瀏覽代碼

fix(KIP-10722): 【DE】【C端】【沈阳】。用户每日上限会受到积分减免的影响

john 2 年之前
父節點
當前提交
2d5cdc7db6
共有 3 個文件被更改,包括 172 次插入18 次删除
  1. 164 0
      src/api/mockData/checkout.sy4.response.json
  2. 7 17
      src/pages/parkingFee/mixins/parkingFeeDiscounts.js
  3. 1 1
      src/store/order/index.js

+ 164 - 0
src/api/mockData/checkout.sy4.response.json

@@ -0,0 +1,164 @@
+{
+  "parkingRecord": {
+    "vehicleNo": "鲁A10001", 
+    "enterTime": "2023-06-13 10:50:08", 
+    "serviceMin": 4307, 
+    "totalFee": 8000, 
+    "actualPayFee": 35, 
+    "thirdPartyId": "_1_29bcc3e1_1686883034855", 
+    "thirdParkOrderNo": "29bcc3e1b5b64aec9ad0213e7dd0fd65", 
+    "createdByQrCode": false, 
+    "totalFeeInYuan": 80
+  }, 
+  "discountInfo": {
+    "usingTotalDiscount": 45, 
+    "memberLevelDiscount": true, 
+    "memberGrade": [
+      {
+        "defaultSelected": true, 
+        "memberGrade": "3", 
+        "memberGradeText": "金玉卡", 
+        "discountTime": 3, 
+        "discountFee": 15
+      }
+    ], 
+    "consume": [
+      {
+        "defaultSelected": true, 
+        "maxDiscountTime": 3, 
+        "defaultDiscountTime": 3, 
+        "discountFee": 15, 
+        "redeemSalesAmount": 600
+      }
+    ], 
+    "points": [
+      {
+        "available": 60, 
+        "pointsPerUnit": 100, 
+        "unitAmount": 5, 
+        "totalAvailable": 260, 
+        "unitHour": 1, 
+        "newMember": false, 
+        "label": "已选择兑换2小时", 
+        "discountFee": 10
+      }
+    ], 
+    "coupons": [
+      {
+        "code": "zo72eetgs6j_t", 
+        "couponId": "dfc9fab9a9ce4cbfb44c15274f6f1e79", 
+        "status": "available", 
+        "name": "停车券(可叠加)", 
+        "expirationDate": "2023-06-16 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": true, 
+        "superposition": "2", 
+        "limitCountPerOrder": 10
+      }, 
+      {
+        "code": "xy2k0rfplvx_t", 
+        "couponId": "dfc9fab9a9ce4cbfb44c15274f6f1e79", 
+        "status": "available", 
+        "name": "停车券(可叠加)", 
+        "expirationDate": "2023-06-16 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": false, 
+        "superposition": "2", 
+        "limitCountPerOrder": 10
+      }, 
+      {
+        "code": "mxn6iotingh_t", 
+        "couponId": "dfc9fab9a9ce4cbfb44c15274f6f1e79", 
+        "status": "available", 
+        "name": "停车券(可叠加)", 
+        "expirationDate": "2023-06-16 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": false, 
+        "superposition": "2", 
+        "limitCountPerOrder": 10
+      }, 
+      {
+        "code": "uuos3fymfmc_t", 
+        "couponId": "dfc9fab9a9ce4cbfb44c15274f6f1e79", 
+        "status": "available", 
+        "name": "停车券(可叠加)", 
+        "expirationDate": "2023-06-16 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": false, 
+        "superposition": "2", 
+        "limitCountPerOrder": 10
+      }, 
+      {
+        "code": "irywl0z2zro_t", 
+        "couponId": "dfc9fab9a9ce4cbfb44c15274f6f1e79", 
+        "status": "available", 
+        "name": "停车券(可叠加)", 
+        "expirationDate": "2023-06-16 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": false, 
+        "superposition": "2", 
+        "limitCountPerOrder": 10
+      }, 
+      {
+        "code": "58i7jpopf1c_t", 
+        "couponId": "dfc9fab9a9ce4cbfb44c15274f6f1e79", 
+        "status": "available", 
+        "name": "停车券(可叠加)", 
+        "expirationDate": "2023-06-16 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": false, 
+        "superposition": "2", 
+        "limitCountPerOrder": 10
+      }, 
+      {
+        "code": "w5xyzlcamie_t", 
+        "couponId": "ff54436ae9a14842953e829ac4a942ef", 
+        "status": "available", 
+        "name": "停车券(不可叠加)", 
+        "expirationDate": "2023-06-24 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": false, 
+        "superposition": "1", 
+        "limitCountPerOrder": 0
+      }, 
+      {
+        "code": "gsj9ezvrtve_t", 
+        "couponId": "ff54436ae9a14842953e829ac4a942ef", 
+        "status": "available", 
+        "name": "停车券(不可叠加)", 
+        "expirationDate": "2023-06-24 23:59:59", 
+        "discountFee": 5, 
+        "defaultSelected": false, 
+        "superposition": "1", 
+        "limitCountPerOrder": 0
+      }
+    ], 
+    "paperCoupons": [
+      {
+        "description": "纸质优惠券允许叠加使用,可在该小程序端、自助缴费机,出口设备上进行核销,不受每日最高8小时优惠限制"
+      }
+    ]
+  }, 
+  "parkingRule": {
+    "maxOneDayDiscountFee": 35, 
+    "enableNewMemberPoints": false, 
+    "enablePoints": true, 
+    "unLimitWeekendPoints": false, 
+    "enableCoupon": true, 
+    "enablePaperCoupons": true, 
+    "enableConsume": true, 
+    "enableConsumeNonSplit": false, 
+    "maxConsumeTime": 7, 
+    "remainConsumeTime": 7, 
+    "availableDiscountFee": 35, 
+    "hourPrice": 5, 
+    "oneTimeLimitation": false, 
+    "oneDayLimitation": true
+  }, 
+  "parkInfo": {
+    "parkName": "沈阳嘉里城停车场\t", 
+    "description": "计费基础规则:5元每小时,上不封顶\n首停减免:1小时/次/天\n会员等级减免:芳华卡每日可免费停车1小时,倾城卡每日可免费停车2小时,金玉卡每日可免费停车3小时(当日仅限使用1次,可与其他减免优惠共享)\n积分抵扣:芳华卡500积分抵扣1小时,倾城卡400积分抵扣1小时,金玉卡300积分抵扣1小时(手动选择抵扣时长)\n消费减免:当日消费每满200元赠送1小时停车时长,每天赠送8小时封顶(仅限会员,当日有效)\n\n注意事项  \n1.沈阳嘉里城停车场开放时间:24小时。\n2.每日最多享首停+会员权益减免(包含会员消费减免)免费停车8小时。\n3.会员等级减免仅限本人使用,每日每位会员只能为一辆车做会员等级减免,每辆车每日只接受一个会员的等级减免。\n4.每张消费小票仅可为1辆车做会员消费减免。\n5.积分兑换停车时长、纸质优惠券没有任何限制。", 
+    "parkMallCode": 4, 
+    "buildingId": "SKC-P1"
+  }
+}

+ 7 - 17
src/pages/parkingFee/mixins/parkingFeeDiscounts.js

@@ -272,33 +272,23 @@ export default {
     reducesClick() {
       const { maxOneTimeDiscountTime, hourPrice, oneTimeLimitation, maxConsumeTime,remainConsumeTime, oneDayLimitation, maxOneDayDiscountFee } = this.orderDetail.parkingRule;
       const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice;
-      /*if ( oneTimeLimitation && this.remainPrice >= maxOneTimeDiscountFee ) {
-        this.checkedList = this.checkedList.filter(elm => elm !== 'reduces')
-        Toast({
-          message: `超出抵扣上限,每次最高可抵扣${ maxOneTimeDiscountTime }小时`,
-          icon: 'none',
-        });
-        return false
-      }*/
       const reduceHours = (maxOneTimeDiscountFee - this.remainPrice) / hourPrice;
       if (this.checkedList.indexOf('reduces') > -1) {
         this.remainPrice = hourPrice + this.remainPrice;
         // 计算最大上限
-        this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
+        if(this.parkMallCode !== 4 ) {
+          this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
+        }
       } else {
         this.remainPrice = this.remainPrice - hourPrice;
-        this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
-        // this.reduceHours = maxConsumeTime;
+        if(this.parkMallCode !== 4 ) {
+          this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
+        }
       }
+
       const [isCrossMessage = false, maxReduceDiscount = 0] = this.crossMessage();
       if (isCrossMessage) {
-        // console.log(215, maxReduceDiscount)
-        // console.log(207, this.reduceHours)
-        // this.maxReduceDiscount = maxReduceDiscount ? 0 : maxReduceDiscount * -1
-        // console.log(217, this.maxReduceDiscount)
         this.remainPrice = this.remainPrice - maxReduceDiscount * hourPrice;
-        //
-        // this.reduceHours = this.maxReduceDiscount
       }
     },
     // 超限提示

+ 1 - 1
src/store/order/index.js

@@ -1,4 +1,4 @@
-import checkOutQHResponse from "@/api/mockData/checkout.sy3.response.json";
+import checkOutQHResponse from "@/api/mockData/checkout.sy4.response.json";
 import { checkOut,calculateDiscount,ordersAndPrepay,currentUnlicensedPlate,unlicensedCarCheckIn,unlicensedCarCheckout } from '@/api/parking';
 import state from "@/store/order/state";
 import mutations from "@/store/order/mutations";