ソースを参照

Merge branch 'release-2.11.0' into John/relsead-2.11.0/KIP-10162

john 2 年 前
コミット
ada77d3dff

+ 62 - 0
src/api/mockData/checkout.pd13.response.json

@@ -0,0 +1,62 @@
+{
+  "parkingRecord": {
+    "vehicleNo": "沪D10001",
+    "enterTime": "2023-05-17 15:53:00",
+    "serviceMin": 23165,
+    "totalFee": 4000,
+    "actualPayFee": 16,
+    "thirdParkOrderNo": "4970728",
+    "createdByQrCode": false,
+    "totalFeeInYuan": 40
+  },
+  "discountInfo": {
+    "usingTotalDiscount": 24,
+    "memberLevelDiscount": false,
+    "consume": [
+      {
+        "defaultSelected": true,
+        "defaultDiscountTime": 10,
+        "discountFee": 24,
+        "redeemSalesAmount": 600,
+        "couponCodes": "0jv2pvambb3_t#8vr1b9wdbli_t#q2q9tqk9fjn_t#b5mkwsc4yag_t#8wl0qimifpi_t#ltvnf11f91l_t#01wn30uhezy_t#ljw41t7natw_t#x2rvzaj44e1_t#p62cmqrlhtk_t"
+      }
+    ],
+    "points": [
+      {
+        "available": 8800,
+        "pointsPerUnit": 1200,
+        "unitAmount": 12,
+        "totalAvailable": 8800,
+        "unitHour": 1,
+        "newMember": false,
+        "label": "8800积分可减免"
+      }
+    ],
+    "paperCoupons": [
+      {
+        "description": "纸质优惠券不限制会员使用。"
+      }
+    ]
+  },
+  "parkingRule": {
+    "maxOneTimeDiscountTime": 2,
+    "enableNewMemberPoints": false,
+    "enablePoints": true,
+    "unLimitWeekendPoints": false,
+    "enableCoupon": true,
+    "enablePaperCoupons": true,
+    "enableConsume": true,
+    "enableConsumeSplit": false,
+    "maxConsumeTime": 10,
+    "remainConsumeTime": 10,
+    "hourPrice": 12,
+    "oneTimeLimitation": true,
+    "oneDayLimitation": false
+  },
+  "parkInfo": {
+    "parkName": "浦东嘉里城",
+    "description": "12元/小时。8-24小时封顶96元。纸质优惠券不限制使用数量。每次最多优惠2小时。积分兑换停车费用1200积分=1小时。积分商城售卖停车电子券的使用类型。单日累计消费满300元赠送1张消费600元赠2张1小时的停车券,不重复发券,消费跨天不累计,",
+    "parkMallCode": 1,
+    "buildingId": "184-100035"
+  }
+}

+ 61 - 0
src/api/mockData/checkout.pd14.response.json

@@ -0,0 +1,61 @@
+{
+  "parkingRecord": {
+    "vehicleNo": "沪D10003",
+    "enterTime": "2023-05-17 15:53:00",
+    "serviceMin": 28745,
+    "totalFee": 2000,
+    "actualPayFee": 0,
+    "thirdParkOrderNo": "4970730",
+    "createdByQrCode": false,
+    "totalFeeInYuan": 20
+  },
+  "discountInfo": {
+    "usingTotalDiscount": 24,
+    "memberLevelDiscount": false,
+    "consume": [
+      {
+        "defaultDiscountTime": 2,
+        "redeemSalesAmount": 600,
+        "couponCodes": "jr17wcxh58e_t#8guir7s7ysm_t"
+      }
+    ],
+    "points": [
+      {
+        "available": 4478,
+        "pointsPerUnit": 1200,
+        "unitAmount": 12,
+        "totalAvailable": 6878,
+        "unitHour": 1,
+        "newMember": false,
+        "label": "已选择兑换2小时",
+        "discountFee": 24
+      }
+    ],
+    "paperCoupons": [
+      {
+        "description": "纸质优惠券不限制会员使用。"
+      }
+    ]
+  },
+  "parkingRule": {
+    "maxOneTimeDiscountTime": 2,
+    "enableNewMemberPoints": false,
+    "enablePoints": true,
+    "unLimitWeekendPoints": false,
+    "enableCoupon": true,
+    "enablePaperCoupons": true,
+    "enableConsume": true,
+    "enableConsumeSplit": false,
+    "maxConsumeTime": 0,
+    "remainConsumeTime": 2,
+    "hourPrice": 12,
+    "oneTimeLimitation": true,
+    "oneDayLimitation": false
+  },
+  "parkInfo": {
+    "parkName": "浦东嘉里城",
+    "description": "12元/小时。8-24小时封顶96元。纸质优惠券不限制使用数量。每次最多优惠2小时。积分兑换停车费用1200积分=1小时。积分商城售卖停车电子券的使用类型。单日累计消费满300元赠送1张消费600元赠2张1小时的停车券,不重复发券,消费跨天不累计,",
+    "parkMallCode": 1,
+    "buildingId": "184-100035"
+  }
+}

+ 38 - 0
src/api/mockData/checkout.qh15.response.json

@@ -0,0 +1,38 @@
+{
+  "parkingRecord": {
+    "vehicleNo": "粤A22233",
+    "enterTime": "2023-05-06 14:39:55",
+    "serviceMin": 37511,
+    "totalFee": 8000,
+    "actualPayFee": 80,
+    "thirdPartyId": "c33e35e6fe0b48af9a8b3b798c8195ae",
+    "thirdParkOrderNo": "BctVnyZ21H1Ykdz88S5coh",
+    "createdByQrCode": false,
+    "totalFeeInYuan": 80
+  },
+  "discountInfo": {
+    "usingTotalDiscount": 0,
+    "memberLevelDiscount": false
+  },
+  "parkingRule": {
+    "maxOneDayDiscountFee": 60,
+    "enableNewMemberPoints": false,
+    "enablePoints": true,
+    "unLimitWeekendPoints": false,
+    "enableCoupon": true,
+    "enablePaperCoupons": false,
+    "maxPointsTime": 0,
+    "enableConsume": false,
+    "enableConsumeSplit": false,
+    "availableDiscountFee": 60,
+    "hourPrice": 5,
+    "oneTimeLimitation": false,
+    "oneDayLimitation": true
+  },
+  "parkInfo": {
+    "parkName": "深圳前海湾停车场",
+    "description": "基础计费规则:\n15分钟内免费,首小时15元,其后每小时5元,全天封顶60元。\n嘉湾汇会员停车礼遇:\n银卡:每月可免费领取2张首2小时停车券\n金卡:每月可免费领取5张首2小时停车券\n铂金卡:每月可免费领取10张首2小时停车券\n*数量有限,领完即止\n仅限开具一个月内的停车费电子发票 ",
+    "parkMallCode": 5,
+    "buildingId": "QHKC-P1"
+  }
+}

+ 6 - 0
src/api/request.js

@@ -174,6 +174,12 @@ export const createAxiosByinterceptors = (config) => {
       return response.data;
     },
     function (error) {
+      console.log('error', error);
+      // 断网
+      if (error.code === 'ERR_NETWORK') {
+        uni.showToast({ title: '网络连接失败,请重试', duration: 3000, icon: 'fail' });
+        return Promise.reject(error.code);
+      }
       // 对响应错误做点什么
       console.log('error-response:', error.response);
       console.log('error-config:', error.config);

+ 2 - 1
src/components/plate-number/plateNumber.vue

@@ -28,7 +28,8 @@
         </div>
         <div class="close-box">
           <div class="plate_number_box">
-            <button size="small" v-for="(item, index) in English_Number" :key="item.id" :class="[item.id === 99 && 'del', item.id === 66 && 'mini']" :disabled="item.id === 45 || item.id === 46 ? true : false" @click="checkEnglish_num(index)">
+            <!-- :disabled="item.id === 45 || item.id === 46 ? true : false" -->
+            <button size="small" v-for="(item, index) in English_Number" :key="item.id" :class="[item.id === 99 && 'del', item.id === 66 && 'mini']"  @click="checkEnglish_num(index)">
               <span v-if="item.id !== 99">{{ item.name }}</span>
               <img v-else :src="require(`../../static/images/back.png`)" alt="" />
             </button>

+ 11 - 0
src/kui/theme/theme.js

@@ -42,5 +42,16 @@ export default {
     primaryColor04: '#ABC2B2',
     primaryColor05: '#D5E0D9',
     primaryColor06: '#EAF0EC',
+  },
+  'theme-jingan':{
+    primaryColor: '#143793',
+    primaryColorActive: '#7287BE',
+    primaryColorDisabled: ' #D0D7E9',
+    primaryColor01: '#143793',
+    primaryColor02: '#435FA9',
+    primaryColor03: '#7287BE',
+    primaryColor04: '#A1AFD4',
+    primaryColor05: '#D0D7E9',
+    primaryColor06: '#E7EBF4',
   }
 };

+ 3 - 1
src/main.js

@@ -30,7 +30,8 @@ import {
   Dialog,
   NumberKeyboard,
   Divider,
-  Stepper
+  Stepper,
+  Loading
 } from 'vant';
 
 import router from './routes/index.js'; // 注册页面路由
@@ -68,6 +69,7 @@ Vue.use(Icon)
   .use(Dialog)
   .use(NumberKeyboard)
   .use(Divider)
+  .use(Loading)
   .use(Stepper);
   
 

+ 54 - 2
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -19,6 +19,7 @@ export default {
       // 微服务接口字段
       isShowDescription: true, // 缴费说明true:显示全部 false:显示部分
       btnLoading: false,
+      isPay: false,
       popup: false,
       msData: {},
     };
@@ -82,6 +83,9 @@ export default {
       appId: state => state.appId,
       source: state => state.source,
     }),
+    isNoLogin() {
+      return JSON.stringify(this.member) === '{}' || !this.member
+    },
     // 支付按钮状态
     payBtnDisabled() {
       // 当存在待支付金额 或者 用户登陆
@@ -121,6 +125,23 @@ export default {
   methods: {
     // 前往支付
     async toPay() {
+      if (this.btnLoading) return
+      this.btnLoading = true
+      setTimeout(() => {
+        if ( this.btnLoading && !this.isPay ) {
+          const toast1 = Toast({
+            message: '网络连接失败,请重试',
+            duration: 3000,
+            onClose: () => {
+              this.$router.replace({
+                // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
+                path: 'home',
+              });
+            }
+          });
+          this.btnLoading = false
+        }
+      }, 10000)
       const { parkingRecord, discountInfo = {}, parkingRule = {}} = this.orderDetail;
       const { coupons, points, memberGrade = [], paperCoupons = [], consume = [] } = discountInfo
       const { hourPrice } = parkingRule
@@ -164,7 +185,7 @@ export default {
           let discountFee = 0
           if(selected) {
             discountFee = consume[0].hasOwnProperty('discountFee') ? consume[0].discountFee : memberGrade[0].defaultDiscountTime * hourPrice;
-            discountTime = discountFee / hourPrice;
+            discountTime = discountFee / hourPrice * 60;
           }
           params.discountInfo.consume = {
             ...consume[0],
@@ -216,6 +237,7 @@ export default {
         // console.log('orderDetail', res);
         if (res?.paymentType === 'NO_FEE_PAY') {
           this.btnLoading = false;
+          this.isPay = false
           this.$router.replace({
             path: this.getPagePath(),
           });
@@ -224,6 +246,17 @@ export default {
         }
         this.kerryPayment(res.sessionId);
       } catch (err) {
+        if(err ==='ERR_NETWORK') {
+          setTimeout(() => {
+            this.$router.replace({
+              // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
+              path: 'home',
+            });  
+          }, 2900)
+        } else {
+          this.btnLoading = false
+          this.isPay = false
+        }
         console.log(err);
       }
     },
@@ -261,6 +294,7 @@ export default {
           if (res.data?.code == '000000') {
             const prepayJson = res.data.data.params;
             const platform = getPlatform();
+            this.isPay = true
             // TODO: h5环境判断
             if (platform === 'micromessenger') {
               const weixinH5PayRes = await this.weixinH5Pay(prepayJson);
@@ -268,6 +302,8 @@ export default {
               console.log(1784, weixinH5PayRes);
               //  errMsg: 'requestPayment:ok'
               if (weixinH5PayRes?.errMsg === 'requestPayment:ok') {
+                this.btnLoading = false
+                this.isPay = false
                 this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
                   name: 'parkingFeeDetail'
                 });
@@ -299,6 +335,7 @@ export default {
                   this.reCreateParkOrder();
                 } else {
                   this.btnLoading = false;
+                  this.isPay = false
                   this.$router.replace({
                     // path: 'parkingFeeSuccess?vehicleNo=' + this.$route.query.vehicleNo,
                     path: this.getPagePath(),
@@ -311,7 +348,17 @@ export default {
           }
         })
         .catch((err) => {
-          console.log(1854, err);
+          if(err.code === "ERR_NETWORK") {
+            this.btnLoading = true;
+            uni.showToast({ title: '网络连接失败,请重试', duration: 3000, icon: 'fail' });
+            setTimeout(() => {
+              this.$router.replace({
+                // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
+                path: 'home',
+              });
+            }, 2900)
+            return
+          }
           this.reCreateParkOrder();
         });
     },
@@ -351,6 +398,7 @@ export default {
           endlessLoop: this.endlessLoop
         })
         this.btnLoading = false;
+        this.isPay = false
         // this.createParkOrder();
       });
       // uni.showModal({
@@ -376,6 +424,8 @@ export default {
       // this.$store.commit('order/SET_ORDER_DETAIL', checkOutResponse);
       try {
         console.log('无牌车扫码出场', this.unlicensedInfo, this.endlessLoop);
+        this.btnLoading = false
+        this.isPay = false
         // return
         this.$store.dispatch('order/orderInit', {
           vehicleNo: this.$route.query.vehicleNo,
@@ -510,6 +560,8 @@ export default {
     // 重置倒计时
     resetCountDown() {
       this.$refs?.countDown?.reset();
+      this.btnLoading = false;
+      this.isPay = false
       this.$store.dispatch('order/orderInit', {
         gateId: this.$route.query?.gateId,
         vehicleNo: this.$route.query?.vehicleNo,

+ 11 - 13
src/pages/parkingFee/mixins/parkingFeeDiscounts.js

@@ -128,16 +128,14 @@ export default {
         this.enableConsumeSplit = this.orderDetail.parkingRule.enableConsumeSplit;
       }
       this.checkedList = [];
-      const { memberGrade = [], consume = [], memberLevelDiscount } = this.orderDetail.discountInfo;
-      const { maxConsumeTime } = this.orderDetail.parkingRule;
+      const { memberGrade = [{}], consume = [], memberLevelDiscount } = this.orderDetail.discountInfo;
+      const { maxConsumeTime,remainConsumeTime } = this.orderDetail.parkingRule;
       this.memberGrade = { ...memberGrade[0] };
       this.consume = { ...consume[0] };
       if (JSON.stringify(this.memberGrade) !== '{}' && this.memberGrade && this.memberGrade.hasOwnProperty('selected') ? this.memberGrade.selected : this.memberGrade.defaultSelected) {
         this.checkedList.push('member');
-        this.isMember = false;
-      } else {
-        this.isMember = true;
       }
+      this.isMember = JSON.stringify(this.memberGrade) === '{}';
       // console.log(140, this.consume, this.consume.hasOwnProperty('selected'), JSON.stringify(this.consume) !== '{}' && this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected, this.consume.defaultSelected)
       // console.log(143, JSON.stringify(this.consume) !== '{}' && this.consume.hasOwnProperty('selected') ? this.consume.selected !== undefined : this.consume.defaultSelected !== undefined);
       if (JSON.stringify(this.consume) !== '{}' && this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected !== undefined) {
@@ -148,8 +146,8 @@ export default {
       }
       this.isReduces = this.consume.hasOwnProperty('selected') || this.consume.hasOwnProperty('defaultSelected') ? false : true;
       this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : this.consume.defaultDiscountTime;
-      if (maxConsumeTime) {
-        this.maxReduceDiscount = maxConsumeTime;
+      if (remainConsumeTime) {
+        this.maxReduceDiscount = remainConsumeTime;
       }
       this.oldCheckedList = [...this.checkedList];
     },
@@ -183,12 +181,12 @@ export default {
       }
     },
     memberClick() {
-      const { maxConsumeTime } = this.orderDetail.parkingRule;
+      const { maxConsumeTime, remainConsumeTime } = this.orderDetail.parkingRule;
       if (this.checkedList.indexOf('member') > -1) {
         this.remainPrice = this.memberGrade.discountFee + this.remainPrice;
       } else if (!this.isMember) {
         this.remainPrice = this.remainPrice - this.memberGrade.discountFee;
-        this.maxReduceDiscount = maxConsumeTime;
+        this.maxReduceDiscount = remainConsumeTime;
       }
       const [isCrossMessage = false, maxReduceDiscount = this.maxReduceDiscount] = this.crossMessage();
       if (isCrossMessage) {
@@ -198,7 +196,7 @@ export default {
       }
     },
     reducesClick() {
-      const { maxOneTimeDiscountTime, hourPrice, oneTimeLimitation, maxConsumeTime, oneDayLimitation, maxOneDayDiscountFee } = this.orderDetail.parkingRule;
+      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')
@@ -212,10 +210,10 @@ export default {
       if (this.checkedList.indexOf('reduces') > -1) {
         this.remainPrice = hourPrice + this.remainPrice;
         // 计算最大上限
-        this.maxReduceDiscount = maxConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : maxConsumeTime;
+        this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
       } else {
         this.remainPrice = this.remainPrice - hourPrice;
-        this.maxReduceDiscount = maxConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : maxConsumeTime;
+        this.maxReduceDiscount = remainConsumeTime > maxOneTimeDiscountFee / hourPrice ? maxOneTimeDiscountFee / hourPrice : remainConsumeTime;
         // this.reduceHours = maxConsumeTime;
       }
       const [isCrossMessage = false, maxReduceDiscount = 0] = this.crossMessage();
@@ -242,7 +240,7 @@ export default {
         return [true, (maxOneDayDiscountFee - (this.reduceHours - 1) * hourPrice) / hourPrice];
       }
       // 单次上限限制
-      if (oneTimeLimitation && this.remainPrice > maxOneTimeDiscountFee) {
+      if (oneTimeLimitation && this.remainPrice >= maxOneTimeDiscountFee) {
         Toast({
           message: `超出抵扣上限,每次最高可抵扣${maxOneTimeDiscountTime}小时`,
           icon: 'none',

+ 1 - 0
src/pages/parkingFee/mixins/parkingFeePaperCoupon.js

@@ -74,6 +74,7 @@ export default {
       paperCoupons: ( state ) => state.order.paperCoupons,
       paperDiscountFee: ( state ) => state.order.paperDiscountFee,
       paperDiscountTime: ( state ) => state.order.paperDiscountTime,
+      paperCouponsDesc: ( state ) => state.order.paperCouponsDesc,
     }),
   },
   methods: {

+ 2 - 1
src/pages/parkingFee/mixins/parkingReceipt/parkingReceipt.js

@@ -264,7 +264,8 @@ export default {
       //   id: 'qqqqqqq',
       //   totalPaidAmount: 111,
       //   taxNo: 'qqqqqqq',
-      //   status: 'COMPLETE',
+      //   status: 'FAILED',
+      //   errorMessage: 'errorMessage',
       //   vehicleNo: 'qqqqqqq',
       //   enterTime: '2023-09-89',
       //   parkName: '111',

+ 127 - 123
src/pages/parkingFee/parkingFee.vue

@@ -1,150 +1,152 @@
 <template>
-  <scroll-view :class="['scroll-Y' ,'color-scroll-Y', theme]">
-    <div class="wrap">
-      <div class="parkingFee">
-        <!-- 菜单 -->
-        <div
-          :class="{
+  <div :class="theme">
+    <scroll-view :class="['scroll-Y' ,'color-scroll-Y']">
+      <div class="wrap">
+        <div class="parkingFee">
+          <!-- 菜单 -->
+          <div
+            :class="{
             top_menu: true,
             blue_top_menu: custTypeId === 1,
             green_top_menu: custTypeId === 2,
           }"
-          v-if="custTypeId >= 0"
-        >
-          <div class="menu_item" @click="doRouter">
-            <img :src="`${require(`./static/images/icon-order.png`)}`" />
-            <span>缴费记录</span>
-          </div>
-          <div class="menu_item" @click="doRouter3" v-if="source !== 'KIP'">
-            <img :src="`${require(`./static/images/icon-coupon.png`)}`" />
-            <span>停车券兑换</span>
-          </div>
-          <div class="menu_item" @click="doRouter1">
-            <img :src="`${require(`./static/images/icon-ticket.png`)}`" />
-            <span>停车开票</span>
-          </div>
-          <div class="menu_item" @click="doRouter2">
-            <img :src="`${require(`./static/images/icon-car.png`)}`" />
-            <span>车辆管理</span>
-          </div>
-        </div>
-        <!-- 中控 -->
-        <div class="parkingFee-bottom">
-          <div style="height: 40px; background-color: #FBFCFF;" v-if="source === 'KIP'"></div>
-          <div :class="['parkingFee-tab', tabbarActive === '无牌缴费' && 'unlicensed-box-bottom']" v-if="supportUnlicensed && source !== 'KIP'">
-            <div :class="['bar', tabbarActive === '手动缴费' && 'active']" @click="tabbarActiveEvent('手动缴费')">手动缴费</div>
-            <div :class="['bar', tabbarActive === '无牌缴费' && 'active']" @click="tabbarActiveEvent('无牌缴费')">无牌缴费</div>
+            v-if="custTypeId >= 0"
+          >
+            <div class="menu_item" @click="doRouter">
+              <img :src="`${require(`./static/images/icon-order.png`)}`" />
+              <span>缴费记录</span>
+            </div>
+            <div class="menu_item" @click="doRouter3" v-if="source !== 'KIP'">
+              <img :src="`${require(`./static/images/icon-coupon.png`)}`" />
+              <span>停车券兑换</span>
+            </div>
+            <div class="menu_item" @click="doRouter1">
+              <img :src="`${require(`./static/images/icon-ticket.png`)}`" />
+              <span>停车开票</span>
+            </div>
+            <div class="menu_item" @click="doRouter2">
+              <img :src="`${require(`./static/images/icon-car.png`)}`" />
+              <span>车辆管理</span>
+            </div>
           </div>
+          <!-- 中控 -->
+          <div class="parkingFee-bottom">
+            <div style="height: 40px; background-color: #FBFCFF;" v-if="source === 'KIP'"></div>
+            <div :class="['parkingFee-tab', tabbarActive === '无牌缴费' && 'unlicensed-box-bottom']" v-if="supportUnlicensed && source !== 'KIP'">
+              <div :class="['bar', tabbarActive === '手动缴费' && 'active']" @click="tabbarActiveEvent('手动缴费')">手动缴费</div>
+              <div :class="['bar', tabbarActive === '无牌缴费' && 'active']" @click="tabbarActiveEvent('无牌缴费')">无牌缴费</div>
+            </div>
 
-          <!-- 手动缴费 -->
-          <div class="manual-box" v-if="tabbarActive === '手动缴费'">
-            <div class="parkingFee-search">
-              <div class="search_tip_1" :style="{paddingTop: supportUnlicensed? '0': '32px'}">
-                <div class="title">车辆类型</div>
-                <k-tab type="fill" @change="toggleType" :tabs="['普通车牌', '新能源', '特殊车牌']" />
-              </div>
-              <!-- <div class="search_tip">
-                <div class="title">车辆类型</div>
-                <div class="search_tip_pt">
-                  <div :class="carType == 0 ? 'search_tip_pt_index' : ''" @click="toggleType(0)">普通车牌</div>
-                  <div :class="carType == 1 ? 'search_tip_pt_index' : ''" @click="toggleType(1)">新能源</div>
-                  <div :class="carType == 2 ? 'search_tip_pt_index' : ''" @click="toggleType(2)">特殊车牌</div>
+            <!-- 手动缴费 -->
+            <div class="manual-box" v-if="tabbarActive === '手动缴费'">
+              <div class="parkingFee-search">
+                <div class="search_tip_1" :style="{paddingTop: supportUnlicensed? '0': '32px'}">
+                  <div class="title">车辆类型</div>
+                  <k-tab type="fill" @change="toggleType" :tabs="['普通车牌', '新能源', '特殊车牌']" />
                 </div>
-              </div> -->
-              <div class="input-box">
-                <!-- <div v-for="i in carType === 1 ? 8 : 7" class="li" :key="`numArr${i}`" @click="clickShowKeyboard(i)" :class="[active === i ? 'active' : '']">
-                  {{ numArr[i] }}
+                <!-- <div class="search_tip">
+                  <div class="title">车辆类型</div>
+                  <div class="search_tip_pt">
+                    <div :class="carType == 0 ? 'search_tip_pt_index' : ''" @click="toggleType(0)">普通车牌</div>
+                    <div :class="carType == 1 ? 'search_tip_pt_index' : ''" @click="toggleType(1)">新能源</div>
+                    <div :class="carType == 2 ? 'search_tip_pt_index' : ''" @click="toggleType(2)">特殊车牌</div>
+                  </div>
                 </div> -->
-                <div class="van-hairline--surround li" @click="clickShowKeyboard(0)" :class="[active === 0 ? 'active' : '']">
-                  {{ numArr[0] }}
-                </div>
-                <div class="van-hairline--surround li" @click="clickShowKeyboard(1)" :class="[active === 1 ? 'active' : '']">
-                  {{ numArr[1] }}
-                </div>
-                <div class="input_box_dian">·</div>
-                <div class="van-hairline--surround li" @click="clickShowKeyboard(2)" :class="[active === 2 ? 'active' : '']">
-                  {{ numArr[2] }}
-                </div>
-                <div class="van-hairline--surround li" @click="clickShowKeyboard(3)" :class="[active === 3 ? 'active' : '']">
-                  {{ numArr[3] }}
-                </div>
-                <div class="van-hairline--surround li" @click="clickShowKeyboard(4)" :class="[active === 4 ? 'active' : '']">
-                  {{ numArr[4] }}
+                <div class="input-box">
+                  <!-- <div v-for="i in carType === 1 ? 8 : 7" class="li" :key="`numArr${i}`" @click="clickShowKeyboard(i)" :class="[active === i ? 'active' : '']">
+                    {{ numArr[i] }}
+                  </div> -->
+                  <div class="van-hairline--surround li" @click="clickShowKeyboard(0)" :class="[active === 0 ? 'active' : '']">
+                    {{ numArr[0] }}
+                  </div>
+                  <div class="van-hairline--surround li" @click="clickShowKeyboard(1)" :class="[active === 1 ? 'active' : '']">
+                    {{ numArr[1] }}
+                  </div>
+                  <div class="input_box_dian">·</div>
+                  <div class="van-hairline--surround li" @click="clickShowKeyboard(2)" :class="[active === 2 ? 'active' : '']">
+                    {{ numArr[2] }}
+                  </div>
+                  <div class="van-hairline--surround li" @click="clickShowKeyboard(3)" :class="[active === 3 ? 'active' : '']">
+                    {{ numArr[3] }}
+                  </div>
+                  <div class="van-hairline--surround li" @click="clickShowKeyboard(4)" :class="[active === 4 ? 'active' : '']">
+                    {{ numArr[4] }}
+                  </div>
+                  <div class="van-hairline--surround li" @click="clickShowKeyboard(5)" :class="[active === 5 ? 'active' : '']">
+                    {{ numArr[5] }}
+                  </div>
+                  <div :class="['van-hairline--surround li', active === 6 ? 'active' : '']" @click="clickShowKeyboard(6)">
+                    {{ numArr[6] }}
+                  </div>
+                  <div class="li dashed green-active" @click="clickShowKeyboard(7)" :class="[active === 7 ? 'active' : '']" >
+                    <span v-if="numArr[7] && carType === 1">{{ numArr[7] }}</span>
+                    <img v-else :src="require('./static/images/unlicensed/leaf.svg')">
+                  </div>
                 </div>
-                <div class="van-hairline--surround li" @click="clickShowKeyboard(5)" :class="[active === 5 ? 'active' : '']">
-                  {{ numArr[5] }}
-                </div>
-                <div :class="['van-hairline--surround li', active === 6 ? 'active' : '']" @click="clickShowKeyboard(6)">
-                  {{ numArr[6] }}
+                <k-button title="查询缴费" style="margin-top: 46px;margin-bottom: 43px;" :disabled="disabledBtn" disabledColor="#D1D2D9" @click="preHandleSearch" />
+                <!-- <div type="primary" class="search-btn" :class="disabledBtn ? 'disabled-btn' : ''" :disabled="disabledBtn" @click="preHandleSearch">查询缴费</div> -->
+              </div>
+              <div class="vehicleMgt-list">
+                <div class="vehicleMgt-title">
+                  <div>历史查询车辆</div>
+                  <!-- <image src="./static/images/icon5.png" class="vehicleMgt-title-img"/> -->
                 </div>
-                <div class="li dashed green-active" @click="clickShowKeyboard(7)" :class="[active === 7 ? 'active' : '']" >
-                  <span v-if="numArr[7] && carType === 1">{{ numArr[7] }}</span>
-                  <img v-else :src="require('./static/images/unlicensed/leaf.svg')">
+                <div class="vehicleMgt-content" v-if="carList.length">
+                  <div class="item" v-for="(item, index) in carList" :key="index" @click="toHandleSearch(item, 1)" :class="vehicleNumber == item ? 'vehicleMgt-content_cls' : ''">
+                    {{ item | formatCarno }}
+                  </div>
                 </div>
               </div>
-              <k-button title="查询缴费" style="margin-top: 46px;margin-bottom: 43px;" :disabled="disabledBtn" disabledColor="#D1D2D9" @click="preHandleSearch" />
-              <!-- <div type="primary" class="search-btn" :class="disabledBtn ? 'disabled-btn' : ''" :disabled="disabledBtn" @click="preHandleSearch">查询缴费</div> -->
             </div>
-            <div class="vehicleMgt-list">
-              <div class="vehicleMgt-title">
-                <div>历史查询车辆</div>
-                <!-- <image src="./static/images/icon5.png" class="vehicleMgt-title-img"/> -->
+
+            <!-- 无牌缴费 -->
+            <div class="unlicensed-box" v-else>
+              <!-- 无牌车 -->
+              <!-- <k-illustration name="no-parking-fee" description="未查询到无牌车信息" /> -->
+              <div class="no-car-unlicensed-box" v-if="!unlicensedCar">
+                <img :src="`${require(`./static/images/unlicensed-1.png`)}`" />
+                <div class="no-car-unlicensed-info">未查询到无牌车信息</div>
+                <div class="search-btn no-car-unlicensed-btn" @click="scanCarCode">
+                  <!-- <van-icon name="scan" />扫描进场二维码领取无牌车号牌 -->
+                  <img class="unlicensed-scan" :src="`${require(`./static/images/unlicensed-scan.png`)}`" /><sapn class="text">扫描进场二维码领取无牌车号牌</sapn>
+                </div>
               </div>
-              <div class="vehicleMgt-content" v-if="carList.length">
-                <div class="item" v-for="(item, index) in carList" :key="index" @click="toHandleSearch(item, 1)" :class="vehicleNumber == item ? 'vehicleMgt-content_cls' : ''">
-                  {{ item | formatCarno }}
+              <!-- 有无牌车 -->
+              <div class="in-car" v-else>
+                <div class="car-number-box">
+                  <img :src="`${require(`./static/images/unlicensed-0.png`)}`" />
+                  <div class="car-number">
+                    <div class="number">{{ unlicensedCar }}</div>
+                    <div class="tips">车辆类型:无牌车辆</div>
+                  </div>
                 </div>
+                <div class="search-btn" @click="unlicensedToPay">去支付</div>
               </div>
             </div>
           </div>
-
-          <!-- 无牌缴费 -->
-          <div class="unlicensed-box" v-else>
-            <!-- 无牌车 -->
-            <!-- <k-illustration name="no-parking-fee" description="未查询到无牌车信息" /> -->
-            <div class="no-car-unlicensed-box" v-if="!unlicensedCar">
-              <img :src="`${require(`./static/images/unlicensed-1.png`)}`" />
-              <div class="no-car-unlicensed-info">未查询到无牌车信息</div>
-              <div class="search-btn no-car-unlicensed-btn" @click="scanCarCode">
-                <!-- <van-icon name="scan" />扫描进场二维码领取无牌车号牌 -->
-                <img class="unlicensed-scan" :src="`${require(`./static/images/unlicensed-scan.png`)}`" /><sapn class="text">扫描进场二维码领取无牌车号牌</sapn>
+          <div class="parkingFee-top">
+            <div class="top_content">
+              <div class="title_box">
+                <span class="btn">缴费说明</span>
               </div>
-            </div>
-            <!-- 有无牌车 -->
-            <div class="in-car" v-else>
-              <div class="car-number-box">
-                <img :src="`${require(`./static/images/unlicensed-0.png`)}`" />
-                <div class="car-number">
-                  <div class="number">{{ unlicensedCar }}</div>
-                  <div class="tips">车辆类型:无牌车辆</div>
-                </div>
+              <!--            <div class="sub_title_box">-->
+              <!--              <span class="btn">基础计费规则:</span>-->
+              <!--            </div>-->
+
+              <div class="info" :class="!init_ch ? 'info_show' : ''">
+                <!-- <p></p> -->
+                <!-- <p>{{ description }}</p> -->
+                <div v-html="description"></div>
               </div>
-              <div class="search-btn" @click="unlicensedToPay">去支付</div>
             </div>
+            <div class="top_down" @click="top_display" v-if="!init_ch && description && description.length > 60"><van-icon name="arrow-down" /></div>
+            <div class="top_down" @click="top_display" v-else><van-icon name="arrow-up" /></div>
           </div>
         </div>
-        <div class="parkingFee-top">
-          <div class="top_content">
-            <div class="title_box">
-              <span class="btn">缴费说明</span>
-            </div>
-<!--            <div class="sub_title_box">-->
-<!--              <span class="btn">基础计费规则:</span>-->
-<!--            </div>-->
-            
-            <div class="info" :class="!init_ch ? 'info_show' : ''">
-              <!-- <p></p> -->
-              <!-- <p>{{ description }}</p> -->
-              <div v-html="description"></div>
-            </div>
-          </div>
-          <div class="top_down" @click="top_display" v-if="!init_ch && description && description.length > 60"><van-icon name="arrow-down" /></div>
-          <div class="top_down" @click="top_display" v-else><van-icon name="arrow-up" /></div>
-        </div>
       </div>
-      <plate-number ref="plateKeyboard" :noDisBtn="[32, 33, 34,35, 36, 37]" :carType="carType" :active="active" :ind="ind" :numArr="numArr" @carnoArr="updateCarno"></plate-number>
-    </div>
-  </scroll-view>
+    </scroll-view>
+    <plate-number ref="plateKeyboard" :noDisBtn="[32, 33, 34,35, 36, 37]" :carType="carType" :active="active" :ind="ind" :numArr="numArr" @carnoArr="updateCarno"></plate-number>
+  </div>
 </template>
 
 <script>
@@ -370,7 +372,9 @@ export default {
               }
             }
             &.active {
-              border-color: var(--k-color-primary-01, #064c8a);
+              &::after{
+                border-color: var(--k-color-primary-01, #064c8a);
+              }
             }
             &.green-active {
               background: #F8FFED;

+ 8 - 4
src/pages/parkingFee/parkingFeeDetail.vue

@@ -35,21 +35,21 @@
             <van-icon name="arrow"/>
           </div>
         </div>
-        <div class="info-item-box" v-if="orderDetail && orderDetail.discountInfo">
+        <div class="info-item-box" v-if="enablePoints">
           <div class="label">积分减免</div>
           <div :class="['value']" @click="showPointsMathPopup('bottom')">
             <span :class="[integralDesc === '今日已达上限' ? 'text-disable' : 'text-red']">{{ integralDesc }}</span>
             <van-icon name="arrow"/>
           </div>
         </div>
-        <div class="info-item-box" v-if="orderDetail && orderDetail.discountInfo">
+        <div class="info-item-box" v-if="enableCoupon">
           <div class="label">优惠劵</div>
           <div :class="['value',]" @click="coupon">
             <span :class="[ coupons.length > 0 ? 'text-red':  'text-disable']">{{ couponDesc }}</span>
             <van-icon name="arrow"/>
           </div>
         </div>
-        <div class="info-item-box" v-if="enablePaperCoupons || orderDetail.parkInfo.parkMallCode === 1">
+        <div class="info-item-box" v-if="enablePaperCoupons">
           <div class="label">纸质优惠劵</div>
           <div :class="['value', 'text-red']" @click="paperCoupon">扫描纸质优惠劵二维码
             <van-icon name="arrow"/>
@@ -110,7 +110,11 @@
           </div>
         </div>
         <div class="btn-box">
-          <k-button style="width: 100%;max-width: 240px" title="支付" disabledColor="#D1D2D9" @click="toPay"/>
+          <k-button :disabled="btnLoading" style="width: 100%;max-width: 240px" title="支付" disabledColor="#D1D2D9" @click="toPay">
+            <template v-slot:left>
+              <van-loading v-if="btnLoading" size="20" color="#fff" style="margin-right: 10px"/>
+            </template>
+          </k-button>
         </div>
 
       </div>

+ 2 - 1
src/pages/parkingFee/parkingFeePaperCoupon.vue

@@ -4,7 +4,8 @@
       <div class="worp">
         <div class="title">纸质优惠劵减免说明</div>
         <div style="font-size: 28px; color: #808080; padding-top: 12px">
-          {{ (orderDetail && orderDetail.parkingRule && orderDetail.parkingRule.paperCouponsDescription) || '' }}
+          <!-- {{ (orderDetail && orderDetail.parkingRule && orderDetail.discountInfo.paperCoupons[0].description) || '' }} -->
+          {{ paperCouponsDesc }}
         </div>
       </div>
       <div v-if="paperCouponList.length">

+ 1 - 1
src/pages/parkingFee/parkingReceipt/parkingReceipt.vue

@@ -357,7 +357,7 @@ export default {
         border-radius: 2px;
         position:absolute;
         right: 168px;
-        z-index: 9999;
+        z-index: 500;
       }
       .my-invoiced-list {
         align-items: flex-end;

+ 2 - 0
src/store/index.js

@@ -153,6 +153,8 @@ const store = new Vuex.Store({
       state.isInit = payload;
     },
     SET_LBS_ID( state,payload ) {
+      uni.setStorageSync('lbsId',payload);
+      uni.setStorageSync('mallId',payload);
       state.lbsId = payload;
     },
     SET_BRAND_ID( state,payload ) {

+ 17 - 15
src/store/order/coupon.js

@@ -16,25 +16,27 @@ export default {
         let bN = bTime.getTime(bTime) // 方法2
         return aN - bN;
       }
-      const coupons = checkOutResponse.discountInfo.coupons.sort(couponSort)
-      commit('setCoupons',coupons);
-      // 统计已选择优惠券
-      let couponCount = 0;
-      checkOutResponse.discountInfo.coupons.forEach(( elm ) => {
-        const selected = elm.hasOwnProperty('selected') ? elm.selected : elm.defaultSelected;
-        if ( selected ) {
-          couponCount++;
+      if ( checkOutResponse?.discountInfo?.coupons?.length ) {
+        const coupons = checkOutResponse.discountInfo.coupons.sort(couponSort)
+        commit('setCoupons',coupons);
+        // 统计已选择优惠券
+        let couponCount = 0;
+        checkOutResponse.discountInfo.coupons.forEach(( elm ) => {
+          const selected = elm.hasOwnProperty('selected') ? elm.selected : elm.defaultSelected;
+          if ( selected ) {
+            couponCount++;
+          }
+        });
+        commit('setCouponCount',couponCount);
+
+        if ( couponCount > 0 ) {
+          return commit('setCouponDesc',`已选择${ couponCount }张优惠劵`);
         }
-      });
-      commit('setCouponCount',couponCount);
-      if ( couponCount > 0 ) {
-        return commit('setCouponDesc',`已选择${ couponCount }张优惠劵`);
-      } else {
         if ( checkOutResponse.discountInfo.coupons.length ) {
           return commit('setCouponDesc',`您有${ checkOutResponse.discountInfo.coupons.length }张可用优惠劵`);
-        }
-        return commit('setCouponDesc',`暂无可用优惠券`);
+        }  
       }
+      commit('setCouponDesc',`暂无可用优惠券`);
     } else {
       commit('setCouponDesc',`暂无可用优惠券`);
     }

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

@@ -1,4 +1,4 @@
-import checkOutQHResponse from "@/api/mockData/checkout.hz1.response.json";
+import checkOutQHResponse from "@/api/mockData/checkout.pd14.response.json";
 import { checkOut,calculateDiscount,ordersAndPrepay,currentUnlicensedPlate,unlicensedCarCheckIn,unlicensedCarCheckout } from '@/api/parking';
 import state from "@/store/order/state";
 import mutations from "@/store/order/mutations";
@@ -69,6 +69,8 @@ export default {
       commit('setParkMallCode', checkOutResponse.parkInfo.parkMallCode)
       commit('setOrderDetail',checkOutResponse);
       const isShowDiscounts = checkOutResponse?.parkingRule?.enableCoupon || false;
+      // 纸质优惠券
+      dispatch('paperCouponRule')
       // 是否展示优惠
       commit('setIsShowDiscounts',isShowDiscounts);
       if ( checkOutResponse.parkingRule ) {
@@ -83,8 +85,6 @@ export default {
         // 电子优惠券:是否启用
         // 处理电子优惠券相关逻辑
         dispatch('couponRule',checkOutResponse);
-        // 纸质优惠券(hold)
-        commit('setEnablePaperCoupons',checkOutResponse?.parkingRule?.enablePaperCoupons || false);
         // 其他数据收集
         commit('setUsingTotalDiscount',checkOutResponse?.discountInfo?.usingTotalDiscount || 0);
         // console.log(191, checkOutResponse?.parkingRecord.hasOwnProperty(actualPayFee));

+ 4 - 0
src/store/order/mutations.js

@@ -47,6 +47,9 @@ export default {
   setEnablePaperCoupons( state,payload ) {
     state.enablePaperCoupons = payload;
   },
+  setPaperCouponsDesc( state,payload ) {
+    state.paperCouponsDesc = payload;
+  },
   setUsingTotalDiscount( state,payload ) {
     state.usingTotalDiscount = payload;
   },
@@ -136,6 +139,7 @@ export default {
     state.couponCount = 0; // 已选择优惠券
     state.couponDesc = ''; // 优惠券说明文案
     state.enablePaperCoupons = false; // 启动纸质优惠券
+    state.paperCouponsDesc = ''; // 纸质优惠券说明
     state.usingTotalDiscount = 0; // 优惠金额
     state.actualPayFee = 0; // 应付金额
     state.availableDiscountFee = 0; // 当日剩余可使用优惠金额

+ 17 - 3
src/store/order/paperCoupon.js

@@ -1,5 +1,7 @@
 import { calculateDiscount } from "@/api/parking";
+import {paperCouponDescription} from '@/utils/api-crm-member'
 import { setSelected } from "@/store/order/utils";
+import uni from '@/utils/uniHooks'; 
 
 export default {
   /*
@@ -14,9 +16,21 @@ export default {
    },
    * 
    * */
-  paperCouponRule( {commit,dispatch,state},checkOutResponse ) {
-    if ( checkOutResponse.parkingRule.enablePaperCoupons ) {
-
+  async paperCouponRule( {commit,dispatch,state},checkOutResponse ) {
+    const groupId = uni.getStorageSync('groupId')
+    const mallId = uni.getStorageSync('mallId')
+    if(!mallId ||!mallId) {
+      commit('setEnablePaperCoupons', false);
+      return
+    }
+    const res = await paperCouponDescription({
+      groupId: groupId,
+      mallId: mallId
+    })
+    console.log(30, res)
+    if (res.msg === 'success' && res.data) {
+      commit('setEnablePaperCoupons', true);
+      commit('setPaperCouponsDesc', res.data)
     }
   },
   async savePaperCoupon( {commit,dispatch,state},{paperCoupons,callback} ) {

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

@@ -21,6 +21,7 @@ export default {
       maxOneDayDiscountFee, // 每日最大优惠金额(深圳车场)
       remainConsumeTime, // 当前订单剩余可使用的优惠
     } = parkingRule;
+    commit('setEnablePoints',enablePoints);
     if ( !points ) return commit('setIntegralDesc','暂无可用积分'); // 积分优惠处的描述
     const [
       {
@@ -37,7 +38,7 @@ export default {
     ] = points;
     commit('setAvailableDiscountFee',availableDiscountFee);
     dispatch('maxPointsTimeMath',checkOutResponse) // 剩余积分可兑换上限
-    commit('setEnablePoints',enablePoints);
+    
     commit('setAvailable',available);
     commit('setMaxPointsTime',maxPointsTime);
     commit('setMaxDiscountFee',maxDiscountFee);
@@ -198,8 +199,8 @@ export default {
       parkInfo: {parkMallCode},
       parkingRule,
     } = state.orderDetail;
-    const [{pointsPerHour,available,discountFee}] = points;
-    const {maxPointsTime,enablePoints,unitAmount} = parkingRule;
+    const [{pointsPerHour,available,discountFee, unitAmount}] = points;
+    const {maxPointsTime,enablePoints} = parkingRule;
     if ( !points ) {
       callback && callback();
       return
@@ -209,11 +210,10 @@ export default {
     if ( parkMallCode === 5 ) {
       pointsTime = discountFee || 0
     } else  {
-      pointsTime = discountFee ?  discountFee / unitAmount: 0
+      pointsTime = discountFee ?  discountFee / unitAmount : 0
     }
-    
     commit('setAvailable',available);
-    commit('setPointsTime',discountFee || 0);
+    commit('setPointsTime',pointsTime || 0);
     callback && callback();
   },
   async savePointsMath( {commit,dispatch,state},callback ) {

+ 1 - 0
src/store/order/state.js

@@ -16,6 +16,7 @@ export default  {
   couponCount: 0, // 已选择优惠券
   couponDesc: '', // 优惠券说明文案
   enablePaperCoupons: false, // 启动纸质优惠券
+  paperCouponsDesc: '', // 纸质优惠券说明文案
   usingTotalDiscount: 0, // 优惠金额
   actualPayFee: 0, // 应付金额
   availableDiscountFee: 0, // 当日剩余可使用优惠金额

+ 8 - 0
src/utils/api-crm-member.js

@@ -105,3 +105,11 @@ export function crmSaveMemberSource(params) {
   const url = `${BASE_URL}api/1.0/login/updateRegister`;
   return request.post(url, params);
 }
+
+
+// https://kerryprops.atlassian.net/browse/SCRM-4004
+// 临停|UI获取纸质券描述|增加API
+export function paperCouponDescription( {groupId, mallId}) {
+  const url = `${window.cmrApi}/1.0/park/paperCouponDescription?groupId=${groupId}&mallId=${mallId}`;
+  return request.post(url);
+}

+ 6 - 0
src/utils/index.js

@@ -175,12 +175,15 @@ export function initEnv() {
   if ( /dev-|8080/.test(href) ) {
     window.env = 'qa';
     window.profileApi = 'https://qa-apim.kerryplus.com/c/api';
+    window.cmrApi = 'https://qa-crm.kerryplus.com/xcrm-api/api';
     window.api = 'qaApi';
     // window.env = 'dev';
     // window.profileApi = 'https://dev-gateway-kip.kerryonvip.com/api';
+    // window.cmrApi = 'https://dev-crm.kerryplus.com/xcrm-api/api';
     // window.api = 'devApi';
     // window.env = 'prod';
     // window.profileApi = 'https://sl-apim.kerryplus.com/c/api';
+    // window.cmrApi = 'https://sl-crm.kerryplus.com/xcrm-api/api';
     // window.api = 'api';
     return;
   }
@@ -188,16 +191,19 @@ export function initEnv() {
     window.env = 'qa';
     window.api = 'qaApi';
     window.profileApi = 'https://qa-apim.kerryplus.com/c/api';
+    window.cmrApi = 'https://qa-crm.kerryplus.com/xcrm-api/api';
     return;
   }
   if ( /sl-/.test(href) ) {
     window.env = 'prod';
     window.profileApi = 'https://sl-apim.kerryplus.com/c/api';
+    window.cmrApi = 'https://sl-crm.kerryplus.com/xcrm-api/api';
     window.api = 'api';
     return;
   }
   window.env = 'prod';
   window.profileApi = 'https://apim.kerryplus.com/c/api';
+  window.cmrApi = 'https://crm.kerryplus.com/xcrm-api/api';
   window.api = 'api';
 }