Răsfoiți Sursa

Merge pull request #276 from John-Hong/release-2.18.0

fix(KIP-12320): 【DE】【C端】临时停车。当有牌车和无牌车(进场时间更早)都在场内时,不会跳转到无牌车tab页下
Tron 1 an în urmă
părinte
comite
fac5bfb26f

+ 12 - 9
src/pages/parkingFee/mixins/parkingFee.js

@@ -232,22 +232,25 @@ export default {
       }
     },
     setVehicleNoType(vehicleNo, vehicles) {
-      // this.isUnlicensed(vehicles) // Kerry plus 没有无牌车功能
-      const item = vehicles.filter(e => e.vehicleNo === vehicleNo)
+      // this.isUnlicensed(vehicles)
+      // const item = vehicles.filter(e => e.vehicleNo === vehicleNo)
+      const item = vehicles
       if(item.length) {
-        if(item[0].vehicleNo.indexOf('临') > -1) {
-          return true
-        }
-        let label = LICENSE_PLATE_TYPE_ARR.filter(e => e.value == item[0].licensePlateType)
-        const index = ['燃油车牌', '新能源', '特殊车牌'].indexOf(label[0].name)
+        // if(item[0].vehicleNo.indexOf('临') > -1) {
+        //   return true
+        // }
+        // let label = LICENSE_PLATE_TYPE_ARR.filter(e => e.value == item[0].licensePlateType)
+        // const index = ['燃油车牌', '新能源', '特殊车牌'].indexOf(label[0].name)
+        const index = item[0].vehicleNo.length === 8 ? 1 : 0
         this.$refs['k-tab'].changeTab(index)
         return true
       }
       return false
     },
     isUnlicensed(vehicles) {
-      const unlicensed = vehicles.filter(elm => elm.vehicleNo.indexOf('临') > -1)
-      if(unlicensed.length) {
+      // debugger
+      // const unlicensed = vehicles.filter(elm => elm.vehicleNo.indexOf('临') > -1)
+      if (vehicles.length && vehicles[0].vehicleNo.indexOf('临') > -1) {
         this.tabbarActiveEvent('无牌缴费');
         // this.tabbarActive = '无牌缴费'
       }

+ 8 - 5
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -845,21 +845,24 @@ export default {
     },
     setVehicleNoType(vehicleNo, vehicles) {
       this.isUnlicensed(vehicles)
-      const item = vehicles.filter(e => e.vehicleNo === vehicleNo)
+      // const item = vehicles.filter(e => e.vehicleNo === vehicleNo)
+      const item = vehicles
       if(item.length) {
         if(item[0].vehicleNo.indexOf('临') > -1) {
           return true
         }
-        let label = LICENSE_PLATE_TYPE_ARR.filter(e => e.value == item[0].licensePlateType)
-        const index = ['燃油车牌', '新能源', '特殊车牌'].indexOf(label[0].name)
+        // let label = LICENSE_PLATE_TYPE_ARR.filter(e => e.value == item[0].licensePlateType)
+        // const index = ['燃油车牌', '新能源', '特殊车牌'].indexOf(label[0].name)
+        const index = item[0].vehicleNo.length === 8 ? 1 : 0
         this.$refs['k-tab'].changeTab(index)
         return true
       }
       return false
     },
     isUnlicensed(vehicles) {
-      const unlicensed = vehicles.filter(elm => elm.vehicleNo.indexOf('临') > -1)
-      if(unlicensed.length) {
+      // debugger
+      // const unlicensed = vehicles.filter(elm => elm.vehicleNo.indexOf('临') > -1)
+      if (vehicles.length && vehicles[0].vehicleNo.indexOf('临') > -1) {
         this.tabbarActiveEvent('无牌缴费');
         // this.tabbarActive = '无牌缴费'
       }