Elements-SY

modify

...@@ -111,7 +111,6 @@ export default { ...@@ -111,7 +111,6 @@ export default {
111 item.disable = false; 111 item.disable = false;
112 if (item.label == "航班日期" || item.label == "航线") { 112 if (item.label == "航班日期" || item.label == "航线") {
113 item.hidden = true; 113 item.hidden = true;
114 - item.hidden = true;
115 } 114 }
116 } 115 }
117 }); 116 });
...@@ -127,7 +126,6 @@ export default { ...@@ -127,7 +126,6 @@ export default {
127 } 126 }
128 }); 127 });
129 } 128 }
130 - this.queryForm = this.$route.query; // 获取跳转过来的参数
131 // 航班配舱维度规则设置查询条件 129 // 航班配舱维度规则设置查询条件
132 let queryCondition = { 130 let queryCondition = {
133 // 航班配舱设置 131 // 航班配舱设置
...@@ -149,6 +147,13 @@ export default { ...@@ -149,6 +147,13 @@ export default {
149 // 非日期级别 147 // 非日期级别
150 if (parmas.querySpecifyData == "2") { 148 if (parmas.querySpecifyData == "2") {
151 _this.noDateLevelData(this.noDateParmas); 149 _this.noDateLevelData(this.noDateParmas);
150 + formConfig.map((item) => {
151 + if (item.type !== "slot") {
152 + if (item.label == "航班日期") {
153 + item.hidden = true;
154 + }
155 + }
156 + });
152 } 157 }
153 // 日期级别 158 // 日期级别
154 if (parmas.querySpecifyData == "1") { 159 if (parmas.querySpecifyData == "1") {
...@@ -157,6 +162,7 @@ export default { ...@@ -157,6 +162,7 @@ export default {
157 noDateParmas: this.noDateParmas, 162 noDateParmas: this.noDateParmas,
158 }); 163 });
159 } 164 }
165 + _this.queryForm = _this.$route.query; // 获取跳转过来的参数
160 }, 166 },
161 }, 167 },
162 // 航班信息维护 168 // 航班信息维护
...@@ -290,7 +296,11 @@ export default { ...@@ -290,7 +296,11 @@ export default {
290 this.returnString(parmas, "handlingCode"); 296 this.returnString(parmas, "handlingCode");
291 this.returnString(parmas, "subCategory"); 297 this.returnString(parmas, "subCategory");
292 if (parmas.minWeight || parmas.maxWeight) { 298 if (parmas.minWeight || parmas.maxWeight) {
293 - if (!/^(0|[1-9]\d*)(.\d{1,5})?$/.test(parmas.minWeight || parmas.maxWeight)) { 299 + if (
300 + !/^(0|[1-9]\d*)(.\d{1,5})?$/.test(
301 + parmas.minWeight || parmas.maxWeight
302 + )
303 + ) {
294 this.msgWarning("请输入有效重量,小数保留5位"); 304 this.msgWarning("请输入有效重量,小数保留5位");
295 return; 305 return;
296 } 306 }
......
...@@ -248,6 +248,9 @@ export default { ...@@ -248,6 +248,9 @@ export default {
248 ); 248 );
249 }); 249 });
250 this.routesInfo = mergeDateRouteInfo; // 航班航线配置信息列表 250 this.routesInfo = mergeDateRouteInfo; // 航班航线配置信息列表
251 + if (this.$route.query.flightKindName == "Purple Tail") {
252 + this.showFlightKind(dateDataLists);
253 + }
251 } 254 }
252 if (dateConfigFlag == false) { 255 if (dateConfigFlag == false) {
253 // 航班航线有规则配置的 256 // 航班航线有规则配置的
...@@ -364,26 +367,82 @@ export default { ...@@ -364,26 +367,82 @@ export default {
364 this.setattrVal(item); // 设置属性值 367 this.setattrVal(item); // 设置属性值
365 } 368 }
366 }); 369 });
367 - this.routeList = dateRouteList; 370 + this.routeList = dateRouteList; // 航线优先级
371 + // 查找包含的航线并且按照dateList航线排序
368 dateList.sort((a, b) => { 372 dateList.sort((a, b) => {
369 return ( 373 return (
370 dateRouteList.findIndex((item) => item.route == a.route) - 374 dateRouteList.findIndex((item) => item.route == a.route) -
371 dateRouteList.findIndex((item) => item.route == b.route) 375 dateRouteList.findIndex((item) => item.route == b.route)
372 ); 376 );
373 }); 377 });
374 - this.routesInfo = dateList;
375 if (this.$route.query.flightKindName == "Purple Tail") { 378 if (this.$route.query.flightKindName == "Purple Tail") {
376 - let flightRouteListStr = []; 379 + let flightRouteListStr =
377 - dateDataLists.map((item, i, arr) => { 380 + this.$route.query.flightRouteListStr.split(";"); // 跳转传过来的航线
381 + // 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
382 + let inRoutes = dateDataLists
383 + .filter((item) => flightRouteListStr.includes(item.route))
384 + .sort(
385 + (a, b) =>
386 + flightRouteListStr.indexOf(a.route) -
387 + flightRouteListStr.indexOf(b.route)
388 + );
389 + // 处理航线优先级展示ET86
390 + let routes = [];
391 + inRoutes.map((item, i, arr) => {
378 if (arr[i].etesRule == "Y") { 392 if (arr[i].etesRule == "Y") {
379 - flightRouteListStr.push(`${arr[i].route}(ET86)`); 393 + routes.push(`${arr[i].route}(ET86)`);
380 } else { 394 } else {
381 - flightRouteListStr.push(arr[i].route); 395 + routes.push(arr[i].route);
382 } 396 }
383 }); 397 });
384 - this.queryForm.flightRouteListStr = flightRouteListStr.join(";"); 398 + // 把处理ET86航线优先级展示
399 + this.queryForm.flightRouteListStr = routes.join(";");
400 + // 跳转传过来的对应的航线把ET86航线的过滤掉
401 + let noEtesRoutes = inRoutes.filter((item) => item.etesRule == "N");
402 + let noRoutes = dateList.filter((item) => {
403 + return noEtesRoutes.some((el) => el.route === item.route);
404 + });
405 + const result = noRoutes
406 + .filter((item2) => {
407 + return noEtesRoutes.some((item1) => {
408 + return item1.route === item2.route;
409 + });
410 + })
411 + .sort((a, b) => {
412 + return (
413 + noEtesRoutes.findIndex((item) => item.route === a.route) -
414 + noEtesRoutes.findIndex((item) => item.route === b.route)
415 + );
416 + });
417 + this.routesInfo = result;
418 + } else {
419 + this.queryForm = this.$route.query; // 获取跳转过来的参数
420 + this.routesInfo = dateList;
421 + }
385 } 422 }
423 + },
424 + // 处理跳转显示航线种类
425 + showFlightKind(dateDataLists) {
426 + let flightRouteListStr = this.$route.query.flightRouteListStr.split(";"); // 跳转传过来的航线
427 + // 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
428 + let inRoutes = dateDataLists
429 + .filter((item) => flightRouteListStr.includes(item.route))
430 + .sort(
431 + (a, b) =>
432 + flightRouteListStr.indexOf(a.route) -
433 + flightRouteListStr.indexOf(b.route)
434 + );
435 + // 处理航线优先级展示ET86
436 + let routes = [];
437 + inRoutes.map((item, i, arr) => {
438 + if (arr[i].etesRule == "Y") {
439 + routes.push(`${arr[i].route}(ET86)`);
440 + } else {
441 + routes.push(arr[i].route);
386 } 442 }
443 + });
444 + // 把处理ET86航线优先级展示
445 + this.queryForm.flightRouteListStr = routes.join(";");
387 }, 446 },
388 // 整合飞行航线配置信息 447 // 整合飞行航线配置信息
389 mergeFlightRouteConfigObj(routeList, dataList) { 448 mergeFlightRouteConfigObj(routeList, dataList) {
...@@ -549,3 +608,8 @@ export default { ...@@ -549,3 +608,8 @@ export default {
549 8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理 608 8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理
550 609
551 */ 610 */
611 +/*
612 + 航线排序;
613 + 航线展示ET86
614 +
615 +*/
......