Elements-SY

Merge branch 'et86-black' into uat

...@@ -95,9 +95,7 @@ ...@@ -95,9 +95,7 @@
95 </el-input> 95 </el-input>
96 </span> 96 </span>
97 <div class="form-item-error-block"> 97 <div class="form-item-error-block">
98 - <span 98 + <span class="el-form-item__error"></span>
99 - class="el-form-item__error"
100 - ></span>
101 </div> 99 </div>
102 </el-col> 100 </el-col>
103 </el-form-item> 101 </el-form-item>
...@@ -142,9 +140,7 @@ ...@@ -142,9 +140,7 @@
142 </el-input> 140 </el-input>
143 </span> 141 </span>
144 <div class="form-item-error-block"> 142 <div class="form-item-error-block">
145 - <span 143 + <span class="el-form-item__error"></span>
146 - class="el-form-item__error"
147 - ></span>
148 </div> 144 </div>
149 </el-col> 145 </el-col>
150 </el-form-item> 146 </el-form-item>
...@@ -161,9 +157,7 @@ ...@@ -161,9 +157,7 @@
161 @blur="includeUrsa({ index, item, $event })" 157 @blur="includeUrsa({ index, item, $event })"
162 > 158 >
163 </el-input> 159 </el-input>
164 - <span 160 + <span class="el-form-item__error"></span>
165 - class="el-form-item__error"
166 - ></span>
167 </el-form-item> 161 </el-form-item>
168 </el-col> 162 </el-col>
169 <el-col :span="10"> 163 <el-col :span="10">
...@@ -178,9 +172,7 @@ ...@@ -178,9 +172,7 @@
178 > 172 >
179 </el-input> 173 </el-input>
180 <div class="form-item-error-block"> 174 <div class="form-item-error-block">
181 - <span 175 + <span class="el-form-item__error"></span>
182 - class="el-form-item__error"
183 - ></span>
184 </div> 176 </div>
185 </el-form-item> 177 </el-form-item>
186 </el-col> 178 </el-col>
...@@ -197,9 +189,7 @@ ...@@ -197,9 +189,7 @@
197 @blur="minNumOfPieces({ index, item, $event })" 189 @blur="minNumOfPieces({ index, item, $event })"
198 > 190 >
199 </el-input> 191 </el-input>
200 - <span 192 + <span class="el-form-item__error"></span>
201 - class="el-form-item__error"
202 - ></span>
203 </el-col> 193 </el-col>
204 <el-col style="text-align: center" :span="1" 194 <el-col style="text-align: center" :span="1"
205 >-</el-col 195 >-</el-col
...@@ -227,9 +217,7 @@ ...@@ -227,9 +217,7 @@
227 @blur="minWeight({ index, item, $event })" 217 @blur="minWeight({ index, item, $event })"
228 > 218 >
229 </el-input> 219 </el-input>
230 - <span 220 + <span class="el-form-item__error"></span>
231 - class="el-form-item__error"
232 - ></span>
233 </el-col> 221 </el-col>
234 <el-col style="text-align: center" :span="1" 222 <el-col style="text-align: center" :span="1"
235 >-</el-col 223 >-</el-col
...@@ -515,7 +503,7 @@ export default { ...@@ -515,7 +503,7 @@ export default {
515 }, 503 },
516 data() { 504 data() {
517 return { 505 return {
518 - activeNames: [0], // 展开指定项 506 + activeNames: 0, // 展开指定项
519 }; 507 };
520 }, 508 },
521 computed: { 509 computed: {
......
...@@ -69,7 +69,7 @@ import { ...@@ -69,7 +69,7 @@ import {
69 enableOrDisable, // 开启/停用航线规则设置 69 enableOrDisable, // 开启/停用航线规则设置
70 batchUpdateOrAddFlight, // 航班航线优先级更新 70 batchUpdateOrAddFlight, // 航班航线优先级更新
71 queryRouteByFltNo, // 通过航班号查询航线 71 queryRouteByFltNo, // 通过航班号查询航线
72 -} from "@/api/destinationFlight" 72 +} from "@/api/destinationFlight";
73 import indexMixins from "../mixins"; 73 import indexMixins from "../mixins";
74 export default { 74 export default {
75 components: { 75 components: {
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
134 findAllFltDataApi(parmas) 134 findAllFltDataApi(parmas)
135 .then((res) => { 135 .then((res) => {
136 const { code, data, msg } = res; 136 const { code, data, msg } = res;
137 - if(code == 200){ 137 + if (code == 200) {
138 this.flightRouteList = data.list; 138 this.flightRouteList = data.list;
139 } 139 }
140 }) 140 })
...@@ -185,6 +185,9 @@ export default { ...@@ -185,6 +185,9 @@ export default {
185 ...this.routesInfo[index], 185 ...this.routesInfo[index],
186 ...routeRuleForm, 186 ...routeRuleForm,
187 }; 187 };
188 + if (this.routeList[index].hasOwnProperty("ordinal")) {
189 + mergeObj.routePriority = this.routeList[index].ordinal;
190 + }
188 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据 191 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据
189 }, 192 },
190 // 保存 【新增/修改航线规则设置】 193 // 保存 【新增/修改航线规则设置】
...@@ -208,7 +211,9 @@ export default { ...@@ -208,7 +211,9 @@ export default {
208 } 211 }
209 } 212 }
210 if (parmas.minNumOfPieces || parmas.maxNumOfPieces) { 213 if (parmas.minNumOfPieces || parmas.maxNumOfPieces) {
211 - if (!/^[1-9]\d*$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)) { 214 + if (
215 + !/^[1-9]\d*$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)
216 + ) {
212 this.msgWarning("请输入有效件数"); 217 this.msgWarning("请输入有效件数");
213 return; 218 return;
214 } 219 }
...@@ -332,6 +337,9 @@ export default { ...@@ -332,6 +337,9 @@ export default {
332 this.$set(this.routesInfo, index, { 337 this.$set(this.routesInfo, index, {
333 route: item.flightRoute, 338 route: item.flightRoute,
334 config: false, 339 config: false,
340 + fltNo: this.routeList[0].fltNo,
341 + etesRule: this.routeList[0].etesRule,
342 + routePriority: item.routePriority,
335 }); 343 });
336 this.msgSuccess(msg); 344 this.msgSuccess(msg);
337 } else { 345 } else {
......
...@@ -244,12 +244,14 @@ export default { ...@@ -244,12 +244,14 @@ export default {
244 if (item.status == "1") { 244 if (item.status == "1") {
245 delete item.id; 245 delete item.id;
246 delete item.historyId; 246 delete item.historyId;
247 + delete item.routePriority;
247 } 248 }
248 - // 开启 || 保存【若开启则不用重置status和删除id & historyId】 249 + // 开启 || 保存【若开启则不用重置status和删除id & historyId】用routePriority字段
249 if ((item.status = "3")) { 250 if ((item.status = "3")) {
250 item.status = "1"; 251 item.status = "1";
251 delete item.id; 252 delete item.id;
252 delete item.historyId; 253 delete item.historyId;
254 + delete item.routePriority;
253 } 255 }
254 return item; 256 return item;
255 }); 257 });
...@@ -311,6 +313,11 @@ export default { ...@@ -311,6 +313,11 @@ export default {
311 this.msgError("暂无航线"); 313 this.msgError("暂无航线");
312 return; 314 return;
313 } 315 }
316 + // 删除航线维度的顺位排序字段使用航班航线列表的排序字段
317 + data.list.map((item) => {
318 + delete item.routePriority;
319 + return item;
320 + });
314 // 日期级别航班航线维度规则详情 321 // 日期级别航班航线维度规则详情
315 const dateDataList = removeDuplicates(data.list, { 322 const dateDataList = removeDuplicates(data.list, {
316 duplicate: "flightRoute", // 去重字段 323 duplicate: "flightRoute", // 去重字段
...@@ -545,6 +552,15 @@ export default { ...@@ -545,6 +552,15 @@ export default {
545 dateRouteList.findIndex((item) => item.route == b.route) 552 dateRouteList.findIndex((item) => item.route == b.route)
546 ); 553 );
547 }); 554 });
555 + result.map((item1) => {
556 + let currentRoute = dateRouteList.findIndex((item2) => {
557 + if (item1.route == item2.route) {
558 + item1.routePriority = item2.routePriority;
559 + }
560 + });
561 + return currentRoute;
562 + });
563 + // 查找对应的航线,把当前的routePriority字段覆盖
548 this.routesInfo = result; 564 this.routesInfo = result;
549 this.pageLoading = false; 565 this.pageLoading = false;
550 } else { 566 } else {
...@@ -559,12 +575,25 @@ export default { ...@@ -559,12 +575,25 @@ export default {
559 dateRouteList.findIndex((item) => item.route == b.route) 575 dateRouteList.findIndex((item) => item.route == b.route)
560 ); 576 );
561 }); 577 });
578 + let routeSpecify = dateRouteList.filter(
579 + (item) => item.etesRule == "N"
580 + );
581 + let routeSpecifyDateSeq = [];
582 + if (routeSpecify.length) {
583 + routeSpecify.map((item) => {
584 + routeSpecifyDateSeq.push(item.route);
585 + });
586 + }
587 + noDateRouteInfo.map((item) => {
588 + item.routeSpecifyDateSeq = routeSpecifyDateSeq.join(";");
589 + return item;
590 + });
562 // this.defaultRouteData(noDateRouteInfo) // 默认航线配置信息数据; 591 // this.defaultRouteData(noDateRouteInfo) // 默认航线配置信息数据;
563 this.routesInfo = noDateRouteInfo; 592 this.routesInfo = noDateRouteInfo;
564 this.pageLoading = false; 593 this.pageLoading = false;
565 } 594 }
566 } else { 595 } else {
567 - // 日期级别和航班种类为Purple Tail的时候 596 + // 日期级别和航班种类为Purple Tail注意事项:
568 // 日期级别的时候要注意dateListNo里没有flightRoute字段,也就是说只有航班航线没有航班航线配置信息; 597 // 日期级别的时候要注意dateListNo里没有flightRoute字段,也就是说只有航班航线没有航班航线配置信息;
569 // 其次是非日期级别mergeNoDateRouteInfo也可能没有对应的数据,没有flightRoute字段。 598 // 其次是非日期级别mergeNoDateRouteInfo也可能没有对应的数据,没有flightRoute字段。
570 // 那么这个时候使用mergeFlightRouteConfigObj方法就会出问题。 599 // 那么这个时候使用mergeFlightRouteConfigObj方法就会出问题。
...@@ -592,11 +621,55 @@ export default { ...@@ -592,11 +621,55 @@ export default {
592 ); 621 );
593 }); 622 });
594 if (this.$route.query.flightKindName == "Purple Tail") { 623 if (this.$route.query.flightKindName == "Purple Tail") {
624 + let routeSpecify = this.routeList.filter(
625 + (item) => item.etesRule == "N"
626 + );
627 + let routeSpecifyDateSeq = [];
628 + if (routeSpecify.length) {
629 + routeSpecify.map((item) => {
630 + routeSpecifyDateSeq.push(item.route);
631 + });
632 + }
633 + // 取日期级别航线优先级
634 + dateList.map((item) => {
635 + item.routeSpecifyDateSeq = routeSpecifyDateSeq.join(";");
636 + return item;
637 + });
638 + dateList.map((item1) => {
639 + let currentRoute = dateRouteList.findIndex((item2) => {
640 + if (item1.route == item2.route) {
641 + item1.routePriority = item2.routePriority;
642 + }
643 + });
644 + return currentRoute;
645 + });
595 // this.defaultRouteData(result) // 默认航线配置信息数据; 646 // this.defaultRouteData(result) // 默认航线配置信息数据;
596 this.routeList = dateRouteList; // 航线优先级 647 this.routeList = dateRouteList; // 航线优先级
597 this.routesInfo = dateList; 648 this.routesInfo = dateList;
598 this.pageLoading = false; 649 this.pageLoading = false;
599 } else { 650 } else {
651 + let routeSpecify = dateRouteList.filter(
652 + (item) => item.etesRule == "N"
653 + );
654 + let routeSpecifyDateSeq = [];
655 + if (routeSpecify.length) {
656 + routeSpecify.map((item) => {
657 + routeSpecifyDateSeq.push(item.route);
658 + });
659 + }
660 + // 取日期级别航线优先级
661 + dateList.map((item) => {
662 + item.routeSpecifyDateSeq = routeSpecifyDateSeq.join(";");
663 + return item;
664 + });
665 + dateList.map((item1) => {
666 + let currentRoute = dateRouteList.findIndex((item2) => {
667 + if (item1.route == item2.route) {
668 + item1.routePriority = item2.routePriority;
669 + }
670 + });
671 + return currentRoute;
672 + });
600 this.routeList = dateRouteList; // 航线优先级 673 this.routeList = dateRouteList; // 航线优先级
601 this.routesInfo = dateList; 674 this.routesInfo = dateList;
602 this.pageLoading = false; 675 this.pageLoading = false;
...@@ -1041,3 +1114,16 @@ export default { ...@@ -1041,3 +1114,16 @@ export default {
1041 还要对所有关于显示的数据做处理,比如页面上所有关于checkbox的勾选框radio单选框; 1114 还要对所有关于显示的数据做处理,比如页面上所有关于checkbox的勾选框radio单选框;
1042 8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理; 1115 8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理;
1043 */ 1116 */
1117 +
1118 +/*
1119 + 1:日期级别没有维度取普通维度要注意的事项:
1120 + 删除普通维度的id、historyId;
1121 + 航线顺位字段:routeSpecifyDateSeq
1122 + 航线顺位排序字段:routePriority
1123 + 且排除ET86航线顺位排序字段:routePriority & routeSpecifyDateSeq
1124 + 2:新增时:
1125 + 不传id、historyId;
1126 + 航线顺位字段:routeSpecifyDateSeq
1127 + 航线顺位排序字段:routePriority
1128 + 且排除ET86航线顺位排序字段:routePriority & routeSpecifyDateSeq
1129 +*/
......
...@@ -510,6 +510,7 @@ export default { ...@@ -510,6 +510,7 @@ export default {
510 this.tableData = [ 510 this.tableData = [
511 { 511 {
512 id: this.id, 512 id: this.id,
513 + statusMark: true, // 作为是否为新增
513 flightNo: "", // 航班号 514 flightNo: "", // 航班号
514 calculateDay: "", // 航班日期 +1 -1 515 calculateDay: "", // 航班日期 +1 -1
515 flightRoute: "", // 航线 516 flightRoute: "", // 航线
...@@ -771,10 +772,10 @@ export default { ...@@ -771,10 +772,10 @@ export default {
771 if (item.hasOwnProperty("routeList")) { 772 if (item.hasOwnProperty("routeList")) {
772 delete item.routeList; 773 delete item.routeList;
773 } 774 }
774 - // // 作为是否为新增 775 + // 作为是否为新增
775 - // if (item.hasOwnProperty("statusMark")) { 776 + if (item.hasOwnProperty("statusMark")) {
776 - // delete item.id; 777 + delete item.id;
777 - // } 778 + }
778 // 编辑 779 // 编辑
779 if (item.hasOwnProperty("edit")) { 780 if (item.hasOwnProperty("edit")) {
780 delete item.edit; 781 delete item.edit;
...@@ -789,6 +790,13 @@ export default { ...@@ -789,6 +790,13 @@ export default {
789 delete item.statusMark; 790 delete item.statusMark;
790 } 791 }
791 }); 792 });
793 + if (this.$route.query.name == "add") {
794 + delete this.queryForm.id;
795 + tableData.map((item, i) => {
796 + delete item.id;
797 + return item;
798 + });
799 + }
792 // 校验ET86配舱航班顺位维度 800 // 校验ET86配舱航班顺位维度
793 let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号 801 let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号
794 let fltNoRoute = this.tableData.some( 802 let fltNoRoute = this.tableData.some(
......