|
@@ -41,6 +41,9 @@ export default {
|
|
maxOneDayCoupons: ( state ) => state.order.maxOneDayCoupons,// 仅限杭州当日电子券可选上限
|
|
maxOneDayCoupons: ( state ) => state.order.maxOneDayCoupons,// 仅限杭州当日电子券可选上限
|
|
paperDiscountFee: ( state ) => state.order.paperDiscountFee,// 纸质券的优惠金额
|
|
paperDiscountFee: ( state ) => state.order.paperDiscountFee,// 纸质券的优惠金额
|
|
}),
|
|
}),
|
|
|
|
+ totalFeeInYuan() {
|
|
|
|
+ return this?.orderDetail?.parkingRecord?.totalFee / 100
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -122,7 +125,7 @@ export default {
|
|
checkboxItemChange(name, index) {
|
|
checkboxItemChange(name, index) {
|
|
const coupon = this.couponList[index];
|
|
const coupon = this.couponList[index];
|
|
if ( coupon.disabled ) {
|
|
if ( coupon.disabled ) {
|
|
- if(!this.actualPayFee) {
|
|
|
|
|
|
+ if (this.totalFeeInYuan - this.paperDiscountFee - this.remainPrice < 1) {
|
|
Toast('当前无需追加优惠')
|
|
Toast('当前无需追加优惠')
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -144,7 +147,8 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
// 如果有选中项
|
|
// 如果有选中项
|
|
- if(!this.actualPayFee) {
|
|
|
|
|
|
+ // 还需支付金额 = 总金额 - 优惠金额
|
|
|
|
+ if (this.totalFeeInYuan - this.paperDiscountFee - this.remainPrice < 1) {
|
|
Toast('当前无需追加优惠')
|
|
Toast('当前无需追加优惠')
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -334,7 +338,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 深圳超限处理
|
|
// 深圳超限处理
|
|
- if ([5, 10].indexOf(parkMallCode) > -1 && this.remainPrice >= this.newAvailableDiscountFee) {
|
|
|
|
|
|
+ if ([5, 10].indexOf(parkMallCode) > -1 && this.remainPrice >= this.availableDiscountFee) {
|
|
if ( showMsg ) return true
|
|
if ( showMsg ) return true
|
|
return Toast({
|
|
return Toast({
|
|
message: `优惠券已达当日使用上限,不可再用`,
|
|
message: `优惠券已达当日使用上限,不可再用`,
|
|
@@ -344,7 +348,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
// 单日上限
|
|
// 单日上限
|
|
- if (oneDayLimitation && this.remainPrice >= this.newAvailableDiscountFee) {
|
|
|
|
|
|
+ if (oneDayLimitation && this.remainPrice >= this.availableDiscountFee) {
|
|
if ( showMsg ) return true
|
|
if ( showMsg ) return true
|
|
return Toast({
|
|
return Toast({
|
|
message: [5, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
|
|
message: [5, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
|