john před 2 roky
rodič
revize
e650eebd02

+ 60 - 0
src/api/mockData/checkout.pd1.response.json

@@ -0,0 +1,60 @@
+{
+  "parkingRecord": {
+    "vehicleNo": "沪D00020",
+    "enterTime": "2023-04-25 08:46:00",
+    "serviceMin": 378,
+    "totalFee": 700,
+    "actualPayFee": 0,
+    "thirdParkOrderNo": "4970693",
+    "createdByQrCode": false,
+    "totalFeeInYuan": 7
+  },
+  "discountInfo": {
+    "usingTotalDiscount": 10,
+    "memberLevelDiscount": true,
+    "memberGrade": [
+      {
+        "defaultSelected": true,
+        "memberGrade": "01",
+        "memberGradeText": "嘉友卡",
+        "discountTime": 1,
+        "discountFee": 10
+      }
+    ],
+    "points": [
+      {
+        "available": 10000,
+        "pointsPerUnit": 1200,
+        "unitAmount": 0,
+        "newMember": false,
+        "label": "10000积分可减免"
+      }
+    ],
+    "paperCoupons": [
+      {
+        "description": "纸质优惠券不限制会员使用。"
+      }
+    ]
+  },
+  "parkingRule": {
+    "maxOneTimeDiscountTime": 10,
+    "enableNewMemberPoints": false,
+    "enablePoints": true,
+    "enableCoupon": false,
+    "maxOneDayCoupons": 5,
+    "remainCoupons": 5,
+    "enablePaperCoupons": true,
+    "paperCouponsDescription": "纸质优惠券不限制会员使用。",
+    "enableConsume": false,
+    "enableConsumeSplit": false,
+    "maxConsumeTime": 0,
+    "remainConsumeTime": 0,
+    "hourPrice": 10
+  },
+  "parkInfo": {
+    "parkName": "浦东嘉里停车场",
+    "description": "12元/小时。8-24小时封顶96元。纸质优惠券不限制使用数量。每次最多优惠2小时。积分兑换停车费用1200积分=1小时。积分商城售卖停车电子券的使用类型。单日累计消费满300元赠送1张消费600元赠2张1小时的停车券,不重复发券,消费跨天不累计,优惠有效期7天",
+    "parkMallCode": 1,
+    "buildingId": "PKC-P1"
+  }
+}

+ 60 - 0
src/api/mockData/checkout.pd2.response.json

@@ -0,0 +1,60 @@
+{
+  "parkingRecord": {
+    "vehicleNo": "沪D00020",
+    "enterTime": "2023-04-25 08:46:00",
+    "serviceMin": 378,
+    "totalFee": 700,
+    "actualPayFee": 0,
+    "thirdParkOrderNo": "4970693",
+    "createdByQrCode": false,
+    "totalFeeInYuan": 7
+  },
+  "discountInfo": {
+    "usingTotalDiscount": 10,
+    "memberLevelDiscount": true,
+    "memberGrade": [
+      {
+        "defaultSelected": true,
+        "memberGrade": "01",
+        "memberGradeText": "嘉友卡",
+        "discountTime": 1,
+        "discountFee": 10
+      }
+    ],
+    "points": [
+      {
+        "available": 10000,
+        "pointsPerUnit": 1200,
+        "unitAmount": 0,
+        "newMember": false,
+        "label": "10000积分可减免"
+      }
+    ],
+    "paperCoupons": [
+      {
+        "description": "纸质优惠券不限制会员使用。"
+      }
+    ]
+  },
+  "parkingRule": {
+    "maxOneTimeDiscountTime": 10,
+    "enableNewMemberPoints": false,
+    "enablePoints": true,
+    "enableCoupon": false,
+    "maxOneDayCoupons": 5,
+    "remainCoupons": 5,
+    "enablePaperCoupons": true,
+    "paperCouponsDescription": "纸质优惠券不限制会员使用。",
+    "enableConsume": false,
+    "enableConsumeSplit": false,
+    "maxConsumeTime": 0,
+    "remainConsumeTime": 0,
+    "hourPrice": 10
+  },
+  "parkInfo": {
+    "parkName": "浦东嘉里停车场",
+    "description": "12元/小时。8-24小时封顶96元。纸质优惠券不限制使用数量。每次最多优惠2小时。积分兑换停车费用1200积分=1小时。积分商城售卖停车电子券的使用类型。单日累计消费满300元赠送1张消费600元赠2张1小时的停车券,不重复发券,消费跨天不累计,优惠有效期7天",
+    "parkMallCode": 1,
+    "buildingId": "PKC-P1"
+  }
+}

+ 1 - 1
src/api/request.js

@@ -98,7 +98,7 @@ function XUser(config) {
     // lbsId: '8aaa82ea804d07cd0180516ff03b0008',
     lbsId: store.state?.lbsId || '',
   };
-  // params = {"userId":"8aaa809d835ba76d018377d482ac0004","sourceType":"WECHAT","phoneNumber":"15090631337","projectId":"","brandId":"8aaa81947c6e1ca0017c73c13cc30006","cid":"oudWQ5ccsJLSlUGt0s_RQysoHqgg","vipCode":"KERRY100213432","lbsId":"8aaa82ea804d07cd0180516ff03b0008"}
+  // params = {"userId": "8aaa809d835ba76d018378bc57180006","sourceType": "WECHAT","phoneNumber": "18521563898","projectId": "paroject1","buildingId": "QHKC-P1","brandId":"8a84853b7c91ac5b017c962dab55030e","cid": "oIUfO5XAVleJ88z13i1_08DCKIhQ","vipCode":"KERRY100200040","lbsId":"8aaa81cb7c836c6b017c83e46b110001"}
   if (/orders-and-prepay|calculate-discount|unlicensed-car-check-in|unlicensed-car-checkout/g.test(config.url)) {
     params.buildingId = window.localStorage.getItem('buildingId');
   }

+ 1 - 1
src/pages/parkingFee/components/base/parkingReceipt/parkingOrderDetail.vue

@@ -14,7 +14,7 @@
           <template>
             <div class="item-header">
               <div>{{ item.orderNo }}-{{ item.vehicleNo }}</div>
-              <div class="red">¥{{ getOrderItemPrice(item) }}</div>
+              <div class="red">¥{{ item.totalPaidAmount }}</div>
             </div>
             <div class="item-bottom">
               <div>{{ item.parkName }}</div>

+ 25 - 10
src/store/order.js

@@ -2,7 +2,7 @@ import { checkOut, calculateDiscount, ordersAndPrepay, currentUnlicensedPlate, u
 
 // import checkOutQHResponse from '@/api/mockData/checkout.qh3.response.json'
 // import checkOutQHResponse from '@/api/mockData/checkout.hz.response.json';
-import checkOutQHResponse from '@/api/mockData/checkout.qh7.response.json'
+import checkOutQHResponse from '@/api/mockData/checkout.pd1.response.json'
 // import unlicensedCarCheckInResponse from '@/api/mockData/unlicensedCarCheckIn.qh.response.json';
 
 /* 
@@ -190,8 +190,8 @@ const actions = {
       // console.log('无牌车扫码出场', endlessLoop);
       // 场内缴费,调 check-out 接口,
       const method = unlicensed && endlessLoop || !vehicleNo ? unlicensedCarCheckout : checkOut
-      const res = await method(vehicleNo, unlicensed, gateId);
-      // const res = checkOutQHResponse
+      // const res = await method(vehicleNo, unlicensed, gateId);
+      const res = checkOutQHResponse
       if (res?.parkingRecord?.totalFee <= 0) {
         callback && callback({
           unlicensed,
@@ -291,6 +291,9 @@ const actions = {
       points,
       usingTotalDiscount, // 当前车辆的已使用优惠的总上限
     } = discountInfo;
+    const {
+      parkMallCode
+    } = parkInfo
     const {
       maxPointsTime = 0, // 最大积分
       enablePoints,
@@ -338,6 +341,9 @@ const actions = {
       discountFee,
       maxDiscountFee,
     }] } = discountInfo
+    const {
+      parkMallCode
+    } = parkInfo
     // 总积分
     const max = available / pointsPerUnit * unitAmount;
     const timeNum = maxDiscountFee / unitAmount;
@@ -364,6 +370,10 @@ const actions = {
 
   // 积分减免
   pointsMath({ commit, dispatch, state }, { type, callback }) {
+    const {parkInfo, parkingRule} = state.orderDetail
+    const {maxOneTimeDiscountTime} = parkingRule
+    const {parkMallCode} = parkInfo
+    console.log(376, maxOneTimeDiscountTime, state.availableDiscountFee)
     /**
      * maxDiscountFee 单次最大可使用金额 
      * availableDiscountFee 当日剩余可使用优惠金额
@@ -379,16 +389,21 @@ const actions = {
     if (maxPointsTime > state.availableDiscountFee) {
       maxPointsTime = state.availableDiscountFee
     }
+    console.log(392, state.pointsTime, maxPointsTime);
+    if ( parkMallCode === 5 ) {
     if (type === 'add' && state.pointsTime >= maxPointsTime) {
-      // 以下是深圳积分上限规则
-      // 超出抵扣上限,每日最高可抵扣${this.parkFee.parkInfoEntity.maxOneDayHour}元 '优惠金额' >= '每日最高可抵扣'
-      if (state.usingTotalDiscount >= state.maxOneDayDiscountFee && !msg) {
+      
+        // 以下是深圳积分上限规则
+        // 超出抵扣上限,每日最高可抵扣${this.parkFee.parkInfoEntity.maxOneDayHour}元 '优惠金额' >= '每日最高可抵扣'
+        if (state.usingTotalDiscount >= state.maxOneDayDiscountFee && !msg) {
           msg = `超出抵扣上限,每日最高可抵扣${state.maxOneDayDiscountFee}元`
+        }
+        // 超出抵扣上限,每次最高可抵扣${this.integralMaxMoney}元 '积分兑换时长' >= '深圳前海停车积分上限'q
+        if (state.pointsTime >= maxPointsTime && !msg) {
+          msg = `超出抵扣上限,每次最高可抵扣${state.maxDiscountFee}元`
+        }
       }
-      // 超出抵扣上限,每次最高可抵扣${this.integralMaxMoney}元 '积分兑换时长' >= '深圳前海停车积分上限'q
-      if (state.pointsTime >= maxPointsTime && !msg) {
-        msg = `超出抵扣上限,每次最高可抵扣${state.maxDiscountFee}元`
-      }
+   
       callback({
         message: msg
       });

+ 2 - 1
vue.config.js

@@ -122,7 +122,8 @@ module.exports = {
         },
       },
       '/msApi': {
-        target: 'http://172.21.201.251:8080',
+        // target: 'http://172.21.201.251:8080',
+        target: 'http://172.20.51.111:8080',
         // target: 'http://172.21.202.133:8080',
         // target: 'https://dev-kip-service-internal.kerryonvip.com/temporary-parking-service', //代理地址,这里设置的地址会代替axios中设置的baseURL
         // target: 'http://172.21.203.140:8080', //代理地址,这里设置的地址会代替axios中设置的baseURL   2023-2-9