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 21:37:33 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
502cf5fcd4948156395fcc656c7bb47bd6246fc9
502cf5fc
2 parents
cedbd9dc
fd669bd8
Merge branch 'et86-black' into uat
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
28 deletions
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
src/views/allocationConfig/flightAllocConfig/mixins/index.js
src/views/et86Config/et86RuleConfig/edit/index.vue
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
View file @
502cf5f
...
...
@@ -95,9 +95,7 @@
</el-input>
</span>
<div class="form-item-error-block">
<span
class="el-form-item__error"
></span>
<span class="el-form-item__error"></span>
</div>
</el-col>
</el-form-item>
...
...
@@ -142,9 +140,7 @@
</el-input>
</span>
<div class="form-item-error-block">
<span
class="el-form-item__error"
></span>
<span class="el-form-item__error"></span>
</div>
</el-col>
</el-form-item>
...
...
@@ -161,9 +157,7 @@
@blur="includeUrsa({ index, item, $event })"
>
</el-input>
<span
class="el-form-item__error"
></span>
<span class="el-form-item__error"></span>
</el-form-item>
</el-col>
<el-col :span="10">
...
...
@@ -178,9 +172,7 @@
>
</el-input>
<div class="form-item-error-block">
<span
class="el-form-item__error"
></span>
<span class="el-form-item__error"></span>
</div>
</el-form-item>
</el-col>
...
...
@@ -197,9 +189,7 @@
@blur="minNumOfPieces({ index, item, $event })"
>
</el-input>
<span
class="el-form-item__error"
></span>
<span class="el-form-item__error"></span>
</el-col>
<el-col style="text-align: center" :span="1"
>-</el-col
...
...
@@ -227,9 +217,7 @@
@blur="minWeight({ index, item, $event })"
>
</el-input>
<span
class="el-form-item__error"
></span>
<span class="el-form-item__error"></span>
</el-col>
<el-col style="text-align: center" :span="1"
>-</el-col
...
...
@@ -515,7 +503,7 @@ export default {
},
data() {
return {
activeNames:
[0]
, // 展开指定项
activeNames:
0
, // 展开指定项
};
},
computed: {
...
...
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
View file @
502cf5f
...
...
@@ -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;
}
})
...
...
@@ -185,6 +185,9 @@ export default {
...this.routesInfo[index],
...routeRuleForm,
};
if (this.routeList[index].hasOwnProperty("ordinal")) {
mergeObj.routePriority = this.routeList[index].ordinal;
}
this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据
},
// 保存 【新增/修改航线规则设置】
...
...
@@ -208,7 +211,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;
}
...
...
@@ -332,6 +337,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 @
502cf5f
...
...
@@ -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"
,
// 去重字段
...
...
@@ -545,6 +552,15 @@ export default {
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
result
.
map
((
item1
)
=>
{
let
currentRoute
=
dateRouteList
.
findIndex
((
item2
)
=>
{
if
(
item1
.
route
==
item2
.
route
)
{
item1
.
routePriority
=
item2
.
routePriority
;
}
});
return
currentRoute
;
});
// 查找对应的航线,把当前的routePriority字段覆盖
this
.
routesInfo
=
result
;
this
.
pageLoading
=
false
;
}
else
{
...
...
@@ -559,12 +575,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 +621,55 @@ 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
;
});
dateList
.
map
((
item1
)
=>
{
let
currentRoute
=
dateRouteList
.
findIndex
((
item2
)
=>
{
if
(
item1
.
route
==
item2
.
route
)
{
item1
.
routePriority
=
item2
.
routePriority
;
}
});
return
currentRoute
;
});
// 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
;
});
dateList
.
map
((
item1
)
=>
{
let
currentRoute
=
dateRouteList
.
findIndex
((
item2
)
=>
{
if
(
item1
.
route
==
item2
.
route
)
{
item1
.
routePriority
=
item2
.
routePriority
;
}
});
return
currentRoute
;
});
this
.
routeList
=
dateRouteList
;
// 航线优先级
this
.
routesInfo
=
dateList
;
this
.
pageLoading
=
false
;
...
...
@@ -1041,3 +1114,16 @@ export default {
还要对所有关于显示的数据做处理,比如页面上所有关于checkbox的勾选框radio单选框;
8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理;
*/
/*
1:日期级别没有维度取普通维度要注意的事项:
删除普通维度的id、historyId;
航线顺位字段:routeSpecifyDateSeq
航线顺位排序字段:routePriority
且排除ET86航线顺位排序字段:routePriority & routeSpecifyDateSeq
2:新增时:
不传id、historyId;
航线顺位字段:routeSpecifyDateSeq
航线顺位排序字段:routePriority
且排除ET86航线顺位排序字段:routePriority & routeSpecifyDateSeq
*/
...
...
src/views/et86Config/et86RuleConfig/edit/index.vue
View file @
502cf5f
...
...
@@ -510,6 +510,7 @@ export default {
this.tableData = [
{
id: this.id,
statusMark: true, // 作为是否为新增
flightNo: "", // 航班号
calculateDay: "", // 航班日期 +1 -1
flightRoute: "", // 航线
...
...
@@ -771,10 +772,10 @@ export default {
if (item.hasOwnProperty("routeList")) {
delete item.routeList;
}
//
//
作为是否为新增
//
if (item.hasOwnProperty("statusMark")) {
//
delete item.id;
//
}
// 作为是否为新增
if (item.hasOwnProperty("statusMark")) {
delete item.id;
}
// 编辑
if (item.hasOwnProperty("edit")) {
delete item.edit;
...
...
@@ -789,6 +790,13 @@ export default {
delete item.statusMark;
}
});
if (this.$route.query.name == "add") {
delete this.queryForm.id;
tableData.map((item, i) => {
delete item.id;
return item;
});
}
// 校验ET86配舱航班顺位维度
let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号
let fltNoRoute = this.tableData.some(
...
...
Please
register
or
login
to post a comment