Просмотр исходного кода

Merge pull request #386 from John-Hong/John/release-3.0.0/SCRM-5416

fix(SCRM-5450): 当consume.defaultDiscountTime为0时,不去重新赋值
John-Hong 1 год назад
Родитель
Сommit
5ee0518331

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

@@ -251,7 +251,7 @@ export default {
         // this.consume.
       }
       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 : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
+      this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : this.consume.defaultDiscountTime;
       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);

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

@@ -254,7 +254,7 @@ export default {
         // this.consume.
       }
       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 : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
+      this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : this.consume.defaultDiscountTime;
       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);