Browse Source

发动机号规则校验修改

@dongkboy 2 years ago
parent
commit
f8bf69b098
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/Letter/Letter.vue

+ 2 - 2
src/views/Letter/Letter.vue

@@ -187,7 +187,7 @@
           <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
           <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
             <el-form-item label="发动机号:" prop="engineNo">
             <el-form-item label="发动机号:" prop="engineNo">
               <el-input
               <el-input
-                onkeyup="value=value.replace(/[^\w-]/ig,'')"
+
                 v-model="carInfo.engineNo"
                 v-model="carInfo.engineNo"
                 placeholder="请输入发动机号"
                 placeholder="请输入发动机号"
               ></el-input>
               ></el-input>
@@ -4790,7 +4790,7 @@ export default {
     "carInfo.engineNo": {
     "carInfo.engineNo": {
       handler(val) {
       handler(val) {
         if (val) {
         if (val) {
-          this.carInfo.engineNo = val.toUpperCase();
+          this.carInfo.engineNo = val.replace(/[^\w-]/ig,'').toUpperCase();
         }
         }
       },
       },
       deep: true
       deep: true