This commit is contained in:
cun-nan 2024-01-27 11:35:35 +08:00
parent 32cb50848f
commit de750590f1
2 changed files with 32 additions and 23 deletions

View File

@ -1339,16 +1339,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.insertGrowthValueChange(userid,storeId,addGrowthVal,growthAfter,orderNo); this.insertGrowthValueChange(userid,storeId,addGrowthVal,growthAfter,orderNo);
CardBalanceChange cardBalanceChange = new CardBalanceChange(); // CardBalanceChange cardBalanceChange = new CardBalanceChange();
// 添加余额记录信息 //// 添加余额记录信息
cardBalanceChange.setUserId(userid); // cardBalanceChange.setUserId(userid);
cardBalanceChange.setChangeType("0"); // cardBalanceChange.setChangeType("0");
cardBalanceChange.setFromType("油品订单消费"); // cardBalanceChange.setFromType("油品订单消费");
cardBalanceChange.setBalance(oilAmount - oilActualPay); // cardBalanceChange.setBalance(oilAmount - oilActualPay);
cardBalanceChange.setOrderNo(orderNo); // cardBalanceChange.setOrderNo(orderNo);
cardBalanceChange.setStoreId(storeId); // cardBalanceChange.setStoreId(storeId);
//
cardBalanceChangeService.insertCardBalance(cardBalanceChange); // cardBalanceChangeService.insertCardBalance(cardBalanceChange);
} }
} }

View File

@ -214,18 +214,26 @@
methods: { methods: {
getPercentage(id){ getPercentage(id){
let grade = {} let grade = {}
this.userGradeList.forEach(i => { request({
if (this.member.gradeId = i.id){ url: "business/userManager/userGrade/" + this.member.gradeId,
grade = i method: 'get',
} }).then((res) => {
}) grade = res.data
console.log(this.member); this.userGradeList.forEach(item => {
this.userGradeList.forEach(item => { if (item.id == id){
console.log(item); if (grade.grade > item.grade){
if (item.id == id){ this.percentage = 100
// this.percentage = }
} if (grade.grade < item.grade){
this.percentage = 0
}
if (grade.grade == item.grade){
this.percentage = ((this.member.growthValue / item.growthValue) * 100).toFixed(0)
}
}
})
}) })
}, },
// //
getMember(){ getMember(){
@ -234,7 +242,7 @@
method: 'get', method: 'get',
}).then((res) => { }).then((res) => {
this.member = res.data this.member = res.data
console.log(this.member,1111); this.getPercentage(this.userGrade.id)
}) })
}, },
getChainConfig(storeId){ getChainConfig(storeId){
@ -272,7 +280,7 @@
this.dieselRule = JSON.parse(res.data[0].dieselRule) this.dieselRule = JSON.parse(res.data[0].dieselRule)
this.naturalGasRule = JSON.parse(res.data[0].naturalGasRule) this.naturalGasRule = JSON.parse(res.data[0].naturalGasRule)
} }
this.getPercentage(res.data[0].id) // this.getPercentage(res.data[0].id)
}else{ }else{
this.isExist = false this.isExist = false
} }
@ -286,6 +294,7 @@
this.dieselRule = JSON.parse(this.userGradeList[this.current].dieselRule) this.dieselRule = JSON.parse(this.userGradeList[this.current].dieselRule)
this.naturalGasRule = JSON.parse(this.userGradeList[this.current].naturalGasRule) this.naturalGasRule = JSON.parse(this.userGradeList[this.current].naturalGasRule)
} }
this.getPercentage(this.userGrade.id)
}, },
goBack() { goBack() {
uni.navigateBack() uni.navigateBack()