Procházet zdrojové kódy

feat(KIP-13109): 补充车辆优惠叠加逻辑

john před 1 rokem
rodič
revize
3ea32f3f0d
1 změnil soubory, kde provedl 12 přidání a 1 odebrání
  1. 12 1
      src/pages/parkingFeeV2/Discounts/index.js

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

@@ -409,7 +409,13 @@ export default {
         return;
       }
     },
-    memberClick() {
+    async memberClick() {
+      await waitByTime(200)
+      if(!this.actualPayFee) {
+        Toast('当前无需追加优惠')
+        this.checkedList = this.checkedList.filter(elm => elm !== 'member')
+        return;
+      }
       const { maxConsumeTime, remainConsumeTime, availableDiscountFee, hourPrice } = this.orderDetail.parkingRule;
       if (this.checkedList.indexOf('member') > -1) {
         /* 浦东 */
@@ -459,6 +465,11 @@ export default {
     },
     async reducesClick() {
       await waitByTime(200)
+      if(!this.actualPayFee) {
+        Toast('当前无需追加优惠')
+        this.checkedList = this.checkedList.filter(elm => elm !== 'member')
+        return;
+      }
       // 浦东
       if(this.parkMallCode === 1 && (this.isReduces || !this.maxReduceDiscount) ) {
         return;