Elements-SY

modify

...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
150 <el-col :span="10"> 150 <el-col :span="10">
151 <el-input class="numberInput" v-model.trim="val.minNumOfPieces" 151 <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
152 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 152 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
153 - @input="change($event)" @blur="inputBlurMinPieces($event)"> 153 + @input="change($event)">
154 </el-input> 154 </el-input>
155 <span ref="minNumOfPieces" class="el-form-item__error"></span> 155 <span ref="minNumOfPieces" class="el-form-item__error"></span>
156 </el-col> 156 </el-col>
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
158 <el-col :span="10"> 158 <el-col :span="10">
159 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" 159 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
160 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 160 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
161 - @input="change($event)" @blur="inputBlurMaxPieces($event)"> 161 + @input="change($event)">
162 </el-input> 162 </el-input>
163 </el-col> 163 </el-col>
164 </el-form-item> 164 </el-form-item>
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
168 <el-col :span="10"> 168 <el-col :span="10">
169 <el-input class="numberInput" v-model.trim="val.minWeight" 169 <el-input class="numberInput" v-model.trim="val.minWeight"
170 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 170 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
171 - @input="change($event)" @blur="inputBlurMinWeight($event)"> 171 + @input="change($event)">
172 </el-input> 172 </el-input>
173 <span ref="minWeight" class="el-form-item__error"></span> 173 <span ref="minWeight" class="el-form-item__error"></span>
174 </el-col> 174 </el-col>
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
176 <el-col :span="10"> 176 <el-col :span="10">
177 <el-input class="numberInput" v-model.trim="val.maxWeight" 177 <el-input class="numberInput" v-model.trim="val.maxWeight"
178 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 178 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
179 - @input="change($event)" @blur="inputBlurMaxWeight($event)"> 179 + @input="change($event)">
180 </el-input> 180 </el-input>
181 </el-col> 181 </el-col>
182 </el-form-item> 182 </el-form-item>
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
392 <el-col :span="10"> 392 <el-col :span="10">
393 <el-input class="numberInput" v-model.trim="val.minNumOfPieces" 393 <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
394 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 394 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
395 - @input="change($event)" @blur="inputBlurMinPieces($event)"> 395 + @input="change($event)">
396 </el-input> 396 </el-input>
397 <span ref="minNumOfPieces" class="el-form-item__error"></span> 397 <span ref="minNumOfPieces" class="el-form-item__error"></span>
398 </el-col> 398 </el-col>
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
400 <el-col :span="10"> 400 <el-col :span="10">
401 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" 401 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
402 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 402 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
403 - @input="change($event)" @blur="inputBlurMaxPieces($event)"> 403 + @input="change($event)">
404 </el-input> 404 </el-input>
405 </el-col> 405 </el-col>
406 </el-form-item> 406 </el-form-item>
...@@ -410,7 +410,7 @@ ...@@ -410,7 +410,7 @@
410 <el-col :span="10"> 410 <el-col :span="10">
411 <el-input class="numberInput" v-model.trim="val.minWeight" 411 <el-input class="numberInput" v-model.trim="val.minWeight"
412 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 412 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
413 - @input="change($event)" @blur="inputBlurMinWeight($event)"> 413 + @input="change($event)">
414 </el-input> 414 </el-input>
415 <span ref="minWeight" class="el-form-item__error"></span> 415 <span ref="minWeight" class="el-form-item__error"></span>
416 </el-col> 416 </el-col>
...@@ -418,7 +418,7 @@ ...@@ -418,7 +418,7 @@
418 <el-col :span="10"> 418 <el-col :span="10">
419 <el-input class="numberInput" v-model.trim="val.maxWeight" 419 <el-input class="numberInput" v-model.trim="val.maxWeight"
420 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 420 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
421 - @input="change($event)" @blur="inputBlurMaxWeight($event)"> 421 + @input="change($event)">
422 </el-input> 422 </el-input>
423 </el-col> 423 </el-col>
424 </el-form-item> 424 </el-form-item>
...@@ -552,10 +552,10 @@ import { ...@@ -552,10 +552,10 @@ import {
552 findByFlightId, 552 findByFlightId,
553 queryRouteByFltNo 553 queryRouteByFltNo
554 } from "@/api/destinationFlight"; 554 } from "@/api/destinationFlight";
555 -import { inputBlurValidate } from "@/utils/mixins"; 555 +// import { inputBlurValidate } from "@/utils/mixins";
556 export default { 556 export default {
557 name: 'FlightAllocConfigInfo', 557 name: 'FlightAllocConfigInfo',
558 - mixins: [inputBlurValidate], 558 + // mixins: [inputBlurValidate],
559 data() { 559 data() {
560 return { 560 return {
561 infoForm: { 561 infoForm: {
...@@ -1210,7 +1210,7 @@ export default { ...@@ -1210,7 +1210,7 @@ export default {
1210 data.routePriority = item.routePriority 1210 data.routePriority = item.routePriority
1211 } 1211 }
1212 }) 1212 })
1213 - data.flightRoute = this.infoForm.route 1213 + // data.flightRoute = this.infoForm.route
1214 } else { 1214 } else {
1215 data.flightRoute = this.routeList[val].route 1215 data.flightRoute = this.routeList[val].route
1216 data.routePriority = this.routeList[val].routePriority 1216 data.routePriority = this.routeList[val].routePriority
...@@ -1263,7 +1263,9 @@ export default { ...@@ -1263,7 +1263,9 @@ export default {
1263 }).catch(() => { 1263 }).catch(() => {
1264 this.loading = false 1264 this.loading = false
1265 }); 1265 });
1266 - }); 1266 + }).catch(() => {
1267 + this.loading = false
1268 + });;
1267 } 1269 }
1268 } else { 1270 } else {
1269 this.infoForm.list[val] = { 1271 this.infoForm.list[val] = {
......
...@@ -643,9 +643,7 @@ export default { ...@@ -643,9 +643,7 @@ export default {
643 this.routeMultiple = true 643 this.routeMultiple = true
644 this.form.route = [] 644 this.form.route = []
645 } 645 }
646 - this.$refs.form.validateField(['route'], (flag) => { 646 + this.validateFieldForm()
647 - // console.log(flag)
648 - })
649 } 647 }
650 }) 648 })
651 // this.$refs.routeSelect.$forceUpdate() 649 // this.$refs.routeSelect.$forceUpdate()
...@@ -1132,13 +1130,16 @@ export default { ...@@ -1132,13 +1130,16 @@ export default {
1132 console.log(err) 1130 console.log(err)
1133 }) 1131 })
1134 }, 1132 },
1133 + // 对部分表单字段进行校验的方法
1134 + validateFieldForm(){
1135 + this.$refs.form.validateField(['route'], (flag) => {})
1136 + },
1135 //航线修改 1137 //航线修改
1136 routeChange(val) { 1138 routeChange(val) {
1139 + this.validateFieldForm()
1137 if(val.length){ 1140 if(val.length){
1141 + this.$nextTick(()=>{
1138 this.$refs.form.clearValidate() 1142 this.$refs.form.clearValidate()
1139 - }else{
1140 - this.$refs.form.validateField(['route'], (flag) => {
1141 - // console.log(flag)
1142 }) 1143 })
1143 } 1144 }
1144 this.$forceUpdate() 1145 this.$forceUpdate()
......