From b25b3fc35b3b938184327e30d95d58f7ae036a69 Mon Sep 17 00:00:00 2001 From: Wangxubin1999 Date: Fri, 21 Oct 2022 17:28:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/eashier/service/service.vue | 31 +++++++-------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/src/pages/eashier/service/service.vue b/src/pages/eashier/service/service.vue index e9804ac..aa6b771 100644 --- a/src/pages/eashier/service/service.vue +++ b/src/pages/eashier/service/service.vue @@ -1844,9 +1844,9 @@ export default { let payLists = []; let rechargeAccountList = []; this.payLists.forEach(item => { - this.payMoneysum = this.payMoneysum * 1 + item.payMoney * 1; + // this.payMoneysum = this.payMoneysum * 1 + item.payMoney * 1; - this.payMoneysums = this.payMoneysum / this.list.length; + // this.payMoneysums = this.payMoneysum / this.list.length; if (item.payMoney > 0) { let items = { @@ -1874,34 +1874,19 @@ export default { } }); - // console.log("🚀 ~ file: service.vue ~ line 1796 ~ addCashConfirm ~ list", list) - // list.forEach(item => { - // console.log(item.collectionAmount) - // collectionAmountsum=item.collectionAmount*1+collectionAmountsum*1; - // }); - // console.log("🚀 ~ file: service.vue ~ line 1800 ~ addCashConfirm ~ collectionAmountsum", collectionAmountsum) + let collectionAmountsum=0 + list.forEach(item => { + collectionAmountsum=item.collectionAmount*1+collectionAmountsum*1; + }); this.formData.append("cashListRequestList", JSON.stringify(list)); // collectionAmount - if (this.payMoneysums != this.appearPrices) { + if (collectionAmountsum==0) { this.$alert("还未进行支付", "提示", { confirmButtonText: "确定", confirmButtonClass: "confirmbtnFalses", type: "warning", center: true, - callback: action => { - this.payMoneysum = 0; - this.payMoneysums = 0; - this.payLists.forEach(item=>{ - item.payMoney=0 - }); - var that = this; - setTimeout(() => { - that.$nextTick(() => { - that.$refs.payment.show(that.form, that.payLists); - }); - }, 500); - - } + callback: action => {} }); this.formData = new FormData(); } else {