浏览代码

Merge branch 'release-3.1.0' into lock/release-2.23.0/KIP-11004

Tron 1 年之前
父节点
当前提交
bbfcc05df1

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "temporay-parking",
-  "version": "2.23.0",
+  "version": "3.0.0",
   "private": true,
   "scripts": {
     "serve": "cross-env NODE_ENV=dev vue-cli-service serve",

+ 6 - 0
src/api/parking/index.js

@@ -329,4 +329,10 @@ export function getPortalsByLbs(brandId,lbsIds) {
 export function getCarInformation(carNum) {
   return window.requestms.get(`parking/find-car-location/${carNum}`, {} , { loading: false });
   // return window.requestms.delete(`https://dev-kip-service-internal.kerryonvip.com/temporary-parking-service/vehicles/${vehicleId}`, params, { loading: false });
+
+// https://kerryprops.atlassian.net/browse/KIP-13961
+// C端|迁移CRM纸质优惠券接口
+// https://qa-apim.kerryplus.com/c/api/temporary-parking/v1/parking-lots/paper-coupon-description?brandId=8a84853b7c91ac5b017c962dab55030e&lbsId=8a84853b7c91ac5b017c961a9b2a030d&parkMallCode=2
+export function getPaperCouponDescription({brandId,lbsId, parkMallCode}) {
+  return window.requestms.get(`parking-lots/paper-coupon-description?brandId=${brandId}&lbsId=${lbsId}&parkMallCode=${parkMallCode}`, {} , { loading: false });
 }

+ 4 - 5
src/api/request.js

@@ -110,7 +110,7 @@ function XUser(config) {
     delete params.userId
     delete params.phoneNumber
   }
-  if (params.isLogin && (!params.vipCode || !params.userId) && config.url.indexOf('/parking-lots/') < -1 || !params.sourceId) {
+  if (params.isLogin && (!params.vipCode || !params.userId || params.userId == 'undefined') && config.url.indexOf('/parking-lots/') < -1 || !params.sourceId) {
     throw {
       response: {
         data: {
@@ -121,7 +121,7 @@ function XUser(config) {
   }
   // 如果 token 存在, 但是没有 vipCode 或者 userId
   const kipAccessToken =uni.getStorageSync('kipAccessToken')
-  if (kipAccessToken && (!params.vipCode || !params.userId) && config.url.indexOf('/parking-lots/') < -1) {
+  if (kipAccessToken && (!params.vipCode || !params.userId || params.userId == 'undefined') && config.url.indexOf('/parking-lots/') < -1) {
     throw {
       response: {
         data: {
@@ -225,12 +225,11 @@ export const createAxiosByinterceptors = (config) => {
       return response.data;
     },
     function (error) {
-      console.error('error.config.url', error.config.url)
       console.log('error', error);
       // 请求超时
-      if (error.code === 'ECONNABORTED') {
+      if (error?.code === 'ECONNABORTED') {
         let msg = '请求超时,请稍后重试'
-        if(error.config.url.indexOf('parking-lots/lbs') > -1 || error.config.url.indexOf('/parking/unlicensed-car-checkout') > -1 || error.config.url.indexOf('/parking/check-out') > -1) {
+        if(error?.config?.url.indexOf('parking-lots/lbs') > -1 || error?.config?.url.indexOf('/parking/unlicensed-car-checkout') > -1 || error?.config?.url.indexOf('/parking/check-out') > -1) {
           msg = '车场连接有问题,请联系服务台!'
         }
         Toast.clear()

文件差异内容过多而无法显示
+ 3 - 0
src/common/css/quill.snow.css


+ 34 - 1
src/common/js/BaseDictionary.js

@@ -279,4 +279,37 @@ export const ENVIRONMENTS = {
     trackingBaseUrl: 'https://t.kerryplus.com/sa.gif',
     trackingRemarkPre: 'online'
   },
-};
+};
+
+/* 
+前海->QH, 浦东->PD, 静安->JA, 杭州->HZ, 沈阳->SY, 天津->TJ, 北京->BJ, 合集1期->HJ1,合集3期->HJ3,福州->FZ,南昌->NC
+
+车场唯一编号 0静安 1浦东 2杭州 3北京 4沈阳 5深圳 6天津 7合集一期 8福州 9合集三期
+*/
+export const tempParkingH5VoucherSwitchByParkMallCode = {
+  // '8a84853b7c91ac5b017c961a9b2a030d': 'HZ', // qa
+  // '8a8883557cca9463017ccb002b360001': 'HZ', // prod
+  '2': 'HZ', // prod
+  // '8a8486a37f48f7bd017f4e5bddd10000': 'QH', // qa
+  // '8a88a9fd7f73ffcd017f968739870006': 'QH', // prod
+  '5': 'QH', // prod
+  // '8a8481f57cca9442017ce02875b8004a': 'PD', // qa
+  // '8a88835c7cd96d31017cda3f77e80003': 'PD', // prod
+  '1': 'PD', // prod
+  // '8a8481f57cca9442017ce026ddd40049': 'JA', // qa
+  // '8a88835c7cd96d31017cda2fd9910000': 'JA', // prod
+  '0': 'JA', // prod
+  // '8a84854a7cfd947d017d02861a9d0002': 'SY', // qa
+  // '8a888aed7d0295e5017d029ff1f40000': 'SY', // prod
+  '4': 'SY', // prod
+  // '8a84819f7c6e260e017c72a446c201c4': 'TJ', // qa
+  // '8a8883557cca9463017ccb0ce0a00002': 'TJ', // prod
+  '6': 'TJ', // prod
+  // '8a8485067ce4da2d017ce555e9b20000': 'BJ', // qa
+  // '8a8884e77cc9e70a017cca4003590008': 'BJ', // prod
+  '3': 'BJ',
+  '7': 'HJ1',
+  '9': 'HJ3',
+  '8': 'FZ',
+  '10': 'NC',
+}

+ 1 - 1
src/main.js

@@ -1,7 +1,7 @@
 import Vue from 'vue';
 import VueRouter from 'vue-router';
 import VConsole from 'vconsole';
-
+import '@/common/css/quill.snow.css'; // 引入对富文本的支持
 
 // 或者使用配置参数来初始化,详情见文档
 // 开发环境和qa环境 打开debug

+ 33 - 3
src/pages/parkingFee/mixins/parkingFee.js

@@ -304,7 +304,11 @@ export default {
         const res = await parkingLots(this.$store.state.lbsId); // TODO: 临时写死
         console.log(res);
         let reg = /[;;]/g;
-        this.description = res?.description?.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');
+        if(res?.ruleDescription) {
+          this.description = res.ruleDescription;
+        } else {
+          this.description = res?.description?.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');
+        }
         this.supportUnlicensed = res.supportUnlicensed || false
         const carList = uni.getStorageSync('carList');
         if (carList) {
@@ -712,6 +716,30 @@ export default {
       })
       // return false
     },
+    async jumpToPreJudgmentOfParkingInvoice2() {
+      return new Promise(async (resolve) => {
+        try {
+          // 判断是否启用停车发票
+          uni.showLoading()
+          const res = await getConfValueOfKey('nchcInvoiceSwitch')
+          const lbsId = uni.getStorageSync('lbsId')
+          if(res?.switch && res.lbsId.length && res.lbsId.indexOf(lbsId) > -1) {
+            uni.hideLoading();
+            this.$dialog({
+              title: '温馨提示',
+              message: res.message,
+              confirmButtonColor: this.$theme[this.theme].primaryColor
+            })
+            resolve(true)
+          }
+          resolve(false)
+        } catch (err) {
+          console.log(err);
+          resolve(false)
+        }
+      })
+      // return false
+    },
     //停车发票
     doRouter1: async function () {
       const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
@@ -962,8 +990,10 @@ export default {
           this.doRouter3()
           break
         case 'PARKING_INVOICE': // 停车开票
-          const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
-          if (isJump) return
+          // const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
+          // if (isJump) return
+          const isJump2 = await this.jumpToPreJudgmentOfParkingInvoice2();
+          if(isJump2) return
           uni.hideLoading()
           uni.removeStorageSync('invoiceindex');
           this.$store.dispatch('clearUnlicensed');

+ 4 - 1
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -777,7 +777,10 @@ export default {
     },
     // 
     setDescription() {
-      if ( this?.orderDetail?.parkInfo?.description.length > 0 ) {
+      if ( this?.orderDetail?.parkInfo?.ruleDescription?.length > 0 ) {
+        return this?.orderDetail?.parkInfo?.ruleDescription;
+      }
+      if ( this?.orderDetail?.parkInfo?.description?.length > 0 ) {
         let reg = /[;;]/g;
         return this.orderDetail.parkInfo.description.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');  
       } 

+ 32 - 8
src/pages/parkingFee/mixins/parkingFeeDiscounts.js

@@ -233,7 +233,7 @@ export default {
       const { memberGrade = [{}], consume = [], memberLevelDiscount, points = [{}] } = this.orderDetail.discountInfo;
       const { maxConsumeTime, remainConsumeTime, hourPrice } = this.orderDetail.parkingRule;
       // 如果积分存在的话,则移除积分的优惠
-      if (JSON.stringify(points) !== {}) {
+      if (points.length && JSON.stringify(points[0]) !== "{}") {
         this.remainPrice = this.parkMallCode !== 1 ? this.usingTotalDiscount - points[0].discountFee : this.usingTotalDiscount;
       }
       this.memberGrade = { ...memberGrade[0] };
@@ -254,7 +254,8 @@ export default {
       this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : this.consume.defaultDiscountTime;
       if (JSON.stringify(this.consume) !== '{}') {
         const isSelected = this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected;
-        this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : this.consume.defaultDiscountTime;
+        this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
+        this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
         // const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee) / hourPrice
         // if (remainingLimitToIncrease) {
         //   this.maxReduceDiscountInit();
@@ -371,8 +372,17 @@ export default {
         return;
       }
     },
-    memberClick() {
-      // debugger
+    async memberClick() {
+      await waitByTime(200)
+      // 没有优惠时不做多余的事情
+      if(JSON.stringify(this.memberGrade) === '{}') {
+        return;
+      }
+      if(!this.actualPayFee) {
+        Toast('当前无需追加优惠')
+        this.checkedList = this.checkedList.filter(elm => elm !== 'member')
+        return;
+      }
       const { maxConsumeTime, remainConsumeTime, availableDiscountFee, hourPrice } = this.orderDetail.parkingRule;
       if (this.checkedList.indexOf('member') > -1) {
         /* 浦东 */
@@ -402,7 +412,7 @@ export default {
         }
         this.remainPrice = this.remainPrice - this.memberGrade.discountFee;
         // 如果不是沈阳,重新计算优惠
-        if (this.parkMallCode !== 4 && this.parkMallCode !== 6) {
+        if (this.parkMallCode !== 4 && this.parkMallCode !== 6 && JSON.stringify(this.consume) !== '{}') {
           this.maxReduceDiscount = remainConsumeTime;
         }
         // 如果不是沈阳,重新计算优惠
@@ -420,7 +430,21 @@ export default {
         }
       }
     },
-    reducesClick() {
+    async reducesClick() {
+    await waitByTime(200)
+      if(!this.actualPayFee) {
+        Toast('当前无需追加优惠')
+        this.checkedList = this.checkedList.filter(elm => elm !== 'reduces')
+        return;
+      }
+      // 没有优惠时不做多余的事情
+      if(JSON.stringify(this.consume) === '{}') {
+        return;
+      }
+      // 浦东
+      if((this.parkMallCode === 1 || this.parkMallCode === 0) && (this.isReduces || !this.maxReduceDiscount) ) {
+        return;
+      }
       const { maxOneTimeDiscountTime, hourPrice, oneTimeLimitation, maxConsumeTime, remainConsumeTime, oneDayLimitation, maxOneDayDiscountFee, availableDiscountFee } = this.orderDetail.parkingRule;
       const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice;
       if (this.checkedList.indexOf('reduces') > -1) {
@@ -504,14 +528,14 @@ export default {
       // 如果初次进来操作的跟原来的不一样则重新计算优惠
       if (this.checkedList.length !== this.checkedTotal || true) {
         ['member', 'reduces'].forEach((key) => {
-          if (key === 'member') {
+          if (key === 'member' && JSON.stringify(this.memberGrade) !== '{}') {
             this.memberGrade = {
               ...this.memberGrade,
               selected: this.checkedList.indexOf(key) > -1,
             };
             orderDetail.discountInfo.memberGrade = [this.memberGrade];
           }
-          if (key === 'reduces') {
+          if (key === 'reduces' && JSON.stringify(this.consume) !== '{}') {
             this.consume = {
               ...this.consume,
               discountTime: this.reduceHours,

+ 6 - 3
src/pages/parkingFee/mixins/parkingFeeList.js

@@ -55,13 +55,16 @@ export default {
     canloading = true;
     pageNum = 0;  
     const member = uni.getStorageSync('member');
-     // 南昌办公楼展示自助积分功能接口请求出错
-     if (this.$store.state?.lbsId === '8a84834088f11119018949444636000c' || this.$store.state?.lbsId === '8a88817a8a629b5f018a838a0f6e001f') {
+    // 南昌办公楼接口请求
+    if (this.$store.state?.lbsId === '8a84834088f11119018949444636000c' || this.$store.state?.lbsId === '8a88817a8a629b5f018a838a0f6e001f') {
       this.list = [];
       this.numberOfElements = 1;
       this.pageNum = 0;
       this.loadData();
-     } else if ( !uni.getStorageSync('loadData') && !member ) {
+      return
+    }
+     this.loadData();
+     if ( !uni.getStorageSync('loadData') && !member ) {
       uni.setStorageSync('loadData','loadData')
       wxToLoginCallback('parkingFeeList',( options ) => {
         this.list = [];

+ 14 - 18
src/pages/parkingFee/parkingFee.vue

@@ -163,20 +163,15 @@
           </div>
           <div class="parkingFee-top">
             
-            <div class="top_content">
+            <div class="top_content ql-snow">
               <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 class="info" :class="[!init_ch ? 'info_show' : '', 'ql-editor']">
+                  <div v-html="description"></div>  
               </div>
             </div>
+            <div v-if="!init_ch && description && description.length > 60" class="top_down_filter"></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>
@@ -676,7 +671,7 @@ export default {
           padding-left: 2px;
           font-size: 27px;
           width: 95%;
-          color: #666;
+          // color: #666;
           line-height: 45px;
           p {
             margin: 0;
@@ -684,21 +679,22 @@ export default {
         }
 
         .info_show {
-          word-break: break-all;
-          text-overflow: ellipsis;
+          height: 150px;
           overflow: hidden;
-          display: -webkit-box;
-          -webkit-line-clamp: 2;
-          -webkit-box-orient: vertical;
         }
       }
-
+      .top_down_filter {
+        height: 150px;
+        margin-top: -150px;
+        background-color: #FBFCFF;
+        background: linear-gradient(to top, #FBFCFF, rgba(0, 123, 255, 0));
+      }
       .top_down {
         width: 100%;
         text-align: center;
         color: #999999;
-        margin-top: 25px;
-        margin-bottom: 20px;
+        padding-top: 25px;
+        padding-bottom: 20px;
       }
     }
   }

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

@@ -70,14 +70,13 @@
         </div>
       </div>
 
-      <div class="description-box">
+      <div class="description-box ql-snow">
         <div class="title_box">
           <span class="title">缴费说明</span>
         </div>
-<!--        <div class="sub_title_box">-->
-<!--          <span class="title">计费基础规则:</span>-->
-<!--        </div>-->
-        <div class="info" v-html="setDescription()"></div>
+        <div class="ql-editor">
+          <div v-html="setDescription()"></div>
+        </div>
       </div>
 <!--      <div style="height: 50px;"></div>-->
       <!-- 开启底部安全区适配 -->

+ 20 - 11
src/pages/parkingFeeV2/Discounts/index.js

@@ -112,7 +112,7 @@ export default {
     // }
     // 消费减免(拆分部分)提示文本
     reduceSplitMessage() {
-      // console.log(106, this.reduceHours);
+// console.log(106, this.reduceHours);
       if (!this.enableConsumeNonSplit) {
         return `选择${this.reduceHours}小时,`;
       }
@@ -257,7 +257,8 @@ export default {
       this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : this.consume.defaultDiscountTime;
       if (JSON.stringify(this.consume) !== '{}') {
         const isSelected = this.consume.hasOwnProperty('selected') ? this.consume.selected : this.consume.defaultSelected;
-        this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : this.consume.defaultDiscountTime;
+        this.maxReduceDiscount = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
+        this.reduceHours = this.consume.hasOwnProperty('discountFee') ? this.consume.discountFee / this.orderDetail.parkingRule.hourPrice : Math.min(this.consume.defaultDiscountTime, this.consume.maxDiscountTime);
         // const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee) / hourPrice
         // if (remainingLimitToIncrease) {
         //   this.maxReduceDiscountInit();
@@ -297,7 +298,7 @@ export default {
       
       const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee || 0) / hourPrice;
       // 如果是浦东的话, 重新计算优惠
-      if (this.parkMallCode === 1) {
+      if (this.parkMallCode === 1 || this.parkMallCode === 0) {
         /*
         * 消费减免真实可用优惠的计算逻辑
         * 消费减免可能选择的情况: X
@@ -411,6 +412,10 @@ export default {
     },
     async memberClick() {
       await waitByTime(200)
+      // 没有优惠时不做多余的事情
+      if(JSON.stringify(this.memberGrade) === '{}') {
+        return;
+      }
       if(!this.actualPayFee) {
         Toast('当前无需追加优惠')
         this.checkedList = this.checkedList.filter(elm => elm !== 'member')
@@ -419,7 +424,7 @@ export default {
       const { maxConsumeTime, remainConsumeTime, availableDiscountFee, hourPrice } = this.orderDetail.parkingRule;
       if (this.checkedList.indexOf('member') > -1) {
         /* 浦东 */
-        if(this.parkMallCode === 1) {
+        if(this.parkMallCode === 1 || this.parkMallCode === 0) {
           const [isCrossMessage = false, maxReduceDiscount = this.maxReduceDiscount] = this.crossMessage();
           if (!isCrossMessage) {
             this.remainPrice = this.memberGrade.discountFee + this.remainPrice;
@@ -438,14 +443,14 @@ export default {
         }
       } else if (!this.isMember) {
         // 浦东单独处理
-        if(this.parkMallCode === 1) {
+        if(this.parkMallCode === 1 && this.parkMallCode === 0) {
           this.remainPrice = this.remainPrice - this.memberGrade.discountFee;
           this.maxReduceDiscountInit();
           return
         }
         this.remainPrice = this.remainPrice - this.memberGrade.discountFee;
         // 如果不是沈阳,重新计算优惠
-        if (this.parkMallCode !== 4 && this.parkMallCode !== 6) {
+        if (this.parkMallCode !== 4 && this.parkMallCode !== 6 && JSON.stringify(this.consume) !== '{}') {
           this.maxReduceDiscount = remainConsumeTime;
         }
         // 如果不是沈阳,重新计算优惠
@@ -470,14 +475,18 @@ export default {
         this.checkedList = this.checkedList.filter(elm => elm !== 'reduces')
         return;
       }
+      // 没有优惠时不做多余的事情
+      if(JSON.stringify(this.consume) === '{}') {
+        return;
+      }
       // 浦东
-      if(this.parkMallCode === 1 && (this.isReduces || !this.maxReduceDiscount) ) {
+      if((this.parkMallCode === 1 || this.parkMallCode === 0) && (this.isReduces || !this.maxReduceDiscount) ) {
         return;
       }
       const { maxOneTimeDiscountTime, hourPrice, oneTimeLimitation, maxConsumeTime, remainConsumeTime, oneDayLimitation, maxOneDayDiscountFee, availableDiscountFee } = this.orderDetail.parkingRule;
       const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice;
       if (this.checkedList.indexOf('reduces') > -1) {
-        if(this.parkMallCode === 1) {
+        if(this.parkMallCode === 1 || this.parkMallCode === 0) {
           const [isCrossMessage = false, maxReduceDiscount = this.maxReduceDiscount] = this.crossMessage();
           if(isCrossMessage) {
             this.checkedList = this.checkedList.filter((elm) => elm !== 'reduces');
@@ -556,7 +565,7 @@ export default {
       // const {parkInfo,parkingRule,discountInfo} = this.orderDetail
       const { maxOneTimeDiscountTime, maxOneDayDiscountFee, oneTimeLimitation, oneDayLimitation, hourPrice, remainConsumeTime } = this.orderDetail.parkingRule;
       // 浦东
-      if (this.parkMallCode === 1) {
+      if (this.parkMallCode === 1 || this.parkMallCode === 0) {
         const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice;
         const remainConsumeTimeFee = remainConsumeTime * hourPrice;
 
@@ -574,14 +583,14 @@ export default {
       // 如果初次进来操作的跟原来的不一样则重新计算优惠
       if (this.checkedList.length !== this.checkedTotal || true) {
         ['member', 'reduces'].forEach((key) => {
-          if (key === 'member') {
+          if (key === 'member' && JSON.stringify(this.memberGrade) !== '{}') {
             this.memberGrade = {
               ...this.memberGrade,
               selected: this.checkedList.indexOf(key) > -1,
             };
             orderDetail.discountInfo.memberGrade = [this.memberGrade];
           }
-          if (key === 'reduces') {
+          if (key === 'reduces' && JSON.stringify(this.consume) !== '{}') {
             this.consume = {
               ...this.consume,
               discountTime: this.reduceHours,

+ 33 - 3
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -220,7 +220,11 @@ export default {
         const res = await parkingLots(this.$store.state.lbsId);
         // console.log(res);
         let reg = /[;;]/g;
-        this.description = res?.description?.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');
+        if(res?.ruleDescription) {
+          this.description = res.ruleDescription;
+        } else {
+          this.description = res?.description?.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');  
+        }
         this.supportUnlicensed = res.supportUnlicensed || false
         const carList = uni.getStorageSync('carList');
         if (carList) {
@@ -642,6 +646,30 @@ export default {
       })
       // return false
     },
+    async jumpToPreJudgmentOfParkingInvoice2() {
+      return new Promise(async (resolve) => {
+        try {
+          // 判断是否启用停车发票
+          uni.showLoading()
+          const res = await getConfValueOfKey('nchcInvoiceSwitch')
+          const lbsId = uni.getStorageSync('lbsId')
+          if(res?.switch && res.lbsId.length && res.lbsId.indexOf(lbsId) > -1) {
+            uni.hideLoading();
+            this.$dialog({
+              title: '温馨提示',
+              message: res.message,
+              confirmButtonColor: this.$theme[this.theme].primaryColor
+            })
+            resolve(true)
+          }
+          resolve(false)
+        } catch (err) {
+          console.log(err);
+          resolve(false)
+        }
+      })
+      // return false
+    },
     //停车发票
     doRouter1: async function () {
       const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
@@ -1024,8 +1052,10 @@ export default {
           })
           break
         case 'PARKING_INVOICE': // 停车开票
-          const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
-          if (isJump) return
+          // const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
+          // if (isJump) return
+          const isJump2 = await this.jumpToPreJudgmentOfParkingInvoice2();
+          if(isJump2) return
           uni.hideLoading()
           uni.removeStorageSync('invoiceindex');
           this.$store.dispatch('clearUnlicensed');

+ 4 - 3
src/pages/parkingFeeV2/mixins/parkingFeeCoupon.js

@@ -137,6 +137,7 @@ export default {
           this.remainPrice = this.remainPrice - this.couponList[index].discountFee
           this.newAvailableDiscountFee = this.newAvailableDiscountFee + this.couponList[index].discountFee
           this.newGroupedCouponData()
+          this.setAllDisabled()
           this.isDisabledByRule(coupon, index, 'showMsg');
         }, 100)
         return;
@@ -208,7 +209,7 @@ export default {
         }
       }
       // 杭州、福州电子券选择上限判断
-      if ( (parkMallCode === 2 || parkMallCode === 8) && this.checkedCouponList.length === this.remainCoupons ) {
+      if ( (parkMallCode === 2 || parkMallCode === 8 || parkMallCode === 7 || parkMallCode === 9) && this.checkedCouponList.length >= this.remainCoupons ) {
         this.couponList = this.couponList.map(( elm,iemi ) => {
           if ( !elm.disabled && this.checkedCouponList.indexOf(`coupon${ iemi }`) < 0 ) {
             elm.disabled = true
@@ -229,7 +230,7 @@ export default {
         return
       }
       // 如果杭州、福州的使用券打到上限则不自动计算其余券是否可选
-      if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8) ) {
+      if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8 || this.parkMallCode === 7 || this.parkMallCode === 9) ) {
         return
       }
       // console.log(292,this.couponList);
@@ -284,7 +285,7 @@ export default {
         });
       }
       // 电子券上限判断(杭州、福州)
-      if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8) ) {
+      if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8 || this.parkMallCode === 7 || this.parkMallCode === 9) ) {
         if ( showMsg ) return true
         return Toast({
           className: 'top300',

+ 4 - 1
src/pages/parkingFeeV2/mixins/parkingFeeDetail.js

@@ -884,7 +884,10 @@ export default {
     },
     // 
     setDescription() {
-      if ( this?.orderDetail?.parkInfo?.description.length > 0 ) {
+      if ( this?.orderDetail?.parkInfo?.ruleDescription?.length > 0 ) {
+        return this?.orderDetail?.parkInfo?.ruleDescription;
+      }
+      if ( this?.orderDetail?.parkInfo?.description?.length > 0 ) {
         let reg = /[;;]/g;
         return this.orderDetail.parkInfo.description.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');  
       } 

+ 14 - 18
src/pages/parkingFeeV2/parkingFee.vue

@@ -204,20 +204,15 @@
           </div>
           <div class="parkingFee-top">
             
-            <div class="top_content">
+            <div class="top_content ql-snow">
               <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 class="info" :class="[!init_ch ? 'info_show' : '', 'ql-editor']">
+                  <div v-html="description"></div>
               </div>
             </div>
+            <div v-if="!init_ch && description && description.length > 60" class="top_down_filter"></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>
@@ -810,7 +805,7 @@ export default {
           padding-left: 2px;
           font-size: 27px;
           width: 95%;
-          color: #666;
+          // color: #666;
           line-height: 45px;
           p {
             margin: 0;
@@ -818,21 +813,22 @@ export default {
         }
 
         .info_show {
-          word-break: break-all;
-          text-overflow: ellipsis;
+          height: 150px;
           overflow: hidden;
-          display: -webkit-box;
-          -webkit-line-clamp: 2;
-          -webkit-box-orient: vertical;
         }
       }
-
+      .top_down_filter {
+        height: 150px;
+        margin-top: -150px;
+        background-color: #FBFCFF;
+        background: linear-gradient(to top, #FBFCFF, rgba(0, 123, 255, 0));
+      }
       .top_down {
         width: 100%;
         text-align: center;
         color: #999999;
-        margin-top: 25px;
-        margin-bottom: 20px;
+        padding-top: 25px;
+        padding-bottom: 20px;
       }
     }
   }

+ 4 - 5
src/pages/parkingFeeV2/parkingFeeDetail.vue

@@ -70,14 +70,13 @@
         </div>
       </div>
 
-      <div class="description-box">
+      <div class="description-box ql-snow">
         <div class="title_box">
           <span class="title">缴费说明</span>
         </div>
-<!--        <div class="sub_title_box">-->
-<!--          <span class="title">计费基础规则:</span>-->
-<!--        </div>-->
-        <div class="info" v-html="setDescription()"></div>
+        <div class="ql-editor">
+          <div v-html="setDescription()"></div>
+        </div>
       </div>
 <!--      <div style="height: 50px;"></div>-->
       <!-- 开启底部安全区适配 -->

+ 2 - 2
src/store/order/memberLevel.js

@@ -10,7 +10,7 @@ export default {
       commit('setEnableConsume',orderDetail.parkingRule.enableConsume);
     }
     
-    if ( orderDetail?.discountInfo?.memberLevelDiscount && orderDetail?.discountInfo?.memberGrade.length ) {
+    if (orderDetail?.discountInfo?.memberGrade?.length ) {
 
       orderDetail.discountInfo.memberGrade.forEach(( elm ) => {
         if ( elm.hasOwnProperty('selected') ? elm.selected : elm.defaultSelected ) {
@@ -49,7 +49,7 @@ export default {
     });
   },
   getDiscountDesc( {commit,dispatch},{orderDetail,checkedTotal} ) {
-    if ( (orderDetail.parkingRule.enableConsume && orderDetail?.discountInfo?.consume?.length) || orderDetail.discountInfo.memberLevelDiscount ) {
+    if ( (orderDetail.parkingRule.enableConsume && orderDetail?.discountInfo?.consume?.length) || orderDetail?.discountInfo?.memberGrade?.length ) {
       if ( checkedTotal > 0 ) {
         return commit('setDiscountDesc',`已选择${ checkedTotal }项优惠`);
       }

+ 21 - 4
src/store/order/paperCoupon.js

@@ -1,7 +1,8 @@
-import { calculateDiscount } from "@/api/parking";
+import { calculateDiscount, getPaperCouponDescription,getConfValueOfKey } from "@/api/parking";
 import {paperCouponDescription} from '@/utils/api-crm-member'
 import { setSelected } from "@/store/order/utils";
 import uni from '@/utils/uniHooks'; 
+import {tempParkingH5VoucherSwitchByParkMallCode} from '@/common/js/BaseDictionary'
 
 export default {
   /*
@@ -23,12 +24,27 @@ export default {
       commit('setEnablePaperCoupons', false);
       return
     }
-    const res = await paperCouponDescription({
+    const siteName = tempParkingH5VoucherSwitchByParkMallCode[checkOutResponse?.parkInfo?.parkMallCode]
+    let method = paperCouponDescription;
+    // 获取config接口中的迁移开关配置
+    const new_old_discount_switch = await getConfValueOfKey('new_old_discount_switch')
+    let newOldDiscountSwitch = false
+    if(new_old_discount_switch.hasOwnProperty(siteName) && new_old_discount_switch[siteName]){
+      newOldDiscountSwitch = true
+      method = getPaperCouponDescription
+    }
+    const res = await method({
       groupId: groupId,
       mallId: mallId,
-      parkMallCode: checkOutResponse?.parkInfo?.parkMallCode
+      parkMallCode: checkOutResponse?.parkInfo?.parkMallCode,
+      brandId: groupId,
+      lbsId: mallId, 
     })
-    console.log(30, res)
+    if(newOldDiscountSwitch && res) {
+      commit('setEnablePaperCoupons', res.enablePaperCoupons);
+      commit('setPaperCouponsDesc', res.paperDiscountDescription)
+      return
+    }
     if (res.msg === 'success' && res.data) {
       commit('setEnablePaperCoupons', true);
       commit('setPaperCouponsDesc', res.data)
@@ -40,6 +56,7 @@ export default {
       setSelected(['coupons','consume','points','memberGrade','newMemberPoints'], orderDetail)
       if (!orderDetail?.discountInfo?.paperCoupons) {
         orderDetail.discountInfo =  {
+          ...orderDetail.discountInfo,
           paperCoupons: []
         }
       } 

+ 1 - 1
src/utils/index.js

@@ -216,7 +216,7 @@ export function initEnv() {
   }
   if ( origin.indexOf('https://lt-') > -1 ) {
     window.env = 'lt';
-    window.profileApi = 'https://lt-apim.kerryplus.com/c/api';
+    window.profileApi = 'https://lt-gateway-kip-internal.kerryplus.com/api';
     window.cmrApi = 'https://lt-crm.kerryplus.com/xcrm-api/api';
     window.api = 'api';
     window.wechatOfficialAccountId = 'wx2bd99ca94d6acd7e'

部分文件因为文件数量过多而无法显示