Browse Source

fix(SCRM-4016): 临时停车,用户有会员等级减免。当用户的缴费金额小于消费减免。会员等级置灰,用户无法点击

john 2 years ago
parent
commit
78c9da91ff
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/pages/parkingFee/mixins/parkingFeeDiscounts.js

+ 2 - 4
src/pages/parkingFee/mixins/parkingFeeDiscounts.js

@@ -128,16 +128,14 @@ export default {
         this.enableConsumeSplit = this.orderDetail.parkingRule.enableConsumeSplit;
       }
       this.checkedList = [];
-      const { memberGrade = [], consume = [], memberLevelDiscount } = this.orderDetail.discountInfo;
+      const { memberGrade = [{}], consume = [], memberLevelDiscount } = this.orderDetail.discountInfo;
       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) {
         this.checkedList.push('member');
-        this.isMember = false;
-      } else {
-        this.isMember = true;
       }
+      this.isMember = JSON.stringify(this.memberGrade) === '{}';
       // console.log(140, this.consume, this.consume.hasOwnProperty('selected'), JSON.stringify(this.consume) !== '{}' && this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected, this.consume.defaultSelected)
       // console.log(143, JSON.stringify(this.consume) !== '{}' && this.consume.hasOwnProperty('selected') ? this.consume.selected !== undefined : this.consume.defaultSelected !== undefined);
       if (JSON.stringify(this.consume) !== '{}' && this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected !== undefined) {