From a72aa4bb793ec765892406c842039a71b33215b1 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 11 Mar 2021 18:12:22 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
index be9c9d9..be177b0 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
@@ -108,7 +108,8 @@
                         </el-col>
                         <el-col :span="14" style="text-align: right;">
                             <label>¥ {{order.total}}</label>
-                            <label>¥ {{(order.zkTotal - order.total).toFixed(2)}}</label>
+                            <!-- 退款订单不能显示为负数 -->
+                            <label>¥ {{(order.zkTotal - order.total>0?order.zkTotal - order.total:0).toFixed(2)}}</label>
                             <label>¥ {{order.zkTotal}}</label>
                             <label>¥ {{order.arrears}}</label>
                             <label>¥ {{order.repay}}</label>
@@ -669,6 +670,7 @@
 
                 _this.data.items = dataItems;
                 _this.data.zkTotal =  _this.refundMoney;
+                _this.data.total =  _this.total;
 
 
                 AjaxProxy.requst({
@@ -724,6 +726,7 @@
                 let _this = this;
                 let items = this.orderItems;
                 _this.refundMoney = 0;
+                _this.total = 0;
 
                 for(var i = 0; i < items.length; i++) {
                     let item = items[i]
@@ -739,6 +742,8 @@
                         }
 
                         _this.refundMoney += parseFloat(item.refundPrice * item.refundCount);
+                        //记录一下未优惠之前的价格
+                        _this.total += parseFloat(item.price * item.refundCount);
                     }
                 }
 
@@ -749,7 +754,7 @@
                 _this.dialogSettleVisible = true;
             },
             calOrderTotalFormatter(row, column) {
-                return row.count * row.price;
+                return row.count * row.zkPrice;
             },
             getVipMoneyCards() {
                 let _this = this;

--
Gitblit v1.9.1