Showing
5 changed files
with
49 additions
and
31 deletions
| ... | @@ -241,7 +241,7 @@ export const inputBlurValidate = { | ... | @@ -241,7 +241,7 @@ export const inputBlurValidate = { |
| 241 | } | 241 | } |
| 242 | }, | 242 | }, |
| 243 | // 人民币最小申报价值 | 243 | // 人民币最小申报价值 |
| 244 | - inputCNYBlurMin({ target }, customVal) { | 244 | + inputCNYBlurMin({ target }) { |
| 245 | // 申报价值最小值和最大值都为空的情况下 | 245 | // 申报价值最小值和最大值都为空的情况下 |
| 246 | if ( | 246 | if ( |
| 247 | this.queryForm.minCustomVal == "" && | 247 | this.queryForm.minCustomVal == "" && |
| ... | @@ -305,7 +305,7 @@ export const inputBlurValidate = { | ... | @@ -305,7 +305,7 @@ export const inputBlurValidate = { |
| 305 | } | 305 | } |
| 306 | }, | 306 | }, |
| 307 | // 人民币最大申报价值 | 307 | // 人民币最大申报价值 |
| 308 | - inputCNYBlurMax({ target }, customVal) { | 308 | + inputCNYBlurMax({ target }) { |
| 309 | // 申报价值最小值和最大值都为空的情况下 | 309 | // 申报价值最小值和最大值都为空的情况下 |
| 310 | if ( | 310 | if ( |
| 311 | this.queryForm.minCustomVal == "" && | 311 | this.queryForm.minCustomVal == "" && |
| ... | @@ -370,7 +370,7 @@ export const inputBlurValidate = { | ... | @@ -370,7 +370,7 @@ export const inputBlurValidate = { |
| 370 | } | 370 | } |
| 371 | }, | 371 | }, |
| 372 | // 美元最小申报价值 | 372 | // 美元最小申报价值 |
| 373 | - inputSUDBlurMin({ target }, customVal) { | 373 | + inputSUDBlurMin({ target }) { |
| 374 | // 申报价值最小值和最大值都为空的情况下 | 374 | // 申报价值最小值和最大值都为空的情况下 |
| 375 | if ( | 375 | if ( |
| 376 | this.queryForm.minUsdCustomVal == "" && | 376 | this.queryForm.minUsdCustomVal == "" && |
| ... | @@ -436,7 +436,7 @@ export const inputBlurValidate = { | ... | @@ -436,7 +436,7 @@ export const inputBlurValidate = { |
| 436 | } | 436 | } |
| 437 | }, | 437 | }, |
| 438 | // 美元最大申报价值 | 438 | // 美元最大申报价值 |
| 439 | - inputSUDBlurMax({ target }, customVal) { | 439 | + inputSUDBlurMax({ target }) { |
| 440 | // 申报价值最小值和最大值都为空的情况下 | 440 | // 申报价值最小值和最大值都为空的情况下 |
| 441 | if ( | 441 | if ( |
| 442 | this.queryForm.minUsdCustomVal == "" && | 442 | this.queryForm.minUsdCustomVal == "" && | ... | ... |
| ... | @@ -97,7 +97,6 @@ | ... | @@ -97,7 +97,6 @@ |
| 97 | <div class="form-item-error-block"> | 97 | <div class="form-item-error-block"> |
| 98 | <span | 98 | <span |
| 99 | class="el-form-item__error" | 99 | class="el-form-item__error" |
| 100 | - v-text="item.locationError" | ||
| 101 | ></span> | 100 | ></span> |
| 102 | </div> | 101 | </div> |
| 103 | </el-col> | 102 | </el-col> |
| ... | @@ -145,7 +144,6 @@ | ... | @@ -145,7 +144,6 @@ |
| 145 | <div class="form-item-error-block"> | 144 | <div class="form-item-error-block"> |
| 146 | <span | 145 | <span |
| 147 | class="el-form-item__error" | 146 | class="el-form-item__error" |
| 148 | - v-text="item.destinationSiteError" | ||
| 149 | ></span> | 147 | ></span> |
| 150 | </div> | 148 | </div> |
| 151 | </el-col> | 149 | </el-col> |
| ... | @@ -165,7 +163,6 @@ | ... | @@ -165,7 +163,6 @@ |
| 165 | </el-input> | 163 | </el-input> |
| 166 | <span | 164 | <span |
| 167 | class="el-form-item__error" | 165 | class="el-form-item__error" |
| 168 | - v-text="item.ursaError" | ||
| 169 | ></span> | 166 | ></span> |
| 170 | </el-form-item> | 167 | </el-form-item> |
| 171 | </el-col> | 168 | </el-col> |
| ... | @@ -183,7 +180,6 @@ | ... | @@ -183,7 +180,6 @@ |
| 183 | <div class="form-item-error-block"> | 180 | <div class="form-item-error-block"> |
| 184 | <span | 181 | <span |
| 185 | class="el-form-item__error" | 182 | class="el-form-item__error" |
| 186 | - v-text="item.notUrsaError" | ||
| 187 | ></span> | 183 | ></span> |
| 188 | </div> | 184 | </div> |
| 189 | </el-form-item> | 185 | </el-form-item> |
| ... | @@ -468,7 +464,6 @@ | ... | @@ -468,7 +464,6 @@ |
| 468 | </div> | 464 | </div> |
| 469 | </template> | 465 | </template> |
| 470 | <script> | 466 | <script> |
| 471 | -// import { inputBlurValidate } from "@/utils/mixins"; | ||
| 472 | export default { | 467 | export default { |
| 473 | name: "routeInfo", | 468 | name: "routeInfo", |
| 474 | props: { | 469 | props: { |
| ... | @@ -518,7 +513,6 @@ export default { | ... | @@ -518,7 +513,6 @@ export default { |
| 518 | default: false, | 513 | default: false, |
| 519 | }, | 514 | }, |
| 520 | }, | 515 | }, |
| 521 | - // mixins: [inputBlurValidate], | ||
| 522 | data() { | 516 | data() { |
| 523 | return { | 517 | return { |
| 524 | activeNames: [0], // 展开指定项 | 518 | activeNames: [0], // 展开指定项 | ... | ... |
| ... | @@ -208,7 +208,7 @@ export default { | ... | @@ -208,7 +208,7 @@ export default { |
| 208 | } | 208 | } |
| 209 | } | 209 | } |
| 210 | if (parmas.minNumOfPieces || parmas.maxNumOfPieces) { | 210 | if (parmas.minNumOfPieces || parmas.maxNumOfPieces) { |
| 211 | - if (!/^\d+$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)) { | 211 | + if (!/^[1-9]\d*$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)) { |
| 212 | this.msgWarning("请输入有效件数"); | 212 | this.msgWarning("请输入有效件数"); |
| 213 | return; | 213 | return; |
| 214 | } | 214 | } |
| ... | @@ -225,10 +225,7 @@ export default { | ... | @@ -225,10 +225,7 @@ export default { |
| 225 | return; | 225 | return; |
| 226 | } | 226 | } |
| 227 | } | 227 | } |
| 228 | - /* | 228 | + // 日期级别:航班顺位只取日期级别下的航线优先级顺位 |
| 229 | - 日期级别: | ||
| 230 | - 处理routeSpecifyDateSeq | ||
| 231 | - */ | ||
| 232 | if (item.createTime && this.queryForm.flightDate) { | 229 | if (item.createTime && this.queryForm.flightDate) { |
| 233 | let routeSpecifyDate = this.routeSpecifyDateSeq.filter( | 230 | let routeSpecifyDate = this.routeSpecifyDateSeq.filter( |
| 234 | (item) => item.etesRule == "N" | 231 | (item) => item.etesRule == "N" | ... | ... |
| ... | @@ -708,6 +708,7 @@ export default { | ... | @@ -708,6 +708,7 @@ export default { |
| 708 | this.routeList.map((item) => { | 708 | this.routeList.map((item) => { |
| 709 | routes.push(item.route); | 709 | routes.push(item.route); |
| 710 | }); | 710 | }); |
| 711 | + // 与routesStr不同的是,routeSpecifyDateSeq属性值作为传参使用 | ||
| 711 | routeRuleForm.routeSpecifyDateSeq = routes.join(";"); | 712 | routeRuleForm.routeSpecifyDateSeq = routes.join(";"); |
| 712 | } | 713 | } |
| 713 | }, | 714 | }, |
| ... | @@ -939,9 +940,22 @@ export default { | ... | @@ -939,9 +940,22 @@ export default { |
| 939 | }; | 940 | }; |
| 940 | // this.validateParmas(validateData); | 941 | // this.validateParmas(validateData); |
| 941 | }, | 942 | }, |
| 942 | - // 最少件数失焦事件 | 943 | + // 最少件数失焦事件:件数和重量可以拿ET86维度规则设置的校验逻辑使用 |
| 943 | minNumOfPiecesBur({ index, item }) { | 944 | minNumOfPiecesBur({ index, item }) { |
| 944 | // console.log("minNumOfPiecesBur", index, item); | 945 | // console.log("minNumOfPiecesBur", index, item); |
| 946 | + const validateData = { | ||
| 947 | + reg: /^[1-9]\d*$/, | ||
| 948 | + index: index, | ||
| 949 | + ursaMark: false, | ||
| 950 | + minNumOfPieces: item.minNumOfPieces, | ||
| 951 | + maxNumOfPieces: item.maxNumOfPieces, | ||
| 952 | + errorMsgAttr: "pieceError", | ||
| 953 | + validateForm: false, // form表单节流阀 | ||
| 954 | + errorMsg: { | ||
| 955 | + invalid: "请输入有效件数", | ||
| 956 | + error: "最小件数不得大于最大件数", | ||
| 957 | + }, | ||
| 958 | + }; | ||
| 945 | }, | 959 | }, |
| 946 | // 最多件数失焦事件 | 960 | // 最多件数失焦事件 |
| 947 | maxNumOfPiecesBur({ index, item }) { | 961 | maxNumOfPiecesBur({ index, item }) { |
| ... | @@ -950,6 +964,19 @@ export default { | ... | @@ -950,6 +964,19 @@ export default { |
| 950 | // 最小重量失焦事件 | 964 | // 最小重量失焦事件 |
| 951 | minWeightBur({ index, item }) { | 965 | minWeightBur({ index, item }) { |
| 952 | // console.log("minWeightBur", index, item); | 966 | // console.log("minWeightBur", index, item); |
| 967 | + const validateData = { | ||
| 968 | + reg: /^(0|[1-9]\d*)(.\d{1,5})?$/, | ||
| 969 | + index: index, | ||
| 970 | + ursaMark: false, | ||
| 971 | + minWeight: item.minWeight, | ||
| 972 | + maxWeight: item.maxWeight, | ||
| 973 | + errorMsgAttr: "weightError", | ||
| 974 | + validateForm: false, // form表单节流阀 | ||
| 975 | + errorMsg: { | ||
| 976 | + invalid: "请输入有效重量,小数保留5位", | ||
| 977 | + error: "最小重量不得大于最大重量", | ||
| 978 | + }, | ||
| 979 | + }; | ||
| 953 | }, | 980 | }, |
| 954 | // 最大重量失焦事件 | 981 | // 最大重量失焦事件 |
| 955 | maxWeightBur({ index, item }) { | 982 | maxWeightBur({ index, item }) { | ... | ... |
| ... | @@ -361,7 +361,7 @@ | ... | @@ -361,7 +361,7 @@ |
| 361 | <el-input | 361 | <el-input |
| 362 | v-model.trim="queryForm.minCustomVal" | 362 | v-model.trim="queryForm.minCustomVal" |
| 363 | placeholder="最小申报价值" | 363 | placeholder="最小申报价值" |
| 364 | - @blur="inputCNYBlurMin($event, 'minCNYCustomVal')" | 364 | + @blur="inputCNYBlurMin($event)" |
| 365 | :disabled="!getRouter" | 365 | :disabled="!getRouter" |
| 366 | ></el-input> | 366 | ></el-input> |
| 367 | <span | 367 | <span |
| ... | @@ -374,7 +374,7 @@ | ... | @@ -374,7 +374,7 @@ |
| 374 | <el-input | 374 | <el-input |
| 375 | v-model.trim="queryForm.maxCustomVal" | 375 | v-model.trim="queryForm.maxCustomVal" |
| 376 | placeholder="最大申报价值" | 376 | placeholder="最大申报价值" |
| 377 | - @blur="inputCNYBlurMax($event, 'maxCNYCustomVal')" | 377 | + @blur="inputCNYBlurMax($event)" |
| 378 | :disabled="!getRouter" | 378 | :disabled="!getRouter" |
| 379 | ></el-input> | 379 | ></el-input> |
| 380 | </el-col> | 380 | </el-col> |
| ... | @@ -387,7 +387,7 @@ | ... | @@ -387,7 +387,7 @@ |
| 387 | <el-input | 387 | <el-input |
| 388 | v-model.trim="queryForm.minUsdCustomVal" | 388 | v-model.trim="queryForm.minUsdCustomVal" |
| 389 | placeholder="最小申报价值" | 389 | placeholder="最小申报价值" |
| 390 | - @blur="inputSUDBlurMin($event, 'minSUDCustomVal')" | 390 | + @blur="inputSUDBlurMin($event)" |
| 391 | :disabled="!getRouter" | 391 | :disabled="!getRouter" |
| 392 | ></el-input> | 392 | ></el-input> |
| 393 | <span | 393 | <span |
| ... | @@ -400,7 +400,7 @@ | ... | @@ -400,7 +400,7 @@ |
| 400 | <el-input | 400 | <el-input |
| 401 | v-model.trim="queryForm.maxUsdCustomVal" | 401 | v-model.trim="queryForm.maxUsdCustomVal" |
| 402 | placeholder="最大申报价值" | 402 | placeholder="最大申报价值" |
| 403 | - @blur="inputSUDBlurMax($event, 'maxSUDCustomVal')" | 403 | + @blur="inputSUDBlurMax($event)" |
| 404 | :disabled="!getRouter" | 404 | :disabled="!getRouter" |
| 405 | ></el-input> | 405 | ></el-input> |
| 406 | </el-col> | 406 | </el-col> |
| ... | @@ -521,7 +521,6 @@ export default { | ... | @@ -521,7 +521,6 @@ export default { |
| 521 | ]; | 521 | ]; |
| 522 | } | 522 | } |
| 523 | }, | 523 | }, |
| 524 | - mounted() {}, | ||
| 525 | methods: { | 524 | methods: { |
| 526 | // ET86新增 | 525 | // ET86新增 |
| 527 | postAdd(params) { | 526 | postAdd(params) { |
| ... | @@ -617,13 +616,14 @@ export default { | ... | @@ -617,13 +616,14 @@ export default { |
| 617 | getAllDictData() { | 616 | getAllDictData() { |
| 618 | allDictData() | 617 | allDictData() |
| 619 | .then((res) => { | 618 | .then((res) => { |
| 620 | - if (res.code != 200) { | 619 | + const { code, data, msg } = res; |
| 621 | - this.msgError(res.msg); | 620 | + if (code != 200) { |
| 621 | + this.msgError(msg); | ||
| 622 | return; | 622 | return; |
| 623 | } | 623 | } |
| 624 | - this.cargoType = res.data.cargoType; // 申报类别 | 624 | + this.cargoType = data.cargoType; // 申报类别 |
| 625 | - if (res.data.serviceCode.length) { | 625 | + if (data.serviceCode.length) { |
| 626 | - this.getObj(res.data); // 获取serviceCode字典 | 626 | + this.getObj(data); // 获取serviceCode字典 |
| 627 | } | 627 | } |
| 628 | }) | 628 | }) |
| 629 | .catch(() => {}); | 629 | .catch(() => {}); |
| ... | @@ -635,8 +635,9 @@ export default { | ... | @@ -635,8 +635,9 @@ export default { |
| 635 | queryRouteByFltNo(item) | 635 | queryRouteByFltNo(item) |
| 636 | .then((res) => { | 636 | .then((res) => { |
| 637 | this.tableAttr.tableLoading = false; | 637 | this.tableAttr.tableLoading = false; |
| 638 | - if (res.code == 200) { | 638 | + const { code, data, msg } = res; |
| 639 | - const list = res.data.list; | 639 | + if (code == 200) { |
| 640 | + const list = data.list; | ||
| 640 | if (list.length) { | 641 | if (list.length) { |
| 641 | let isEtesRoute = list.filter((item) => item.isEtesRoute == "Y"); // 过滤普通航线 | 642 | let isEtesRoute = list.filter((item) => item.isEtesRoute == "Y"); // 过滤普通航线 |
| 642 | if (isEtesRoute.length == 0) { | 643 | if (isEtesRoute.length == 0) { |
| ... | @@ -753,9 +754,6 @@ export default { | ... | @@ -753,9 +754,6 @@ export default { |
| 753 | this.queryForm.originOfFlightNo | 754 | this.queryForm.originOfFlightNo |
| 754 | ); | 755 | ); |
| 755 | }, | 756 | }, |
| 756 | - /* | ||
| 757 | - 如果是编辑,那么添加航班顺位时 | ||
| 758 | - */ | ||
| 759 | // 表单提交 | 757 | // 表单提交 |
| 760 | submitForm(formName) { | 758 | submitForm(formName) { |
| 761 | this.$refs[formName].validate((valid) => { | 759 | this.$refs[formName].validate((valid) => { |
| ... | @@ -773,9 +771,11 @@ export default { | ... | @@ -773,9 +771,11 @@ export default { |
| 773 | // if (item.hasOwnProperty("statusMark")) { | 771 | // if (item.hasOwnProperty("statusMark")) { |
| 774 | // delete item.id; | 772 | // delete item.id; |
| 775 | // } | 773 | // } |
| 774 | + // // 航线列表 | ||
| 776 | if (item.hasOwnProperty("routeList")) { | 775 | if (item.hasOwnProperty("routeList")) { |
| 777 | delete item.routeList; | 776 | delete item.routeList; |
| 778 | } | 777 | } |
| 778 | + // 排序字段 | ||
| 779 | item.priority = ++i; | 779 | item.priority = ++i; |
| 780 | return item; | 780 | return item; |
| 781 | }); | 781 | }); | ... | ... |
-
Please register or login to post a comment