From 866748d6e6d328a1bc42edc6c86de15950dac8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 6 Jun 2024 11:35:37 +0800 Subject: [PATCH] bug --- .../views/cashier/NewComponents/homeindex.vue | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 6ebaf5759..e861358bd 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -195,10 +195,10 @@
-
囤油卡 -
+
-->
储值卡 @@ -218,7 +218,7 @@
¥{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}
-
优惠合计:{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}元/{{consumeRefuelMoney.toFixed(2)}}L
+
优惠合计:{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}元
立即结算
@@ -1126,7 +1126,7 @@
支付宝
银联二维码
挂账
-
囤油卡
+
储值卡
小程序码
@@ -1147,10 +1147,10 @@
储值卡付款
¥{{ consumeAmount }}
-
+
实付款
¥0.00
@@ -3167,15 +3167,15 @@ }) this.goodsActualPay = this.goodsAmount - this.goodsDiscount; }, - getOilCoupon(){ + async getOilCoupon() { let type = 0; // if (this.consumeAmount==0){ - if (this.consumeRefuelMoney>0){ + if (this.consumeRefuelMoney > 0) { type = 1; - }else { - if (this.consumeAmount>0){ + } else { + if (this.consumeAmount > 0) { type = 0; - }else { + } else { type = 2; } } @@ -3192,12 +3192,12 @@ this.paymentActive.mtUserLevel = this.member.gradeId this.paymentActive.userId = this.member.id let _this = this - this.oilOrder.forEach(item => { + for (const item of this.oilOrder) { _this.paymentActive.amount = item.amount _this.paymentActive.oilId = item.oilName _this.paymentActive.storeId = item.storeId - getPaymentActive(_this.paymentActive).then(async res => { + await getPaymentActive(_this.paymentActive).then(async res => { item.activeId = res.data.activeId item.type = res.data.type let discount = { type: "", discount: 0, oilName: item.oilName, gunName: item.gunName } @@ -3236,7 +3236,7 @@ } } // } - console.log(_this.oilDiscount, 111) + console.log(_this.oilDiscount, _this.couponAmount, _this.fullReduction, 3239) this.countAmountFull() if (this.isOilStorageCard) { await this.countAmountFull() @@ -3248,7 +3248,7 @@ await this.countAmountFull() } }) - }) + } }, // 调用优惠券接口 getCoupon(){ @@ -3877,6 +3877,7 @@ }, // 囤油卡变化后总金额的变化 changeRefuelMoney(){ + this.isOilStorageCard = false getRecord({mtUserId:this.member.id}).then(res => { this.oilCardAmount = 0 let oilAmount = 0 @@ -3889,7 +3890,7 @@ if (item.oilName==i.oilType){ item.lockupPrice = i.lockupPrice amount = item.lockupPrice * item.liters - this.isOilStorageCard = true + if (amount>0) this.isOilStorageCard = true flag = false }else { flag = true @@ -3899,6 +3900,7 @@ if (flag) amount = item.amount oilAmount += amount }) + console.log("3903", this.isOilStorageCard) if (oilAmount>0) this.oilCardAmount = this.oilAmount - oilAmount this.countAmountFull() })