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-16 09:57:03 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
2782f843985f742e9b4f9ef2c3d3b983363c5e52
2782f843
2 parents
cc14f848
67270b70
Merge branch 'et86' into uat
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
3595 additions
and
486 deletions
package.json
src/App.vue
src/api/destinationFlight.js
src/assets/languages/dictLabels.js
src/assets/languages/echarts.js
src/components/Drag/index.vue
src/components/YlEcharts/YlEchartsBar/index.vue
src/components/YlEcharts/YlEchartsBar/optionConfig.js
src/main.js
src/router/index.js
src/utils/index.js
src/views/allocationConfig/flightAllocConfig/components/RouteDraggable.vue
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
src/views/allocationConfig/flightAllocConfig/dialog.vue
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/formConfig.js
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
src/views/allocationConfig/flightAllocConfig/index.vue
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/allocationConfig/flightAllocConfig/mixins/index.js
src/views/allocationConfig/flightRandConfig/index.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/basicInformation/queryCargo/dialog.vue
src/views/basicInformation/queryCargo/index.vue
src/views/et86Config/et86RuleConfig/components/input-number/index.js
src/views/et86Config/et86RuleConfig/components/input-number/src/input-number.vue
src/views/preMdeConfig/reportForm/index.vue
src/views/systemConfig/userConfig/drawer.vue
src/views/systemLog/dmLog/index.vue
package.json
View file @
2782f84
...
...
@@ -38,6 +38,7 @@
"dependencies"
:
{
"axios"
:
"0.21.1"
,
"core-js"
:
"3.8.3"
,
"echarts"
:
"^5.4.3"
,
"element-ui"
:
"2.15.3"
,
"sortablejs"
:
"^1.15.0"
,
"vue"
:
"2.6.14"
,
...
...
src/App.vue
View file @
2782f84
...
...
@@ -6,6 +6,6 @@
<script>
export default {
name:
'App'
}
name:
"App",
}
;
</script>
...
...
src/api/destinationFlight.js
View file @
2782f84
...
...
@@ -29,7 +29,7 @@ export function findFlightDimRuleByFlightNo(query) {
})
}
//
获取航班下航线维度(维度修改)
//
航线维度设置详情
/**
* @param purposeOfFlightNo 航班号
* @param flightDate 航班日期
...
...
@@ -43,7 +43,7 @@ export function findDestinationFltRuleByFlightNo(query) {
})
}
//
航班优先级修改
//
航班航线优先级更新
export
function
batchUpdateOrAddFlight
(
data
)
{
return
request
({
url
:
'/destinationFlight/batchUpdateOrAddFlight'
,
...
...
@@ -52,7 +52,7 @@ export function batchUpdateOrAddFlight(data) {
})
}
//
新增修改
规则设置
//
新增/修改航线
规则设置
export
function
updateOrAddFlight
(
form
)
{
return
request
({
url
:
'/destinationFlight/updateOrAddFlight'
,
...
...
@@ -61,30 +61,23 @@ export function updateOrAddFlight(form) {
})
}
//删除规则
export
function
delFlightId
(
id
)
{
const
data
=
{
id
}
// 删除航线规则设置
export
function
delFlightId
(
data
)
{
return
request
({
url
:
'/destinationFlight/delFlightId'
,
method
:
'post'
,
data
:
data
})
url
:
"/destinationFlight/delFlightId"
,
method
:
"post"
,
data
:
data
,
})
;
}
//
启用/停止规则
export
function
enableOrDisable
(
id
,
status
)
{
//
开启/停用航线规则设置
export
function
enableOrDisable
(
data
)
{
//statsu 1-有效 3-停用
const
data
=
{
id
,
status
}
return
request
({
url
:
'/destinationFlight/enableOrDisable'
,
method
:
'post'
,
data
:
data
})
url
:
"/destinationFlight/enableOrDisable"
,
method
:
"post"
,
data
:
data
,
})
;
}
//获取全部字典
...
...
@@ -120,16 +113,13 @@ export function saveOrUpdateSpecifyDateRoute(data) {
})
}
// id查询目的航班
export
function
findByFlightId
(
id
)
{
const
data
=
{
id
}
// 通过id查询目的航班维度设置详情
export
function
findByFlightId
(
data
)
{
return
request
({
url
:
'/destinationFlight/findByFlightId'
,
method
:
'post'
,
data
:
data
})
url
:
"/destinationFlight/findByFlightId"
,
method
:
"post"
,
data
:
data
,
})
;
}
//航班号查航班
...
...
src/assets/languages/dictLabels.js
View file @
2782f84
...
...
@@ -43,7 +43,7 @@ let ductLabels = {
"user"
:
{
//用户设置
"isValid"
:
{
"1"
:
"启用"
,
"2"
:
"
关闭
"
,
"2"
:
"
停用
"
,
},
},
"FlightInformation"
:
{
//航班信息维护
...
...
src/assets/languages/echarts.js
View file @
2782f84
// echarts按需引入
// 引入 echarts API
import
*
as
echarts
from
"echarts/core"
;
// 引入echarts图表类型
import
{
BarChart
}
from
"echarts/charts"
;
// 引入echarts图表配置项
import
{
GridComponent
,
PolarComponent
,
GeoComponent
,
SingleAxisComponent
,
ParallelComponent
,
CalendarComponent
,
GraphicComponent
,
ToolboxComponent
,
TooltipComponent
,
AxisPointerComponent
,
BrushComponent
,
TitleComponent
,
TimelineComponent
,
MarkPointComponent
,
MarkLineComponent
,
MarkAreaComponent
,
LegendComponent
,
DataZoomComponent
,
DataZoomInsideComponent
,
DataZoomSliderComponent
,
VisualMapComponent
,
VisualMapContinuousComponent
,
VisualMapPiecewiseComponent
,
AriaComponent
,
DatasetComponent
,
TransformComponent
,
}
from
"echarts/components"
;
// 引入 Canvas 渲染器渲染
import
{
CanvasRenderer
}
from
"echarts/renderers"
;
// 将以上引入的组件使用use()方法注册
echarts
.
use
([
BarChart
,
GridComponent
,
PolarComponent
,
GeoComponent
,
SingleAxisComponent
,
ParallelComponent
,
CalendarComponent
,
GraphicComponent
,
ToolboxComponent
,
TooltipComponent
,
AxisPointerComponent
,
BrushComponent
,
TitleComponent
,
TimelineComponent
,
MarkPointComponent
,
MarkLineComponent
,
MarkAreaComponent
,
LegendComponent
,
DataZoomComponent
,
DataZoomInsideComponent
,
DataZoomSliderComponent
,
VisualMapComponent
,
VisualMapContinuousComponent
,
VisualMapPiecewiseComponent
,
AriaComponent
,
DatasetComponent
,
TransformComponent
,
CanvasRenderer
,
]);
export
default
echarts
;
...
...
src/components/Drag/index.vue
View file @
2782f84
<template>
<!-- 拖拽交换位置效果 -->
<transition-group tag="div" class="container">
<div class="item" v-for="(item, index) in list" :key="i
ndex
" draggable="true"
<div class="item" v-for="(item, index) in list" :key="i
tem.route
" draggable="true"
@dragstart="handleDragStart($event, item)" @dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnter($event, item)" @dragend="handleDragEnd($event, item)">
<svg-icon v-if="!disabled" icon-class="drag-text" class="el-input__icon input-icon" style="color:#bfbfbf" />
...
...
@@ -84,7 +84,7 @@ export default {
height: 150px;
overflow-y: scroll;
padding: 0;
border: 1px solid #
cc
c;
border: 1px solid #
e7eae
c;
&::-webkit-scrollbar {
width: 7px;
...
...
src/components/YlEcharts/YlEchartsBar/index.vue
0 → 100644
View file @
2782f84
<template>
<div ref="barEcharts" class="yl-echarts-container bar-echarts"></div>
</template>
<script>
import { optionBar } from "./optionConfig"
export default {
data() {
return {};
},
computed: {},
watch: {},
created() {},
mounted() {
// 初始化echarts实例
const myChart = this.$echarts.init(this.$refs.barEcharts);
console.log(myChart);
// 绘制图表
myChart.setOption(optionBar);
},
methods: {},
};
</script>
<style lang='scss'>
.yl-echarts-container{
// height: 200px;
}
</style>
src/components/YlEcharts/YlEchartsBar/optionConfig.js
0 → 100644
View file @
2782f84
export
const
optionBar
=
{
xAxis
:
{
type
:
"category"
,
data
:
[
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
,
"Sun"
],
},
yAxis
:
{
type
:
"value"
,
},
series
:
[
{
data
:
[
120
,
200
,
150
,
80
,
70
,
110
,
130
],
type
:
"bar"
,
showBackground
:
true
,
backgroundStyle
:
{
color
:
"rgba(180, 180, 180, 0.2)"
,
},
},
],
};
src/main.js
View file @
2782f84
...
...
@@ -27,6 +27,8 @@ import tableHeaders from '@/assets/languages/tableHeaders'
import
dictLabels
from
"@/assets/languages/dictLabels.js"
import
settings
from
'./settings.js'
import
*
as
filters
from
"./utils/filters.js"
;
import
echarts
from
"@/assets/languages/echarts"
;
// 全局方法挂载
Vue
.
prototype
.
parseTime
=
parseTime
Vue
.
prototype
.
resetForm
=
resetForm
...
...
@@ -42,7 +44,7 @@ Vue.prototype.isArray = isArray
Vue
.
prototype
.
tableHeaders
=
tableHeaders
Vue
.
prototype
.
dictLabels
=
dictLabels
Vue
.
prototype
.
settings
=
settings
Vue
.
prototype
.
$echarts
=
echarts
;
Vue
.
prototype
.
msgSuccess
=
function
(
msg
)
{
this
.
$message
({
showClose
:
true
,
message
:
msg
,
type
:
"success"
});
}
...
...
src/router/index.js
View file @
2782f84
...
...
@@ -73,10 +73,19 @@ export const constantRoutes = [
hidden
:
true
,
children
:
[
{
path
:
"/
info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status
"
,
path
:
"/
edit
"
,
component
:
(
resolve
)
=>
require
([
"@/views/allocationConfig/flightAllocConfig/info"
],
resolve
),
name
:
"FlightAllocConfigInfo"
,
require
([
"@/views/et86Config/et86RuleConfig/edit"
],
resolve
),
name
:
"edit"
,
meta
:
{
title
:
"ET86规则"
,
icon
:
"user"
,
noCache
:
true
},
},
{
path
:
"/routeInfo"
,
component
:
(
resolve
)
=>
require
([
"@/views/allocationConfig/flightAllocConfig/flightRouteInfo"
,
],
resolve
),
name
:
"routeInfo"
,
meta
:
{
title
:
"航班配舱"
,
icon
:
"user"
},
},
{
...
...
src/utils/index.js
View file @
2782f84
...
...
@@ -401,7 +401,7 @@ export function sortList(arr, key) {
});
}
// 获取计算元素的属性的margin
+ padding + clientHeight
// 获取计算元素的属性的margin
Top + marginBottom + paddingTop + paddingBottom值
function
getPropertyValue
(
el
)
{
let
style
,
marginTop
,
marginBottom
,
paddingTop
,
paddingBottom
;
style
=
window
.
getComputedStyle
(
el
,
null
);
...
...
@@ -454,3 +454,101 @@ export function restTableHeight($refs) {
let
topHeaderClientHeight
=
document
.
querySelector
(
".headerRef"
).
clientHeight
;
return
heigth
+
topHeaderClientHeight
;
}
/**
* Array Json去重 & 排序
* @author SunYu
* @param {Array} arr
* @param {string || Object} keys
* @description 对数组中指定的JSON字段去重和指定的字段进行排序
* @example
* 当指定一个字段去重时:removeDuplicates(arr, "name")
* 当指定一个字段去重并且排序如下:
* removeDuplicates(res.data.list, {
* duplicate: "name", // 去重字段
* sortType: "Number", // 排序类型
* sortAttr: "id", // 排序字段
* })
*/
export
function
removeDuplicates
(
arr
,
keys
)
{
let
duplicate
,
dateTime
;
if
(
typeof
keys
==
"object"
)
{
duplicate
=
keys
.
duplicate
;
dateTime
=
keys
.
dateTime
;
}
// 去重
let
map
=
new
Map
();
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
item
=
arr
[
i
];
if
(
!
map
.
has
(
item
[
duplicate
])
||
new
Date
(
map
.
get
(
item
[
duplicate
])[
dateTime
])
<
new
Date
(
item
[
dateTime
])
)
{
map
.
set
(
item
[
duplicate
],
item
);
}
}
const
result
=
Array
.
from
(
map
.
values
());
// 返回去重结果
if
(
typeof
keys
==
"string"
)
return
result
;
// 排序
if
(
typeof
keys
==
"object"
)
{
if
(
keys
.
sort
)
{
if
(
keys
.
sortType
.
toLowerCase
().
trim
()
==
"number"
)
{
if
(
result
.
length
)
{
result
=
sortFn
();
}
// 返回排序去重结果
}
}
return
result
;
}
// 排序方法
function
sortFn
()
{
if
(
isNaN
(
Number
(
result
[
0
][
keys
.
sortAttr
])))
{
return
result
.
sort
((
a
,
b
)
=>
a
[
keys
.
sortAttr
].
localeCompare
(
b
[
keys
.
sortAttr
])
);
// 按字母排序
}
else
{
return
result
.
sort
((
a
,
b
)
=>
a
[
keys
.
sortAttr
]
-
b
[
keys
.
sortAttr
]);
// 按数字排序
}
}
}
/**
* Array Json
* @author SunYu
* @param {Array} arr
* @param {string} key
* @description 把所有重复的过滤出来
* @example
* filterRepeat(arr, "name")
*/
export
function
filterRepeat
(
arr
,
key
)
{
const
newArr
=
arr
.
map
((
item
)
=>
item
[
key
])
.
filter
((
key
,
index
,
array
)
=>
array
.
indexOf
(
key
)
!==
index
);
return
arr
.
filter
((
item
)
=>
newArr
.
includes
(
item
[
key
]));
}
/**
* Array Json
* @author SunYu
* @param {Array} arr
* @param {string} key
* @param {string} time
* @description 把数组JSON字段重复的值过滤出来,并且根据时间戳返回最新的那一条且返回新的数组
* @example
* filterRepeatNewData(arr, "name", "createTime")
*/
export
function
filterRepeatNewData
(
arr
,
key
,
time
)
{
// 找出最大时间戳
const
maxDate
=
filterRepeat
(
arr
,
key
).
reduce
(
(
max
,
obj
)
=>
new
Date
(
obj
[
time
]).
getTime
()
>
max
?
new
Date
(
obj
[
time
]).
getTime
()
:
max
,
-
Infinity
);
// 找出最大时间戳对应的数据并且返回新的数组
const
result
=
filterRepeat
(
arr
,
key
).
filter
(
(
obj
)
=>
new
Date
(
obj
[
time
]).
getTime
()
===
maxDate
);
return
result
;
}
...
...
src/views/allocationConfig/flightAllocConfig/components/RouteDraggable.vue
0 → 100644
View file @
2782f84
<
template
>
<
el
-
card
>
<
div
class
=
"row"
>
<
div
class
=
"col-6"
>
<
draggable
class
=
"list-group"
tag
=
"ul"
v
-
model
=
"routeList"
v
-
bind
=
"dragOptions"
@start
=
"dragStart"
@end
=
"dragEnd"
>
<
transition
-
group
type
=
"transition"
name
=
"flip-list"
>
<
li
class
=
"list-group-item"
v
-
for
=
"(item, i) in routeList"
:
key
=
"item.route"
>
<
i
:
class
=
"
item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
"
@click
=
"item.fixed = !item.fixed"
aria
-
hidden
=
"true"
></
i
>
<
span
v
-
if
=
"item.isEtesRoute == 'Y' || item.etesRule == 'Y'"
><
i
class
=
"route-count"
>
{{
++
i
}}
</
i
>
{{
item
.
route
}}
【
ET86
航线】
</
span
>
<
span
v
-
else
><
i
class
=
"route-count"
>
{{
++
i
}}
</
i
>
{{
item
.
route
}}
</
span
>
</
li
>
</
transition
-
group
>
</
draggable
>
</
div
>
</
div
>
</
el
-
card
>
</
template
>
<
script
>
import
draggable
from
"vuedraggable"
;
export
default
{
name
:
"YlDraggable"
,
props
:
{
routeList
:
{
// 航线
type:
Array
,
default
:
()
=>
[],
},
dragOptions
:
{
// 拖拽配置
type:
Object
,
default
:
()
=>
{
return
{
animation
:
200
,
group
:
"description"
,
disabled
:
false
,
ghostClass
:
"ghost"
,
};
},
},
},
components
:
{
draggable
,
},
data
()
{
return
{};
},
created
()
{},
methods
:
{
// 排序
sort
()
{
this
.
routeList
=
this
.
routeList
.
sort
(
(
a
,
b
)
=>
a
.
routePriority
-
b
.
routePriority
);
},
// 开始拖拽
dragStart
()
{},
// 结束拖拽
dragEnd
()
{
this
.
$
emit
(
"dragEnd"
,
this
.
routeList
);
},
},
};
</
script
>
<
style
lang
=
"scss"
>
.
el
-
card__body
{
padding
:
15
px
10
px
0
px
10
px
!
important
;
}
.
list
-
group
{
min
-
height
:
20
px
;
max
-
height
:
150
px
;
overflow
:
auto
;
margin
-
top
:
0
;
padding
:
0
;
&::-
webkit
-
scrollbar
{
width
:
7
px
;
height
:
7
px
;
}
&::-
webkit
-
scrollbar
-
track
{
background
-
color
:
#
fff
;
}
&::-
webkit
-
scrollbar
-
thumb
{
background
-
color
:
#
ccc
;
border
-
radius
:
20
px
;
}
&::-
webkit
-
scrollbar
-
thumb
:
hover
{
background
-
color
:
#
409
eff
;
}
&::-
webkit
-
scrollbar
-
track
-
piece
{
background
:
#
f2f6fc
;
}
}
.
list
-
group
-
item
{
cursor
:
move
;
padding
:
5
px
0
px
;
}
.
list
-
group
-
item
i
{
cursor
:
pointer
;
}
.
route
-
count
{
font
-
family
:
initial
;
font
-
style
:
inherit
;
margin
-
right
:
15
px
;
}
</
style
>
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
0 → 100644
View file @
2782f84
<template>
<div ref="routeInfo" class="route-container">
<el-collapse
value="1"
accordion
v-model="activeNames"
@change="collapseChange"
v-loading="loading"
>
<div
class="collapse-item-header"
v-for="(item, index) in routesInfo"
:key="item.route || item.flightRoute"
>
<el-collapse-item :name="index" v-if="showFlightRoute(item)">
<!-- 航线名 -->
<template slot="title">
<strong>{{ item.route || item.flightRoute }}</strong>
</template>
<!-- 航线设置信息 -->
<div class="route-info info-item">
<el-card class="route-info-card">
<!-- 有数据时 -->
<section v-if="item.config || item.flightRoute">
<div slot="header" class="route-config-header">
<el-button
type="primary"
size="mini"
:disabled="pageName || item.status == '3' || status"
:loading="item.loading"
@click="saveSubmit(item, index)"
>保 存</el-button
>
<el-button
v-if="showBtnRule(item)"
type="primary"
size="mini"
icon="el-icon-video-pause"
:loading="item.loading"
:disabled="pageName || status"
@click="onOffSubmit(item, index)"
>{{ item.status | statusBtn }}</el-button
>
<el-button
v-if="showBtnRule(item)"
type="danger"
size="mini"
icon="el-icon-delete"
:disabled="pageName || item.status !== '3' || status"
:loading="item.loading"
@click="deleteSubmit(item, index)"
>删 除</el-button
>
<span class="flight-route-title">
{{ item.ruleDate ? "日期级别规则" : "普通规则" }}</span
>
</div>
<el-divider></el-divider>
<div class="route-config-info">
<el-form label-position="right" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="始发站">
<el-col :span="2">
<el-radio-group
v-model="item.isLocation"
@change="changeLocation"
:disabled="pageName || status"
>
<el-radio label="1">包含始发站</el-radio>
<el-radio label="2">不包含始发站</el-radio>
</el-radio-group>
</el-col>
<el-col :span="10">
<el-input
v-if="item.isLocation == '1'"
:disabled="pageName || status"
type="textarea"
v-model="item.location"
:rows="4"
placeholder="始发站之间用回车符分隔"
style="width: 500px"
>
</el-input>
<el-input
v-else
:disabled="pageName || status"
type="textarea"
v-model="item.notLocation"
:rows="4"
placeholder="始发站之间用回车符分隔"
style="width: 500px"
>
</el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="目的站">
<el-col :span="2">
<el-radio-group
:disabled="pageName || status"
v-model="item.isDestinationSite"
@change="changeDestinationSite"
>
<el-radio label="1">包含目的站</el-radio>
<el-radio label="2">不包含目的站</el-radio>
</el-radio-group>
</el-col>
<el-col :span="10">
<el-input
v-if="item.isDestinationSite == '1'"
:disabled="pageName || status"
type="textarea"
v-model="item.destinationSite"
:rows="4"
placeholder="目的站之间用回车符分隔"
style="width: 500px"
>
</el-input>
<el-input
v-else
:disabled="pageName || status"
type="textarea"
v-model="item.notDestinationSite"
:rows="4"
placeholder="目的站之间用回车符分隔"
style="width: 500px"
>
</el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="10">
<el-form-item label="URSA包含">
<el-input
:disabled="pageName || status"
type="textarea"
v-model="item.includeUrsa"
:rows="4"
placeholder="URSA之间用分号分隔,例:F1_;F2_;F3_;P_"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="URSA不包含">
<el-input
:disabled="pageName || status"
type="textarea"
v-model="item.notIncludeUrsa"
:rows="4"
placeholder="URSA之间用分号分隔,例:F1;F2;F3;P"
>
</el-input>
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-col :span="9">
<el-form-item label="件数">
<el-col :span="10">
<el-input
:disabled="pageName || status"
class="numberInput"
v-model.trim="item.minNumOfPieces"
placeholder="最少件数"
>
</el-input>
<span
ref="minNumOfPieces"
class="el-form-item__error"
></span>
</el-col>
<el-col style="text-align: center" :span="1"
>-</el-col
>
<el-col :span="10">
<el-input
:disabled="pageName || status"
class="numberInput"
v-model.trim="item.maxNumOfPieces"
placeholder="最多件数"
>
</el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="重量(KG)">
<el-col :span="10">
<el-input
:disabled="pageName || status"
class="numberInput"
v-model.trim="item.minWeight"
placeholder="最小重量"
>
</el-input>
<span
ref="minWeight"
class="el-form-item__error"
></span>
</el-col>
<el-col style="text-align: center" :span="1"
>-</el-col
>
<el-col :span="10">
<el-input
:disabled="pageName || status"
class="numberInput"
v-model.trim="item.maxWeight"
placeholder="最大重量"
>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-form-item label="申报类别">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group
:disabled="pageName || status"
v-model="item.typeOfGoods"
@change="changeCargoType"
>
<el-row>
<el-col
v-for="item in cargoType"
:span="2"
:key="item.id"
>
<el-checkbox
v-if="item.status === 1"
:label="item.chineseName"
:name="item.chineseName"
:key="item.code"
>
<Tooltips
:content="item.chineseName"
:refName="item.code"
>
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="货物类型">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group
:disabled="pageName || status"
v-model="item.cargoType"
@change="changeCargoStatus"
>
<el-row>
<el-col
:span="3"
v-for="item in cargoStatus"
:key="item.id"
>
<el-checkbox
v-if="item.status === 1"
:label="item.chineseName"
:name="item.chineseName"
:key="item.code"
disabled
>
<Tooltips
:content="item.chineseName"
:refName="item.code"
>
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="取件扫描号">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group
:disabled="pageName || status"
v-model="item.puporpuxCode"
@change="changePuporpux"
>
<el-row>
<el-col
:span="2"
v-for="item in puporpux"
:key="item.id"
>
<el-checkbox
v-if="item.status === 1"
:label="item.chineseName"
:name="item.chineseName"
:key="item.code"
>
<Tooltips
:content="item.chineseName"
:refName="item.code"
>
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Service Code">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group
:disabled="pageName || status"
v-model="item.serviceCode"
@change="changeServiceCode"
>
<el-row>
<el-col
:span="2"
v-for="item in serviceCode"
:key="item.id"
>
<el-checkbox
v-if="item.status === 1"
:label="item.chineseName"
:name="item.chineseName"
:key="item.code"
>
<Tooltips
:content="item.chineseName"
:refName="item.code"
>
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Handling Code">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group
:disabled="pageName || status"
v-model="item.handlingCode"
@change="changeHandlingCode"
>
<el-row>
<el-col
:span="2"
v-for="item in handlingCode"
:key="item.id"
>
<el-checkbox
v-if="item.status === 1"
:label="item.chineseName"
:name="item.chineseName"
:key="item.code"
>
<Tooltips
:content="item.chineseName"
:refName="item.code"
>
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Sub Category">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group
:disabled="pageName || status"
v-model="item.subCategory"
@change="changeSubCategory"
>
<el-row>
<el-col
:span="2"
v-for="item in subCategory"
:key="item.id"
>
<el-checkbox
v-if="item.status === 1"
:label="item.chineseName"
:name="item.chineseName"
:key="item.code"
>
<Tooltips
:content="item.chineseName"
:refName="item.code"
>
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</section>
<!-- 没有数据时 -->
<div class="no-data" v-else>
<el-empty description="未设置规则!">
<el-button
type="primary"
size="small"
:disabled="pageName"
@click="addRouteRule(index)"
>新增规则</el-button
>
</el-empty>
</div>
</el-card>
</div>
</el-collapse-item>
</div>
</el-collapse>
</div>
</template>
<script>
// import { inputBlurValidate } from "@/utils/mixins";
export default {
name: "routeInfo",
props: {
routesInfo: {
// 航线规则信息
type: Array,
default: () => [],
},
cargoType: {
// 申报类别
type: Array,
default: () => [],
},
cargoStatus: {
// 货物类型
type: Array,
default: () => [],
},
puporpux: {
// 取件扫描号
type: Array,
default: () => [],
},
serviceCode: {
// Service Code
type: Array,
default: () => [],
},
handlingCode: {
// Handling Code
type: Array,
default: () => [],
},
subCategory: {
// Sub Category
type: Array,
default: () => [],
},
status: {
// 标识是详情还是编辑
type: Boolean,
default: false,
},
loading: {
// 折叠面板
type: Boolean,
default: false,
},
},
// mixins: [inputBlurValidate],
data() {
return {
activeNames: [0], // 展开指定项
};
},
computed: {
pageName() {
if (
this.$route.query.pageName == "dmLog" ||
this.$route.query.pageName == "flightRandConfig" ||
this.$route.query.dataStatus == "view"
) {
return true;
}
},
},
filters: {
// 状态:0 无效,1 有效 2 配置中 3 停用
statusBtn(status) {
if (status == "0") {
return "无 效";
} else if (status == "1") {
return "停 用";
} else if (status == "3") {
return "开 启";
} else {
return "保 存";
}
},
},
methods: {
// 航线回显逻辑:如果航线无效并且没有数据,则不展示该航线
showFlightRoute(item) {
if (this.$route.query.status == "3" && item.config == false) {
return false;
} else {
return true;
}
},
// 航线操作按钮回显逻辑
showBtnRule(item) {
/*
展示保存按钮、开启按钮/停用按钮、删除按钮逻辑如下:
1:当status状态等于3的时候展示:保存按钮、开启按钮/停用按钮、删除按钮;
2:当status状态等于1并且ruleDate字段有值的时候展示:保存按钮、开启按钮/停用按钮、删除按钮;
3:当从航班配置设置不查询日期的时候“查看&修改”的时候,
有效的航线也就是status状态等于1的时候也要展示:保存按钮、开启按钮/停用按钮、删除按钮;
4:那么问题来了当从航班配置设置不查询日期的时候状态为1的时候也要展示:保存按钮、开启按钮/停用按钮、删除按钮;
那么要么跳转的时候传过来一个参数;
5:如果是从【航班顺位】和【DM数据处理】跳转过来,那么航班航线设置维度只作为详情查看,禁用所有的操作。
所以展示不展示保存按钮、开启按钮/停用按钮、删除按钮毫无意义
*/
if (item.status == "3" || (item.status == "1" && item.ruleDate)) {
return true;
} else if (
item.status == "1" &&
this.$route.query.querySpecifyData == "2"
) {
// 航班配舱设置非日期级别情况下
return true;
} else if (item.status == "1" && this.$route.query.dataStatus == "add") {
// 添加航班配舱设置非日期级别情况下
return true;
} else if (item.status == "2") {
return true;
} else {
return false;
}
},
// 当前激活面板改变时触发
collapseChange(name) {
this.$emit("collapse", name);
},
// 始发站
changeLocation(val) {
this.$emit("location", val);
},
// 目的站
changeDestinationSite(val) {
this.$emit("destinationSite", val);
},
// 申报类别
changeCargoType(arr) {
this.$emit("cargoType", arr);
},
// 货物类型
changeCargoStatus(arr) {
this.$emit("cargoStatus", arr);
},
// 取件扫描号
changePuporpux(arr) {
this.$emit("puporpux", arr);
},
// Service Code
changeServiceCode(arr) {
this.$emit("serviceCode", arr);
},
// Handling Code
changeHandlingCode(arr) {
this.$emit("handlingCode", arr);
},
// Sub Category
changeSubCategory(arr) {
this.$emit("subCategory", arr);
},
// 新增规则
addRouteRule(index) {
this.$emit("addRlue", index);
},
// 保存
saveSubmit(item, index) {
this.$emit("save", item, index);
},
// 开启/暂停
onOffSubmit(item, index) {
this.$emit("onOff", item, index);
},
// 删除
deleteSubmit(item, index) {
this.$emit("delete", item, index);
},
},
};
</script>
<style lang="scss">
.collapse-item-header {
padding-left: 40px;
}
.el-collapse {
border: 0 !important;
}
.el-collapse-item__header {
background-color: #d9ecff !important;
border-bottom: 1px solid #ccc;
padding: 0 10px 0 30px;
}
.el-collapse-item__wrap {
border-bottom: 0 !important;
}
.el-collapse-item {
border-bottom: 1px solid #ccc;
}
.el-collapse-item:last-child {
}
.route-container {
strong {
font-size: 14px;
}
.route-info {
.route-info-card {
section {
padding: 12px 70px;
.route-config-header {
.flight-route-title {
margin-left: 8px;
}
}
}
.route-config-info {
}
}
}
}
.el-form-item__error {
color: #ff4949;
font-size: 12px;
line-height: 1;
padding-top: 4px;
position: absolute;
top: 100%;
left: 0;
font-weight: 500;
width: 100% !important;
}
</style>
src/views/allocationConfig/flightAllocConfig/dialog.vue
View file @
2782f84
<template>
<div>
<el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
@close="close" append-to-body center>
<el-form ref="routeOrder" label-width="auto" label-position="left" size="small" @submit.native.prevent>
<el-dialog
title="航线优先级排序"
:visible.sync="open"
width="25%"
:close-on-click-modal="false"
:show-close="false"
@close="close"
append-to-body
center
>
<el-form
ref="routeOrder"
label-width="auto"
label-position="left"
size="small"
@submit.native.prevent
>
<el-form-item label="航班号:" prop="fltNo">
<span>{{ fltNo }}</span>
</el-form-item>
...
...
@@ -14,7 +28,9 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button type="primary" :loading="loading" @click="submit"
>确 定</el-button
>
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
...
...
@@ -22,81 +38,85 @@
</template>
<script>
import { allRouteQuery, saveOrUpdateSpecifyDateRoute } from "@/api/destinationFlight";
import {
allRouteQuery,
saveOrUpdateSpecifyDateRoute,
} from "@/api/destinationFlight";
export default {
name: "",
props: {
open: {
type: Boolean,
default: false
default: false,
},
fltData: {
type: Object,
default: null
}
default: null,
},
},
data() {
return {
fltNo: ''
,
fltDate: ''
,
fltNo: ""
,
fltDate: ""
,
routeList: [],
submitData: [],
loading: false
}
loading: false,
};
},
watch: {
open(val) {
this.routeList = []
this.submitData = []
this.routeList = [];
this.submitData = [];
if (val) {
this.fltNo = this.fltData.fltNo
this.fltDate = this.fltData.fltDate
this.fltNo = this.fltData.fltNo;
this.fltDate = this.fltData.fltDate;
allRouteQuery({
fltNo: this.fltNo,
routeDate: this.fltDate
}).then(res => {
routeDate: this.fltDate,
})
.then((res) => {
if (res.code === 200) {
this.routeList = res.data.list
this.submitData = res.data.list
this.routeList = res.data.list;
this.submitData = res.data.list;
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
console.log(err)
})
.catch((err) => {
console.log(err);
});
}
}
},
},
methods: {
submit() {
saveOrUpdateSpecifyDateRoute(this.submitData).then(res => {
saveOrUpdateSpecifyDateRoute(this.submitData)
.then((res) => {
if (res.code === 200) {
this.msgSuccess('保存成功')
this.close()
this.msgSuccess("保存成功");
this.close(res.code);
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
console.log(err)
})
.catch((err) => {
console.log(err);
});
},
close(
) {
this.routeList = []
this.submitData = []
this.$emit('close')
close(code
) {
this.routeList = [];
this.submitData = [];
this.$emit("close", code);
},
drag(val) {
val.forEach((item, index) => {
item.ordinal = index + 1
})
this.submitData = val
}
}
}
item.ordinal = index + 1;
});
this.submitData = val;
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<style lang="scss" scoped></style>
...
...
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/formConfig.js
0 → 100644
View file @
2782f84
export
const
formConfig
=
[
{
label
:
"航班号"
,
type
:
"Input"
,
name
:
"purposeOfFlightNo"
,
prop
:
"purposeOfFlightNo"
,
placeholder
:
"请输入航班号"
,
span
:
4
,
trigger
:
"blur"
,
labelWidth
:
"55px"
,
disable
:
false
,
},
{
label
:
"航班日期"
,
type
:
"Date"
,
name
:
"flightDate"
,
prop
:
"flightDate"
,
placeholder
:
"请选择航班日期"
,
format
:
"yyyy-MM-dd"
,
colWidth
:
"18%"
,
inputWidth
:
"100%"
,
disable
:
false
,
hidden
:
false
,
},
{
label
:
"航线"
,
type
:
"Input"
,
name
:
"flightRouteListStr"
,
prop
:
"flightRouteListStr"
,
placeholder
:
""
,
span
:
6
,
labelWidth
:
"40px"
,
trigger
:
"blur"
,
// 事件名
disable
:
false
,
hidden
:
false
,
},
{
label
:
"航线优先级"
,
type
:
"slot"
,
name
:
"flightRoute"
,
prop
:
"flightRoute"
,
placeholder
:
""
,
colWidth
:
"23%"
,
labelWidth
:
"85px"
,
trigger
:
"blur"
,
// 事件名
},
];
// 航线规则表单
export
const
routeRuleForm
=
{
config
:
true
,
purposeOfFlightNo
:
""
,
flightRoute
:
""
,
// 飞行航线
routeSpecifyDateSeq
:
""
,
// 航线优先级
declarationCategory
:
""
,
location
:
null
,
// 包含始发站
notLocation
:
null
,
// 不包含始发站
destinationSite
:
null
,
// 包含目的站
notDestinationSite
:
null
,
// 不包含目的站
includeUrsa
:
""
,
// URSA包含
notIncludeUrsa
:
""
,
// URSA不包含
minNumOfPieces
:
""
,
// 最小件数
maxNumOfPieces
:
""
,
// 最大件数
minWeight
:
""
,
// 最小重量
maxWeight
:
""
,
// 最大重量
typeOfGoods
:
[],
// 申报类别
cargoType
:
[],
// 货物类型
puporpuxCode
:
[],
// 取件扫描号
serviceCode
:
[],
// Service Code
handlingCode
:
[],
// Handling Code
subCategory
:
[],
// Sub Category
ruleDate
:
""
,
};
// 校验表单域的选项
export
const
validateForm
=
[
"location"
,
"notLocation"
,
"destinationSite"
,
"notDestinationSite"
,
"includeUrsa"
,
"notIncludeUrsa"
,
"minNumOfPieces"
,
"maxNumOfPieces"
,
"minWeight"
,
"maxWeight"
,
"typeOfGoods"
,
"cargoType"
,
"puporpuxCode"
,
"serviceCode"
,
"handlingCode"
,
"subCategory"
,
];
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
0 → 100644
View file @
2782f84
<template>
<div ref="barEcharts" class="route-info-container">
<!-- 航线设置规则信息查询条件 -->
<el-row style="padding: 0 50px">
<el-col>
<yl-form
ref="ruleForm"
:formConfig="formConfig"
:queryForm="queryForm"
:inline="false"
formWidth="auto"
@blur="blurEvent"
>
<route-draggable
:routeList="routeList"
:dragOptions="dragOptions"
></route-draggable>
</yl-form>
</el-col>
</el-row>
<!-- 航线设置规则信息 -->
<el-row>
<el-col :span="24">
<el-divider content-position="left">航线维度设置</el-divider>
</el-col>
<el-col>
<route-info
ref="routeInfo"
:routesInfo="routesInfo"
:cargoType="cargoType"
:cargoStatus="cargoStatus"
:puporpux="puporpux"
:serviceCode="serviceCode"
:handlingCode="handlingCode"
:subCategory="subCategory"
:status="getRouter"
:loading="loading"
@location="changeLocation"
@destinationSite="changeDestinationSite"
@addRlue="addRlue"
@save="saveSubmit"
@onOff="onOffSubmit"
@delete="deleteSubmit"
>
</route-info>
</el-col>
</el-row>
</div>
</template>
<script>
import YlForm from "@/components/YlForm";
import RouteInfo from "../components/RouteInfo";
import RouteDraggable from "../components/RouteDraggable";
import { formConfig, routeRuleForm, validateForm } from "./formConfig";
import {
updateOrAddFlight, // 新增/修改航线规则设置
delFlightId, // 删除航线规则设置
enableOrDisable, // 开启/停用航线规则设置
batchUpdateOrAddFlight, // 航班航线优先级更新
queryRouteByFltNo, // 通过航班号查询航线
} from "@/api/destinationFlight";
import indexMixins from "../mixins";
export default {
components: {
YlForm,
RouteInfo,
RouteDraggable,
},
mixins: [indexMixins],
data() {
return {
loading: false, // 折叠面板
dragOptions: {
// 航线优先级拖拽配置
animation: 200,
group: "description",
disabled: true, // 是否禁止拖拽
ghostClass: "ghost",
},
formConfig: formConfig, // 表单配置项
queryForm: {
// 表单参数
},
routeList: [], // 航线
routesInfo: [], // 航线规则信息
cargoType: [], // 申报类别
cargoStatus: [], // 货物类型
puporpux: [], // 取件扫描号
serviceCode: [], // Service Code
handlingCode: [], // Handling Code
subCategory: [], // Sub Category
};
},
/*
判断有日期的找到了就走有日期的,如果日期级别的没有找到再去走一次普通级别的接口
*/
created() {
this.getAllDictData(); // 获取全部字典
const parmas = {
querySpecifyData: this.$route.query.querySpecifyData || "", // 查询特殊数据字段
purposeOfFlightNo: this.$route.query.purposeOfFlightNo || "", // 航班号
flightDate: this.$route.query.flightDate || "", // 飞行日期
flightRouteListStr: this.$route.query.flightRouteListStr || "", // 飞行航线集合
status: this.$route.query.status || "", // 状态
dataStatus: this.$route.query.dataStatus || "", // add 、edit、view
flightKindName: this.$route.query.flightKindName || "", // 航班种类White Tail 、Purple Tail
pageName: this.$route.query.pageName || "", //
id: this.$route.query.id || "",
};
// 指定隐藏或显示From表单域
this.hiddenFormItem(parmas);
// queryCondition只负责接收参数和接口调用
this.queryCondition(parmas);
},
mounted() {},
methods: {
// 【通过航班号查询航线】
getQueryRouteByFltNo(parmas) {
queryRouteByFltNo(parmas)
.then((res) => {
const { code, data } = res;
if (code == 200) {
if (data.list.length) {
let isEtesRoute = data.list.filter(
(item) => item.isEtesRoute == "N"
); // 过滤ET86航线
const routes = [];
isEtesRoute.map((item) => {
routes.push({ config: false, route: item.route });
});
this.routeList = isEtesRoute;
this.routesInfo = routes;
} else {
this.routeList = [];
this.msgError("暂无航线");
}
}
})
.catch(() => {});
},
// 航班号输入框失焦事件
blurEvent({ purposeOfFlightNo }) {
// 航班号转大写
routeRuleForm.flightRoute = this.upCase(purposeOfFlightNo);
// 通过航班号查询航线
this.getQueryRouteByFltNo({ fltNo: this.upCase(purposeOfFlightNo) });
this.queryForm.purposeOfFlightNo = this.upCase(purposeOfFlightNo);
},
// 新增规则
addRlue(index) {
// 如果当前航班号的航线下没有数据,新增规则给默认数据
routeRuleForm.purposeOfFlightNo = this.$route.query.purposeOfFlightNo;
this.setattrVal(routeRuleForm);
const mergeObj = {
...this.routesInfo[index],
...routeRuleForm,
};
this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据
},
// 保存 【新增/修改航线规则设置】
saveSubmit(item, index) {
item.flightRoute = item.route || item.flightRoute;
item.ruleDate = item.ruleDate || this.queryForm.flightDate;
let parmas = JSON.parse(JSON.stringify(item));
this.returnString(parmas, "cargoType");
this.returnString(parmas, "typeOfGoods");
this.returnString(parmas, "puporpuxCode");
this.returnString(parmas, "serviceCode");
this.returnString(parmas, "handlingCode");
this.returnString(parmas, "subCategory");
if (parmas.minWeight || parmas.maxWeight) {
if (
!/^(0|[1-9]\d*)(.\d{1,5})?$/.test(
parmas.minWeight || parmas.maxWeight
)
) {
this.msgWarning("请输入有效重量,小数保留5位");
return;
}
}
if (parmas.minNumOfPieces || parmas.maxNumOfPieces) {
if (!/^\d+$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)) {
this.msgWarning("请输入有效件数");
return;
}
}
if (parmas.minNumOfPieces && parmas.maxNumOfPieces) {
if (Number(parmas.minNumOfPieces) > Number(parmas.maxNumOfPieces)) {
this.msgWarning("最小件数不能大于最大件数");
return;
}
}
if (parmas.minWeight && parmas.maxWeight) {
if (Number(parmas.minWeight) > Number(parmas.maxWeight)) {
this.msgWarning("最小重量不能大于最大重量");
return;
}
}
// 校验表单域的选项
let validate = validateForm.some((key) => parmas[key]);
if (validate) {
this.loading = true;
updateOrAddFlight(parmas)
.then((res) => {
const { code, msg, data } = res;
if (code == 200) {
this.hasOwnProperty(data, "typeOfGoods");
this.hasOwnProperty(data, "puporpuxCode");
this.hasOwnProperty(data, "serviceCode");
this.hasOwnProperty(data, "handlingCode");
this.hasOwnProperty(data, "subCategory");
this.setattrVal(data); // 设置属性值
this.$set(this.routesInfo, index, {
config: true,
...data,
});
this.msgSuccess("保存成功!");
} else {
this.msgWarning(msg);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
});
} else {
this.msgWarning("未添加规则信息,请添加后再保存!");
}
},
// 开启/停用【开启/停用航线规则设置】
onOffSubmit(item, index) {
this.loading = true;
let tip = item.status == "1" ? "停用" : "启用";
let parmas = {
id: item.id,
status: item.status == "1" ? "3" : "1",
};
this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
enableOrDisable(parmas)
.then((res) => {
const { code, msg, data } = res;
if (code == 200) {
this.hasOwnProperty(data, "typeOfGoods");
this.hasOwnProperty(data, "puporpuxCode");
this.hasOwnProperty(data, "serviceCode");
this.hasOwnProperty(data, "handlingCode");
this.hasOwnProperty(data, "subCategory");
this.setattrVal(data); // 设置属性值
this.$set(this.routesInfo, index, {
config: true,
...data,
});
this.msgSuccess(tip + "成功");
} else {
this.msgWarning(msg);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
this.loading = false;
});
},
// 删除航线规则设置
deleteSubmit(item, index) {
this.loading = true;
let parmas = {
id: item.id,
};
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton: true,
type: "warning",
})
.then(() => {
delFlightId(parmas)
.then((res) => {
const { code, msg, data } = res;
if (code == 200) {
this.$set(this.routesInfo, index, {
route: item.flightRoute,
config: false,
});
this.msgSuccess(msg);
} else {
this.msgWarning(msg);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
this.loading = false;
});
},
},
};
</script>
<style lang="scss" scoped>
.route-info-container {
padding: 20px;
}
</style>
src/views/allocationConfig/flightAllocConfig/index.vue
View file @
2782f84
<template>
<div>
<el-form ref="flightAllocForm" :model="queryParams" class="form-header" size="small" label-position="right"
label-width="auto" @submit.native.prevent>
<el-form
ref="flightAllocForm"
:model="queryParams"
class="form-header"
size="small"
label-position="right"
label-width="auto"
@submit.native.prevent
>
<el-row>
<el-col :span="6">
<el-form-item label="航班号">
<el-input class="formItem" v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList">
<el-input
class="formItem"
v-model.trim="purposeOfFlightNo"
placeholder="航班号"
@keyup.enter.native="getList"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班日期">
<el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable :disabled="queryParams.querySpecifyData == '2'">
<el-date-picker
class="formItem"
v-model="queryParams.flightDate"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
clearable
:disabled="queryParams.querySpecifyData == '2'"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态">
<el-select class="formItem" v-model="queryParams.status" placeholder="状态">
<el-select
class="formItem"
v-model="queryParams.status"
placeholder="状态"
>
<el-option label="有效" value="1"></el-option>
<el-option label="停用" value="3"></el-option>
</el-select>
...
...
@@ -26,35 +49,76 @@
</el-col>
</el-row>
<div>
<el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button>
<el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']"
@click="
$router.push({
name: 'FlightAllocConfigInfo',
params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' },
})
">添加</el-button>
<el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1"
inactive-value="2" active-color="#13ce66" inactive-color="#909399" @change="switchChange"></el-switch>
<el-button
type="primary"
icon="el-icon-search"
:loading="loading"
@click="getList"
size="mini"
>查询</el-button
>
<el-button
class="mb20"
type="primary"
icon="el-icon-plus"
size="mini"
v-hasPermi="['allocation:alloc:add']"
@click="addFlightRouteConfig"
>添加</el-button
>
<el-switch
style="margin-left: 10px"
v-model="queryParams.querySpecifyData"
inactive-text="日期查询"
active-value="1"
inactive-value="2"
active-color="#13ce66"
inactive-color="#909399"
@change="switchChange"
></el-switch>
</div>
</el-form>
<Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true"
:totalCount="total" :loading="loading" :limitSize="queryParams.limit" :limitStart="queryParams.start"
:page="curPage" :pageSizes="[20]" :height="tableHeight" @currentChange="currentChange">
<Tables
ref="newTables"
ductName="FlightAlloc"
:data="flyList"
:headerData="tableHeaders['flightAlloc']"
:order="true"
:totalCount="total"
:loading="loading"
:limitSize="queryParams.limit"
:limitStart="queryParams.start"
:page="curPage"
:pageSizes="[20]"
:height="tableHeight"
@currentChange="currentChange"
>
<template v-slot:ruleDate="scope">
<el-link v-if="scope.row.ruleDate" type="primary" @click="toRouteOrder(scope.row)">
{{
scope.row.ruleDate
}}<i class="el-icon-link"></i> </el-link>
<el-link
v-if="scope.row.ruleDate"
type="primary"
@click="toRouteOrder(scope.row)"
>
{{ scope.row.ruleDate }}<i class="el-icon-link"></i>
</el-link>
</template>
<template slot="optionColumn">
<el-table-column label="操作" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-view"
@click="handleClick(scope.row.purposeOfFlightNo, 'detail', scope.row.ruleDate, scope.row.status)">查看
<el-button
type="text"
size="mini"
icon="el-icon-view"
@click="handleClick(scope.row, 'view')"
>查看
</el-button>
<el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']"
@click="handleClick(scope.row.purposeOfFlightNo, 'update', scope.row.ruleDate, scope.row.status)">修改
<el-button
type="text"
size="mini"
icon="el-icon-edit"
v-hasPermi="['allocation:alloc:update']"
@click="handleClick(scope.row, 'edit')"
>修改
</el-button>
<!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button>
...
...
@@ -71,22 +135,20 @@
</template>
<script>
import {
findFlightDimRuleByFlightNo
} from "@/api/destinationFlight";
import Dialog from './dialog.vue'
import { findFlightDimRuleByFlightNo } from "@/api/destinationFlight";
import Dialog from "./dialog.vue";
export default {
name: "FlightAllocConfig",
components: {
Dialog
Dialog
,
},
data() {
return {
queryParams: {
purposeOfFlightNo: null,
flightDate: undefined,
querySpecifyData:
'2'
,
querySpecifyData:
"2"
,
status: "1",
start: 0,
limit: 20,
...
...
@@ -114,13 +176,14 @@ export default {
// })
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200
this.tableHeight =
window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200;
},
activated() {
this.getList()
this.getList()
;
},
deactivated() {
this.flyList = []
this.flyList = []
;
},
methods: {
getList() {
...
...
@@ -130,59 +193,78 @@ export default {
this.queryParams.start = 0;
}
this.loading = true;
findFlightDimRuleByFlightNo(this.queryParams).then(res => {
this.loading = false
findFlightDimRuleByFlightNo(this.queryParams)
.then((res) => {
this.loading = false;
if (res.code === 200) {
this.flyList = res.data.list
this.total = res.data.totalCount
this.flyList = res.data.list;
this.total = res.data.totalCount;
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
this.loading = false
console.log(err)
})
.catch((err) => {
this.loading = false;
console.log(err);
});
},
// 添加
addFlightRouteConfig() {
this.$router.push({
path: "/routeInfo",
query: {
flightDate: "", // 跳转的时候默认当天日期
purposeOfFlightNo: "",
flightRouteListStr: "",
status: "",
pageName: "flightAllocConfig",
dataStatus: "add",
disable: "",
},
});
},
//跳转到查看,修改页面
handleClick(fltNo, handle, fltDate, status) {
let obj = {
id: ' ',
handle: handle,
fltNo: fltNo,
fltDate: fltDate != null ? fltDate : ' ',
route: ' ',
routeStatus: 'FlightAllocConfig',
status: status == '3' ? '3' : ' ',
createStatus: 1
}
handleClick({ purposeOfFlightNo, ruleDate, flightRoute, status }, name) {
this.$router.push({
name: "FlightAllocConfigInfo",
params: obj,
path: "/routeInfo",
query: {
flightDate: ruleDate,
purposeOfFlightNo: purposeOfFlightNo,
flightRouteListStr: flightRoute,
status: status,
pageName: "flightAllocConfig",
dataStatus: name,
querySpecifyData: this.queryParams.querySpecifyData,
disable: true,
},
});
},
//航班优先级修改
toRouteOrder(val) {
this.colData = {
fltNo: val.purposeOfFlightNo,
fltDate: val.ruleDate
}
this.open = true
fltDate: val.ruleDate
,
}
;
this.open = true
;
},
//开关改变
switchChange(val) {
if (val ==
'2'
) {
this.queryParams.flightDate = undefined
if (val ==
"2"
) {
this.queryParams.flightDate = undefined
;
}
},
close() {
this.open = false
close(code) {
if (code == 200) {
this.getList();
}
this.open = false;
},
//翻页
currentChange(val) {
this.curPage = val.page
this.curPage = val.page
;
this.queryParams.start = val.start;
this.getList();
}
}
,
},
computed: {
purposeOfFlightNo: {
...
...
@@ -196,5 +278,3 @@ export default {
},
};
</script>
...
...
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
2782f84
...
...
@@ -1220,8 +1220,10 @@ export default {
queryRouteByFltNo({ fltNo: this.infoForm.fltNo }).then(res => {
if (res.code === 200) {
if (res.data.list.length > 0) {
this.routeList = res.data.list
res.data.list.forEach(item => {
let isEtesRoute = res.data.list.filter((item) => item.isEtesRoute == "N"); // 过滤ET86航线
this.routeList = isEtesRoute
if(isEtesRoute.length){
isEtesRoute.forEach(item => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
...
...
@@ -1229,6 +1231,9 @@ export default {
routePriority: item.ordinal
})
})
}else{
this.msgWarning('未查询到航线信息!')
}
} else {
this.msgWarning('未查询到航线信息!')
this.routeList = []
...
...
src/views/allocationConfig/flightAllocConfig/mixins/index.js
0 → 100644
View file @
2782f84
import
{
allDictData
,
// 获取全部字典
findDestinationFltRuleByFlightNo
,
// 航线维度设置详情
findByFlightId
,
// 通过id查询目的航班维度设置详情
}
from
"@/api/destinationFlight"
;
import
{
formConfig
,
routeRuleForm
}
from
"../flightRouteInfo/formConfig"
;
import
{
removeDuplicates
}
from
"@/utils"
;
export
default
{
data
()
{
return
{
formConfig
:
formConfig
,
// 表单配置项
queryForm
:
{
// 表单参数
},
};
},
computed
:
{
// 获取路由参数
getRouter
()
{
if
(
this
.
$route
.
query
.
name
==
"add"
)
{
return
"保存"
;
}
else
if
(
this
.
$route
.
query
.
name
==
"edit"
)
{
return
"修改"
;
}
else
{
return
false
;
}
},
},
methods
:
{
// 指定隐藏或显示From表单域
hiddenFormItem
({
dataStatus
,
querySpecifyData
})
{
// 指定隐藏或显示From表单域【add时】
if
(
dataStatus
==
"add"
)
{
formConfig
.
map
((
item
)
=>
{
if
(
item
.
type
!==
"slot"
)
{
item
.
disable
=
false
;
if
(
item
.
label
==
"航班日期"
||
item
.
label
==
"航线"
)
{
item
.
hidden
=
true
;
}
}
});
}
else
{
// 【edit和view及空值时】
formConfig
.
map
((
item
)
=>
{
if
(
item
.
type
!==
"slot"
)
{
item
.
disable
=
true
;
if
(
item
.
label
==
"航班日期"
||
item
.
label
==
"航线"
)
{
item
.
hidden
=
false
;
}
}
});
}
// 【航班配舱设置】非日期级别
if
(
querySpecifyData
==
"2"
)
{
formConfig
.
map
((
item
)
=>
{
if
(
item
.
type
!==
"slot"
)
{
if
(
item
.
label
==
"航线"
)
{
item
.
hidden
=
true
;
}
}
});
}
// 【航班配舱设置】日期级别
if
(
querySpecifyData
==
"1"
)
{
formConfig
.
map
((
item
)
=>
{
if
(
item
.
type
!==
"slot"
)
{
if
(
item
.
label
==
"航线"
)
{
item
.
hidden
=
true
;
}
}
});
}
},
// 页面跳转传参
queryCondition
(
parmas
)
{
let
_this
=
this
;
// 航班配舱维度规则设置查询条件
let
queryCondition
=
{
// 航班配舱设置
flightAllocConfig
:
{
noDateParmas
:
{
flightDate
:
""
,
flightRoute
:
""
,
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
status
:
""
,
},
dateParmas
:
{
flightDate
:
parmas
.
flightDate
,
flightRoute
:
""
,
flightRouteListStr
:
""
,
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
status
:
""
,
},
queryParmas
:
function
()
{
// 非日期级别
if
(
parmas
.
querySpecifyData
==
"2"
)
{
_this
.
noDateLevelData
(
this
.
noDateParmas
);
}
// 日期级别
if
(
parmas
.
querySpecifyData
==
"1"
)
{
_this
.
dateLevelData
({
dateParmas
:
this
.
dateParmas
,
noDateParmas
:
this
.
noDateParmas
,
});
}
_this
.
queryForm
=
_this
.
$route
.
query
;
// 获取跳转过来的参数
},
},
// 航班信息维护
flightInformationMaintenance
:
{
noDateParmas
:
{
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
flightRouteListStr
:
parmas
.
flightRouteListStr
,
status
:
""
,
},
dateParmas
:
{
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
flightDate
:
parmas
.
flightDate
,
flightRouteListStr
:
parmas
.
flightRouteListStr
,
status
:
""
,
},
queryParmas
:
function
()
{
// White Tail
if
(
parmas
.
flightKindName
==
"White Tail"
)
{
_this
.
dateLevelData
({
dateParmas
:
this
.
dateParmas
,
noDateParmas
:
this
.
noDateParmas
,
});
}
// Purple Tail
if
(
parmas
.
flightKindName
==
"Purple Tail"
)
{
_this
.
dateLevelData
({
dateParmas
:
this
.
dateParmas
,
noDateParmas
:
this
.
noDateParmas
,
});
}
},
},
// 航班顺位设置
flightRandConfig
:
{
noDateParmas
:
{
flightRoute
:
""
,
flightRouteListStr
:
""
,
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
status
:
""
,
},
dateParmas
:
{
flightDate
:
parmas
.
flightDate
,
flightRoute
:
""
,
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
status
:
""
,
},
queryParmas
:
function
()
{
// 普通级别
if
(
parmas
.
pageName
==
"flightRandConfig"
)
{
_this
.
dateLevelData
({
dateParmas
:
this
.
dateParmas
,
noDateParmas
:
this
.
noDateParmas
,
});
}
},
},
// 【系统日志】DM数据处理
dmLog
:
{
queryParmas
:
function
()
{
if
(
parmas
.
pageName
==
"dmLog"
)
{
_this
.
getFindByFlightId
({
id
:
parmas
.
id
,
});
}
},
},
};
// 航班配舱设置
queryCondition
.
flightAllocConfig
.
queryParmas
();
// 航班信息维护
queryCondition
.
flightInformationMaintenance
.
queryParmas
();
// 航班顺位设置
queryCondition
.
flightRandConfig
.
queryParmas
();
// 【系统日志】DM数据处理
queryCondition
.
dmLog
.
queryParmas
();
},
// 获取所有数据字典
getAllDictData
()
{
allDictData
()
.
then
((
res
)
=>
{
if
(
res
.
code
!=
200
)
{
this
.
msgError
(
res
.
msg
);
return
;
}
// 给checkBox表单赋值做展示信息
const
{
data
}
=
res
;
this
.
cargoType
=
data
.
cargoType
;
// 申报类别
this
.
cargoStatus
=
data
.
cargoStatus
;
// 货物类型
this
.
puporpux
=
data
.
puporpux
;
// 取件扫描号
this
.
serviceCode
=
this
.
dicSort
(
data
.
serviceCode
.
sort
((
a
,
b
)
=>
a
.
chineseName
.
localeCompare
(
b
.
chineseName
)
)
);
// Service Code
this
.
handlingCode
=
this
.
dicSort
(
this
.
sorttodo
(
data
.
handlingCode
,
"BLANK"
)
);
// Handling Code
this
.
subCategory
=
this
.
dicSort
(
this
.
sorttodo
(
data
.
subCategory
,
"Blank"
)
);
// Sub Category
})
.
catch
(()
=>
{});
},
// 【接口调用和数据去重整合】普通级别
noDateLevelRoute
(
parmas
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
findDestinationFltRuleByFlightNo
(
parmas
)
.
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
;
if
(
code
!=
200
)
{
this
.
msgError
(
msg
);
return
;
}
let
noDateRouteLists
=
data
.
routeList
;
// 只负责展示航线优先级
let
noDateRouteList
=
data
.
routeList
.
filter
(
(
item
)
=>
item
.
etesRule
==
"N"
);
// 航班航线基本信息(过滤ET86航线的)
// 普通级别航班航线维度规则详情
const
noDateDataList
=
removeDuplicates
(
data
.
list
,
{
duplicate
:
"flightRoute"
,
// 去重字段
dateTime
:
"createTime"
,
// 从重复的数据中根据时间取最新的一条
sort
:
false
,
// 是否要排序
sortType
:
"Number"
,
// 排序类型
sortAttr
:
"routePriority"
,
// 排序字段
});
// 整合飞行航线配置信息
const
mergeNoDateRouteInfo
=
this
.
mergeFlightRouteConfigObj
(
noDateRouteList
,
noDateDataList
);
// 当前所有航线都有航线配置信息返回true,否则返回false
let
noDateConfigFlag
=
mergeNoDateRouteInfo
.
every
(
(
item
)
=>
item
.
config
==
true
);
resolve
({
noDateConfigFlag
,
noDateRouteLists
,
noDateRouteList
,
mergeNoDateRouteInfo
,
});
})
.
catch
(()
=>
{});
});
},
// 【接口调用和数据去重整合】日期级别
dateLevelRoute
(
parmas
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
findDestinationFltRuleByFlightNo
(
parmas
)
.
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
;
if
(
code
!=
200
)
{
this
.
msgError
(
msg
);
return
;
}
let
dateDataLists
=
data
.
routeList
;
// 只负责展示航线优先级
let
dateRouteList
=
data
.
routeList
.
filter
(
(
item
)
=>
item
.
etesRule
==
"N"
);
// 航班航线基本信息(过滤ET86航线的)
// 日期级别航班航线维度规则详情
const
dateDataList
=
removeDuplicates
(
data
.
list
,
{
duplicate
:
"flightRoute"
,
// 去重字段
dateTime
:
"createTime"
,
// 从重复的数据中根据时间取最新的一条
sort
:
false
,
// 是否要排序
sortType
:
"Number"
,
// 排序类型
sortAttr
:
"routePriority"
,
// 排序字段
});
// 整合飞行航线配置信息,对没有航线配置信息的也已经做了config为false的处理;
const
mergeDateRouteInfo
=
this
.
mergeFlightRouteConfigObj
(
dateRouteList
,
dateDataList
);
/*
【dateConfigFlag】:
判断日期级别的航线有没有航线配置的数据,如果其中一条没有返回false,
然后再接着调用非日期级别的查询做数据处理;
*/
let
dateConfigFlag
=
mergeDateRouteInfo
.
every
(
(
item
)
=>
item
.
config
==
true
);
// 返回日期级别查询结果
resolve
({
dateConfigFlag
,
dateDataLists
,
dateRouteList
,
mergeDateRouteInfo
,
});
})
.
catch
(()
=>
{});
});
},
// 根据航班号ID查看航班航线配置详情
getFindByFlightId
(
parmas
)
{
findByFlightId
(
parmas
)
.
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
;
if
(
code
!=
200
)
{
this
.
msgError
(
msg
);
return
;
}
const
routeList
=
[
data
.
list
];
// 航班航线维度规则详情
const
dataList
=
removeDuplicates
(
routeList
,
{
duplicate
:
"flightRoute"
,
// 去重字段
dateTime
:
"createTime"
,
// 从重复的数据中根据时间取最新的一条
sort
:
false
,
// 是否要排序
sortType
:
"Number"
,
// 排序类型
sortAttr
:
"routePriority"
,
// 排序字段
});
// 将flightRoute航线赋值给route属性,并且追加到当前对象
routeList
.
map
((
item
)
=>
{
if
(
item
.
flightRoute
)
{
item
.
route
=
item
.
flightRoute
;
}
});
// 整合飞行航线配置信息,对没有航线配置信息的也已经做了config为false的处理;
const
mergeRouteInfo
=
this
.
mergeFlightRouteConfigObj
(
routeList
,
dataList
);
// 处理属性
mergeRouteInfo
.
map
((
item
)
=>
{
if
(
item
.
config
)
{
this
.
hasOwnProperty
(
item
,
"typeOfGoods"
);
this
.
hasOwnProperty
(
item
,
"puporpuxCode"
);
this
.
hasOwnProperty
(
item
,
"serviceCode"
);
this
.
hasOwnProperty
(
item
,
"handlingCode"
);
this
.
hasOwnProperty
(
item
,
"subCategory"
);
this
.
setattrVal
(
item
);
// 设置属性值
}
});
this
.
routeList
=
routeList
;
// 航班航线列表
mergeRouteInfo
.
sort
((
a
,
b
)
=>
{
return
(
routeList
.
findIndex
((
item
)
=>
item
.
route
==
a
.
route
)
-
routeList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
this
.
routesInfo
=
mergeRouteInfo
;
// 航班航线配置信息列表
})
.
catch
(()
=>
{});
},
// 拿到【接口调用和数据去重整合】的数据做数据页面显示处理:非日期级别
noDateLevelData
(
noDateParmas
)
{
this
.
noDateLevelRoute
(
noDateParmas
).
then
(
({
noDateConfigFlag
,
noDateRouteList
,
mergeNoDateRouteInfo
})
=>
{
// 满足非日期级别航线的配置信息
// 处理属性
mergeNoDateRouteInfo
.
map
((
item
)
=>
{
if
(
item
.
config
)
{
this
.
hasOwnProperty
(
item
,
"typeOfGoods"
);
this
.
hasOwnProperty
(
item
,
"puporpuxCode"
);
this
.
hasOwnProperty
(
item
,
"serviceCode"
);
this
.
hasOwnProperty
(
item
,
"handlingCode"
);
this
.
hasOwnProperty
(
item
,
"subCategory"
);
this
.
setattrVal
(
item
);
// 设置属性值
}
});
this
.
routeList
=
noDateRouteList
;
// 航班航线列表
mergeNoDateRouteInfo
.
sort
((
a
,
b
)
=>
{
return
(
noDateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
a
.
route
)
-
noDateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
this
.
routesInfo
=
mergeNoDateRouteInfo
;
// 航班航线配置信息列表
}
);
},
// 拿到【接口调用和数据去重整合】的数据做数据页面显示处理:日期级别
dateLevelData
({
dateParmas
,
noDateParmas
})
{
this
.
dateLevelRoute
(
dateParmas
).
then
((
res
)
=>
{
const
{
dateConfigFlag
,
dateDataLists
,
dateRouteList
,
mergeDateRouteInfo
,
}
=
res
;
if
(
dateConfigFlag
)
{
// 日期级别当前航班航线配置没有缺省的,就不用再去查询非日期级别了
// 处理属性
mergeDateRouteInfo
.
map
((
item
)
=>
{
if
(
item
.
config
)
{
this
.
hasOwnProperty
(
item
,
"typeOfGoods"
);
this
.
hasOwnProperty
(
item
,
"puporpuxCode"
);
this
.
hasOwnProperty
(
item
,
"serviceCode"
);
this
.
hasOwnProperty
(
item
,
"handlingCode"
);
this
.
hasOwnProperty
(
item
,
"subCategory"
);
this
.
setattrVal
(
item
);
// 设置属性值
}
});
this
.
routeList
=
dateRouteList
;
// 航班航线列表
mergeDateRouteInfo
.
sort
((
a
,
b
)
=>
{
return
(
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
a
.
route
)
-
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
this
.
routesInfo
=
mergeDateRouteInfo
;
// 航班航线配置信息列表
if
(
this
.
$route
.
query
.
flightKindName
==
"Purple Tail"
)
{
this
.
showFlightKind
(
dateDataLists
);
}
}
else
{
// 当前航线有缺省的航线配置
// 航班航线有规则配置的
const
dateListHas
=
mergeDateRouteInfo
.
filter
(
(
item
)
=>
item
.
config
==
true
);
// 航班航线没有规则配置的
const
dateListNo
=
mergeDateRouteInfo
.
filter
(
(
item
)
=>
item
.
config
==
false
);
this
.
noDateLevelRoute
(
noDateParmas
).
then
(
({
noDateConfigFlag
,
noDateRouteLists
,
noDateRouteList
,
mergeNoDateRouteInfo
,
})
=>
{
// 航班种类
this
.
flightKindName
({
noDateConfigFlag
,
noDateRouteLists
,
noDateRouteList
,
mergeNoDateRouteInfo
,
dateDataLists
,
dateRouteList
,
dateListHas
,
dateListNo
,
});
}
);
}
});
},
// 航班种类
flightKindName
({
noDateConfigFlag
,
noDateRouteLists
,
noDateRouteList
,
mergeNoDateRouteInfo
,
dateDataLists
,
dateRouteList
,
dateListHas
,
dateListNo
,
})
{
if
(
this
.
$route
.
query
.
flightKindName
==
"White Tail"
)
{
// White Tail只展示当前查询的一条
const
route
=
this
.
$route
.
query
.
flightRouteListStr
;
let
noDateRouteInfo
,
result
;
this
.
routeList
=
dateRouteList
;
// 从日期取
if
(
dateListHas
.
length
)
{
const
dateRouteInfo
=
dateListHas
.
filter
(
(
item
)
=>
item
.
flightRoute
==
route
);
result
=
dateRouteInfo
;
// 航班航线配置信息列表
}
else
{
// 从非日期级别取
noDateRouteInfo
=
mergeNoDateRouteInfo
.
filter
(
(
item
)
=>
item
.
flightRoute
==
route
);
result
=
noDateRouteInfo
;
// 航班航线配置信息列表
}
if
(
result
.
length
)
{
// 处理属性
result
.
map
((
item
)
=>
{
if
(
item
.
config
)
{
this
.
hasOwnProperty
(
item
,
"typeOfGoods"
);
this
.
hasOwnProperty
(
item
,
"puporpuxCode"
);
this
.
hasOwnProperty
(
item
,
"serviceCode"
);
this
.
hasOwnProperty
(
item
,
"handlingCode"
);
this
.
hasOwnProperty
(
item
,
"subCategory"
);
this
.
setattrVal
(
item
);
// 设置属性值
}
});
result
.
sort
((
a
,
b
)
=>
{
return
(
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
a
.
route
)
-
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
this
.
routesInfo
=
result
;
}
else
{
// 日期级别和非日期级别都没有配置信息的时候,
// 从数据整合的里面取一个对应的航线数据作为回显暂无数据处理。
noDateRouteInfo
=
mergeNoDateRouteInfo
.
filter
(
(
item
)
=>
item
.
route
==
route
);
noDateRouteInfo
.
sort
((
a
,
b
)
=>
{
return
(
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
a
.
route
)
-
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
this
.
routesInfo
=
noDateRouteInfo
;
}
}
else
{
// 日期级别和航班种类为Purple Tail的时候
// 日期级别的时候要注意dateListNo里没有flightRoute字段,也就是说只有航班航线没有航班航线配置信息;
// 其次是非日期级别mergeNoDateRouteInfo也可能没有对应的数据,没有flightRoute字段。
// 那么这个时候使用mergeFlightRouteConfigObj方法就会出问题。
const
result
=
this
.
mergeFlightRouteConfigObj
(
dateListNo
,
mergeNoDateRouteInfo
);
let
dateList
=
dateListHas
.
concat
(
result
);
// 处理属性
dateList
.
map
((
item
)
=>
{
if
(
item
.
config
)
{
this
.
hasOwnProperty
(
item
,
"typeOfGoods"
);
this
.
hasOwnProperty
(
item
,
"puporpuxCode"
);
this
.
hasOwnProperty
(
item
,
"serviceCode"
);
this
.
hasOwnProperty
(
item
,
"handlingCode"
);
this
.
hasOwnProperty
(
item
,
"subCategory"
);
this
.
setattrVal
(
item
);
// 设置属性值
}
});
this
.
routeList
=
dateRouteList
;
// 航线优先级
// 查找包含的航线并且按照dateList航线排序
dateList
.
sort
((
a
,
b
)
=>
{
return
(
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
a
.
route
)
-
dateRouteList
.
findIndex
((
item
)
=>
item
.
route
==
b
.
route
)
);
});
if
(
this
.
$route
.
query
.
flightKindName
==
"Purple Tail"
)
{
let
flightRouteListStr
=
this
.
$route
.
query
.
flightRouteListStr
.
split
(
";"
);
// 跳转传过来的航线
// 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
let
inRoutes
=
dateDataLists
.
filter
((
item
)
=>
flightRouteListStr
.
includes
(
item
.
route
))
.
sort
(
(
a
,
b
)
=>
flightRouteListStr
.
indexOf
(
a
.
route
)
-
flightRouteListStr
.
indexOf
(
b
.
route
)
);
// 处理航线优先级展示ET86
let
routes
=
[];
inRoutes
.
map
((
item
,
i
,
arr
)
=>
{
if
(
arr
[
i
].
etesRule
==
"Y"
)
{
routes
.
push
(
`
${
arr
[
i
].
route
}
(ET86)`
);
}
else
{
routes
.
push
(
arr
[
i
].
route
);
}
});
// 把处理ET86航线优先级展示
this
.
queryForm
.
flightRouteListStr
=
routes
.
join
(
";"
);
// 跳转传过来的对应的航线把ET86航线的过滤掉
let
noEtesRoutes
=
inRoutes
.
filter
((
item
)
=>
item
.
etesRule
==
"N"
);
let
noRoutes
=
dateList
.
filter
((
item
)
=>
{
return
noEtesRoutes
.
some
((
el
)
=>
el
.
route
===
item
.
route
);
});
const
result
=
noRoutes
.
filter
((
item2
)
=>
{
return
noEtesRoutes
.
some
((
item1
)
=>
{
return
item1
.
route
===
item2
.
route
;
});
})
.
sort
((
a
,
b
)
=>
{
return
(
noEtesRoutes
.
findIndex
((
item
)
=>
item
.
route
===
a
.
route
)
-
noEtesRoutes
.
findIndex
((
item
)
=>
item
.
route
===
b
.
route
)
);
});
this
.
routesInfo
=
result
;
}
else
{
this
.
queryForm
=
this
.
$route
.
query
;
// 获取跳转过来的参数
this
.
routesInfo
=
dateList
;
}
}
},
// 处理跳转显示航线种类
showFlightKind
(
dateDataLists
)
{
let
flightRouteListStr
=
this
.
$route
.
query
.
flightRouteListStr
.
split
(
";"
);
// 跳转传过来的航线
// 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
let
inRoutes
=
dateDataLists
.
filter
((
item
)
=>
flightRouteListStr
.
includes
(
item
.
route
))
.
sort
(
(
a
,
b
)
=>
flightRouteListStr
.
indexOf
(
a
.
route
)
-
flightRouteListStr
.
indexOf
(
b
.
route
)
);
// 处理航线优先级展示ET86
let
routes
=
[];
inRoutes
.
map
((
item
,
i
,
arr
)
=>
{
if
(
arr
[
i
].
etesRule
==
"Y"
)
{
routes
.
push
(
`
${
arr
[
i
].
route
}
(ET86)`
);
}
else
{
routes
.
push
(
arr
[
i
].
route
);
}
});
// 把处理ET86航线优先级展示
this
.
queryForm
.
flightRouteListStr
=
routes
.
join
(
";"
);
},
// 整合飞行航线配置信息
mergeFlightRouteConfigObj
(
routeList
,
dataList
)
{
if
(
dataList
.
length
)
{
let
flightRoute1
=
routeList
.
some
((
obj
)
=>
obj
.
hasOwnProperty
(
"flightRoute"
)
);
let
flightRoute2
=
dataList
.
some
((
obj
)
=>
obj
.
hasOwnProperty
(
"flightRoute"
)
);
const
result
=
routeList
.
map
((
item1
)
=>
{
const
item2
=
dataList
.
find
((
item2
)
=>
{
if
(
flightRoute1
)
{
if
(
item2
.
route
===
item1
.
flightRoute
)
{
item2
.
config
=
true
;
return
item2
;
}
}
else
if
(
flightRoute2
)
{
if
(
item2
.
flightRoute
===
item1
.
route
)
{
item2
.
config
=
true
;
return
item2
;
}
}
});
// 返回当前相等的一条数据
if
(
item2
)
{
return
{
...
item1
,
...
item2
};
}
else
{
item1
.
config
=
false
;
return
item1
;
// 没有的返回当前的
}
});
return
result
;
}
else
{
// 没有航班航线配置的情况下
const
result
=
routeList
.
map
((
item
)
=>
{
item
.
config
=
false
;
if
(
item
)
{
return
item
;
}
});
return
result
;
}
},
// 回显时所用:判断对象是否存在某个属性,并且把这个属性值使用分号分隔
hasOwnProperty
(
item
,
key
)
{
if
(
item
.
hasOwnProperty
(
key
))
{
if
(
item
[
key
])
{
item
[
key
]
=
item
[
key
].
split
(
";"
);
}
else
{
item
[
key
]
=
[];
}
}
},
// 保存提交时所用:改方法主要用于提交保存时,再把数组转换成字符串,与hasOwnProperty相反
returnString
(
parmas
,
key
)
{
if
(
parmas
.
hasOwnProperty
(
key
))
{
if
(
parmas
[
key
].
length
)
{
parmas
[
key
]
=
parmas
[
key
].
join
(
";"
);
}
else
{
parmas
[
key
]
=
null
;
}
}
},
//排序
sorttodo
(
arr
,
chineseName
)
{
var
index
=
1
,
newArr
=
[],
length
=
arr
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
arr
[
i
].
chineseName
===
chineseName
)
{
newArr
[
0
]
=
arr
[
i
];
}
else
{
newArr
[
index
++
]
=
arr
[
i
];
}
}
return
newArr
;
},
// 数据字典排序
dicSort
(
val
)
{
let
status1
=
[];
let
status0
=
[];
let
arr
=
[];
val
.
forEach
((
item
)
=>
{
if
(
item
.
status
==
1
)
{
status1
.
push
(
item
);
}
else
{
status0
.
push
(
item
);
}
});
arr
=
status1
.
concat
(
status0
);
return
arr
;
},
// 设置属性值
setattrVal
(
item
)
{
if
(
item
.
location
)
{
// 始发站
item
.
isLocation
=
"1"
;
}
if
(
item
.
notLocation
)
{
item
.
isLocation
=
"2"
;
}
if
(
item
.
location
==
null
&&
item
.
notLocation
==
null
)
{
item
.
isLocation
=
"1"
;
}
if
(
item
.
destinationSite
)
{
// 目的站
item
.
isDestinationSite
=
"1"
;
}
if
(
item
.
notDestinationSite
)
{
item
.
isDestinationSite
=
"2"
;
}
if
(
item
.
destinationSite
==
null
&&
item
.
notDestinationSite
==
null
)
{
item
.
isDestinationSite
=
"1"
;
}
let
routes
=
[];
if
(
this
.
routeList
.
length
)
{
this
.
routeList
.
map
((
item
)
=>
{
routes
.
push
(
item
.
route
);
});
routeRuleForm
.
routeSpecifyDateSeq
=
routes
.
join
(
";"
);
}
},
// 失焦事件
blurEvent
({
originOfFlightNo
})
{
this
.
queryForm
.
originOfFlightNo
=
this
.
upCase
(
originOfFlightNo
);
},
// 始发站
changeLocation
(
val
)
{
// console.log("始发站:", val);
},
// 目的站
changeDestinationSite
(
val
)
{
// console.log("目的站:", val);
},
},
};
/*
【整个航班航线维度设置的回显逻辑以及数据处理思路】如下:
1:获取航班航线列表和航班航线配置信息列表。
2:如果航班航线配置信息列表有数据,先做航线去重。
3:拿航班航线列表和航班航线配置信息列表去做遍历,判断当前航班航线在航班航线配置信息列表中有没有对应的数据。
如果有给当前航班航线设置一个属性值为true的config属性,并且把当前航班航线与航线配置信息列表中对应的对象合并,
如果当前航班航线没有在航线配置列表中找到,那么直接给航班航线列表中的这条航线数据设置一个属性值为false的config属性。
4:当把航班航线列表和航班航线配置信息列表数据整合到一块以后,那么在做数据渲染的时候就可以根据config值来显示当前航班航线有没有航线配置信息,
从而显示暂无数据用来去展示“新增规则”按钮。
此外config属性还有一个作用就是在做日期级别航线查询的时候,如果日期级别的航线没有航线配置信息会走一次非日期级别的航线配置信息查询,
那么当有了这个config属性,如果在做日期级别航线配置信息查询的时候,当前日期级别航班航线列表与航班航线配置信息列表做遍历查询时,
且航班航线列表每一个航线都有航班航线配置信息,那么就可以使用every对航班航线列表与航班配置信息列表做数据整合之后做遍历。
当返回true时,那么就不需要再走一次非日期级别的航线配置信息查询了,当返回false说明航班航线列表中存在没有航班航线的配置信息,
那么这个时候就可以根据config属性值为false走一次非日期级别的航线配置信息查询;
5:【航班配舱设置】逻辑:根据路由跳转传参过来的querySpecifyData值,如果querySpecifyData等于2的时候就是非日期级别,
那么只需要走非日期级别的查询即可,如果querySpecifyData属性值等于1的时候,说明是日期级别的,那么则走日期级别的查询,
但是当航班航线列表和航班航线配置信息列表做数据整合之后返回的数组中的JSON对象中config属性值有一个为false,
那么如同上述第4条提的,就需要再走一次非日期级别的航线配置信息查询;反之则不需要;
6:【航班信息维护】逻辑:和上述第5条查询的区别之处是根据航班种类flightKindName字段是White Tail还是Purple Tail,
但是不管是哪种航班类型都是先走日期级别的航班航线配置信息查询,当有config属性值有一个为false的时候还需要走一次非日期级别的航班航线配置信息查询。
但是有一点就是White Tail只查询一条航班航线配置信息,根据从航班信息维护White Tail类型查看维度,
做路由跳转传参带过来的航线首先在日期级别航线配置信息中遍历查询有没有该航班航线的配置信息,如果有,
那么则不需要再走一次非日期级别的航班航线配置信息查询,如果没有那么则再走一次非日期航班航线配置信息查询。
但是航线优先级显示的航线还是取日期级别航班航线列表中的航线。
7:航班航线信息列表和航班航线配置信息列表在做完航班航线配置信息列表去重之后和航班航线列表做数据整合之后,
还要对所有关于显示的数据做处理,比如页面上所有关于checkbox的勾选框radio单选框;
8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理;
*/
src/views/allocationConfig/flightRandConfig/index.vue
View file @
2782f84
...
...
@@ -67,7 +67,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row
.actualFlight, 'detail', scope.row.flightDate, ' ', ' '
)">查看配置维度
@click="handleClick(scope.row)">查看配置维度
</el-button>
</template>
</el-table-column>
...
...
@@ -275,21 +275,18 @@ export default {
},
methods: {
//跳转到查看,修改页面
handleClick(
fltNo, handle, fltDate, route, status
) {
handleClick(
{ actualFlight, flightDate, route }
) {
this.openFlightDate = false;
let obj = {
id: ' ',
handle: handle,
fltNo: fltNo,
fltDate: fltDate != null ? fltDate : ' ',
route: route,
routeStatus: 'FlightRandConfig',
status: status,
createStatus: 1,
}
this.$router.push({
name: "FlightAllocConfigInfo",
params: obj,
path: "/routeInfo",
query: {
flightDate: flightDate,
purposeOfFlightNo: actualFlight,
flightRouteListStr: route,
status: "",
pageName: "flightRandConfig",
disable: true,
},
});
},
/** 查询原航班顺位规则*/
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
2782f84
<template>
<div>
<el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto"
size="small">
<el-form
class="form-header"
:model="queryParams"
ref="queryForm"
label-position="right"
label-width="auto"
size="small"
>
<el-row>
<el-col :span="6">
<el-form-item label="航班日期从" prop="fltDateStart">
<el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date"
placeholder="选择日期">
<el-date-picker
class="formItem"
value-format="yyyy-MM-dd"
v-model="queryParams.fltDateStart"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="到" prop="fltDateEnd">
<el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date"
placeholder="选择日期">
<el-date-picker
class="formItem"
value-format="yyyy-MM-dd"
v-model="queryParams.fltDateEnd"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班号" prop="fltNo">
<el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable />
<el-input
class="formItem"
v-model="queryParams.fltNo"
placeholder="请输入航班号"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班类型" prop="typeId">
<el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable>
<el-option v-for="dict in selectOption.flightTypelist" :key="dict.id" :label="dict.chineseName"
:value="dict.id" />
<el-select
class="formItem"
v-model="queryParams.typeId"
placeholder="请选择航班类型"
clearable
>
<el-option
v-for="dict in selectOption.flightTypelist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班状态" prop="statusId">
<el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable>
<el-option v-for="dict in selectOption.flightStatuslist" :key="dict.id" :label="dict.chineseName"
:value="dict.id" />
<el-select
class="formItem"
v-model="queryParams.statusId"
placeholder="请选择航班状态"
clearable
>
<el-option
v-for="dict in selectOption.flightStatuslist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班种类" prop="flightKindId">
<el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable>
<el-option v-for="dict in selectOption.flightKindlist" :key="dict.id" :label="dict.chineseName"
:value="dict.id" />
<el-select
class="formItem"
v-model="queryParams.flightKindId"
placeholder="请选择航班种类"
clearable
>
<el-option
v-for="dict in selectOption.flightKindlist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
<el-button
class="mt10"
type="primary"
icon="el-icon-search"
size="mini"
:loading="loading"
@click="handleQuery"
>搜索
</el-button>
<el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:flightInfo:add']">
新增</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启
<el-button
class="mt10"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button
class="mt10"
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['base:flightInfo:add']"
>
新增</el-button
>
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-check"
size="mini"
:disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus10')"
v-hasPermi="['base:flightInfo:open']"
>自动配舱开启</el-button
>
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-close"
size="mini"
:disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus80')"
v-hasPermi="['base:flightInfo:close']"
>自动配舱关闭</el-button
>
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-check"
size="mini"
:disabled="ids.length == 0"
@click="autoPushBatch('open')"
v-hasPermi="['base:flightInfo:autoPushOpen']"
>自动推送开启</el-button
>
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-close"
size="mini"
:disabled="ids.length == 0"
@click="autoPushBatch('close')"
v-hasPermi="['base:flightInfo:autoPushClose']"
>自动推送关闭</el-button
>
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-check"
size="mini"
:disabled="ids.length == 0"
@click="whiteListSwitchStatus(1)"
v-hasPermi="['base:flightInfo:whiteOpen']"
>白名单自动配舱开启
</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-close"
size="mini"
:disabled="ids.length == 0"
@click="whiteListSwitchStatus(0)"
v-hasPermi="['base:flightInfo:whiteClose']"
>白名单自动配舱关闭
</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(1)">黑名单自动配舱开启
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-check"
size="mini"
:disabled="ids.length == 0"
@click="BlackListSwitchStatus(1)"
>黑名单自动配舱开启
</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(0)">黑名单自动配舱关闭
<el-button
class="mt10"
type="primary"
icon="el-icon-circle-close"
size="mini"
:disabled="ids.length == 0"
@click="BlackListSwitchStatus(0)"
>黑名单自动配舱关闭
</el-button>
<el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0"
@click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除
<el-button
class="mt10"
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="ids.length == 0"
@click="handleDelete"
v-hasPermi="['base:flightInfo:delete']"
>删除
</el-button>
</el-form>
<Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
:order="true" :selection="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limitSize"
:page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" :pageSizes="[20, 30, 40, 50, 100]"
@tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange" @sortChange="sortChange"
@sizeChange="sizeChange">
<Tables
ref="flightInfoTable"
ductName="FlightInformation"
:data="findAllFltDatList"
:headerData="tableHeader"
:order="true"
:selection="true"
:totalCount="total"
:loading="loading"
:limitSize="queryParams.limitSize"
:page="queryParams.pageNum"
:shiftKey="shiftKey"
:height="tableHeight"
:pageSizes="[20, 30, 40, 50, 100]"
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
@currentChange="currentChange"
@sortChange="sortChange"
@sizeChange="sizeChange"
>
<template slot="optionColumn">
<el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center"
class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160">
<el-table-column
v-if="findAllFltDatList.length > 0"
label="操作"
align="center"
class-name="small-padding fixed-width"
:fixed="tableHeader.length > 10 ? 'right' : false"
width="160"
>
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:flightInfo:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-link" @click="goFlightAllocConfig(scope.row)">查看维度
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['base:flightInfo:update']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-link"
@click="goFlightAllocConfig(scope.row)"
>查看维度
</el-button>
</template>
</el-table-column>
</template>
</Tables>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"
:show-close="false" @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small">
<el-dialog
:title="title"
:visible.sync="open"
width="60%"
:close-on-click-modal="false"
:append-to-body="true"
:show-close="false"
@close="cancel"
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-position="right"
label-width="auto"
size="small"
>
<el-row>
<el-col :span="12">
<el-form-item label="航班号" prop="fltNo">
<el-input class="wid80" @blur="blurfltNo" :disabled="formdisabled.fltNo" v-model="form.fltNo"
placeholder="请输入航班号" maxlength="20" />
<el-input
class="wid80"
@blur="blurfltNo"
:disabled="formdisabled.fltNo"
v-model="form.fltNo"
placeholder="请输入航班号"
maxlength="20"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="该航班预审状态:">
<el-tag v-if="preAudit" :type="preAudit == '开启' ? 'success' : 'info'" effect="dark">{{ preAudit }}
<el-tag
v-if="preAudit"
:type="preAudit == '开启' ? 'success' : 'info'"
effect="dark"
>{{ preAudit }}
</el-tag>
</el-form-item>
</el-col>
...
...
@@ -115,56 +304,145 @@
<el-row>
<el-col :span="12">
<el-form-item label="航班日期" prop="fltDate">
<el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate"
type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期">
<el-date-picker
class="wid80"
:disabled="formdisabled.fltDate"
clearable
size="small"
v-model="form.fltDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择航班日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班种类" prop="kindId">
<el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类"
@change="kindChange">
<el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName"
:value="item.id">
<el-select
class="wid80"
v-model="form.kindId"
:disabled="formdisabled.kindId"
placeholder="请选择航班种类"
@change="kindChange"
>
<el-option
v-for="item in selectOption.flightKindlist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-bottom:5px">
<el-row style="margin-bottom:
5px">
<el-col :span="12">
<el-form-item>
<template slot="label">
<div style="display:inline-block">
<div style="display:
inline-block">
<span class="error-route">*</span>
航班路线
<el-tooltip class="item" effect="dark" content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线"
placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
<el-tooltip
class="item"
effect="dark"
content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线"
placement="top-start"
>
<span
class="el-icon-warning"
style="color: #1890ff; font-size: 16px"
></span>
</el-tooltip>
</div>
</template>
<el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" @blur="blurRoute"
:loading="routeLoading" :multiple='true' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
<el-select
v-if="routeMultiple"
ref="routeSelect"
class="wid80"
v-model="form.route"
:disabled="formdisabled.route"
placeholder="请选择航线"
no-data-text="未查询到航线"
@change="routeChange"
@blur="blurRoute"
:loading="routeLoading"
:multiple="true"
>
<el-option
v-for="item in routeList"
:key="item.route"
:label="item.route"
:value="item.route"
>
<span style="float: left">{{ item.route }}</span>
<span
style="
float: right;
margin-right: 30px;
color: #8492a6;
font-size: 13px;
"
>{{ item.isEtesRoute == "Y" ? "(ET86)" : "" }}</span
>
</el-option>
</el-select>
<el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" @blur="blurRoute"
:loading="routeLoading" :multiple='false' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
<el-select
v-if="routeMultiple == false"
ref="routeSelect"
class="wid80"
v-model="form.route"
:disabled="formdisabled.route"
placeholder="请选择航线"
no-data-text="未查询到航线"
@change="routeChange"
@blur="blurRoute"
:loading="routeLoading"
:multiple="false"
>
<el-option
v-for="item in routeList"
:key="item.id"
:label="item.route"
:value="item.route"
>
<span style="float: left">{{ item.route }}</span>
<span
style="
float: right;
margin-right: 30px;
color: #8492a6;
font-size: 13px;
"
>{{ item.isEtesRoute == "Y" ? "(ET86)" : "" }}</span
>
</el-option>
</el-select>
<span ref="errorRoute" class="el-form-item__error" v-show="routeError">航班路线不能为空</span>
<span
ref="errorRoute"
class="el-form-item__error"
v-show="routeError"
>航班路线不能为空</span
>
</el-form-item>
<div class="formTips" v-if="title == '修改航班信息'">注意!:移除航线,相对应日期级别航线维度会同时删除</div>
<div class="formTips" v-if="title == '修改航班信息'">
注意!:移除航线,相对应日期级别航线维度会同时删除
</div>
</el-col>
<el-col :span="12">
<el-form-item label="航班类型" prop="typeId">
<el-select class="wid80" v-model="form.typeId" placeholder="请选择航班类型">
<el-option v-for="item in selectOption.flightTypelist" :key="item.id" :label="item.chineseName"
:value="item.id">
<el-select
class="wid80"
v-model="form.typeId"
placeholder="请选择航班类型"
>
<el-option
v-for="item in selectOption.flightTypelist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -173,31 +451,60 @@
<el-row>
<el-col :span="12">
<el-form-item label="航班状态" prop="statusId">
<el-select class="wid80" :disabled="true" v-model="form.statusId" placeholder="请选择航班状态">
<el-option v-for="item in selectOption.flightStatuslist" :key="item.id" :label="item.chineseName"
:value="item.id">
<el-select
class="wid80"
:disabled="true"
v-model="form.statusId"
placeholder="请选择航班状态"
>
<el-option
v-for="item in selectOption.flightStatuslist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原始重量(KG)" prop="originalWeight">
<el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入原始重量(KG)"
v-model="form.originalWeight" v-input-filter></el-input-number>
<el-input-number
class="wid80"
@change="LowHighAvailable"
:min="0"
:precision="0"
placeholder="请输入原始重量(KG)"
v-model="form.originalWeight"
v-input-filter
></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="额外增重百分比" prop="extraWeightPercent">
<el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入额外增重百分比"
v-model="form.extraWeightPercent" v-input-filter></el-input-number>
<el-input-number
class="wid80"
@change="LowHighAvailable"
:min="0"
:precision="0"
placeholder="请输入额外增重百分比"
v-model="form.extraWeightPercent"
v-input-filter
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否开启高低价" prop="highLowPriceFlg">
<el-switch class="wid80" @change="LowHighAvailable" v-model="form.highLowPriceFlg" :active-value="1"
:inactive-value="0" active-color="#13ce66">
<el-switch
class="wid80"
@change="LowHighAvailable"
v-model="form.highLowPriceFlg"
:active-value="1"
:inactive-value="0"
active-color="#13ce66"
>
</el-switch>
</el-form-item>
</el-col>
...
...
@@ -205,72 +512,120 @@
<el-row>
<el-col :span="12">
<el-form-item label="今日航班预审状态" prop="isNeedRequired">
<el-select class="wid80" v-model="form.isNeedRequired" placeholder="">
<el-option label="未设置" :value="2">
</el-option>
<el-option label="开启" :value="1">
</el-option>
<el-option label="关闭" :value="0">
</el-option>
<el-select
class="wid80"
v-model="form.isNeedRequired"
placeholder=""
>
<el-option label="未设置" :value="2"> </el-option>
<el-option label="开启" :value="1"> </el-option>
<el-option label="关闭" :value="0"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价百分比" prop="highPriceWeightPercent">
<el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable"
placeholder="开启高低价后可修改" v-model="form.highPriceWeightPercent"></el-input-number>
<el-input-number
class="wid80"
:disabled="ishighPriceWeightPercent"
@change="LowHighAvailable"
placeholder="开启高低价后可修改"
v-model="form.highPriceWeightPercent"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="低价百分比" prop="lowPriceWeightPercent">
<el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算"
v-model="form.lowPriceWeightPercent"></el-input-number>
<el-input-number
class="wid80"
:disabled="true"
placeholder="开启高低价后计算"
v-model="form.lowPriceWeightPercent"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价可配重量" prop="highAvailableWeight">
<el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" v-model="form.highAvailableWeight"
:precision="2"></el-input-number>
<el-input-number
class="wid80"
:disabled="true"
placeholder="开启高低价后计算"
v-model="form.highAvailableWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="低价可配重量" prop="lowAvailableWeight">
<el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" v-model="form.lowAvailableWeight"
:precision="2"></el-input-number>
<el-input-number
class="wid80"
:disabled="true"
placeholder="开启高低价后计算"
v-model="form.lowAvailableWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价已配重量" prop="highAllocatedWeight">
<el-input-number class="wid80" :disabled="true" placeholder="请输入高价已配重量" v-model="form.highAllocatedWeight"
:precision="2"></el-input-number>
<el-input-number
class="wid80"
:disabled="true"
placeholder="请输入高价已配重量"
v-model="form.highAllocatedWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="低价已配重量" prop="lowAllocatedWeight">
<el-input-number class="wid80" :disabled="true" placeholder="请输入低价已配重量" v-model="form.lowAllocatedWeight"
:precision="2"></el-input-number>
<el-input-number
class="wid80"
:disabled="true"
placeholder="请输入低价已配重量"
v-model="form.lowAllocatedWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="已配总重量" prop="alloctedWeight">
<el-input-number class="wid80" :disabled="true" placeholder="请输入已配总重量" v-model="form.alloctedWeight"
:precision="2"></el-input-number>
<el-input-number
class="wid80"
:disabled="true"
placeholder="请输入已配总重量"
v-model="form.alloctedWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
<el-input-number class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" />
<el-input-number
class="wid80"
v-model="form.accountTotalWeight"
disabled
placeholder="配置特殊规则后计算"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight">
<el-input-number class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" />
<el-form-item
label="特殊规则已配重量"
prop="accountAllocatedWeight"
>
<el-input-number
class="wid80"
v-model="form.accountAllocatedWeight"
disabled
placeholder="配置特殊规则后计算"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -280,12 +635,22 @@
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false"
:append-to-body="true" :close-on-press-escape="false">
<el-dialog
title="未删除成功航班"
width="40%"
center
:visible.sync="dialogTableVisible"
:close-on-click-modal="false"
:append-to-body="true"
:close-on-press-escape="false"
>
<el-table :data="gridData">
<el-table-column property="fltNo" label="航班号"></el-table-column>
<el-table-column property="fltDate" label="航班日期"></el-table-column>
<el-table-column property="alloctedWeight" label="已配重量"></el-table-column>
<el-table-column
property="alloctedWeight"
label="已配重量"
></el-table-column>
</el-table>
</el-dialog>
</div>
...
...
@@ -302,11 +667,11 @@ import {
updateStatusBatch,
updateAutoPushBatch,
updateWhiteListSwitchBatch,
updateBlackListSwitchBatch
updateBlackListSwitchBatch
,
} from "@/api/findAllFltData";
import { getpreAudit } from
'@/api/system/preReview.js'
import { queryRouteByFltNo } from
'@/api/destinationFlight.js'
import { getpreAudit } from
"@/api/system/preReview.js";
import { queryRouteByFltNo } from
"@/api/destinationFlight.js";
import { queryRoute } from "@/api/system/dictionary.js";
export default {
name: "FlightInformationMaintenance",
data() {
...
...
@@ -355,14 +720,14 @@ export default {
{
required: true,
message: "原始重量(KG)不能为空",
trigger: ["change","blur"],
trigger: ["change",
"blur"],
},
],
},
//原航班规则数据
findAllFltDatList: [],
//表头
tableHeader: this.tableHeaders[
'FlightInformation'
],
tableHeader: this.tableHeaders[
"FlightInformation"
],
//删除失败数据
gridData: [],
//form属性禁用状态
...
...
@@ -472,6 +837,7 @@ export default {
//shift键状态
shiftKey: false,
routeError: false, // 请选择航线错误显示
routes: [],
};
},
directives: {
...
...
@@ -499,7 +865,7 @@ export default {
},
created() {
//查询条件数据源
this.queryParams.fltDateStart = this.nowDate()
this.queryParams.fltDateStart = this.nowDate()
;
if (this.$store.state.tagsView.cachedViews.length == 0) {
this.findFltConditionData();
this.findAllFltData();
...
...
@@ -514,7 +880,7 @@ export default {
// })
},
activated() {
this.ids = []
this.ids = []
;
this.findFltConditionData();
this.findAllFltData();
},
...
...
@@ -532,22 +898,22 @@ export default {
this.shiftKey = false;
}
});
this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
this.tableHeight =
window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
},
methods: {
//输入航班号后
blurfltNo() {
// this.routeList = []
this.form.accountTotalWeight = 0
this.form.accountAllocatedWeight = 0
this.form.accountTotalWeight = 0
;
this.form.accountAllocatedWeight = 0
;
if (
this.form.fltNo != null &&
this.form.fltNo != undefined &&
this.form.fltNo != ""
) {
this.form.fltNo = this.form.fltNo.toUpperCase();
this.perStatus(this.form.fltNo)
this.perStatus(this.form.fltNo)
;
findFltCommonConf(this.form).then((response) => {
if (response.code == 200) {
//额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
...
...
@@ -603,23 +969,28 @@ export default {
this.msgError(response.msg);
}
});
this.routeLoading = true
this.routeLoading = true
;
//获取航线
queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
this.routeLoading = false
queryRouteByFltNo({ fltNo: this.form.fltNo })
.then((res) => {
this.routeLoading = false;
if (res.code === 200) {
this.routeList = res.data.list
if (res.data.list.length) {
this.routeList = res.data.list;
}
if (res.data.list.length == 0) {
this.form.route = "";
this.routeList = [];
this.msgError("该航班没有设置航线");
}
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
this.routeLoading = false
console.log(err)
})
.catch((err) => {
this.routeLoading = false;
console.log(err);
});
} else {
this.form.route = "";
this.routeList = [];
...
...
@@ -627,18 +998,18 @@ export default {
},
//航班种类修改
kindChange(val) {
this.selectOption.flightKindlist.forEach(
item
=> {
this.selectOption.flightKindlist.forEach(
(item)
=> {
if (item.id == val) {
if (item.chineseName.indexOf(
'White'
) >= 0) {
this.routeMultiple = false
this.form.route =
''
} else if (item.chineseName.indexOf(
'Purple'
) >= 0) {
this.routeMultiple = true
this.form.route = []
if (item.chineseName.indexOf(
"White"
) >= 0) {
this.routeMultiple = false
;
this.form.route =
"";
} else if (item.chineseName.indexOf(
"Purple"
) >= 0) {
this.routeMultiple = true
;
this.form.route = []
;
}
this.routeError = true
this.routeError = true;
}
})
})
;
// this.$refs.routeSelect.$forceUpdate()
},
//查询条件数据源
...
...
@@ -658,15 +1029,24 @@ export default {
},
//获取航班预审状态
perStatus(val) {
getpreAudit({ fltNo: val, page: 1, size: 20 }).then(res => {
getpreAudit({ fltNo: val, page: 1, size: 20 })
.then((res) => {
if (res.code === 200) {
this.preAudit = res.data.list.length == 0 ? '关闭' : res.data.list[0].status == 0 ? '关闭' : res.data.list[0].status == 1 ? '开启' : ''
this.preAudit =
res.data.list.length == 0
? "关闭"
: res.data.list[0].status == 0
? "关闭"
: res.data.list[0].status == 1
? "开启"
: "";
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
console.log(err)
})
.catch((err) => {
console.log(err);
});
},
/** 航班信息维护查询*/
findAllFltData() {
...
...
@@ -699,7 +1079,7 @@ export default {
handleAdd() {
this.reset();
this.findFltConditionData();
this.preAudit = null
this.preAudit = null
;
this.open = true;
this.title = "添加航班信息";
this.form.id = null;
...
...
@@ -721,8 +1101,8 @@ export default {
this.formdisabled.originalWeight = false;
this.routeError = false;
this.$nextTick(() => {
this.$refs.form.clearValidate()
})
this.$refs.form.clearValidate()
;
})
;
},
//计算高低价可配
LowHighAvailable() {
...
...
@@ -742,7 +1122,9 @@ export default {
this.$set(
this.form,
"highAvailableWeight",
(Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) *
(Weight -
this.form.accountTotalWeight -
(this.form.alloctedWeight - this.form.accountAllocatedWeight)) *
(this.form.highPriceWeightPercent / 100)
);
this.$set(
...
...
@@ -778,7 +1160,10 @@ export default {
this.$set(
this.form,
"lowAvailableWeight",
(Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) - this.form.highAvailableWeight
Weight -
this.form.accountTotalWeight -
(this.form.alloctedWeight - this.form.accountAllocatedWeight) -
this.form.highAvailableWeight
);
//this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
} else if (
...
...
@@ -810,7 +1195,9 @@ export default {
Weightall() {
let Weight = 0;
if (this.form.extraWeightPercent > 0) {
Weight = this.form.originalWeight * (this.form.extraWeightPercent / 100) + this.form.originalWeight;
Weight =
this.form.originalWeight * (this.form.extraWeightPercent / 100) +
this.form.originalWeight;
} else {
Weight = this.form.originalWeight;
}
...
...
@@ -818,13 +1205,13 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
if
(row.statusName == "已删除")
{
if
(row.statusName == "已删除")
{
this.msgError("已删除不可操作");
return
return
;
}
this.reset();
this.findFltConditionData();
this.perStatus(row.fltNo)
this.perStatus(row.fltNo)
;
this.open = true;
this.title = "修改航班信息";
//航班号
...
...
@@ -838,7 +1225,7 @@ export default {
findFltById(row).then((response) => {
if (response.code == 200) {
this.form = response.data;
this.form.route = this.form.route.split(
';')
this.form.route = this.form.route.split(
";");
//是否开启高低价
// this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false;
//是否预审
...
...
@@ -847,73 +1234,149 @@ export default {
// this.LowHighAvailable();
//航线
this.selectOption.flightKindlist.forEach(
item
=> {
this.selectOption.flightKindlist.forEach(
(item)
=> {
if (item.id == this.form.kindId) {
if (item.chineseName.indexOf(
'White'
) >= 0) {
this.formdisabled.route = true
} else if (item.chineseName.indexOf(
'Purple'
) >= 0) {
this.formdisabled.route = false
this.routeMultiple = true
if (item.chineseName.indexOf(
"White"
) >= 0) {
this.formdisabled.route = true
;
} else if (item.chineseName.indexOf(
"Purple"
) >= 0) {
this.formdisabled.route = false
;
this.routeMultiple = true
;
//获取航线
queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
this.routeLoading = false
queryRouteByFltNo({ fltNo: this.form.fltNo })
.then((res) => {
this.routeLoading = false;
if (res.code === 200) {
this.routeList = res.data.list
if (res.data.list.length) {
this.routeList = res.data.list;
} else {
this.routeList = [];
}
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
this.routeLoading = false
console.log(err)
})
.catch((err) => {
this.routeLoading = false;
console.log(err);
});
}
}
})
this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true
});
this.ishighPriceWeightPercent =
this.form.highLowPriceFlg === 1 ? false : true;
} else {
this.msgError(response.msg);
}
});
},
//查看航班维度
goFlightAllocConfig(val) {
if(val.statusName == "已删除"){
/*
查看航班维度
不仅分为航班种类又分当前航班航线是不是ET86,
如果航班航种类是Purple Tail,遍历航班航线查询的是不是全都是ET86航线,如果全部是ET86航线,那么不做跳转。
如果是White Tail也就是只差当前的一条航班航线,如果当前航班航线是ET86航线那么就不做跳转;
*/
goFlightAllocConfig(row) {
if (row.statusName == "已删除") {
this.msgError("已删除不可操作");
return
return
;
}
let obj = {
id: ' ',
handle: 'updated',
fltNo: val.fltNo,
fltDate: val.fltDate ? val.fltDate : null,
route: val.route,
routeStatus: 'flightInformationMaintenance' + val.flightKindName,
status: ' ',
createStatus: 1,
let params = {
fltNo: row.fltNo,
page: 1,
size: 20,
};
let routeInfo = {
fltNo: "",
isEtesRoute: false,
fltRoute: "",
};
// 本次判断跳转只是对接口的,并没有对勾选的取
queryRoute(params)
.then((res) => {
const { code, data } = res;
const et86RouteList = [];
if (code == 200) {
if (data.list.length) {
// Purple Tail是不是全部是ET86航线
routeInfo.isEtesRoute = data.list.every(
(item) => item.isEtesRoute == "Y"
);
// 有没有ET86航线
const isEtesRoute = data.list.filter(
(item) => item.isEtesRoute == "Y"
);
// 处理alert提示语展示数据
if (isEtesRoute.length) {
isEtesRoute.map((item) => {
et86RouteList.push(item.route);
});
routeInfo.fltNo = row.fltNo;
routeInfo.fltRoute = et86RouteList;
}
// White Tail 当前航线在航班航线中是否为ET86航线
if (row.flightKindName == "White Tail") {
if (isEtesRoute.length) {
let whiteEt86 = isEtesRoute.filter(
(item) => item.route == row.route
);
routeInfo.isEtesRoute = whiteEt86.length;
}
} else {
routeInfo.isEtesRoute = row.route
.split(";")
.every((item) => et86RouteList.includes(item));
}
} else {
this.msgError("暂无当前航班航线");
}
if (routeInfo.isEtesRoute) {
let msg = routeInfo.fltNo + ": " + routeInfo.fltRoute.join(";");
this.$alert(
`当前${msg}为ET86航线,不可操作该按钮。可在ET86规则界面维护。`,
"提示",
{
confirmButtonText: "关闭",
callback: (action) => {},
}
);
return;
}
this.$router.push({
name: 'FlightAllocConfigInfo',
params: obj
path: "/routeInfo",
query: {
flightDate: row.fltDate,
purposeOfFlightNo: row.fltNo,
flightRouteListStr: row.route,
status: row.status,
flightKindName: row.flightKindName,
pageName: "flightInformationMaintenance",
disable: true,
},
});
}
})
.catch(() => {});
},
// 航班状态
flightState(multipleSelection, statusName) {
let flightState = multipleSelection.some(item => item.statusName == statusName);
let flightState = multipleSelection.some(
(item) => item.statusName == statusName
);
if (flightState) {
this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`);
} else {
flightState = false
flightState = false
;
}
return flightState
return flightState
;
},
/** 删除按钮操作 */
handleDelete(row) {
let fIds = [];
this.ids.forEach(
item
=> {
fIds.push(item.id)
this.ids.forEach(
(item)
=> {
fIds.push(item.id)
;
});
// 航班状态
if (this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
;
this.$confirm("是否确认删除所选数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
...
...
@@ -935,27 +1398,27 @@ export default {
.then(() => {
this.dialogTableVisible = true;
})
.catch(() => {
});
.catch(() => {});
} else {
this.msgSuccess(response.msg);
}
})
.catch(() => {
});
.catch(() => {});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if(this.form.route == undefined)
{
if (this.form.route == undefined)
{
this.routeError = true;
return
return;
}
if(this.form.route.length || this.form.route !== undefined)
{
if (this.form.route.length || this.form.route !== undefined)
{
this.routeError = false;
}
if(this.form.route.length == 0){
if (this.form.route.length == 0) {
this.routeError = true;
return
return;
}
if (valid) {
let formdata = JSON.parse(JSON.stringify(this.form));
...
...
@@ -988,18 +1451,26 @@ export default {
// formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
//总重量更新
// formdata.totalWeight = this.Weightall()
formdata.route = this.form.route.toString().replace(/,/g, ';')
formdata.route = this.form.route.toString().replace(/,/g, ";");
if (
this.form.extraWeightPercent == undefined ||
this.form.extraWeightPercent == null
) {
formdata.extraWeightPercent = 0;
}
//处理数据
saveOrUpdate(formdata).then((response) => {
saveOrUpdate(formdata)
.then((response) => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.routeList = []
this.routeList = [];
this.open = false;
this.findAllFltData();
} else {
this.msgError(response.msg);
}
});
})
.catch(() => {});
}
});
},
...
...
@@ -1010,11 +1481,11 @@ export default {
},
//取消按钮
cancel() {
this.routeError = false
this.routeList = []
this.ishighPriceWeightPercent = true
this.routeMultiple = false
this.routeLoading = false
this.routeError = false
;
this.routeList = []
;
this.ishighPriceWeightPercent = true
;
this.routeMultiple = false
;
this.routeLoading = false
;
this.open = false;
this.findAllFltData();
this.findFltConditionData();
...
...
@@ -1034,23 +1505,28 @@ export default {
//批量开启/关闭航班
handleFlightStatus(status) {
// 航班状态
if (this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
;
let handle = status == "flightStatus80" ? "关闭" : "开启";
let state = this.ids.some((item) => item.statusName == `已${handle}`);
if (state) {
this.msgError(`勾选的航班,航班状态为已${handle},不可操作该按钮`);
return;
}
let data = {
updateIds: [],
};
this.ids.map(
item
=> {
this.ids.map(
(item)
=> {
data.status = status;
if (status ===
'flightStatus80'
) {
if (item.statusName ===
'已开启'
) {
data.updateIds.push(item.id)
if (status ===
"flightStatus80"
) {
if (item.statusName ===
"已开启"
) {
data.updateIds.push(item.id)
;
}
} else {
if (item.statusName ===
'已关闭'
) {
data.updateIds.push(item.id)
if (item.statusName ===
"已关闭"
) {
data.updateIds.push(item.id)
;
}
}
})
})
;
if (data.updateIds.length > 0) {
updateStatusBatch(data).then((response) => {
if (response.code === 200) {
...
...
@@ -1065,7 +1541,7 @@ export default {
//自动推送开关
autoPushBatch(status) {
// 航班状态
if (this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
;
let msg = status == "open" ? "开启" : "关闭";
let data = {
updateIds: [],
...
...
@@ -1093,7 +1569,7 @@ export default {
this.msgError(res.msg);
}
})
.catch(
err
=> {
.catch(
(err)
=> {
this.msgError(err);
});
} else {
...
...
@@ -1104,60 +1580,64 @@ export default {
//白名单配舱开关
whiteListSwitchStatus(val) {
// 航班状态
if (this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
;
let obj = {
updateIds: []
}
obj.status = val
this.ids.forEach(item => {
obj.updateIds.push(item.id)
})
updateWhiteListSwitchBatch(obj).then(res => {
updateIds: [],
};
obj.status = val;
this.ids.forEach((item) => {
obj.updateIds.push(item.id);
});
updateWhiteListSwitchBatch(obj)
.then((res) => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.findAllFltData()
this.msgSuccess(res.msg);
this.findAllFltData();
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
console.log(err)
})
.catch((err) => {
console.log(err);
});
},
//黑名单配舱开关
BlackListSwitchStatus(val) {
// 航班状态
if (this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
;
let obj = {
updateIds: []
}
obj.status = val
this.ids.forEach(item => {
obj.updateIds.push(item.id)
})
updateBlackListSwitchBatch(obj).then(res => {
updateIds: [],
};
obj.status = val;
this.ids.forEach((item) => {
obj.updateIds.push(item.id);
});
updateBlackListSwitchBatch(obj)
.then((res) => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.findAllFltData()
this.msgSuccess(res.msg);
this.findAllFltData();
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
console.log(err)
})
.catch((err) => {
console.log(err);
});
},
//航线修改
routeChange(val) {
if
(this.form.route.length)
{
if
(this.form.route.length)
{
this.routeError = false;
}
else
{
}
else
{
this.routeError = true;
}
this.$forceUpdate()
this.$forceUpdate()
;
},
blurRoute(){
if
(this.form.route.length)
{
blurRoute()
{
if
(this.form.route !== undefined && this.form.route.length)
{
this.routeError = false;
}
else
{
}
else
{
this.routeError = true;
}
},
...
...
@@ -1181,11 +1661,11 @@ export default {
//每页长度
sizeChange(val) {
this.queryParams.limitSize = val;
this.queryParams.pageNum = 1
this.queryParams.pageNum = 1
;
this.findAllFltData();
},
setClose() {
this.tableHeader = this.tableHeaders[
'FlightInformation']
this.tableHeader = this.tableHeaders[
"FlightInformation"];
},
},
computed: {
...
...
@@ -1196,19 +1676,19 @@ export default {
set: function (val) {
this.form.route = this.upCase(val);
},
}
}
}
,
}
,
};
</script>
<style>
.el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
.el-table__body tr.current-row
>
td {
.el-table__body tr.current-row
>
td {
background-color: #a0cfff;
}
.el-table--striped .el-table__body tr.hover-row.el-table__row--striped
>
td,
.el-table__body tr.hover-row
>
td {
.el-table--striped .el-table__body tr.hover-row.el-table__row--striped
>
td,
.el-table__body tr.hover-row
>
td {
background-color: #d9ecff !important;
}
...
...
@@ -1217,7 +1697,7 @@ export default {
color: #ff4949;
text-align: right;
}
.error-route{
.error-route
{
color: #ff4949;
}
</style>
...
...
src/views/basicInformation/queryCargo/dialog.vue
View file @
2782f84
...
...
@@ -17,7 +17,7 @@
</el-row>
</el-form>
<Tables ref="cargoLog" ductName="cargoLog" :order="false" :border='false' :data="data.tableData"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false"
:height="tableHeight"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false"
:page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false"
:loading="loading" @currentChange="currentChange">
</Tables>
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
2782f84
...
...
@@ -132,7 +132,7 @@
<el-form-item>
<template slot="label">
<div style="display:inline-block">配载航线
<el-tooltip class="item" effect="dark" content="选择航线需要先输入配载航班号,才能选择对应
得
航线" placement="top-start">
<el-tooltip class="item" effect="dark" content="选择航线需要先输入配载航班号,才能选择对应
的
航线" placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
</el-tooltip>
</div>
...
...
src/views/et86Config/et86RuleConfig/components/input-number/index.js
0 → 100644
View file @
2782f84
import
YlElInputNumber
from
"./src/input-number"
;
YlElInputNumber
.
install
=
function
(
Vue
)
{
Vue
.
component
(
YlElInputNumber
.
name
,
YlElInputNumber
);
};
// 该组件是基于Element UI InputNumber 计数器
export
default
YlElInputNumber
;
src/views/et86Config/et86RuleConfig/components/input-number/src/input-number.vue
0 → 100644
View file @
2782f84
<template>
<div
@dragstart.prevent
:class="[
'el-input-number',
inputNumberSize ? 'el-input-number--' + inputNumberSize : '',
{ 'is-disabled': inputNumberDisabled },
{ 'is-without-controls': !controls },
{ 'is-controls-right': controlsAtRight }
]">
<span
class="el-input-number__decrease"
role="button"
v-if="controls"
@click="decrease"
:class="{'is-disabled': minDisabled}"
@keydown.enter="decrease">
<i :class="`el-icon-${controlsAtRight ? 'arrow-down' : 'minus'}`"></i>
</span>
<span
class="el-input-number__increase"
role="button"
v-if="controls"
@click="increase"
:class="{'is-disabled': maxDisabled}"
@keydown.enter="increase">
<i :class="`el-icon-${controlsAtRight ? 'arrow-up' : 'plus'}`"></i>
</span>
<el-input
ref="input"
:value="displayValue"
:placeholder="placeholder"
:disabled="inputNumberDisabled"
:size="inputNumberSize"
:max="max"
:min="min"
:name="name"
:label="label"
@keydown.up.native.prevent="increase"
@keydown.down.native.prevent="decrease"
@blur="handleBlur"
@focus="handleFocus"
@input="handleInput"
@change="handleInputChange">
</el-input>
</div>
</template>
<script>
export default {
name: 'YlElInputNumber',
inject: {
elForm: {
default: ''
},
elFormItem: {
default: ''
}
},
props: {
step: {
type: Number,
default: 1
},
stepStrictly: {
type: Boolean,
default: false
},
max: {
type: Number,
default: Infinity
},
min: {
type: Number,
default: -Infinity
},
value: {},
disabled: Boolean,
size: String,
controls: {
type: Boolean,
default: true
},
controlsPosition: {
type: String,
default: ''
},
name: String,
label: String,
placeholder: String,
precision: {
type: Number,
validator(val) {
return val >= 0 && val === parseInt(val, 10);
}
}
},
data() {
return {
currentValue: 0,
userInput: null
};
},
watch: {
value: {
immediate: true,
handler(value) {
let newVal = value === undefined ? value : Number(value);
if (newVal !== undefined) {
if (isNaN(newVal)) {
return;
}
if (this.stepStrictly) {
const stepPrecision = this.getPrecision(this.step);
const precisionFactor = Math.pow(10, stepPrecision);
newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
}
if (this.precision !== undefined) {
newVal = this.toPrecision(newVal, this.precision);
}
}
if (newVal >= this.max) newVal = this.max;
if (newVal <= this.min) newVal = this.min;
this.currentValue = newVal;
this.userInput = null;
this.$emit('input', newVal);
}
}
},
computed: {
minDisabled() {
return this._decrease(this.value, this.step) < this.min;
},
maxDisabled() {
return this._increase(this.value, this.step) > this.max;
},
numPrecision() {
const { value, step, getPrecision, precision } = this;
const stepPrecision = getPrecision(step);
if (precision !== undefined) {
if (stepPrecision > precision) {
console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
}
return precision;
} else {
return Math.max(getPrecision(value), stepPrecision);
}
},
controlsAtRight() {
return this.controls && this.controlsPosition === 'right';
},
_elFormItemSize() {
return (this.elFormItem || {}).elFormItemSize;
},
inputNumberSize() {
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
},
inputNumberDisabled() {
return this.disabled || !!(this.elForm || {}).disabled;
},
displayValue() {
if (this.userInput !== null) {
return this.userInput;
}
let currentValue = this.currentValue;
if (typeof currentValue === 'number') {
if (this.stepStrictly) {
const stepPrecision = this.getPrecision(this.step);
const precisionFactor = Math.pow(10, stepPrecision);
currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
}
if (this.precision !== undefined) {
currentValue = currentValue.toFixed(this.precision);
}
}
return currentValue;
}
},
methods: {
toPrecision(num, precision) {
if (precision === undefined) precision = this.numPrecision;
return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
},
getPrecision(value) {
if (value === undefined) return 0;
const valueString = value.toString();
const dotPosition = valueString.indexOf('.');
let precision = 0;
if (dotPosition !== -1) {
precision = valueString.length - dotPosition - 1;
}
return precision;
},
_increase(val, step) {
if (typeof val !== 'number' && val !== undefined) return this.currentValue;
const precisionFactor = Math.pow(10, this.numPrecision);
return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
},
_decrease(val, step) {
if (typeof val !== 'number' && val !== undefined) return this.currentValue;
const precisionFactor = Math.pow(10, this.numPrecision);
return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
},
increase() {
if (this.inputNumberDisabled || this.maxDisabled) return;
const value = this.value || 0;
const newVal = this._increase(value, this.step);
this.setCurrentValue(newVal);
},
decrease() {
if (this.inputNumberDisabled || this.minDisabled) return;
const value = this.value || 0;
const newVal = this._decrease(value, this.step);
this.setCurrentValue(newVal);
},
handleBlur(event) {
this.$emit('blur', event);
},
handleFocus(event) {
this.$emit('focus', event);
},
setCurrentValue(newVal) {
const oldVal = this.currentValue;
if (typeof newVal === 'number' && this.precision !== undefined) {
newVal = this.toPrecision(newVal, this.precision);
}
if (newVal >= this.max) newVal = this.max;
if (newVal <= this.min) newVal = this.min;
if (oldVal === newVal) return;
this.userInput = null;
this.$emit('input', newVal);
this.$emit('change', newVal, oldVal);
this.currentValue = newVal;
},
handleInput(value) {
this.userInput = value;
},
handleInputChange(value) {
const newVal = value === '' ? undefined : Number(value);
if (!isNaN(newVal) || value === '') {
this.setCurrentValue(newVal);
}
this.userInput = null;
},
select() {
this.$refs.input.select();
}
},
mounted() {
let innerInput = this.$refs.input.$refs.input;
innerInput.setAttribute('role', 'spinbutton');
innerInput.setAttribute('aria-valuemax', this.max);
innerInput.setAttribute('aria-valuemin', this.min);
innerInput.setAttribute('aria-valuenow', this.currentValue);
innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
},
updated() {
if (!this.$refs || !this.$refs.input) return;
const innerInput = this.$refs.input.$refs.input;
innerInput.setAttribute('aria-valuenow', this.currentValue);
}
};
</script>
src/views/preMdeConfig/reportForm/index.vue
View file @
2782f84
...
...
@@ -74,10 +74,11 @@
<script>
import Chart from '@/components/echarts/echarts-series.vue'
import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig";
// import YlEchartsBar from "@/components/YlEcharts/YlEchartsBar"
export default {
components: {
Chart
Chart,
// YlEchartsBar
},
data() {
return {
...
...
src/views/systemConfig/userConfig/drawer.vue
View file @
2782f84
...
...
@@ -71,15 +71,13 @@
</el-col>
<el-col :span="24">
<el-form-item label="所属角色:" prop="roleIds">
<el-checkbox-group v-model="roleid" :disabled="userFormDisabled" @change="change">
<el-row>
<el-col :span="4" v-for="item in roleList" :key="item.id">
<el-checkbox-group v-model="roleid" :disabled="userFormDisabled" @change="change" style="padding-top: 6px;box-sizing: border-box;">
<span v-for="(item,i) in roleList" :key="item.id" style="vertical-align:middle;" :style="{ marginLeft: i !=0 ? '15px' : 0 }">
<el-checkbox :label="item.id">
{{ item.name }}
<Tooltips :content="item.englishName" :refName="item.code"></Tooltips>
</el-checkbox>
</el-col>
</el-row>
</span>
</el-checkbox-group>
</el-form-item>
</el-col>
...
...
@@ -275,6 +273,12 @@ export default {
};
</script>
<style>
<style lang="scss" scoped>
.el-checkbox-group .el-checkbox {
width: auto !important;
margin-left: 15px !important;
}
.el-checkbox:first-child{
margin-left: 0px !important;
}
</style>
...
...
src/views/systemLog/dmLog/index.vue
View file @
2782f84
<template>
<div>
<el-form ref="dmLogForm" class="form-header" :model="selectForm" label-width="auto" size="small"
@submit.native.prevent>
<el-form
ref="dmLogForm"
class="form-header"
:model="selectForm"
label-width="auto"
size="small"
@submit.native.prevent
>
<el-row type="flex" style="flex-wrap: wrap !important">
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input v-model.trim="fltNo" class="formItem" placeholder="请输入航班号" clearable></el-input>
<el-input
v-model.trim="fltNo"
class="formItem"
placeholder="请输入航班号"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="数据接收日期" prop="createTime">
<el-date-picker v-model="selectForm.createTime" class="formItem" type="date" placeholder="选择日期"
:value-format="valueFormat" clearable>
<el-date-picker
v-model="selectForm.createTime"
class="formItem"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
clearable
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input v-model="selectForm.awbNbr" class="formItem" placeholder="请输入运单号" clearable></el-input>
<el-input
v-model="selectForm.awbNbr"
class="formItem"
placeholder="请输入运单号"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="处理状态级别">
<el-select v-model="selectForm.status" class="formItem" placeholder="不限" clearable>
<el-select
v-model="selectForm.status"
class="formItem"
placeholder="不限"
clearable
>
<el-option label="未处理" value="0"></el-option>
<el-option label="处理成功" value="1"></el-option>
<el-option label="无需处理" value="2"></el-option>
...
...
@@ -34,52 +61,85 @@
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker v-model="selectForm.fltDate" class="formItem" type="date" placeholder="选择日期"
:value-format="valueFormat" clearable>
<el-date-picker
v-model="selectForm.fltDate"
class="formItem"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
clearable
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="回推ACCS结果">
<el-select v-model="selectForm.sendLogSendResult" class="formItem" placeholder="不限" clearable>
<el-option label="未推" value="0">
</el-option>
<el-option label="推送成功" value="1">
</el-option>
<el-option label="推送失败" value="2">
</el-option>
<el-select
v-model="selectForm.sendLogSendResult"
class="formItem"
placeholder="不限"
clearable
>
<el-option label="未推" value="0"> </el-option>
<el-option label="推送成功" value="1"> </el-option>
<el-option label="推送失败" value="2"> </el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div class="ml20" style="display: flex">
<el-button type="primary" size="mini" icon="el-icon-search" :loading="loading" @click="selectDMData(0)">查询
<el-button
type="primary"
size="mini"
icon="el-icon-search"
:loading="loading"
@click="selectDMData(0)"
>查询
</el-button>
</div>
</el-form>
<Tables ref="dmLogTables" ductName="logDmData" :order="true" :data="data" :headerData="tableHeader"
tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :page="selectForm.page"
:limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total" :loading="loading"
@currentChange="currentChange">
<Tables
ref="dmLogTables"
ductName="logDmData"
:order="true"
:data="data"
:headerData="tableHeader"
tableAlign="center"
:showOverflowTooltip="false"
:height="tableHeight"
:page="selectForm.page"
:limitSize="selectForm.size"
:pageSizes="[100]"
:totalCount="total"
:loading="loading"
@currentChange="currentChange"
>
<template v-slot:awbNbr="scope">
<el-link type="primary" @click="gotoWeatherTable(scope.row)">
{{
scope.row.awbNbr
}}<i class="el-icon-link"></i> </el-link>
{{ scope.row.awbNbr }}<i class="el-icon-link"></i>
</el-link>
</template>
<template v-slot:flightFltNo="scope">
<el-link v-if="scope.row.allocDimId" type="primary"
@click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute ? scope.row.currentFlightRoute : ' ', status: ' ', createStatus: 1, } })">
{{
scope.row.flightFltNo
}}<i class="el-icon-link"></i> </el-link>
<el-link
v-if="scope.row.allocDimId"
type="primary"
@click="viewRouteConfig(scope.row)"
>
{{ scope.row.flightFltNo }}<i class="el-icon-link"></i>
</el-link>
<span v-else>{{ scope.row.flightFltNo }}</span>
</template>
<template v-slot:remarksDetail="scope">
<span v-if="scope.row.remarksDetail == null || scope.row.remarksDetail == ''">{{ scope.row.remarksDetail
}}</span>
<span
v-if="
scope.row.remarksDetail == null || scope.row.remarksDetail == ''
"
>{{ scope.row.remarksDetail }}</span
>
<div v-else>
<div v-for="item in scope.row.remarksDetail.split('\\r\\n')">{{ item }}</div>
<div v-for="item in scope.row.remarksDetail.split('\\r\\n')">
{{ item }}
</div>
</div>
</template>
</Tables>
...
...
@@ -100,7 +160,7 @@ export default {
size: 100,
},
data: [],
tableHeader: this.tableHeaders[
'DM'
],
tableHeader: this.tableHeaders[
"DM"
],
portList: [],
rules: {
createTime: [
...
...
@@ -138,7 +198,8 @@ export default {
this.data = [];
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
this.tableHeight =
window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
},
methods: {
//数据查询
...
...
@@ -151,32 +212,37 @@ export default {
getDmDataList(this.selectForm).then((res) => {
this.loading = false;
if (res.code === 200) {
this.total = res.data.total
this.total = res.data.total
;
if (res.data.total === 0) {
this.msgWarning(
'未查询到数据')
this.msgWarning(
"未查询到数据");
} else {
this.data = res.data.list;
}
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg)
;
}
});
},
//跳转流水
gotoWeatherTable(val) {
getDmFlowInformation('accsId=' + val.dmAccsId).then(res => {
getDmFlowInformation("accsId=" + val.dmAccsId)
.then((res) => {
if (res.code === 200) {
if (res.data.list.length > 0) {
this.$router.push({ name: 'weatherTable', params: { data: res.data.list, awbNbr: val.awbNbr } })
this.$router.push({
name: "weatherTable",
params: { data: res.data.list, awbNbr: val.awbNbr },
});
} else {
this.msgWarning('未查询到该条数据的流水')
this.msgWarning("未查询到该条数据的流水");
}
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
}).catch(err => {
console.log(err)
})
.catch((err) => {
console.log(err);
});
},
//分页
currentChange(val) {
...
...
@@ -204,6 +270,20 @@ export default {
item.index = index;
});
},
// 当前配载航班号跳转查看航线配置详情
viewRouteConfig(row) {
this.$router.push({
path: "/routeInfo",
query: {
id: row.allocDimId,
purposeOfFlightNo: row.flightFltNo,
flightDate: row.flightFltDate,
flightRouteListStr: row.currentFlightRoute,
pageName: "dmLog",
disable: true,
},
});
},
},
computed: {
fltNo: {
...
...
Please
register
or
login
to post a comment