Showing
8 changed files
with
83 additions
and
16 deletions
| ... | @@ -319,3 +319,28 @@ body { | ... | @@ -319,3 +319,28 @@ body { |
| 319 | .btn-mb-4 { | 319 | .btn-mb-4 { |
| 320 | margin-bottom: 4px; | 320 | margin-bottom: 4px; |
| 321 | } | 321 | } |
| 322 | + | ||
| 323 | +textarea::-webkit-input-placeholder { | ||
| 324 | + /* WebKit browsers */ | ||
| 325 | + color: #C0C4CC !important; | ||
| 326 | + font-size: 13px !important; | ||
| 327 | + font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif; | ||
| 328 | + } | ||
| 329 | + textarea:-moz-placeholder { | ||
| 330 | + /* Mozilla Firefox 4 to 18 */ | ||
| 331 | + color: #c0c4cc !important; | ||
| 332 | + font-size: 13px !important; | ||
| 333 | + font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif; | ||
| 334 | + } | ||
| 335 | + textarea::-moz-placeholder { | ||
| 336 | + /* Mozilla Firefox 19+ */ | ||
| 337 | + color: #c0c4cc !important; | ||
| 338 | + font-size: 13px !important; | ||
| 339 | + font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif; | ||
| 340 | + } | ||
| 341 | + textarea::-ms-input-placeholder { | ||
| 342 | + /* Internet Explorer 10+ */ | ||
| 343 | + color: #c0c4cc !important; | ||
| 344 | + font-size: 13px !important; | ||
| 345 | + font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif; | ||
| 346 | + } | ... | ... |
| ... | @@ -79,14 +79,22 @@ service.interceptors.response.use(res => { | ... | @@ -79,14 +79,22 @@ service.interceptors.response.use(res => { |
| 79 | type: 'error' | 79 | type: 'error' |
| 80 | }) | 80 | }) |
| 81 | return Promise.reject(new Error(msg)) | 81 | return Promise.reject(new Error(msg)) |
| 82 | - } else if (code !== 200 && code !== 201 && code !== 202 && code != 203 && code != 603 && code != 402) { | 82 | + } else if ( |
| 83 | + code !== 200 && | ||
| 84 | + code !== 201 && | ||
| 85 | + code !== 202 && | ||
| 86 | + code != 203 && | ||
| 87 | + code != 300 && | ||
| 88 | + code != 402 && | ||
| 89 | + code != 603 | ||
| 90 | + ) { | ||
| 83 | Message({ | 91 | Message({ |
| 84 | message: msg, | 92 | message: msg, |
| 85 | - type: 'error' | 93 | + type: "error", |
| 86 | - }) | 94 | + }); |
| 87 | - return Promise.reject('error') | 95 | + return Promise.reject("error"); |
| 88 | } else { | 96 | } else { |
| 89 | - return res.data | 97 | + return res.data; |
| 90 | } | 98 | } |
| 91 | }, | 99 | }, |
| 92 | error => { | 100 | error => { | ... | ... |
| ... | @@ -136,7 +136,7 @@ | ... | @@ -136,7 +136,7 @@ |
| 136 | </el-col> | 136 | </el-col> |
| 137 | <el-col :span="6"> | 137 | <el-col :span="6"> |
| 138 | <el-form-item label="运单号"> | 138 | <el-form-item label="运单号"> |
| 139 | - <el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000" | 139 | + <el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000" |
| 140 | v-model="formData.waybillNo" clearable></el-input> | 140 | v-model="formData.waybillNo" clearable></el-input> |
| 141 | </el-form-item> | 141 | </el-form-item> |
| 142 | </el-col> | 142 | </el-col> | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -437,6 +437,7 @@ export default { | ... | @@ -437,6 +437,7 @@ export default { |
| 437 | cancel() { | 437 | cancel() { |
| 438 | this.open = false; | 438 | this.open = false; |
| 439 | this.findSourceFlightRules(); | 439 | this.findSourceFlightRules(); |
| 440 | + this.$refs.form.clearValidate(); | ||
| 440 | //this.reset(); | 441 | //this.reset(); |
| 441 | }, | 442 | }, |
| 442 | /** 重置按钮操作 */ | 443 | /** 重置按钮操作 */ | ... | ... |
| ... | @@ -45,7 +45,7 @@ | ... | @@ -45,7 +45,7 @@ |
| 45 | <el-form ref="addForm" :model="newPre" label-width="auto" label-position="left" size="small" :rules="rules" | 45 | <el-form ref="addForm" :model="newPre" label-width="auto" label-position="left" size="small" :rules="rules" |
| 46 | @submit.native.prevent> | 46 | @submit.native.prevent> |
| 47 | <el-form-item label="航班号" prop="addFlitNo"> | 47 | <el-form-item label="航班号" prop="addFlitNo"> |
| 48 | - <el-input type="textarea" v-model="fltNo" :rows="7" maxlength="255" show-word-limit placeholder="请输入航班号,用;分隔"> | 48 | + <el-input type="textarea" v-model="newPre.addFlitNo" :rows="7" maxlength="255" show-word-limit placeholder="请输入航班号,用;分隔"> |
| 49 | </el-input> | 49 | </el-input> |
| 50 | </el-form-item> | 50 | </el-form-item> |
| 51 | </el-form> | 51 | </el-form> |
| ... | @@ -89,7 +89,7 @@ export default { | ... | @@ -89,7 +89,7 @@ export default { |
| 89 | addFlitNo: '', | 89 | addFlitNo: '', |
| 90 | },//新增航班 | 90 | },//新增航班 |
| 91 | rules: { | 91 | rules: { |
| 92 | - fltNo: [ | 92 | + addFlitNo: [ |
| 93 | { | 93 | { |
| 94 | required: true, | 94 | required: true, |
| 95 | message: "航班号不能为空", | 95 | message: "航班号不能为空", |
| ... | @@ -199,6 +199,7 @@ export default { | ... | @@ -199,6 +199,7 @@ export default { |
| 199 | close() { | 199 | close() { |
| 200 | this.dialogVisible = false | 200 | this.dialogVisible = false |
| 201 | this.newPre.addFlitNo = '' | 201 | this.newPre.addFlitNo = '' |
| 202 | + this.$refs.addForm.clearValidate() | ||
| 202 | }, | 203 | }, |
| 203 | //翻页 | 204 | //翻页 |
| 204 | currentChange(val) { | 205 | currentChange(val) { | ... | ... |
| ... | @@ -180,8 +180,8 @@ | ... | @@ -180,8 +180,8 @@ |
| 180 | </el-col> | 180 | </el-col> |
| 181 | <el-col :span="12"> | 181 | <el-col :span="12"> |
| 182 | <el-form-item label="原始重量(KG)" prop="originalWeight"> | 182 | <el-form-item label="原始重量(KG)" prop="originalWeight"> |
| 183 | - <el-input-number class="wid80" @change="LowHighAvailable" :precision="0" placeholder="请输入原始重量(KG)" | 183 | + <el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入原始重量(KG)" |
| 184 | - v-model="form.originalWeight"></el-input-number> | 184 | + v-model="form.originalWeight" v-input-filter></el-input-number> |
| 185 | </el-form-item> | 185 | </el-form-item> |
| 186 | </el-col> | 186 | </el-col> |
| 187 | </el-row> | 187 | </el-row> |
| ... | @@ -359,7 +359,7 @@ export default { | ... | @@ -359,7 +359,7 @@ export default { |
| 359 | route: [ | 359 | route: [ |
| 360 | { | 360 | { |
| 361 | required: true, | 361 | required: true, |
| 362 | - message: "航班路线不能为空", | 362 | + message: "航班路线不能为空呀", |
| 363 | trigger: "change", | 363 | trigger: "change", |
| 364 | }, | 364 | }, |
| 365 | // { | 365 | // { |
| ... | @@ -482,6 +482,29 @@ export default { | ... | @@ -482,6 +482,29 @@ export default { |
| 482 | shiftKey: false, | 482 | shiftKey: false, |
| 483 | }; | 483 | }; |
| 484 | }, | 484 | }, |
| 485 | + directives: { | ||
| 486 | + // 处理加减天数 | ||
| 487 | + "input-filter": { | ||
| 488 | + bind: function (el, binding, { context }) { | ||
| 489 | + el.handler = function (event) { | ||
| 490 | + if (event.data == "E" || event.data == "e") { | ||
| 491 | + // 无理数时 | ||
| 492 | + event.target.value = ""; | ||
| 493 | + } | ||
| 494 | + if (event.target.value) { | ||
| 495 | + if (Number(event.target.value) < 0) { | ||
| 496 | + event.target.value = ""; | ||
| 497 | + } | ||
| 498 | + event.target.dispatchEvent(new Event("input")); | ||
| 499 | + } | ||
| 500 | + }; | ||
| 501 | + el.addEventListener("input", el.handler); | ||
| 502 | + }, | ||
| 503 | + unbind: function (el) { | ||
| 504 | + el.removeEventListener("input", el.handler); | ||
| 505 | + }, | ||
| 506 | + }, | ||
| 507 | + }, | ||
| 485 | created() { | 508 | created() { |
| 486 | //查询条件数据源 | 509 | //查询条件数据源 |
| 487 | this.queryParams.fltDateStart = this.nowDate() | 510 | this.queryParams.fltDateStart = this.nowDate() |
| ... | @@ -615,11 +638,15 @@ export default { | ... | @@ -615,11 +638,15 @@ export default { |
| 615 | this.selectOption.flightKindlist.forEach(item => { | 638 | this.selectOption.flightKindlist.forEach(item => { |
| 616 | if (item.id == val) { | 639 | if (item.id == val) { |
| 617 | if (item.chineseName.indexOf('White') >= 0) { | 640 | if (item.chineseName.indexOf('White') >= 0) { |
| 618 | - this.form.route = '' | ||
| 619 | this.routeMultiple = false | 641 | this.routeMultiple = false |
| 642 | + // this.rules.route[0].type = 'string' | ||
| 643 | + this.form.route = '' | ||
| 644 | + // this.rules.route[0].required = true; | ||
| 620 | } else if (item.chineseName.indexOf('Purple') >= 0) { | 645 | } else if (item.chineseName.indexOf('Purple') >= 0) { |
| 621 | - this.form.route = [] | ||
| 622 | this.routeMultiple = true | 646 | this.routeMultiple = true |
| 647 | + // this.rules.route[0].type = 'array' | ||
| 648 | + this.form.route = [] | ||
| 649 | + // this.rules.route[0].required = true; | ||
| 623 | } | 650 | } |
| 624 | } | 651 | } |
| 625 | }) | 652 | }) |
| ... | @@ -1109,6 +1136,11 @@ export default { | ... | @@ -1109,6 +1136,11 @@ export default { |
| 1109 | }, | 1136 | }, |
| 1110 | //航线修改 | 1137 | //航线修改 |
| 1111 | routeChange(val) { | 1138 | routeChange(val) { |
| 1139 | + if(val.length){ | ||
| 1140 | + this.rules.route[0].required = false; | ||
| 1141 | + }else{ | ||
| 1142 | + // this.rules.route[0].required = true; | ||
| 1143 | + } | ||
| 1112 | this.$forceUpdate() | 1144 | this.$forceUpdate() |
| 1113 | }, | 1145 | }, |
| 1114 | //多选框选中数据 | 1146 | //多选框选中数据 | ... | ... |
| ... | @@ -501,7 +501,7 @@ export default { | ... | @@ -501,7 +501,7 @@ export default { |
| 501 | directives: { | 501 | directives: { |
| 502 | // 处理加减天数 | 502 | // 处理加减天数 |
| 503 | "input-filter": { | 503 | "input-filter": { |
| 504 | - bind: function (el, binding) { | 504 | + bind: function (el, binding, { context }) { |
| 505 | el.handler = function (event) { | 505 | el.handler = function (event) { |
| 506 | if (event.data == "E" || event.data == "e") { | 506 | if (event.data == "E" || event.data == "e") { |
| 507 | // 无理数时 | 507 | // 无理数时 |
| ... | @@ -510,10 +510,10 @@ export default { | ... | @@ -510,10 +510,10 @@ export default { |
| 510 | if (event.target.value) { | 510 | if (event.target.value) { |
| 511 | if (Number(event.target.value) < -7) { | 511 | if (Number(event.target.value) < -7) { |
| 512 | event.target.value = ""; | 512 | event.target.value = ""; |
| 513 | - this.msgError("加减天数最小不能低于7天"); | 513 | + context.msgError("加减天数最小不能低于7天"); |
| 514 | } else if (Number(event.target.value) > 7) { | 514 | } else if (Number(event.target.value) > 7) { |
| 515 | event.target.value = ""; | 515 | event.target.value = ""; |
| 516 | - this.msgError("加减天数最小不能大于7天"); | 516 | + context.msgError("加减天数最小不能大于7天"); |
| 517 | } else if (/[\.]/.test(Number(event.target.value))) { | 517 | } else if (/[\.]/.test(Number(event.target.value))) { |
| 518 | // 浮点数时 | 518 | // 浮点数时 |
| 519 | event.target.value = ""; | 519 | event.target.value = ""; | ... | ... |
-
Please register or login to post a comment