Explorar el Código

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

john hace 1 año
padre
commit
3ea32f3f0d
Se han modificado 1 ficheros con 12 adiciones y 1 borrados
  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;