|
@@ -112,7 +112,7 @@ export default {
|
|
// }
|
|
// }
|
|
// 消费减免(拆分部分)提示文本
|
|
// 消费减免(拆分部分)提示文本
|
|
reduceSplitMessage() {
|
|
reduceSplitMessage() {
|
|
- // console.log(106, this.reduceHours);
|
|
|
|
|
|
+// console.log(106, this.reduceHours);
|
|
if (!this.enableConsumeNonSplit) {
|
|
if (!this.enableConsumeNonSplit) {
|
|
return `选择${this.reduceHours}小时,`;
|
|
return `选择${this.reduceHours}小时,`;
|
|
}
|
|
}
|
|
@@ -254,10 +254,10 @@ export default {
|
|
// this.consume.
|
|
// this.consume.
|
|
}
|
|
}
|
|
this.isReduces = this.consume.hasOwnProperty('selected') || this.consume.hasOwnProperty('defaultSelected') ? false : true;
|
|
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;
|
|
|
|
|
|
+ this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
|
|
if (JSON.stringify(this.consume) !== '{}') {
|
|
if (JSON.stringify(this.consume) !== '{}') {
|
|
const isSelected = this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected;
|
|
const isSelected = this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected;
|
|
- this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : this.consume.defaultDiscountTime;
|
|
|
|
|
|
+ this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
|
|
// const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee) / hourPrice
|
|
// const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee) / hourPrice
|
|
// if (remainingLimitToIncrease) {
|
|
// if (remainingLimitToIncrease) {
|
|
// this.maxReduceDiscountInit();
|
|
// this.maxReduceDiscountInit();
|