Ver Fonte

fix(KIP-10830): 【DE】【C端】【天津】临时停车,当用户的抵扣金额达到应缴金额后,用户无法操作积分的增加和减少

john há 2 anos atrás
pai
commit
e97a10baa5

+ 2 - 2
src/pages/parkingFee/mixins/parkingFeeDiscounts.js

@@ -232,8 +232,8 @@ export default {
       this.checkedList = [];
       const { memberGrade = [{}], consume = [], memberLevelDiscount, points = [{}] } = this.orderDetail.discountInfo;
       const { maxConsumeTime, remainConsumeTime, hourPrice } = this.orderDetail.parkingRule;
-      // 如果积分存在的话,则移除积分的优惠
-      if (JSON.stringify(points) !== {}) {
+      // 如果积分存在的话,则移除积分的优惠(天津除外)
+      if (JSON.stringify(points) !== {} && this.parkMallCode !== 6) {
         this.remainPrice = this.usingTotalDiscount - points[0].discountFee;
       }
       this.memberGrade = { ...memberGrade[0] };

+ 6 - 2
src/store/order/points.js

@@ -145,7 +145,7 @@ export default {
       // 当前使用优惠 state.usingTotalDiscount
       // 判断符合上限
       // 浦东积分上限判断
-      if ( parkMallCode === 1 && type === 'add' && state.usingTotalDiscount >= maxOneDayDiscountFee ) {
+      if ( (parkMallCode === 1 || parkMallCode === 6) && type === 'add' && state.usingTotalDiscount >= maxOneDayDiscountFee ) {
         msg = `超出抵扣上限,每次最高可抵扣${ maxOneDayDiscountFee }元`
       }
     }
@@ -157,7 +157,7 @@ export default {
       // 当前使用优惠 state.usingTotalDiscount
       // 判断符合上限
       // 浦东积分上限判断: 减去纸质优惠券的金额
-      if ( parkMallCode === 1 && type === 'add' && state.usingTotalDiscount >= maxOneTimeDiscountFee ) {
+      if ( (parkMallCode === 1 || parkMallCode === 6) && type === 'add' && state.usingTotalDiscount >= maxOneTimeDiscountFee ) {
         msg = `超出抵扣上限,每次最高可抵扣${ maxOneTimeDiscountTime }小时`
       }
     }
@@ -173,6 +173,10 @@ export default {
     //   return;
     // }
     if ( type === 'add' ) {
+      // 如果天津的积分参与的抵扣金额大于等于当前车辆的总的停车费用,则阻止用户继续使用积分
+      // if(parkMallCode === 6 && state?.usingTotalDiscount>= parkingRecord?.totalFeeInYuan) {
+      //   return
+      // }
       let pointsTime = 0;
       pointsTime = state.pointsTime + (parkMallCode === 5 ? state.unitAmount : state.unitHour);
       const available = state.available - state.pointsPerUnit;

+ 1 - 1
src/utils/index.js

@@ -179,7 +179,7 @@ export function wxToLoginCallback( path,callback ) {
 export function initEnv() {
   const href = window.location.href;
   console.log('当前页面的url地址  ',href);
-  if ( /dev-|8080/.test(href) ) {
+  if ( /dev-|808[0-9]/.test(href) ) {
     window.env = 'qa';
     window.profileApi = 'https://qa-apim.kerryplus.com/c/api';
     window.cmrApi = 'https://qa-crm.kerryplus.com/xcrm-api/api';