|
@@ -311,6 +311,10 @@ export default {
|
|
|
const { maxConsumeTime, remainConsumeTime, hourPrice, maxOneTimeDiscountTime } = this.orderDetail.parkingRule;
|
|
|
|
|
|
const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee || 0) / hourPrice;
|
|
|
+ const couponsDiscountFee = this.orderDetail?.discountInfo?.coupons?.reduce((acc, elm) => {
|
|
|
+ const selected = elm.hasOwnProperty('selected') ? elm.selected : elm.defaultSelected;
|
|
|
+ return selected ? acc + elm.discountFee : acc;
|
|
|
+ }, 0) || 0;
|
|
|
// 如果是浦东的话, 重新计算优惠
|
|
|
if (this.parkMallCode === 1 || this.parkMallCode === 0) {
|
|
|
/*
|
|
@@ -366,6 +370,17 @@ export default {
|
|
|
// }
|
|
|
return
|
|
|
}
|
|
|
+ // && this.checkedList.includes('reduces')
|
|
|
+ if(this.enableConsumeNonSplit && this.parkMallCode === 4) {
|
|
|
+ const memberGradeDiscountFee = this.checkedList.includes('member') ? this.memberGrade.discountFee : 0
|
|
|
+ // 去除电子券、会员等级,获的消费减免可用的上限
|
|
|
+ const consumeDiscountFee = (this.orderDetail.parkingRule.availableDiscountFee - (couponsDiscountFee + memberGradeDiscountFee)) / hourPrice
|
|
|
+ if (consumeDiscountFee <= this.consume.maxDiscountTime) {
|
|
|
+ this.maxReduceDiscount = consumeDiscountFee
|
|
|
+ this.reduceHours = consumeDiscountFee
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!remainingLimitToIncrease) {
|
|
|
// if(!this.consume.selected) {
|
|
|
// this.isReduces = true
|
|
@@ -391,10 +406,6 @@ export default {
|
|
|
this.maxReduceDiscount = maxReduceDiscount <= remainConsumeTime ? maxReduceDiscount : remainConsumeTime
|
|
|
this.maxReduceDiscount = this.maxReduceDiscount > maxDiscountTime ? maxDiscountTime: this.maxReduceDiscount
|
|
|
if(this.checkedList.includes('member')) {
|
|
|
- const couponsDiscountFee = this.orderDetail?.discountInfo?.coupons?.reduce((acc, elm) => {
|
|
|
- const selected = elm.hasOwnProperty('selected') ? elm.selected : elm.defaultSelected;
|
|
|
- return selected ? acc + elm.discountFee : acc;
|
|
|
- }, 0) || 0;
|
|
|
// 去除电子券、会员等级,获的消费减免可用的上限
|
|
|
const consumeDiscountFee = (this.orderDetail.parkingRule.availableDiscountFee - (couponsDiscountFee + this.memberGrade.discountFee)) / hourPrice
|
|
|
if (consumeDiscountFee < this.maxReduceDiscount) {
|
|
@@ -481,6 +492,7 @@ export default {
|
|
|
this.maxReduceDiscountInit();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
// 如果不是沈阳
|
|
|
if (this.parkMallCode !== 4 && this.parkMallCode !== 6) {
|
|
|
const [isCrossMessage = false, maxReduceDiscount = this.maxReduceDiscount] = this.crossMessage();
|
|
@@ -490,6 +502,9 @@ export default {
|
|
|
this.isMember = false;
|
|
|
}
|
|
|
}
|
|
|
+ if(this.enableConsumeNonSplit && this.parkMallCode == 4) {
|
|
|
+ this.maxReduceDiscountInit();
|
|
|
+ }
|
|
|
},
|
|
|
async reducesClick() {
|
|
|
await waitByTime(200)
|