Explorar o código

Merge pull request #375 from John-Hong/John/release-2.23.0/KIP-13832

feat(KIP-13833): 配置南昌开票开关,移除合集的开票开关
Tron hai 1 ano
pai
achega
dc0fb8e7f9

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

@@ -712,6 +712,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 +986,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');

+ 28 - 2
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -642,6 +642,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 +1048,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');