This commit is contained in:
cun-nan 2024-01-16 14:19:08 +08:00
parent cac79ebfa9
commit 41bf52b5bf

View File

@ -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();
}
}
},
//