From ebbc5dd4c94cd92c0e3bd0f037fee972729821fb 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: Wed, 5 Jun 2024 09:32:34 +0800 Subject: [PATCH] bug --- .../views/cashier/NewComponents/homeindex.vue | 72 ++++++++++--------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index ee6badc05..6f6fa281a 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -3196,53 +3196,55 @@ _this.paymentActive.oilId = item.oilName _this.paymentActive.storeId = item.storeId - getPaymentActive(_this.paymentActive).then(res => { + 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} - let oilData = {oilName:item.oilName,oilPreferential: {}} + let discount = { type: "", discount: 0, oilName: item.oilName, gunName: item.gunName } + let oilData = { oilName: item.oilName, oilPreferential: {} } // this.preferentialData1 = res.data oilData.oilPreferential = res.data _this.oilPreferentialData.push(oilData) // if (_this.consumeRefuelMoney==0){ - if (res.data.memberFavorableAmount){ - discount.discount = res.data.memberFavorableAmount - _this.gradeDiscount.push(discount) - if(!this.isOilStorageCard) { - _this.oilDiscount = res.data.memberFavorableAmount - _this.checkAll2 = true - this.checkedCities2.push(discount.gunName) - } + if (res.data.memberFavorableAmount) { + discount.discount = res.data.memberFavorableAmount + _this.gradeDiscount.push(discount) + if (!this.isOilStorageCard) { + _this.oilDiscount = res.data.memberFavorableAmount + _this.checkAll2 = true + this.checkedCities2.push(discount.gunName) } - if (res.data.cardFavorableAmount){ - discount.discount = res.data.cardFavorableAmount - _this.couponDiscount.push(discount) - if(!this.isOilStorageCard) { - _this.cardFavorableId = res.data.cardFavorableId - _this.recordId = res.data.recordId - _this.couponAmount = res.data.cardFavorableAmount - _this.checkAll5 = true - } + } + if (res.data.cardFavorableAmount) { + discount.discount = res.data.cardFavorableAmount + _this.couponDiscount.push(discount) + if (!this.isOilStorageCard) { + _this.cardFavorableId = res.data.cardFavorableId + _this.recordId = res.data.recordId + _this.couponAmount = res.data.cardFavorableAmount + _this.checkAll5 = true } - if (res.data.activeFavorableAmount){ - discount.discount = res.data.activeFavorableAmount - discount.type = res.data.type - _this.fullReduceDiscount.push(discount) - if(!this.isOilStorageCard) { - _this.fullReduction = res.data.activeFavorableAmount - _this.checkAll1 = true - this.checkedCities1.push(discount.gunName) - } + } + if (res.data.activeFavorableAmount) { + discount.discount = res.data.activeFavorableAmount + discount.type = res.data.type + _this.fullReduceDiscount.push(discount) + if (!this.isOilStorageCard) { + _this.fullReduction = res.data.activeFavorableAmount + _this.checkAll1 = true + this.checkedCities1.push(discount.gunName) } + } // } - if(this.isOilStorageCard){ - this.countAmountFull() + console.log(_this.oilDiscount, 111) + this.countAmountFull() + if (this.isOilStorageCard) { + await this.countAmountFull() } - if (type==1){ - this.countAmountUnBalance() + if (type == 1) { + await this.countAmountUnBalance() } - if (type==0){ - this.countAmountFull() + if (type == 0) { + await this.countAmountFull() } }) })