Răsfoiți Sursa

Merge pull request #389 from John-Hong/release-3.0.0

fix(SCRM-5472): 页面展示的消费抵扣时长的计算规则调整
John-Hong 1 an în urmă
părinte
comite
7bf32f0e02

+ 1 - 0
src/pages/parkingFee/mixins/parkingFeeDiscounts.js

@@ -255,6 +255,7 @@ export default {
       if (JSON.stringify(this.consume) !== '{}') {
         const isSelected = this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected;
         this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
+        this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
         // const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee) / hourPrice
         // if (remainingLimitToIncrease) {
         //   this.maxReduceDiscountInit();

+ 1 - 0
src/pages/parkingFeeV2/Discounts/index.js

@@ -258,6 +258,7 @@ export default {
       if (JSON.stringify(this.consume) !== '{}') {
         const isSelected = this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected;
         this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
+        this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
         // const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee) / hourPrice
         // if (remainingLimitToIncrease) {
         //   this.maxReduceDiscountInit();