Parcourir la source

feat(SCRM-5368): [DE][C端]临时停车,车牌管理里面,添加车牌的时候,点击小叶子不能从燃油车牌跳转到新能源车

lock.qiu@kerryprops.com il y a 1 an
Parent
commit
67a9218d81

+ 9 - 3
src/pages/parkingFee/mixins/vehicleAddOrEdit.js

@@ -83,7 +83,7 @@ export default {
       this.active = 0;
       this.carType = index;
 
-      if (this.carType == '1') {
+      if (index === 1) {
         this.numArr = [
           this.numArr[0],
           this.numArr[1],
@@ -109,16 +109,22 @@ export default {
     },
     // 唤起键盘
     clickShowKeyboard(index) {
-      if ( this.carType !== 1 && index === 7) return
       this.ind = index;
       this.active = index;
       // console.log('唤起键盘', this.ind, this.active);
+      if ( index === 7) {
+        console.log(2222)
+        this.carType = 1
+        this.$refs['k-tab-edit'].changeTab(this.carType)
+      }
+      this.ind = index;
+      this.active = index;
       this.$nextTick(() => {
         // return;
         if (index === 0) {
           this.$refs['plateKeyboard'].openKeyboardCN();
         } else {
-          // this.$refs['plateKeyboard'].closeKeyboardCN();
+          this.$refs['plateKeyboard'].closeKeyboardCN();
           this.$refs['plateKeyboard'].openKeyboardEN();
         }
       });

+ 2 - 2
src/pages/parkingFee/vehicleAddOrEdit.vue

@@ -4,7 +4,7 @@
     <div>
       <div class="search_tip_1">
         <div class="title">车辆类型</div>
-        <k-tab type="fill" @change="toggleType" :tabs="['燃油车牌', '新能源', '特殊车牌']" />
+        <k-tab ref="k-tab-edit" type="fill" @change="toggleType" :tabs="['燃油车牌', '新能源', '特殊车牌']" />
       </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' : '']">
@@ -33,7 +33,7 @@
           {{ 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>
+          <span v-if="carType === 1">{{ numArr[7] }}</span>
           <img v-else :src="require('./static/images/unlicensed/leaf.svg')">
         </div>
       </div>