Browse Source

feat(SCRM-7245): 兼容电子券过低的场景

john 9 tháng trước cách đây
mục cha
commit
9e9693e1cf
1 tập tin đã thay đổi với 10 bổ sung5 xóa
  1. 10 5
      src/pages/parkingFeeV2/mixins/parkingFeeCoupon.js

+ 10 - 5
src/pages/parkingFeeV2/mixins/parkingFeeCoupon.js

@@ -270,10 +270,12 @@ export default {
             const elm = {
               ...this.couponList[elmIndex]
             }
-            this.$set(this.couponList, elmIndex , {
-              ...elm,
-              disabled:  elmIndex !== index
-            })
+            if(elm.name) {
+              this.$set(this.couponList, elmIndex , {
+                ...elm,
+                disabled:  elmIndex !== index
+              })
+            }
           })
         break;
         case '2': // 同类型可叠加
@@ -302,7 +304,10 @@ export default {
             } else {
               elm.disabled = true; // 非同批次的优惠券设置为不可选择
             }
-            this.$set(this.couponList, elmIndex , {...elm})
+            if(elm.name) {
+              this.$set(this.couponList, elmIndex , {...elm})
+            }
+            
           })
         break;
       }