|
@@ -234,7 +234,7 @@ export default {
|
|
const { maxConsumeTime, remainConsumeTime, hourPrice } = this.orderDetail.parkingRule;
|
|
const { maxConsumeTime, remainConsumeTime, hourPrice } = this.orderDetail.parkingRule;
|
|
// 如果积分存在的话,则移除积分的优惠
|
|
// 如果积分存在的话,则移除积分的优惠
|
|
if (JSON.stringify(points) !== {}) {
|
|
if (JSON.stringify(points) !== {}) {
|
|
- this.remainPrice = this.usingTotalDiscount - points[0].discountFee;
|
|
|
|
|
|
+ this.remainPrice = this.parkMallCode !== 1 ? this.usingTotalDiscount - points[0].discountFee : this.usingTotalDiscount;
|
|
}
|
|
}
|
|
this.memberGrade = { ...memberGrade[0] };
|
|
this.memberGrade = { ...memberGrade[0] };
|
|
this.consume = { ...consume[0] };
|
|
this.consume = { ...consume[0] };
|
|
@@ -286,11 +286,22 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
maxReduceDiscountInit() {
|
|
maxReduceDiscountInit() {
|
|
|
|
+ const {maxDiscountTime} = this.consume
|
|
if(JSON.stringify(this.consume) === '{}' || !this.consume.hasOwnProperty('redeemSalesAmount')) {
|
|
if(JSON.stringify(this.consume) === '{}' || !this.consume.hasOwnProperty('redeemSalesAmount')) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- const { maxConsumeTime, remainConsumeTime, hourPrice } = this.orderDetail.parkingRule;
|
|
|
|
- const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee) / hourPrice
|
|
|
|
|
|
+ const { maxConsumeTime, remainConsumeTime, hourPrice, maxOneTimeDiscountTime } = this.orderDetail.parkingRule;
|
|
|
|
+
|
|
|
|
+ const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee || 0) / hourPrice;
|
|
|
|
+ // 如果是浦东的话, 重新计算优惠
|
|
|
|
+ if (this.parkMallCode === 1) {
|
|
|
|
+ /*if(this.checkedList.indexOf('reduces') < 0) {
|
|
|
|
+ this.maxReduceDiscount = this.maxReduceDiscount > maxDiscountTime ? maxDiscountTime: this.maxReduceDiscount
|
|
|
|
+ return
|
|
|
|
+ }*/
|
|
|
|
+ this.maxReduceDiscount = this.remainPrice / hourPrice < remainConsumeTime ? remainConsumeTime : this.maxReduceDiscount
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (!remainingLimitToIncrease) {
|
|
if (!remainingLimitToIncrease) {
|
|
// if(!this.consume.selected) {
|
|
// if(!this.consume.selected) {
|
|
// this.isReduces = true
|
|
// this.isReduces = true
|
|
@@ -298,7 +309,6 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.isReduces = false
|
|
this.isReduces = false
|
|
- const {maxDiscountTime} = this.consume
|
|
|
|
if (this.remainPrice >= this.availableDiscountFee) {
|
|
if (this.remainPrice >= this.availableDiscountFee) {
|
|
// console.log('过大', this.maxReduceDiscount, remainingLimitToIncrease);
|
|
// console.log('过大', this.maxReduceDiscount, remainingLimitToIncrease);
|
|
this.maxReduceDiscount = this.maxReduceDiscount - remainingLimitToIncrease > maxDiscountTime ? maxDiscountTime : this.maxReduceDiscount - remainingLimitToIncrease
|
|
this.maxReduceDiscount = this.maxReduceDiscount - remainingLimitToIncrease > maxDiscountTime ? maxDiscountTime : this.maxReduceDiscount - remainingLimitToIncrease
|