From 16a89ed918eda0bb4123b007723cd1f2457493c3 Mon Sep 17 00:00:00 2001 From: "wangxubin@yeah.net" Date: Wed, 24 Aug 2022 11:08:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../raiseReatment/components/index.vue | 121 +++- src/pages/eashier/service/passcode.vue | 1 + src/pages/eashier/service/payment.vue | 97 ++- src/pages/eashier/service/service.vue | 644 ++++++++++++------ src/pages/promotion/group/components/edit.vue | 16 +- 5 files changed, 607 insertions(+), 272 deletions(-) diff --git a/src/pages/eashier/raiseReatment/components/index.vue b/src/pages/eashier/raiseReatment/components/index.vue index e1bdf29..d19c9f3 100644 --- a/src/pages/eashier/raiseReatment/components/index.vue +++ b/src/pages/eashier/raiseReatment/components/index.vue @@ -37,7 +37,6 @@ @click='openPro(1)'>添加 -
总金额 : {{ outMoneys }}
撤销 -
总金额 : {{ inMoneys }}
+
成交金额 : {{ inMoneys }}
+
转入金额 : {{ outMoneys }}
+
现付金额 : {{ payMoneys }}
+
欠款金额金额 : {{ debtMoney }}
- - + @@ -135,12 +136,20 @@ {{ scope.row.payMoney }} - +
+ +
合计
+
+
现付金额为:
+
{{ payMoneys }}
+
+ + @@ -194,11 +203,13 @@ export default { }, }, projectDialogVisible: false, + shows: false, recDateShow: false, activeName: "现付", outMoneyIndex: -1, inNumberIndex: -1, inNumberIndexs: -1, + payMoneys: 0, proForm: { additionDate: null, manageStaffName: null, @@ -393,21 +404,16 @@ export default { if (this.openProText == 0) { (form.priceMember * form.minumumTimes).toFixed(2) * 1; form.prices = form.priceMember - form.changeInTime = form.minumumTimes; + form.changeInTime = 0; form.projectId = form.id; form.debtMoney = 0; form.transactionMoney = form.changeInMoney; form.changeInMoneyShow = false; form.debtMoneyShow = false; form.changeInCaseTimeShow = false; - let num = 0; - this.outList.forEach((item) => { - num = num + item.changeOutMoney - }); - form.changeInMoney = num - form.changeInMoney if (this.inList.length < 1) { this.inList.push(form); + this.inMoneys = 0; } else { this.$alert("只能选择一个项目进行转入", "提示", { confirmButtonText: "确定", @@ -428,8 +434,9 @@ export default { form.changeOutTimeShow = false; form.accountId = form.id; this.outList.push(form); + this.sumMoney(); } - this.sumMoney(); + // }, //查询会员信息 memberOne() { @@ -471,12 +478,6 @@ export default { //选择金额. editPay(row, index) { - // if (this.debtMoney < 0) { - // this.$message.error({ - // message: "支付金额已超出 , 无需进行现付 !", - // }); - // } else { - console.log(row) var form = { ...row, @@ -485,21 +486,36 @@ export default { var payLists = [...this.proForm.payLists]; payLists[index] = form; form.isShow = true; - form.payMoney = (this.debtMoney + form.payMoney).toFixed(2) * 1; this.proForm.payLists = []; this.proForm.payLists = payLists; + console.log(this.proForm.payLists) this.sumMoney() // } }, endEdit(row) { - console.log(row); - console.log(this.inList); - if (row.payMoney) { + + if (row.payMoney && row.payMoney <= this.debtMoney) { row.payMoney = row.payMoney * 1; } else { - row.payMoney = 0; + if (row.payMoney > this.debtMoney) { + this.$alert("现付金额大于需付金额,已将金额调整适合金额", "提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => { }, + }); + } + row.payMoney = this.debtMoney; } row.isShow = false; + this.shows = false; + // this.endEditTimes() + this.sumMoney() + }, + endEdits() { + this.shows = true, + this.sumMoney() }, openPro(num) { this.openProText = num; @@ -596,9 +612,9 @@ export default { num = num + item.changeOutMoney }); this.outMoneys = num; - if(this.outList.length!=0){ - this.inList[0].changeInMoney=num - } + // if(this.outList.length!=0){ + // this.inList[0].changeInMoney=num + // } }, openOutMoney(row, index) { @@ -638,6 +654,19 @@ export default { row.transactionMoney = row.changeInMoney; this.inNumberIndex = -1; this.sumMoney(); + if (this.outMoneys > row.changeInMoney) { + this.$alert("成交金额不能小于转入金额: ", "提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => { }, + }); + this.inList[0].changeInTime = 0 + this.inList[0].transactionMoney = 0 + this.sumMoney(); + } + }, endEditprices(row, index) { // if (row.changeInTime < row.minumumTimes) { @@ -646,10 +675,41 @@ export default { // }); // row.changeInTime = row.minumumTimes; // } + if (row.minumumPriceMember > row.prices) { + this.$alert("单价不可以低于最低单价: ", "提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => { }, + + }); + row.prices = row.minumumPriceMember + } else if (row.priceMember < row.prices) { + this.$alert("单价不可以高于标准单价: ", "提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => { }, + }); + row.prices = row.priceMember + } + row.changeInMoney = (row.prices * row.changeInTime).toFixed(2) * 1; row.transactionMoney = row.changeInMoney; this.inNumberIndexs = -1; this.sumMoney(); + if (this.outMoneys > row.changeInMoney) { + this.$alert("成交金额不能小于转入金额,请修改单价或者转入次数: ", "提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => { }, + }); + this.sumMoney(); + } }, projectRadio(row) { if (row) { @@ -674,6 +734,7 @@ export default { }); this.outMoneys = outMoneys.toFixed(2) * 1; this.inMoneys = inMoneys.toFixed(2) * 1; + this.payMoneys = payMoneys.toFixed(2) * 1; if (inMoneys != 0) { this.debtMoney = (inMoneys - outMoneys - payMoneys - debtMoney).toFixed(2) * 1; diff --git a/src/pages/eashier/service/passcode.vue b/src/pages/eashier/service/passcode.vue index e6de099..3ca1139 100644 --- a/src/pages/eashier/service/passcode.vue +++ b/src/pages/eashier/service/passcode.vue @@ -133,6 +133,7 @@ export default { if (res.data == true) { this.$message.success({ message: "密码正确!" }); this.$emit("passcodeData", this.file); + console.log(this.file) this.paymentcodeDialog = false; } else { this.$alert("密码错误", "提示", { diff --git a/src/pages/eashier/service/payment.vue b/src/pages/eashier/service/payment.vue index 84efc2b..ef7184d 100644 --- a/src/pages/eashier/service/payment.vue +++ b/src/pages/eashier/service/payment.vue @@ -1,15 +1,17 @@