Ver Fonte

fix(KIP-12666): 【DE】【C端】临时停车。S端关闭是否判断每月换绑次数后,C端不应显示”优惠车“标志

john há 1 ano atrás
pai
commit
7bb798eef3

+ 14 - 5
src/pages/parkingFee/mixins/vehicleManagement.js

@@ -17,7 +17,7 @@ import uni from '@/utils/uniHooks.js';
 // import { vehicles as vehiclesList } from './list';
 import { wxToLoginCallback, isHZ } from '@/utils/index';
 import { Toast } from 'vant';
-import { getVehicles, delVehicle } from '@/api/parking/index'
+import { getVehicles, delVehicle, parkingLots } from '@/api/parking/index'
 
 export default {
   components: {
@@ -55,11 +55,14 @@ export default {
       deleteDialogSwitch: false,
       deleteSuccessDialogSwitch: false,
       show: false, // 删除车牌时提示内容
+      parkingLotsInfo: {},
+      enableDiscountVehicle: false
     };
   },
 
   async created() {
     this.options = this.$route.query;
+    this.parkingLots()
   },
   async mounted() {
     setTimeout(() => {
@@ -121,6 +124,12 @@ export default {
     // #endif
   },
   methods: {
+    // 获取车场信息
+    async parkingLots() {
+      const res = await parkingLots(this.$store.state.lbsId)
+      this.parkingLotsInfo = res;
+      this.enableDiscountVehicle = res.enableDiscountVehicle;
+    },
     // 添加车牌号
     toAdd() {
       if(this.isNoLogin) return
@@ -129,7 +138,7 @@ export default {
     // 跳转支付页面
     toPayBefore(item) {
       // 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || item.eligible){
+      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
         this.toPay(item.vehicleNo)
         return
       }
@@ -264,7 +273,7 @@ export default {
       this.activeId = item.id;
       this.activeCarno = item.vehicleNo;
       // 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || !item.eligible) {
+      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle) {
         this.show = true
         return
       }
@@ -296,8 +305,8 @@ export default {
     },
     // 编辑
     toEditBefore(item) {
-      // TODO 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || !item.eligible){
+      // 不是杭州的车牌 或者 是非优惠的车牌
+      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
         this.toEdit(item)
         return
       }

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

@@ -20,7 +20,7 @@
               我的车牌
             </div>
 <!--            <img v-if="isHZ && item.eligible" class="discountCar" :src="`${require(`@/pages/parkingFee/static/images/${source ==='KIP' ? 'discountCarOffice': 'discountCar' }.svg`)}`" />-->
-            <div class="discountCar" v-if="isHZ && item.eligible">
+            <div class="discountCar" v-if="isHZ && item.eligible && this.enableDiscountVehicle">
               优惠车
             </div>
             <div class="plate_plate_index plate_plate_index2">

+ 13 - 4
src/pages/parkingFeeV2/mixins/vehicleManagement.js

@@ -17,7 +17,7 @@ import uni from '@/utils/uniHooks.js';
 // import { vehicles as vehiclesList } from './list';
 import {isHZ, wxToLoginCallback} from '@/utils/index';
 import { Toast } from 'vant';
-import { getVehicles, delVehicle } from '@/api/parking/index'
+import { getVehicles, delVehicle, parkingLots } from '@/api/parking/index'
 
 export default {
   components: {
@@ -56,11 +56,14 @@ export default {
       deleteDialogSwitch: false,
       deleteSuccessDialogSwitch: false,
       show: false, // 删除车牌时提示内容
+      parkingLotsInfo: {},
+      enableDiscountVehicle: false
     };
   },
 
   async created() {
     this.options = this.$route.query;
+    this.parkingLots()
   },
   async mounted() {
     // setTimeout(() => {
@@ -139,6 +142,12 @@ export default {
     // #endif
   },
   methods: {
+    // 获取车场信息
+    async parkingLots() {
+      const res = await parkingLots(this.$store.state.lbsId)
+      this.parkingLotsInfo = res;
+      this.enableDiscountVehicle = res.enableDiscountVehicle;
+    },
     // 添加车牌号
     toAdd() {
       if (this.isNoLogin) return
@@ -147,7 +156,7 @@ export default {
     // 跳转支付页面
     toPayBefore(item) {
       // 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || item.eligible){
+      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
         this.toPay(item.vehicleNo)
         return
       }
@@ -164,7 +173,7 @@ export default {
     // 编辑
     toEditBefore(item) {
       // 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || !item.eligible){
+      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
         this.toEdit(item)
         return
       }
@@ -319,7 +328,7 @@ export default {
       this.activeId = item.id;
       this.activeCarno = item.vehicleNo;
       // 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || !item.eligible) {
+      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle) {
         this.show = true
         return
       }

+ 1 - 1
src/pages/parkingFeeV2/vehicleManagement.vue

@@ -20,7 +20,7 @@
               我的车牌
             </div>
             <!-- <img v-if="isHZ && item.eligible" class="discountCar" :src="`${require(`@/pages/parkingFee/static/images/${source ==='KIP' ? 'discountCarOffice': 'discountCar' }.svg`)}`" />-->
-            <div class="discountCar" v-if="isHZ && item.eligible">
+            <div class="discountCar" v-if="isHZ && item.eligible && enableDiscountVehicle">
               优惠车
             </div>
             <div class="plate_plate_index plate_plate_index2">