Переглянути джерело

fix(SCRM-3796): [DE][C端]临时停车,当天设置60元,用户缴费使用优惠40.再重新缴费,应该只可以使用20元优惠

john 2 роки тому
батько
коміт
ff9413288a

+ 20 - 102
src/api/mockData/checkout.qh10.response.json

@@ -1,121 +1,39 @@
 {
   "parkingRecord": {
-    "vehicleNo": "闽RRRRRY",
-    "enterTime": "2023-05-14 06:28:11",
-    "serviceMin": 300,
-    "totalFee": 10000,
-    "actualPayFee": 45,
-    "thirdPartyId": "bc936575706640cea678c7c320051718",
-    "thirdParkOrderNo": "690bbf8b3fdf49ab888e929373e7ea88",
+    "vehicleNo": "云A22223",
+    "enterTime": "2021-12-02 14:45:11",
+    "serviceMin": 756091,
+    "totalFee": 946000,
+    "actualPayFee": 9440,
+    "thirdPartyId": "fBQ8mW9RJQ4vCJ9ck2hUI",
+    "thirdParkOrderNo": "B7uMkA5gJPW6SGycz1AQz7",
     "createdByQrCode": false,
-    "totalFeeInYuan": 100
+    "totalFeeInYuan": 9460
   },
   "discountInfo": {
-    "usingTotalDiscount": 55,
+    "usingTotalDiscount": 20,
     "memberLevelDiscount": false,
     "points": [
       {
-        "available": 0,
-        "totalAvailable": 1000,
+        "available": 509,
         "maxDiscountFee": 20,
         "pointsPerUnit": 50,
         "unitAmount": 5,
+        "totalAvailable": 509,
         "newMember": false,
-        "label": "已选择兑换20元",
-        "discountFee": 20,
-        "unlimitUsePoints": "UN_LIMIT"
+        "label": "509积分可减免"
       }
     ],
     "coupons": [
       {
-        "code": "bghhx92keb9_t",
-        "couponId": "96c84681fb5c4fd38e3043fab5371964",
-        "name": "首2小时停车券(测试)",
-        "expirationDate": "2023-05-12 23:59:59",
+        "code": "e903c24ggng_t",
+        "couponId": "67a5071cfff34264925b96c578c76184",
+        "name": "首2小时免费停车优惠券",
+        "expirationDate": "2023-05-31 23:59:59",
         "discountFee": 20,
         "defaultSelected": true,
-        "superposition": "2",
+        "superposition": "1",
         "limitCountPerOrder": 1
-      },
-      {
-        "code": "d3jbhhnh624_t",
-        "couponId": "96c84681fb5c4fd38e3043fab5371964",
-        "name": "首2小时停车券(测试)",
-        "expirationDate": "2023-05-12 23:59:59",
-        "discountFee": 20,
-        "defaultSelected": false,
-        "superposition": "2",
-        "limitCountPerOrder": 1
-      },
-      {
-        "code": "i26z1cf0vvm_t",
-        "couponId": "60b9e286414b41ec9c32596bf6f2d0c5",
-        "name": "5元停车券(周末及法定节假日)",
-        "expirationDate": "2023-05-31 23:59:59",
-        "discountFee": 5,
-        "defaultSelected": true,
-        "superposition": "2",
-        "limitCountPerOrder": 2
-      },
-      {
-        "code": "g9ar30c6cpe_t",
-        "couponId": "60b9e286414b41ec9c32596bf6f2d0c5",
-        "name": "5元停车券(周末及法定节假日)",
-        "expirationDate": "2023-05-31 23:59:59",
-        "discountFee": 5,
-        "defaultSelected": true,
-        "superposition": "2",
-        "limitCountPerOrder": 2
-      },
-      {
-        "code": "gw2goi8lgzx_t",
-        "couponId": "60b9e286414b41ec9c32596bf6f2d0c5",
-        "name": "5元停车券(周末及法定节假日)",
-        "expirationDate": "2023-05-31 23:59:59",
-        "discountFee": 5,
-        "defaultSelected": true,
-        "superposition": "2",
-        "limitCountPerOrder": 2
-      },
-      {
-        "code": "g9ar30c6cpe_t",
-        "couponId": "60b9e286414b41ec9c32596bf6f2d0c5",
-        "name": "5元停车券(周末及法定节假日)",
-        "expirationDate": "2023-05-31 23:59:59",
-        "discountFee": 5,
-        "defaultSelected": true,
-        "superposition": "2",
-        "limitCountPerOrder": 2
-      },
-      {
-        "code": "gw2goi8lgzx_t",
-        "couponId": "60b9e286414b41ec9c32596bf6f2d0c5",
-        "name": "5元停车券(周末及法定节假日)",
-        "expirationDate": "2023-05-31 23:59:59",
-        "discountFee": 5,
-        "defaultSelected": true,
-        "superposition": "2",
-        "limitCountPerOrder": 2
-      },
-      {
-        "code": "g9ar30c6cpe_t",
-        "couponId": "60b9e286414b41ec9c32596bf6f2d0c5",
-        "name": "5元停车券(周末及法定节假日)",
-        "expirationDate": "2023-05-31 23:59:59",
-        "discountFee": 5,
-        "defaultSelected": true,
-        "superposition": "2",
-        "limitCountPerOrder": 2
-      },
-      {
-        "code": "gw2goi8lgzx_t",
-        "couponId": "60b9e286414b41ec9c32596bf6f2d0c5",
-        "name": "5元停车券(周末及法定节假日)",
-        "expirationDate": "2023-05-31 23:59:59",
-        "discountFee": 5,
-        "defaultSelected": true,
-        "superposition": "2",
-        "limitCountPerOrder": 2
       }
     ]
   },
@@ -125,15 +43,15 @@
     "enablePoints": true,
     "enableCoupon": true,
     "enablePaperCoupons": false,
-    "maxPointsTime": 101,
+    "maxPointsTime": 10,
     "enableConsume": false,
     "enableConsumeSplit": false,
-    "availableDiscountFee": 60,
+    "availableDiscountFee": 20,
     "hourPrice": 5
   },
   "parkInfo": {
     "parkName": "深圳前海湾停车场",
-    "description": "15分钟内免费,首小时15元,其后每小时5元,全天封顶60元。\n嘉湾汇会员停车礼遇:\n银卡:每月可免费领取2张首2小时停车券\n金卡:每月可免费领取5张首2小时停车券\n铂金卡:每月可免费领取10张首2小时停车券\n*数量有限,领完即止\n仅限开具一个月内的停车费电子发票 ",
+    "description": "基础计费规则:\n15分钟内免费,首小时15元,其后每小时5元,全天封顶60元。\n嘉湾汇会员停车礼遇:\n银卡:每月可免费领取2张首2小时停车券\n金卡:每月可免费领取5张首2小时停车券\n铂金卡:每月可免费领取10张首2小时停车券\n*数量有限,领完即止\n仅限开具一个月内的停车费电子发票 ",
     "parkMallCode": 5,
     "buildingId": "QHKC-P1"
   }

+ 7 - 5
src/pages/parkingFee/mixins/parkingFeeCoupon.js

@@ -72,7 +72,6 @@ export default {
       this.remainPrice = this.usingTotalDiscount;
       this.newAvailableDiscountFee = this.availableDiscountFee
       if (this.couponList.length) {
-        if ( this.setAllDisabled() ) return
         this.couponList = this.couponList.map((elm, index) => {
           elm.disabled = true;
           const selected = elm.hasOwnProperty('selected') ? elm.selected : elm.defaultSelected;
@@ -91,8 +90,11 @@ export default {
             return elm;
           });
         }
-        // 验证剩余优惠券是否可勾选(无需验证:后端已计算可勾选的优惠券)
-        this.newGroupedCouponData()
+        this.$nextTick(() => {
+          // 验证剩余优惠券是否可勾选(无需验证:后端已计算可勾选的优惠券)
+          this.newGroupedCouponData()
+          this.setAllDisabled()
+        })
       }
     },
     item2Number(i) {
@@ -125,8 +127,8 @@ export default {
         this.checkedCouponList.push(`coupon${index}`);
       }
       this.$nextTick(() => {
-        if ( this.setAllDisabled() ) return
-        this.newGroupedCouponData()  
+        this.newGroupedCouponData()
+        this.setAllDisabled()
       })
       
     },