|
@@ -129,7 +129,7 @@ export default {
|
|
|
}
|
|
|
this.checkedList = [];
|
|
|
const { memberGrade = [], consume = [], memberLevelDiscount } = this.orderDetail.discountInfo;
|
|
|
- const { maxConsumeTime } = this.orderDetail.parkingRule;
|
|
|
+ const { maxConsumeTime,remainConsumeTime } = this.orderDetail.parkingRule;
|
|
|
this.memberGrade = { ...memberGrade[0] };
|
|
|
this.consume = { ...consume[0] };
|
|
|
if (JSON.stringify(this.memberGrade) !== '{}' && this.memberGrade && this.memberGrade.hasOwnProperty('selected') ? this.memberGrade.selected : this.memberGrade.defaultSelected) {
|
|
@@ -148,8 +148,8 @@ export default {
|
|
|
}
|
|
|
this.isReduces = this.consume.hasOwnProperty('selected') || this.consume.hasOwnProperty('defaultSelected') ? false : true;
|
|
|
this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : this.consume.defaultDiscountTime;
|
|
|
- if (maxConsumeTime) {
|
|
|
- this.maxReduceDiscount = maxConsumeTime;
|
|
|
+ if (remainConsumeTime) {
|
|
|
+ this.maxReduceDiscount = remainConsumeTime;
|
|
|
}
|
|
|
this.oldCheckedList = [...this.checkedList];
|
|
|
},
|
|
@@ -183,12 +183,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
memberClick() {
|
|
|
- const { maxConsumeTime } = this.orderDetail.parkingRule;
|
|
|
+ const { maxConsumeTime, remainConsumeTime } = this.orderDetail.parkingRule;
|
|
|
if (this.checkedList.indexOf('member') > -1) {
|
|
|
this.remainPrice = this.memberGrade.discountFee + this.remainPrice;
|
|
|
} else if (!this.isMember) {
|
|
|
this.remainPrice = this.remainPrice - this.memberGrade.discountFee;
|
|
|
- this.maxReduceDiscount = maxConsumeTime;
|
|
|
+ this.maxReduceDiscount = remainConsumeTime;
|
|
|
}
|
|
|
const [isCrossMessage = false, maxReduceDiscount = this.maxReduceDiscount] = this.crossMessage();
|
|
|
if (isCrossMessage) {
|
|
@@ -198,7 +198,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
reducesClick() {
|
|
|
- const { maxOneTimeDiscountTime, hourPrice, oneTimeLimitation, maxConsumeTime, oneDayLimitation, maxOneDayDiscountFee } = this.orderDetail.parkingRule;
|
|
|
+ const { maxOneTimeDiscountTime, hourPrice, oneTimeLimitation, maxConsumeTime,remainConsumeTime, oneDayLimitation, maxOneDayDiscountFee } = this.orderDetail.parkingRule;
|
|
|
const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice;
|
|
|
/*if ( oneTimeLimitation && this.remainPrice >= maxOneTimeDiscountFee ) {
|
|
|
this.checkedList = this.checkedList.filter(elm => elm !== 'reduces')
|
|
@@ -212,10 +212,10 @@ export default {
|
|
|
if (this.checkedList.indexOf('reduces') > -1) {
|
|
|
this.remainPrice = hourPrice + this.remainPrice;
|
|
|
// 计算最大上限
|
|
|
- this.maxReduceDiscount = maxConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : maxConsumeTime;
|
|
|
+ this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
|
|
|
} else {
|
|
|
this.remainPrice = this.remainPrice - hourPrice;
|
|
|
- this.maxReduceDiscount = maxConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : maxConsumeTime;
|
|
|
+ this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
|
|
|
// this.reduceHours = maxConsumeTime;
|
|
|
}
|
|
|
const [isCrossMessage = false, maxReduceDiscount = 0] = this.crossMessage();
|