jinhui.wang

增加航班号限制

...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
11 <el-row class="mb20"> 11 <el-row class="mb20">
12 <el-col :span="6"> 12 <el-col :span="6">
13 <el-form-item label="航班号" prop="fltNo"> 13 <el-form-item label="航班号" prop="fltNo">
14 - <el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled"> 14 + <el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled" maxlength="50">
15 </el-input> 15 </el-input>
16 </el-form-item> 16 </el-form-item>
17 </el-col> 17 </el-col>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
24 </el-col> 24 </el-col>
25 <el-col :span="6" v-if="infoForm.route != null"> 25 <el-col :span="6" v-if="infoForm.route != null">
26 <el-form-item label="航线"> 26 <el-form-item label="航线">
27 - <el-input v-model.tirm="infoForm.route" @change="getRoutes" disabled> 27 + <el-input v-model.trim="infoForm.route" @change="getRoutes" disabled>
28 </el-input> 28 </el-input>
29 </el-form-item> 29 </el-form-item>
30 </el-col> 30 </el-col>
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
115 </el-col> 115 </el-col>
116 <el-col :span="24"> 116 <el-col :span="24">
117 <el-form-item label="配载航班" prop="flightRank"> 117 <el-form-item label="配载航班" prop="flightRank">
118 - <el-input type="textarea" v-model="form.flightRank" :rows="4"></el-input> 118 + <el-input type="textarea" v-model="form.flightRank" :rows="4" maxlength="255"></el-input>
119 </el-form-item> 119 </el-form-item>
120 </el-col> 120 </el-col>
121 <el-col :span="24"> 121 <el-col :span="24">
...@@ -217,6 +217,7 @@ export default { ...@@ -217,6 +217,7 @@ export default {
217 dayOfWeek: [], 217 dayOfWeek: [],
218 // 表单参数 218 // 表单参数
219 form: { 219 form: {
220 + flightRank: null,
220 dayOfWeek: [], 221 dayOfWeek: [],
221 }, 222 },
222 // 表单校验 223 // 表单校验
...@@ -449,8 +450,20 @@ export default { ...@@ -449,8 +450,20 @@ export default {
449 this.queryParams.sourceFlightNo = this.upCase(val); 450 this.queryParams.sourceFlightNo = this.upCase(val);
450 }, 451 },
451 }, 452 },
453 + flightRank: {
454 + get: function () {
455 + return this.form.flightRank
456 + },
457 + set: function (val) {
458 + const reg = /^([a-zA-Z0-9]{0,40}(\;[a-zA-Z0-9]{0,40})*)$/
459 + if (reg.test(val)) {
460 + this.form.flightRank = val
461 + }
462 + },
463 + }
452 }, 464 },
453 }; 465 };
454 </script> 466 </script>
455 <style> 467 <style>
468 +
456 </style> 469 </style>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 </el-col> 13 </el-col>
14 <el-col :span="12"> 14 <el-col :span="12">
15 <el-form-item label="航班号" prop="flightNo"> 15 <el-form-item label="航班号" prop="flightNo">
16 - <el-input class="formItem" ref="flightNoFormItem" v-focus v-model="formData.flightNo" 16 + <el-input class="formItem" ref="flightNoFormItem" v-focus v-model="formData.flightNo" maxlength="50"
17 placeholder="请输入航班号" @change="getRoute" :disabled="disabled"> 17 placeholder="请输入航班号" @change="getRoute" :disabled="disabled">
18 </el-input> 18 </el-input>
19 </el-form-item> 19 </el-form-item>
......