dedsudiyu 2 vuotta sitten
vanhempi
commit
2fdba7136c

+ 2 - 2
src/views/comprehensive/personnel/student/addPage.vue

@@ -197,8 +197,8 @@
           <el-input
             :disabled="editType"
             style="width:218px;"
-            onkeyup="this.value=this.value.replace(/[^\d.]/g,'')"
-            maxlength="50"
+            onkeyup="this.value=this.value.replace(/^\s*|\s*$/g,'')"
+            maxlength="30"
             v-model="form.cardNum"
             placeholder="请输入校园卡号"
             clearable

+ 1 - 0
src/views/comprehensive/personnel/student/bindingCardPage.vue

@@ -94,6 +94,7 @@
         let self = this;
         for(let i=0;i<self.watchList.length;i++){
           self.watchList[i].cardType = 0;
+          self.watchList[i].cardNum = self.watchList[i].cardNum.replace(/^\s*|\s*$/g,"");
         }
         let num = 0;
         for(let i=0;i<self.watchList.length;i++){

+ 2 - 2
src/views/comprehensive/personnel/teacher/addPage.vue

@@ -126,8 +126,8 @@
             <el-input
               :disabled="editType"
               style="width:218px;"
-              onkeyup="this.value=this.value.replace(/[^\d.]/g,'')"
-              maxlength="50"
+              onkeyup="this.value=this.value.replace(/^\s*|\s*$/g,'')"
+              maxlength="30"
               v-model="form.cardNum"
               placeholder="请输入校园卡号"
               clearable

+ 1 - 0
src/views/comprehensive/personnel/teacher/bindingCardPage.vue

@@ -94,6 +94,7 @@
         let self = this;
         for(let i=0;i<self.watchList.length;i++){
           self.watchList[i].cardType = 0;
+          self.watchList[i].cardNum = self.watchList[i].cardNum.replace(/^\s*|\s*$/g,"");
         }
         let num = 0;
         for(let i=0;i<self.watchList.length;i++){