Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-10-24 19:32:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b164ef7cb2f6078e0d1e6e74300ad457e81c1df5
b164ef7c
1 parent
fa3c62c2
modify
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
5 deletions
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
src/views/allocationConfig/flightAllocConfig/mixins/index.js
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
View file @
b164ef7
...
...
@@ -69,7 +69,7 @@ import {
enableOrDisable, // 开启/停用航线规则设置
batchUpdateOrAddFlight, // 航班航线优先级更新
queryRouteByFltNo, // 通过航班号查询航线
} from "@/api/destinationFlight"
} from "@/api/destinationFlight"
;
import indexMixins from "../mixins";
export default {
components: {
...
...
@@ -134,7 +134,7 @@ export default {
findAllFltDataApi(parmas)
.then((res) => {
const { code, data, msg } = res;
if
(code == 200)
{
if
(code == 200)
{
this.flightRouteList = data.list;
}
})
...
...
@@ -190,6 +190,7 @@ export default {
// 保存 【新增/修改航线规则设置】
saveSubmit(item, index) {
item.flightRoute = item.route || item.flightRoute;
item.routePriority = ++index; // 作为排序
let parmas = JSON.parse(JSON.stringify(item));
this.returnString(parmas, "cargoType");
this.returnString(parmas, "typeOfGoods");
...
...
@@ -208,7 +209,9 @@ export default {
}
}
if (parmas.minNumOfPieces || parmas.maxNumOfPieces) {
if (!/^[1-9]\d*$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)) {
if (
!/^[1-9]\d*$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)
) {
this.msgWarning("请输入有效件数");
return;
}
...
...
@@ -253,6 +256,7 @@ export default {
this.hasOwnProperty(data, "handlingCode");
this.hasOwnProperty(data, "subCategory");
this.setattrVal(data); // 设置属性值
index--;
this.$set(this.routesInfo, index, {
config: true,
...data,
...
...
@@ -332,6 +336,9 @@ export default {
this.$set(this.routesInfo, index, {
route: item.flightRoute,
config: false,
fltNo: this.routeList[0].fltNo,
etesRule: this.routeList[0].etesRule,
routePriority: item.routePriority,
});
this.msgSuccess(msg);
} else {
...
...
src/views/allocationConfig/flightAllocConfig/mixins/index.js
View file @
b164ef7
...
...
@@ -244,12 +244,14 @@ export default {
if
(
item
.
status
==
"1"
)
{
delete
item
.
id
;
delete
item
.
historyId
;
delete
item
.
routePriority
;
}
// 开启 || 保存【若开启则不用重置status和删除id & historyId】
// 开启 || 保存【若开启则不用重置status和删除id & historyId】
用routePriority字段
if
((
item
.
status
=
"3"
))
{
item
.
status
=
"1"
;
delete
item
.
id
;
delete
item
.
historyId
;
delete
item
.
routePriority
;
}
return
item
;
});
...
...
@@ -311,6 +313,11 @@ export default {
this
.
msgError
(
"暂无航线"
);
return
;
}
// 删除航线维度的顺位排序字段使用航班航线列表的排序字段
data
.
list
.
map
((
item
)
=>
{
delete
item
.
routePriority
;
return
item
;
});
// 日期级别航班航线维度规则详情
const
dateDataList
=
removeDuplicates
(
data
.
list
,
{
duplicate
:
"flightRoute"
,
// 去重字段
...
...
@@ -559,12 +566,25 @@ export default {
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
let
routeSpecify
=
dateRouteList
.
filter
(
(
item
)
=>
item
.
etesRule
==
"N"
);
let
routeSpecifyDateSeq
=
[];
if
(
routeSpecify
.
length
)
{
routeSpecify
.
map
((
item
)
=>
{
routeSpecifyDateSeq
.
push
(
item
.
route
);
});
}
noDateRouteInfo
.
map
((
item
)
=>
{
item
.
routeSpecifyDateSeq
=
routeSpecifyDateSeq
.
join
(
";"
);
return
item
;
});
// this.defaultRouteData(noDateRouteInfo) // 默认航线配置信息数据;
this
.
routesInfo
=
noDateRouteInfo
;
this
.
pageLoading
=
false
;
}
}
else
{
// 日期级别和航班种类为Purple Tail
的时候
// 日期级别和航班种类为Purple Tail
注意事项:
// 日期级别的时候要注意dateListNo里没有flightRoute字段,也就是说只有航班航线没有航班航线配置信息;
// 其次是非日期级别mergeNoDateRouteInfo也可能没有对应的数据,没有flightRoute字段。
// 那么这个时候使用mergeFlightRouteConfigObj方法就会出问题。
...
...
@@ -592,11 +612,39 @@ export default {
);
});
if
(
this
.
$route
.
query
.
flightKindName
==
"Purple Tail"
)
{
let
routeSpecify
=
this
.
routeList
.
filter
(
(
item
)
=>
item
.
etesRule
==
"N"
);
let
routeSpecifyDateSeq
=
[];
if
(
routeSpecify
.
length
)
{
routeSpecify
.
map
((
item
)
=>
{
routeSpecifyDateSeq
.
push
(
item
.
route
);
});
}
// 取日期级别航线优先级
dateList
.
map
((
item
)
=>
{
item
.
routeSpecifyDateSeq
=
routeSpecifyDateSeq
.
join
(
";"
);
return
item
;
});
// this.defaultRouteData(result) // 默认航线配置信息数据;
this
.
routeList
=
dateRouteList
;
// 航线优先级
this
.
routesInfo
=
dateList
;
this
.
pageLoading
=
false
;
}
else
{
let
routeSpecify
=
dateRouteList
.
filter
(
(
item
)
=>
item
.
etesRule
==
"N"
);
let
routeSpecifyDateSeq
=
[];
if
(
routeSpecify
.
length
)
{
routeSpecify
.
map
((
item
)
=>
{
routeSpecifyDateSeq
.
push
(
item
.
route
);
});
}
// 取日期级别航线优先级
dateList
.
map
((
item
)
=>
{
item
.
routeSpecifyDateSeq
=
routeSpecifyDateSeq
.
join
(
";"
);
return
item
;
});
this
.
routeList
=
dateRouteList
;
// 航线优先级
this
.
routesInfo
=
dateList
;
this
.
pageLoading
=
false
;
...
...
@@ -1041,3 +1089,16 @@ export default {
还要对所有关于显示的数据做处理,比如页面上所有关于checkbox的勾选框radio单选框;
8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理;
*/
/*
1:日期级别没有维度取普通维度要注意的事项:
删除普通维度的id、historyId;
航线顺位字段:routeSpecifyDateSeq
航线顺位排序字段:routePriority
且排除ET86航线顺位排序字段:routePriority & routeSpecifyDateSeq
2:新增时:
不传id、historyId;
航线顺位字段:routeSpecifyDateSeq
航线顺位排序字段:routePriority
且排除ET86航线顺位排序字段:routePriority & routeSpecifyDateSeq
*/
...
...
Please
register
or
login
to post a comment