Commit a828c9de authored by youjie's avatar youjie

包车优惠券

parent c4c4c4b0
......@@ -696,6 +696,7 @@
this.useCouponIds = []
}
this.showCoupon = false;
this.CalTotalPrice();
},
calcMaxCouponHandle() {
if (this.couponList && this.couponList.length > 0) {
......@@ -703,14 +704,14 @@
let discount = 0
const money = this.price
this.couponList.forEach(x => {
if (x.couponsType == 1 && x.denomination > discount && (this.orderMsg.AdultPeopleNum >= x
if (x.couponsType == 1 && x.denomination > discount && (this.orderMsg.PeopleNum >= x
.orderGuestNum || !x.orderGuestNum)) {
discount = x.denomination
maxCouponId = x.id
}
if (x.couponsType == 2) {
let disMoney = money * (1 - x.denomination)
if (discount < disMoney && (this.orderMsg.AdultPeopleNum >= x.orderGuestNum || !x
if (discount < disMoney && (this.orderMsg.PeopleNum >= x.orderGuestNum || !x
.orderGuestNum)) {
discount = disMoney
maxCouponId = x.id
......@@ -794,8 +795,8 @@
} else {
this.orderMsg.Num++;
}
this.getUserCouponList()
// this.CalTotalPrice();
if(this.currentCoupon.discountMoney>0) this.calcMaxCouponHandle();
else this.CalTotalPrice();
},
formatDate(str) {
let temp = str.split("-");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment