- 会员等级:{{ getGrade(member.gradeId) }}
+ 会员等级:{{ member.gradeId?getGrade(member.gradeId):'未知' }}
@@ -526,18 +526,25 @@ import {
},
// 选择会员
chooseUser(mobile,id){
- this.dialogVisiblevip = false
- this.isMember = true;
- // this.map.payUser = mobile;
- // this.map.userId = id;
- this.balance = this.member.cardBalance;
- if (this.balance>=(this.oilAmount - this.oilDiscount)){
- this.consumeAmount = this.oilAmount - this.oilDiscount;
- this.oilActualPay = 0;
+ console.log("this.member",this.member)
+ if (this.member.id) {
+ this.dialogVisiblevip = false
+ this.isMember = true;
+ // this.map.payUser = mobile;
+ // this.map.userId = id;
+ this.balance = this.member.cardBalance;
+ if (this.balance>=(this.oilAmount - this.oilDiscount)){
+ this.consumeAmount = this.oilAmount - this.oilDiscount;
+ this.oilActualPay = 0;
+ }else {
+ this.consumeAmount = this.balance;
+ this.oilActualPay = this.oilAmount - this.oilDiscount - this.balance;
+ }
}else {
- this.consumeAmount = this.balance;
- this.oilActualPay = this.oilAmount - this.oilDiscount - this.balance;
+ this.$message.error('请先选择会员');
+
}
+
},
// 选择会员信息
handleChoose(data){
diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue
index 698b8b28e..edf0c8149 100644
--- a/gasStation-uni/pages/index/index.vue
+++ b/gasStation-uni/pages/index/index.vue
@@ -196,7 +196,7 @@
let storeId = "19";
let staffId = "";
- if (str.includes("&")){
+ if (str.includes("&")) {
let arr = str.split("&");
arr.forEach(item => {
if (item.includes("storeId")) {
@@ -205,17 +205,17 @@
staffId = item.split("=")[1]
}
})
- }else{
+ } else {
storeId = str.split("=")[1]
}
-
+
uni.setStorageSync("storeId", storeId)
uni.setStorageSync("inviteStaffId", staffId)
this.storeId = uni.getStorageSync("storeId")
this.staffId = uni.getStorageSync("inviteStaffId")
uni.showLoading({
- title:uni.getStorageSync("storeId") + "++" +uni.getStorageSync("inviteStaffId") + q
+ title: uni.getStorageSync("storeId") + "++" + uni.getStorageSync("inviteStaffId") + q
})
this.getUserAuthority();
this.getOilType();
@@ -223,7 +223,7 @@
if (uni.getStorageSync("storeId")) {
this.storeId = uni.getStorageSync("storeId")
} else {
- let storeId = "34";
+ let storeId = "12";
uni.setStorageSync("storeId", storeId)
}
@@ -343,7 +343,7 @@
}
},
fail(err) {
-
+
}
})
},
diff --git a/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue b/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue
index c84d6c432..7189baf50 100644
--- a/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue
+++ b/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue
@@ -156,6 +156,8 @@