From 68defbe491894e01c4402922de33c39633fca091 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 29 Mar 2022 14:25:54 +0800
Subject: [PATCH] 系统名称
---
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html | 54 +++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
index 45d6218..70680aa 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/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>
@@ -256,11 +257,15 @@
label="收款">
</el-table-column>
<el-table-column
- prop="t3"
+ prop="payMethod"
+ label="支付方式">
+ </el-table-column>
+ <el-table-column
+ prop="achieveType"
label="业绩类型">
</el-table-column>
<el-table-column
- prop="t1"
+ prop="goodsCash"
label="原业绩">
</el-table-column>
<el-table-column
@@ -401,6 +406,10 @@
<el-table-column
prop="payMethod"
label="支付方式">
+ </el-table-column>
+ <el-table-column
+ prop="cardName"
+ label="储值卡名称">
</el-table-column>
<el-table-column
prop="flowNo"
@@ -544,7 +553,16 @@
created : function() {
let _this = this;
this.orderParam = /*[[${orderParam}]]*/
- this.queryOrderDetailData(this.orderParam);
+ var orderId = /*[[${orderId}]]*/
+ var orderNo = /*[[${orderNo}]]*/
+
+ var param = {};
+ if(orderId) {
+ param.id = orderId;
+ } else {
+ param.orderNo = orderNo;
+ }
+ this.queryOrderDetailData(param);
// 业绩类型
AjaxProxy.requst({
app: _this,
@@ -570,7 +588,7 @@
let _this = this;
AjaxProxy.requst({
app: _this,
- data: {id: param, orderNo:param},
+ data: param,
contentType: 'application/x-www-form-urlencoded',
url: basePath + '/admin/order/findOrderDetailByIdOrNo',
callback: function (data) {
@@ -611,7 +629,7 @@
//获取用户列表
AjaxProxy.requst({
app: _this,
- url: basePath + '/admin/shopAll',
+ url: basePath + '/admin/all',
callback: function (data) {
_this.userList = data.rows;
}
@@ -664,6 +682,10 @@
}
_this.data.items = dataItems;
+ _this.data.zkTotal = _this.refundMoney;
+ _this.data.total = _this.total;
+
+
AjaxProxy.requst({
app: _this,
data: _this.data,
@@ -672,7 +694,9 @@
callback: function (data) {
_this.isRefund = false;
_this.dialogSettleVisible = false;
- _this.queryOrderDetailData(_this.data.oldOrderId);
+ var param = {};
+ param.id = _this.data.oldOrderId;
+ _this.queryOrderDetailData(param);
}
});
@@ -717,6 +741,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]
@@ -732,6 +757,8 @@
}
_this.refundMoney += parseFloat(item.refundPrice * item.refundCount);
+ //记录一下未优惠之前的价格
+ _this.total += parseFloat(item.price * item.refundCount);
}
}
@@ -742,7 +769,7 @@
_this.dialogSettleVisible = true;
},
calOrderTotalFormatter(row, column) {
- return row.count * row.price;
+ return (row.count * row.zkPrice).toFixed(2);
},
getVipMoneyCards() {
let _this = this;
@@ -903,7 +930,8 @@
console.log("校验业绩是否大于订单收款金额");
let jsqMap={};
let isOk=true;
- this.achieveItems.forEach(achieve=>{
+ for(let i=0 ; i< this.achieveItems.length; i++){
+ let achieve=this.achieveItems[i];
if(!isNaN(achieve.goodsCash) ){
key=achieve.achieveType+achieve.orderItemId;
if(!jsqMap[key]){
@@ -914,14 +942,14 @@
if(jsqMap[key]>achieve.zkTotal) {
this.$message.error("【"+achieve.goodsName + "】业绩分配金额大于支付金额");
isOk = false;
- return;
+ break;
}
}else{
this.$message.error("【"+achieve.goodsName + "】业绩分配金额请填写数字");
isOk=false;
- return;
+ break;
}
- });
+ }
console.log("isOk",isOk);
return isOk;
},
@@ -952,7 +980,7 @@
title: "打印订单",
area: ['250px', '550px'],
maxmin: true,
- content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id]
+ content: [basePath + '/admin/order/printOrder?id=' + id]
});
},
handleClick() {
--
Gitblit v1.9.1