diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 3db1a0819..579ffc62f 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -1003,6 +1003,8 @@ // 互斥限制 -1没有限制 0满减互斥 1储值卡互斥 exclusion:-1, isExistOilOrder:false, + // 是否存在固定等级会员优惠 + isFixingLevel:false, // 查询优惠活动信息所需参数 preferentialData:{ userId:"", @@ -1416,6 +1418,7 @@ }, // 根据会员等级信息获取等级优惠信息 getGrade(userId,gradeId){ + this.isFixingLevel = false let _this = this; this.oilDiscount = 0; this.gradeDiscount = []; @@ -1429,6 +1432,7 @@ let discount = {type: "", full: 0, reduce: 0, liters: 0} if (item.type == "汽油") { if (response.data.fixingLevel){ + _this.isFixingLevel = true let gasolineRule = JSON.parse(response.data.fixingLevel.gasolineRule).sort((a, b) => a.gasolineRule1 - b.gasolineRule1); if (response.data.fixingLevel.discountType == '自定义优惠' && response.data.fixingLevel.status == 'qy') { if (response.data.fixingLevel.gasolineDiscount == "满减优惠") { @@ -1576,6 +1580,7 @@ } if (item.type == "柴油") { if (response.data.fixingLevel){ + _this.isFixingLevel = true let dieselRule = JSON.parse(response.data.fixingLevel.dieselRule).sort((a, b) => a.dieselRule1 - b.dieselRule1); if (response.data.fixingLevel.discountType == '自定义优惠' && response.data.fixingLevel.status == 'qy') { if (response.data.fixingLevel.dieselDiscount == "满减优惠") { @@ -1723,6 +1728,7 @@ } if (item.type == "天然气") { if (response.data.fixingLevel){ + _this.isFixingLevel = true let naturalGasRule = JSON.parse(response.data.fixingLevel.naturalGasRule).sort((a, b) => a.naturalGasRule1 - b.naturalGasRule1); if (response.data.fixingLevel.discountType == '自定义优惠' && response.data.fixingLevel.status == 'qy') { if (response.data.fixingLevel.naturalGasDiscount == "满减优惠") { @@ -1876,7 +1882,7 @@ }) }, // 选择会员 - chooseUser(data){ + async chooseUser(data){ this.dialogVisiblevip = false this.isMember = true; this.map.payUser = data.mobile; @@ -1887,14 +1893,15 @@ this.refuelMoney = JSON.parse(data.refuelMoney) this.changeRefuelMoney(); }else - this.getGrade(data.id,data.gradeId) - // this.handleChange(); - this.preferentialData.storeId = this.storeId; - this.preferentialData.userId = data.id; - this.preferentialData.gradeId = data.gradeId; - if (this.oilOrder.length>0){ - this.preferential(); - this.getCoupon(); + await this.getGrade(data.id,data.gradeId) + if (!this.isFixingLevel){ + this.preferentialData.storeId = this.storeId; + this.preferentialData.userId = data.id; + this.preferentialData.gradeId = data.gradeId; + if (this.oilOrder.length>0){ + this.preferential(); + this.getCoupon(); + } } }, // 调用优惠券接口