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
jinhui.wang
2022-09-15 14:13:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
413fa6fe09e9e5909fbe2da92798be398538ba53
413fa6fe
1 parent
1d2bbcf0
ver:1.7,新维度页面增加,增加货站 品名 航班页面,货物查询手动配舱增加航线,首页增加航线。。
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
2534 additions
and
795 deletions
src/api/destinationFlight.js
src/api/goodsStation.js
src/api/goodsStationFlight.js
src/assets/languages/dictLabels.js
src/assets/languages/tableHeaders.js
src/assets/styles/index.scss
src/components/Breadcrumb/index.vue
src/components/Drag/index.vue
src/components/IconSelect/index.vue
src/components/RightToolbar/index.vue
src/layout/components/TagsView/index.vue
src/router/index.js
src/settings.js
src/views/allocationConfig/cargoAllocation/index.vue
src/views/allocationConfig/cargoAllocation/info.vue
src/views/allocationConfig/flightAllocConfig/dialog.vue
src/views/allocationConfig/flightAllocConfig/index.vue
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/basicInformation/queryCargo/dialog.vue
src/views/basicInformation/queryCargo/index.vue
src/views/index.vue
src/views/systemConfig/dictionaryConfig/dialog.vue
src/views/systemConfig/dictionaryConfig/index.vue
src/views/systemConfig/goodsStation/dialog.vue
src/views/systemConfig/goodsStation/index.vue
src/views/systemConfig/goodsStation/upDateResult.vue
src/views/systemConfig/goodsStationFlight/dialog.vue
src/views/systemConfig/goodsStationFlight/index.vue
src/views/systemLog/dmLog/index.vue
src/views/systemLog/dmLog/weatherTable.vue
src/api/destinationFlight.js
View file @
413fa6f
import
request
from
'@/utils/request'
//目的航班规则接口
//查询航班航线
//查询航线
/**
* @param fltNo 航班号
*/
export
function
queryRouteByFltNo
(
data
)
{
return
request
({
url
:
'/dictionary/queryRouteByFltNo'
,
method
:
'post'
,
data
:
data
})
}
// 查询航班列表
export
function
findFlightNo
(
query
)
{
/**
* @param purposeOfFlightNo 航班号
* @param flightDate 航班日期
* @param status 状态
* @param start 开始位置 *
* @param limit 每页长度 *
*/
export
function
findFlightDimRuleByFlightNo
(
query
)
{
return
request
({
url
:
'/destinationFlight/findFlightNo'
,
url
:
'/destinationFlight/findFlight
DimRuleByFlight
No'
,
method
:
'post'
,
data
:
query
})
}
// id查询目的航班
export
function
findByFlightId
(
id
)
{
const
data
=
{
id
}
// 获取航班下航线维度(维度修改)
/**
* @param purposeOfFlightNo 航班号
* @param flightDate 航班日期
* @param flightRoute 航线
*/
export
function
findDestinationFltRuleByFlightNo
(
query
)
{
return
request
({
url
:
'/destinationFlight/find
ByFlightId
'
,
url
:
'/destinationFlight/find
DestinationFltRuleByFlightNo
'
,
method
:
'post'
,
data
:
data
data
:
query
})
}
//航班号查航班
export
function
findDestinationFltRuleByActualFlight
(
actualFlight
){
const
data
=
{
actualFlight
}
//航班优先级修改
export
function
batchUpdateOrAddFlight
(
data
)
{
return
request
({
url
:
'/sourceFlight/findDestinationFltRuleByActual
Flight'
,
method
:
'post'
,
data
:
data
url
:
'/destinationFlight/batchUpdateOrAdd
Flight'
,
method
:
'post'
,
data
:
data
})
}
export
function
updateOrAddFlight
(
form
){
//处理数据
form
.
typeOfGoods
=
form
.
typeOfGoods
.
join
(
';'
);
form
.
declarationCategory
=
form
.
declarationCategory
.
join
(
';'
);
form
.
serviceCode
=
form
.
serviceCode
.
join
(
';'
);
form
.
subCategory
=
form
.
subCategory
.
join
(
';'
);
form
.
handlingCode
=
form
.
handlingCode
.
join
(
';'
);
//新增修改规则设置
export
function
updateOrAddFlight
(
form
)
{
return
request
({
url
:
'/destinationFlight/updateOrAddFlight'
,
url
:
'/destinationFlight/updateOrAddFlight'
,
method
:
'post'
,
data
:
form
data
:
form
})
}
//删除规则
export
function
delFlightId
(
id
){
export
function
delFlightId
(
id
)
{
const
data
=
{
id
}
...
...
@@ -65,7 +74,7 @@ export function delFlightId(id){
}
//启用/停止规则
export
function
enableOrDisable
(
id
,
status
){
export
function
enableOrDisable
(
id
,
status
)
{
//statsu 1-有效 3-停用
const
data
=
{
id
,
...
...
@@ -78,43 +87,59 @@ export function enableOrDisable(id, status){
})
}
//申报类别
export
function
cargoTypeData
(){
//获取全部字典
export
function
allDictData
()
{
return
request
({
url
:
'/destinationFlight/
cargoType
Data'
,
url
:
'/destinationFlight/
allDict
Data'
,
method
:
'post'
})
}
//货物类型
export
function
cargoStatusData
(){
//维度航线优先级查询
/**
* @param fltNo 航班号
* @param routeDate 航班日期
*/
export
function
allRouteQuery
(
data
)
{
return
request
({
url
:
'/destinationFlight/cargoStatusData'
,
method
:
'post'
url
:
'/specifyDateRoute/query'
,
method
:
'post'
,
data
:
data
})
}
//ServiceCode
export
function
serviceCodeData
(){
//维度航线优先级修改
/**
* @param list 航线排序集合
*/
export
function
saveOrUpdateSpecifyDateRoute
(
data
)
{
return
request
({
url
:
'/destinationFlight/serviceCodeData'
,
method
:
'post'
url
:
'/specifyDateRoute/saveOrUpdateSpecifyDateRoute'
,
method
:
'post'
,
data
:
data
})
}
//SubCategory
export
function
subCategoryData
(){
// id查询目的航班
export
function
findByFlightId
(
id
)
{
const
data
=
{
id
}
return
request
({
url
:
'/destinationFlight/subCategoryData'
,
method
:
'post'
url
:
'/destinationFlight/findByFlightId'
,
method
:
'post'
,
data
:
data
})
}
//获取全部字典
export
function
allDictData
(){
return
request
({
url
:
'/destinationFlight/allDictData'
,
method
:
'post'
})
//航班号查航班
export
function
findDestinationFltRuleByActualFlight
(
actualFlight
)
{
// const data = {
// actualFlight
// }
// return request({
// url: '/sourceFlight/findDestinationFltRuleByActualFlight',
// method: 'post',
// data: data
// })
}
\ No newline at end of file
...
...
src/api/goodsStation.js
0 → 100644
View file @
413fa6f
import
request
from
'@/utils/request'
//批量导入
export
function
importGoods
(
file
,
type
)
{
let
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
formData
.
append
(
"type"
,
type
);
return
request
({
url
:
'/goods/importGoods'
,
method
:
'post'
,
data
:
formData
})
}
//批量添加品名货站
/**
* @param goodsStation * 货站名
* @param goodsList * 货品名list
*/
export
function
batchAddGoods
(
data
)
{
return
request
({
url
:
'/goods/batchAddGoods'
,
method
:
'post'
,
data
:
data
})
}
//批量删除品名货站
/**
* @param idList * id集合
*/
export
function
batchDeleteGoods
(
data
)
{
return
request
({
url
:
'/goods/batchDeleteGoods'
,
method
:
'post'
,
data
:
data
})
}
//查询品名
/**
* @param page * 页数
* @param size * 页长
* @param goodsStation 货站名
*/
export
function
searchGoods
(
data
)
{
return
request
({
url
:
'/goods/searchGoods'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
src/api/goodsStationFlight.js
0 → 100644
View file @
413fa6f
import
request
from
'@/utils/request'
//查询货站航班
/**
* @param page * 页数
* @param size * 页长
* @param goodsStation 货站名称
*/
export
function
searchStationFlight
(
data
)
{
return
request
({
url
:
'/stationFlight/searchStationFlight'
,
method
:
'post'
,
data
:
data
})
}
//批量添加货站航班
/**
* @param goodsStation * 货站名称
* @param flightList * 航班号集合
*/
export
function
batchAddStationFlight
(
data
)
{
return
request
({
url
:
'/stationFlight/batchAddStationFlight'
,
method
:
'post'
,
data
:
data
})
}
//批量删除货站航班
/**
* @param id * id集合
*/
export
function
batchDeleteGoods
(
data
)
{
return
request
({
url
:
'/stationFlight/batchDeleteGoods'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
src/assets/languages/dictLabels.js
View file @
413fa6f
...
...
@@ -86,7 +86,7 @@ let ductLabels = {
"2_2"
:
"已处理(数据丢弃)"
,
"2_3"
:
"已处理(数据丢弃)"
,
"2_4"
:
"已处理(数据丢弃)"
,
"3_1"
:
"已处理(异常处理)"
,
//
"3_1": "已处理(异常处理)",
"3_2"
:
"处理失败(系统异常)"
,
"3_3"
:
"处理失败(系统异常)"
,
"3_4"
:
"处理失败(系统异常)"
,
...
...
src/assets/languages/tableHeaders.js
View file @
413fa6f
...
...
@@ -32,7 +32,7 @@ let tableHeaders = {
},
{
columnChineseName
:
"已配体积(m³)"
,
columnName
:
"allocat
ionVolumn
"
,
columnName
:
"allocat
edVolume
"
,
columnWidth
:
""
,
status
:
1
},
...
...
@@ -234,6 +234,13 @@ let tableHeaders = {
status
:
1
},
{
columnChineseName
:
"终配航线"
,
columnName
:
"finalFlightRoute"
,
columnWidth
:
"140"
,
ext1
:
"sorTable"
,
status
:
1
,
},
{
columnChineseName
:
"二配航班号"
,
columnName
:
"twoMatchFlightNo"
,
columnWidth
:
"120"
,
...
...
@@ -248,6 +255,13 @@ let tableHeaders = {
status
:
1
},
{
columnChineseName
:
"二配航线"
,
columnName
:
"twoFlightRoute"
,
columnWidth
:
"140"
,
ext1
:
"sorTable"
,
status
:
1
,
},
{
columnChineseName
:
"预配航班号"
,
columnName
:
"preplanFlightNo"
,
columnWidth
:
"120"
,
...
...
@@ -414,7 +428,7 @@ let tableHeaders = {
},
{
columnChineseName
:
"航线"
,
columnName
:
"
router
"
,
columnName
:
"
flightRoute
"
,
columnWidth
:
"140"
,
status
:
1
},
...
...
@@ -976,6 +990,7 @@ let tableHeaders = {
columnChineseName
:
"航班日期"
,
columnName
:
"ruleDate"
,
columnWidth
:
"150"
,
ext1
:
'slot'
,
status
:
1
},
{
...
...
@@ -1135,7 +1150,7 @@ let tableHeaders = {
},
{
columnChineseName
:
"当前配载航线"
,
columnName
:
"
f
lightRoute"
,
columnName
:
"
currentF
lightRoute"
,
columnWidth
:
"130"
,
status
:
1
},
...
...
@@ -1268,7 +1283,7 @@ let tableHeaders = {
{
columnChineseName
:
"申报类别"
,
columnName
:
"declarationCategory"
,
columnWidth
:
"
10
0"
,
columnWidth
:
"
8
0"
,
status
:
1
},
{
...
...
@@ -1280,13 +1295,13 @@ let tableHeaders = {
{
columnChineseName
:
"增加重量"
,
columnName
:
"increaseWeight"
,
columnWidth
:
"
10
0"
,
columnWidth
:
"
9
0"
,
status
:
1
},
{
columnChineseName
:
"减轻重量"
,
columnName
:
"reduceWeight"
,
columnWidth
:
"
10
0"
,
columnWidth
:
"
9
0"
,
status
:
1
},
{
...
...
@@ -1385,6 +1400,185 @@ let tableHeaders = {
status
:
1
},
],
//货站-品名
"goodsStation"
:
[
{
columnChineseName
:
"口岸"
,
columnName
:
"portName"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"货站名称"
,
columnName
:
"goodsStation"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"品名"
,
columnName
:
"goodsName"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"操作人"
,
columnName
:
"updateUserName"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"操作时间"
,
columnName
:
"updateTime"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"创建日期"
,
columnName
:
"createTime"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
],
//货站-航班
"goodsStationFlight"
:
[
{
columnChineseName
:
"口岸"
,
columnName
:
"portName"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"货站名称"
,
columnName
:
"goodsStation"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"航班号"
,
columnName
:
"fltNo"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"操作人"
,
columnName
:
"updateUserName"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"操作时间"
,
columnName
:
"updateTime"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"创建日期"
,
columnName
:
"createTime"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
],
//特殊配舱规则
"superAllocation"
:
[
{
columnChineseName
:
"ShipperAccount"
,
columnName
:
"shipperAccount"
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"原航班"
,
columnName
:
"accsFlightNo"
,
columnWidth
:
"150"
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"操作人"
,
columnName
:
"updateUserName"
,
columnWidth
:
"100"
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"操作时间"
,
columnName
:
"updateTime"
,
columnWidth
:
"200"
,
ext1
:
""
,
status
:
1
},
],
"newSuperAllocation"
:
[
{
columnChineseName
:
"航班日期"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"航班号"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"航线"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"URSA"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"申报类型"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"服务类型"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"预留仓位"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
{
columnChineseName
:
"已配仓位"
,
columnName
:
""
,
columnWidth
:
""
,
ext1
:
""
,
status
:
1
},
]
}
export
default
tableHeaders
;
\ No newline at end of file
...
...
src/assets/styles/index.scss
View file @
413fa6f
...
...
@@ -294,6 +294,17 @@ body {
max-width
:
300px
;
}
.backgroundCollapse
{
.el-collapse-item__header
{
background-color
:
#d9ecff
!
important
;
border-bottom
:
1px
solid
#ccc
;
}
}
.numberInput
{
width
:
100%
!
important
;
}
.el-select-dropdown__wrap
{
max-height
:
350px
!
important
;
}
\ No newline at end of file
...
...
src/components/Breadcrumb/index.vue
View file @
413fa6f
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title
}}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
</el-breadcrumb-item>
</transition-group>
...
...
@@ -35,9 +36,9 @@ export default {
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
matched = [{ path: '/index', meta: { title: '首页' }
}].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
},
...
...
@@ -46,7 +47,7 @@ export default {
if (!name) {
return false
}
return name.trim() === '
首页
'
return name.trim() === '
Index
'
},
handleLink(item) {
const { redirect, path } = item
...
...
src/components/Drag/index.vue
View file @
413fa6f
...
...
@@ -19,7 +19,7 @@
export default {
name: 'Toolbar',
props: {
data
: {
routes
: {
type: Array,
default: null
},
...
...
@@ -35,12 +35,12 @@ export default {
}
},
created() {
this.list = this.
data
this.list = this.
routes
},
watch: {
data
(val) {
routes
(val) {
if (val) {
this.list =
this.data
this.list =
val
}
}
},
...
...
@@ -81,7 +81,7 @@ export default {
.container {
max-width: 350px;
min-height: 32px;
max-height: 150px;
//
max-height: 150px;
overflow-y: scroll;
display: flex;
flex-direction: column;
...
...
src/components/IconSelect/index.vue
View file @
413fa6f
...
...
@@ -5,7 +5,7 @@
<i slot="suffix" class="el-icon-search el-input__icon" />
</el-input>
<div class="icon-list">
<div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
<div
:class="name == item?'selectIcon':''"
v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
<svg-icon :icon-class="item" style="height: 30px;width: 16px;" />
<span>{{ item }}</span>
</div>
...
...
@@ -31,6 +31,7 @@ export default {
}
},
selectedIcon(name) {
this.name = name
this.$emit('selected', name)
document.body.click()
},
...
...
@@ -65,4 +66,7 @@ export default {
}
}
}
.selectIcon{
border:1px solid #ccc;
}
</style>
...
...
src/components/RightToolbar/index.vue
View file @
413fa6f
<template>
<div class="top-right-btn">
<el-row>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" />
<el-tooltip
class="item"
effect="dark"
:content="showSearch ? '隐藏搜索' : '显示搜索'"
placement="top"
>
<el-button
:size="size"
circle
icon="el-icon-search"
@click="toggleSearch()"
/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
<el-button
:size="size"
circle
icon="el-icon-refresh"
@click="refresh()"
/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
<el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" />
<el-tooltip
class="item"
effect="dark"
content="显隐列"
placement="top"
v-if="columns"
>
<el-button
:size="size"
circle
icon="el-icon-menu"
@click="showColumn()"
/>
</el-tooltip>
</el-row>
<el-dialog :title="title" :visible.sync="open" append-to-body>
...
...
@@ -42,6 +68,10 @@ export default {
columns: {
type: Array,
},
size: {
type: String,
default: "mini",
},
},
created() {
// 显隐列初始默认隐藏列
...
...
src/layout/components/TagsView/index.vue
View file @
413fa6f
...
...
@@ -6,9 +6,7 @@
:style="activeStyle(tag)" @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent.native="openMenu(tag, $event)">
{{ tag.title }}
<span
v-if="tag.name != 'FlightAllocConfigAdd' && tag.name != 'FlightAllocConfigInfo' && tag.name != 'weatherTable' && !isAffix(tag)"
class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
...
...
src/router/index.js
View file @
413fa6f
...
...
@@ -73,19 +73,13 @@ export const constantRoutes = [
hidden
:
true
,
children
:
[
{
path
:
'/info/:handle/:
id
'
,
path
:
'/info/:handle/:
fltNo-:fltDate
'
,
component
:
(
resolve
)
=>
require
([
'@/views/allocationConfig/flightAllocConfig/info'
],
resolve
),
name
:
'FlightAllocConfigInfo'
,
meta
:
{
title
:
'航班配舱'
,
icon
:
'user'
}
},
{
path
:
'/info/:handle'
,
component
:
(
resolve
)
=>
require
([
'@/views/allocationConfig/flightAllocConfig/info'
],
resolve
),
name
:
'FlightAllocConfigAdd'
,
meta
:
{
title
:
'新增配舱'
,
icon
:
'user'
}
},
{
path
:
'/weatherTable'
,
path
:
'/weatherTable/:awbNbr'
,
component
:
(
resolve
)
=>
require
([
'@/views/systemLog/dmLog/weatherTable'
],
resolve
),
name
:
'weatherTable'
,
meta
:
{
title
:
'流水表'
,
icon
:
'user'
}
...
...
src/settings.js
View file @
413fa6f
...
...
@@ -58,5 +58,5 @@ module.exports = {
/**
* 版本号
*/
version
:
'version:1.
6
.0'
version
:
'version:1.
7
.0'
}
...
...
src/views/allocationConfig/cargoAllocation/index.vue
View file @
413fa6f
...
...
@@ -178,12 +178,12 @@
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="mini" v-hasPermi="['allocation:cargo:allocation']" @click="addFit"
:disabled="tableSelection.length <= 0">添加到航班</el-button>
...
...
src/views/allocationConfig/cargoAllocation/info.vue
View file @
413fa6f
...
...
@@ -15,7 +15,7 @@
style="width: 400px; margin: 30px auto" :model="formData" :rules="rules">
<el-form-item label="航班号" prop="fltNo">
<el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10"
style="width: 350px"></el-input>
style="width: 350px"
@change="dateChange"
></el-input>
</el-form-item>
<el-form-item label="航班日期:" prop="fltDate">
<el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期"
...
...
@@ -200,23 +200,32 @@ export default {
},
//日期选择变化
dateChange(val) {
let obj = {
fltNo: this.formData.fltNo,
fltDate: val
}
findFlightRoute(obj).then(res => {
if (res.code === 200) {
res.data[0].route.indexOf(';') <= 0 ?
this.routeList = res.data :
res.data[0].route.split(';').forEach(item => {
this.routeList.push({ id: res.data[0].id, route: item })
})
this.routeList = []
if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') {
if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') {
let obj = {
fltNo: this.formData.fltNo,
fltDate: this.formData.fltDate,
}
findFlightRoute(obj).then(res => {
if (res.code === 200) {
res.data[0].route.indexOf(';') <= 0 ?
this.routeList = res.data :
res.data[0].route.split(';').forEach(item => {
this.routeList.push({ id: res.data[0].id, route: item })
})
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
} else {
this.msgWarning(
res.msg
)
this.msgWarning(
'航班日期不能为空'
)
}
}
).catch(err =>
{
console.log(err
)
}
)
}
else
{
this.msgWarning('航班号不能为空'
)
}
}
},
computed: {
...
...
@@ -233,4 +242,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
...
...
src/views/allocationConfig/flightAllocConfig/dialog.vue
0 → 100644
View file @
413fa6f
<template>
<div>
<el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
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>
<el-form-item label="航班日期:" prop="fltDate">
<span>{{ fltDate }}</span>
</el-form-item>
<el-form-item label="航线优先级" prop="route">
<Drag :routes="routeList" @drag="drag"></Drag>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { allRouteQuery, saveOrUpdateSpecifyDateRoute } from "@/api/destinationFlight";
export default {
name: "",
props: {
open: {
type: Boolean,
default: false
},
fltData: {
type: Object,
default: null
}
},
data() {
return {
fltNo: '',
fltDate: '',
routeList: [],
submitData: [],
loading: false
}
},
watch: {
open(val) {
if (val) {
this.fltNo = this.fltData.fltNo
this.fltDate = this.fltData.fltDate
allRouteQuery({
fltNo: this.fltNo,
routeDate: this.fltDate
}).then(res => {
if (res.code === 200) {
this.routeList = res.data.list
this.submitData = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
}
},
methods: {
submit() {
saveOrUpdateSpecifyDateRoute(this.submitData).then(res => {
if (res.code === 200) {
this.msgSuccess('保存成功')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
close() {
this.$emit('close')
},
drag(val) {
val.forEach((item, index) => {
item.ordinal = index + 1
})
this.submitData = val
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
src/views/allocationConfig/flightAllocConfig/index.vue
View file @
413fa6f
<template>
<div>
<el-form ref="flightAllocForm" :inline="true" :model="queryParams" class="form-header" size="medium"
label-position="right" label-width="auto">
label-position="right" label-width="auto"
@submit.native.prevent
>
<el-form-item label="航班号">
<el-input v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"></el-input>
</el-form-item>
<el-form-item label="航班日期">
<el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="queryParams.status" placeholder="状态">
<el-option label="有效" value="1"></el-option>
...
...
@@ -18,8 +23,8 @@
<el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']"
@click="
$router.push({
name: 'FlightAllocConfig
Add
',
params: { handle: 'add' },
name: 'FlightAllocConfig
Info
',
params: { handle: 'add'
, fltNo: 'new', fltDate: ' ',status:null
},
})
">添加</el-button>
</div>
...
...
@@ -28,47 +33,61 @@
: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>
</template>
<template slot="optionColumn">
<el-table-column label="操作"
prop="id" align="center
">
<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.id, 'detail')">查看
<el-button type="text" size="mini" icon="el-icon-view"
@click="handleClick(scope.row.purposeOfFlightNo, 'detail', scope.row.ruleDate, scope.row.status)">查看
</el-button>
<el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']"
@click="handleClick(scope.row.id, 'update')">修改</el-button>
<el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
@click="handleClick(scope.row.purposeOfFlightNo, 'update', scope.row.ruleDate, scope.row.status)">修改
</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>
<el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']"
@click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button>
<el-button type="text" size="mini" icon="el-icon-video-play" v-hasPermi="['allocation:alloc:openClose']"
@click="changeStatus(scope.row.id, 1)" v-else>启用</el-button>
@click="changeStatus(scope.row.id, 1)" v-else>启用</el-button>
-->
</template>
</el-table-column>
</template>
</Tables>
<Dialog :fltData="colData" :open="open" @close="close"></Dialog>
</div>
</template>
<script>
import {
findFlightNo,
delFlightId,
enableOrDisable,
findFlightDimRuleByFlightNo
} from "@/api/destinationFlight";
import Dialog from './dialog.vue'
export default {
name: "FlightAllocConfig",
components: {
Dialog
},
data() {
return {
queryParams: {
purposeOfFlightNo: "",
purposeOfFlightNo: null,
flightDate: undefined,
status: "1",
start: 0,
limit: 20,
},
flyList: [],
colData: {},
curPage: 1,
total: 0,
tableHeight: null,
open: false,
loading: false,
};
},
...
...
@@ -94,66 +113,36 @@ export default {
this.queryParams.start = 0;
}
this.loading = true;
findFlightNo(this.queryParams).then((response) => {
if (response.code != 200) {
this.msgWarning(response.msg)
return;
findFlightDimRuleByFlightNo(this.queryParams).then(res => {
this.loading = false
if (res.code === 200) {
this.flyList = res.data.list
this.total = res.data.totalCount
} else {
this.msgWarning(res.msg)
}
this.flyList = response.data.list;
this.
total = response.data.totalCount;
this.loading = false;
})
;
}).catch(err => {
this.
loading = false
console.log(err)
})
},
//跳转到查看,修改页面
handleClick(fl
ightiId, handle
) {
handleClick(fl
tNo, handle, fltDate, status
) {
this.$router.push({
name: "FlightAllocConfigInfo",
params: { handle: handle,
id: flightiId
},
params: { handle: handle,
fltNo: fltNo, fltDate: fltDate ? fltDate : null, status: status
},
});
},
//删除规则
del(id, status) {
if (status == "1") {
this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
confirmButtonText: "确定",
showCancelButton: false,
type: "warning",
});
} else {
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton: true,
type: "warning",
}).then(() => {
delFlightId(id)
.then((res) => {
res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg)
this.getList()
})
.catch(() => { });
});
//航班优先级修改
toRouteOrder(val) {
this.colData = {
fltNo: val.purposeOfFlightNo,
fltDate: val.ruleDate
}
this.open = true
},
//启用,停用
changeStatus(id, status) {
let tip = status === 1 ? "启用" : "停用";
this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
enableOrDisable(id, status)
.then((res) => {
if (res.code != 200) {
this.msgError(res.msg);
} else {
this.getList();
this.msgSuccess(tip + "成功");
}
})
.catch(() => { });
});
close() {
this.open = false
},
//翻页
currentChange(val) {
...
...
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
413fa6f
<template>
<div style="margin: 40px" v-loading="loading">
<div v-if="isEmpty">
<el-empty description="找不到这条数据!"></el-empty>
<el-button size="small" @click="close">返回</el-button>
</div>
<template v-else>
<el-form ref="form" :model="form" label-width="200px" size="small" :disabled="disable" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="航班号" prop="purposeOfFlightNo">
<el-input v-model.trim="form.purposeOfFlightNo" maxlength="10" style="width: 60%"
:disabled="nameDisabled"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<el-row :gutter="20">
<el-col :span="6">
<el-radio v-model="isLocation" label="1" size="mini">站点包含</el-radio>
<el-radio v-model="isLocation" label="2" size="mini">站点不包含</el-radio>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="站点包含" v-show="isLocation == 1">
<el-input type="textarea" v-model="form.location" :rows="6" resize="none" style="width: 600px"
placeholder="站点之间用回车符分隔"></el-input>
</el-form-item>
<el-form-item label="站点不包含" v-show="isLocation == 2">
<el-input type="textarea" v-model="form.notLocation" :rows="6" resize="none" style="width: 600px"
placeholder="站点之间用回车符分隔"></el-input>
</el-form-item>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="URSA包含" prop="includeUrsa">
<el-input type="textarea" v-model="form.includeUrsa" :rows="6" resize="none"
placeholder="URSA之间用分号分隔,例:F2;F3;P_"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="URSA不包含" prop="notIncludeUrsa">
<el-input type="textarea" v-model="form.notIncludeUrsa" :rows="6" resize="none"
placeholder="URSA之间用分号分隔,例:F2;F3;P_"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="件数">
<el-col :span="3">
<el-input class="numberInput" v-model.trim="minNumOfPieces"></el-input>
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<el-input class="numberInput" v-model.trim="maxNumOfPieces"></el-input>
</el-col>
</el-form-item>
<el-form-item label="重量">
<el-col :span="3">
<el-input class="numberInput" v-model.trim="minWeight"></el-input>
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<el-input class="numberInput" v-model.trim="maxWeight"></el-input>
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
</el-form-item>
<el-form-item label="申报类别">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.typeOfGoods">
<el-row>
<el-col :span="2" v-for="item in cargoType" :key="item.id">
<el-checkbox v-if="item.status === 1" :label="item.chineseName" :name="item.chineseName">
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="货物类型">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.declarationCategory">
<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" disabled>
</el-checkbox>
<div style="padding:20px;min-height: 300px;">
<el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button>
<!-- 空状态 -->
<div v-if="isEmpty">
<el-empty description="未查询到数据!"></el-empty>
</div>
<el-form v-else ref="infoForm" :model="infoForm" label-position="right" label-width="120px" size="small"
:disabled="disabled" :rules="rules" @submit.native.prevent>
<!-- 表头设置 -->
<el-row class="mb20">
<el-col :span="6">
<el-form-item label="航班号" prop="fltNo">
<el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="Service Code">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.serviceCode">
<el-row>
<el-col :span="2" v-for="item in serviceCode" :key="item.id">
<el-checkbox v-if="item.status === 1 || form.serviceCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="form.serviceCode.includes(item.chineseName) && item.status === 0">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
<el-col :span="6" v-if="infoForm.fltDate != null">
<el-form-item label="航班日期" prop="fltDate">
<el-date-picker class="wid80" v-model="infoForm.fltDate" size="small" type="date"
value-format="yyyy-MM-dd" placeholder="选择航班日期" clearable :disabled="fltNoDisabled">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="Handling Code">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.handlingCode">
<el-row>
<el-col :span="3" v-for="item in handlingCode" :key="item.id">
<el-checkbox v-if="item.status === 1 || form.handlingCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="form.handlingCode.includes(item.chineseName) && item.status === 0">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
<el-col :span="7">
<el-form-item prop="route" label="航线:">
<Drag :routes="routeList" :disabled="true" @drag="drag">
</Drag>
</el-form-item>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="Sub Category">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.subCategory">
<el-row>
<el-col :span="3" v-for="item in subCategory" :key="item.id">
<el-checkbox v-if="item.status === 1 || form.subCategory.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="form.subCategory.includes(item.chineseName) && item.status === 0">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-form>
<div style="marginLeft: 200px">
<el-button type="primary" size="small"
v-if="$route.params.handle != 'detail' && $route.params.handle != 'DMdetail'" @click="submit('form')"
:loading="btnLoading">
<span v-if="$route.params.handle === 'add'">添加</span>
<span v-else>保存</span>
</el-button>
<el-button size="small" @click="close">取消</el-button>
</div>
</template>
</div>
<!-- <el-button v-if="status == 'update' && infoForm.fltDate != null" type="primary" size="small"
@click="setRoutes" :disabled="allSubmitDisabled">航线优先级保存</el-button> -->
</el-row>
<!-- <div class="routeTip">
<span class="el-icon-warning-outline" style="color:#ff4949"></span>
航班优先级只有在设置日期的维度下才可修改,若修改没有日期的维度请到数据字典航线表修改对应航班的优先级
</div> -->
<!-- 航线维度设置 -->
<el-divider content-position="left">航线维度设置</el-divider>
<!-- <div class="routeTip"> -->
<!-- <span class="el-icon-warning-outline" style="color:#ff4949"></span> -->
<!-- 新增航线维度时,不添加维度的航线,等同于没有限制规则,配舱时以航线优先级顺序配舱! -->
<!-- </div> -->
<el-collapse ref="routeCollapse"
v-if="routeSatus != 'flightInformationMaintenanceWhite Tail' && routeSatus != 'dmLog'"
class="backgroundCollapse" :value="infoForm.list.length > 0 ? routeList[0].route : ''"
style="min-height:500px;width:95%;margin:0 auto 50px" accordion v-loading="loading">
<el-collapse-item v-for="(routeItem, index) in routeList" :key="index" :name="routeItem.route">
<template slot="title">
<span class="fontWeight">{{ routeItem.route }}</span>
</template>
<el-card shadow="always" v-for="(val, idx) in infoForm.list" :key="idx"
v-if="val.flightRoute === routeItem.route" style="min-height:350px">
<div>
<el-empty description="未设置规则!" v-if="!val.isLocation">
<el-button type="primary" size="small" @click="newRoute(idx)">新增规则
</el-button>
</el-empty>
<el-row class="rowPadding" v-else>
<el-button type="primary" size="mini" @click="submit(idx)">保 存</el-button>
<el-button type="primary" v-if="val.status === '1'" size="mini"
icon="el-icon-video-pause" @click="changeStatus(idx)">
停 用</el-button>
<el-button type="primary" v-if="val.status === '3'" size="mini"
icon="el-icon-video-pause" @click="changeStatus(idx)">
启 用</el-button>
<el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete"
@click="del(idx)">删 除
</el-button>
<el-divider></el-divider>
<el-col :span="24">
<el-form-item label="站点">
<el-col :span="4">
<el-radio-group v-model="val.isLocation" @change="change">
<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="val.isLocation == '1'" v-model="val.location"
type="textarea" :rows="4" resize="none" style="width: 500px"
placeholder="站点之间用回车符分隔">
</el-input>
<el-input v-else v-model="val.notLocation" type="textarea" :rows="4"
resize="none" style="width: 500px" placeholder="站点之间用回车符分隔">
</el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="URSA包含">
<el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none"
style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="URSA不包含">
<el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4"
resize="none" style="width:500px" placeholder="URSA之间用分号分隔,例: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 class="numberInput" v-model.trim="val.minNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="重量(KG)">
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.minWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</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 v-model="val.typeOfGoods" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.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 v-model="val.declarationCategory" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.cargoStatus" :span="3"
:key="item.id">
<el-checkbox v-if="item.status === 1" :label="item.chineseName"
:name="item.chineseName" disabled :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 v-model="val.puporpuxCode" @change="change">
<el-row>
<el-col :span="2" v-for="item in checkBoxItem.puporpux">
<el-checkbox
v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.puporpuxCode.includes(item.chineseName) && item.status == 0"
: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 v-model="val.serviceCode" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.serviceCode" :span="2"
:key="item.id">
<el-checkbox
v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.serviceCode.includes(item.chineseName) && item.status == 0"
: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 v-model="val.handlingCode" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.handlingCode" :span="2"
:key="item.id">
<el-checkbox
v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.handlingCode.includes(item.chineseName) && item.status == 0"
: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 v-model="val.subCategory" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.subCategory" :span="2"
:key="item.id">
<el-checkbox
v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.subCategory.includes(item.chineseName) && item.status == 0"
: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>
</div>
</el-card>
</el-collapse-item>
</el-collapse>
<el-card v-else shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" style="min-height:350px">
<div>
<el-empty description="未设置规则!" v-if="!val.isLocation">
<el-button type="primary" size="small" @click="newRoute(idx)">新增规则
</el-button>
</el-empty>
<el-row class="rowPadding" v-else>
<el-button type="primary" size="mini" @click="submit(idx)">保 存</el-button>
<el-button type="primary" v-if="val.status === '1'" size="mini" icon="el-icon-video-pause"
@click="changeStatus(idx)">
停 用</el-button>
<el-button type="primary" v-if="val.status === '3'" size="mini" icon="el-icon-video-pause"
@click="changeStatus(idx)">
启 用</el-button>
<el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" @click="del(idx)">删 除
</el-button>
<el-divider></el-divider>
<el-col :span="24">
<el-form-item label="站点">
<el-col :span="4">
<el-radio-group v-model="val.isLocation" @change="change">
<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="val.isLocation == '1'" v-model="val.location" type="textarea"
:rows="4" resize="none" style="width: 500px" placeholder="站点之间用回车符分隔">
</el-input>
<el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none"
style="width: 500px" placeholder="站点之间用回车符分隔">
</el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="URSA包含">
<el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none"
style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="URSA不包含">
<el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" resize="none"
style="width:500px" placeholder="URSA之间用分号分隔,例: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 class="numberInput" v-model.trim="val.minNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-col>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="重量(KG)">
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.minWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</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 v-model="val.typeOfGoods" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.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 v-model="val.declarationCategory" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.cargoStatus" :span="3" :key="item.id">
<el-checkbox v-if="item.status === 1" :label="item.chineseName"
:name="item.chineseName" disabled :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 v-model="val.puporpuxCode" @change="change">
<el-row>
<el-col :span="2" v-for="item in checkBoxItem.puporpux">
<el-checkbox
v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.puporpuxCode.includes(item.chineseName) && item.status == 0"
: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 v-model="val.serviceCode" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.serviceCode" :span="2" :key="item.id">
<el-checkbox
v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.serviceCode.includes(item.chineseName) && item.status == 0"
: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 v-model="val.handlingCode" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.handlingCode" :span="2" :key="item.id">
<el-checkbox
v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.handlingCode.includes(item.chineseName) && item.status == 0"
: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 v-model="val.subCategory" @change="change">
<el-row>
<el-col v-for="item in checkBoxItem.subCategory" :span="2" :key="item.id">
<el-checkbox
v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="val.subCategory.includes(item.chineseName) && item.status == 0"
: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>
</div>
</el-card>
</el-form>
</div>
</template>
<script>
import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
findDestinationFltRuleByFlightNo,
updateOrAddFlight,
allDictData,
delFlightId,
enableOrDisable,
batchUpdateOrAddFlight,
findByFlightId,
queryRouteByFltNo
} from "@/api/destinationFlight";
export default {
name: "",
data() {
return {
form: {
minNumOfPieces: undefined,
maxNumOfPieces: undefined,
minWeight: undefined,
maxWeight: undefined,
typeOfGoods: [],
declarationCategory: [],
serviceCode: [],
subCategory: [],
handlingCode: [],
},
rules: {
purposeOfFlightNo: [
{
required: true,
message: "请输入航班号",
trigger: "blur",
},
],
},
typeOfGoods: [],
declarationCategory: [],
formServiceCode: [],
formHandlingCode: [],
formSubCategory: [],
cargoType: [],
cargoStatus: [],
serviceCode: [],
handlingCode: [],
subCategory: [],
isLocation: "1",
disable: false,
nameDisabled: false,
btnLoading: false,
loading: true,
isEmpty: false,
routeName: "",
dataId: "",
handleName: "",
};
},
created() {
this.routeName = this.$route.name;
this.dataId = this.$route.params.id;
this.handleName = this.$route.params.handle;
this.dictData();
if (this.handleName === "detail" || this.handleName === 'DMdetail') {
this.disable = true;
}
if (this.handleName != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if (
sessionStorage.getItem("flightInfo" + id) &&
this.$route.name == "FlightAllocConfigInfo" &&
this.handleName != "detail" &&
this.handleName != "DMdetail"
) {
this.loading = false;
this.form = JSON.parse(
sessionStorage.getItem("flightInfo" + this.$route.params.id)
);
if (this.form.notLocation != null || this.form.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
name: 'FlightAllocConfigInfo',
data() {
return {
infoForm: {
fltNo: '',
fltDate: null,
route: null,
list: [],
},
routeList: [],
checkBoxItem: {
cargoType: [],
cargoStatus: [],
puporpux: [],
serviceCode: [],
handlingCode: [],
subCategory: []
},
rules: {
"fltNo": [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
},
]
},
status: '',
routeSatus: '',
isEmpty: false,
disabled: false,
allSubmitDisabled: false,
fltNoDisabled: false,
loading: true,
}
} else {
if (isNaN(Number(this.dataId))) {
findDestinationFltRuleByActualFlight(this.dataId).then((response) => {
if (response.code != 200) {
this.msgWarning(response.msg)
this.isEmpty = true;
} else if (response.data == null) {
this.isEmpty = true;
} else {
let info = response.data;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
}
this.loading = false;
}).catch(() => {
this.loading = false;
})
} else {
//货物信息
findByFlightId(this.dataId).then((response) => {
if (response.code != 200) {
this.msgWarning(response.msg)
this.isEmpty = true;
},
created() {
this.dictData()
this.status = this.$route.params.handle
this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false
this.$route.params.routeStatus ? this.routeSatus = this.$route.params.routeStatus : ''
if (this.$route.params.handle != 'add') {
this.fltNoDisabled = true
this.infoForm.fltNo = this.$route.params.fltNo
this.infoForm.fltDate = this.$route.params.fltDate
this.infoForm.route = this.$route.params.route
if (this.routeSatus == 'dmLog') {
this.getIdDimension(this.$route.params.id)
} else {
let info = response.data.list;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
this.getRouteDimension({ fltNo: this.$route.params.fltNo, fltDate: this.$route.params.fltDate, route: this.$route.params.route ? this.$route.params.route : '', status: this.$route.params.status })
}
this.loading = false;
}).catch(() => {
this.loading = false;
})
}
}
} else {
this.loading = false;
}
if (this.$route.name == "FlightAllocConfigAdd") {
if (sessionStorage.getItem("flightAdd")) {
this.form = JSON.parse(sessionStorage.getItem("flightAdd"));
if (this.form.notLocation != null || this.form.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
}
}
},
methods: {
//排序
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];
this.infoForm.fltNo = ''
this.infoForm.fltDate = null
this.infoForm.route = null
}
}
return newArr;
},
submit(form) {
this.$refs[form].validate((valid) => {
if (!valid) {
return false;
}
});
this.btnLoading = true;
if (this.handleName === "update") {
//修改,获取id
this.form.id = this.$route.params.id;
}
//调用接口
this.typeOfGoods = this.form.typeOfGoods;
this.declarationCategory = this.form.declarationCategory;
this.formServiceCode = this.form.serviceCode;
this.formHandlingCode = this.form.handlingCode;
this.formSubCategory = this.form.subCategory;
if (this.form.purposeOfFlightNo) {
this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase();
}
if (this.isLocation == 1) {
this.form.notLocation = "";
} else {
this.form.location = "";
}
if (
this.form.includeUrsa &&
this.form.includeUrsa.length != 0 &&
this.form.notIncludeUrsa &&
this.form.notIncludeUrsa.length != 0
) {
let include = this.form.includeUrsa.split(";");
let notInclude = this.form.notIncludeUrsa.split(";");
let errorList = [];
notInclude.forEach((element) => {
if (element.indexOf("_") > 0) {
errorList.push(element);
} else {
let flag = 0;
for (let i = 0; i < include.length; i++) {
if (
element == "" ||
(include[i].indexOf("_") > 0 &&
include[i].substring(0, 1) == element.substring(0, 1))
) {
flag = 1;
break;
}
mounted() {
this.loading = false
},
watch: {
$route: {
handler(to, from) {
let route = ''
if (from.name == 'FlightInformationMaintenance') {
this.routeSatus = 'flightInformationMaintenance'
route = this.infoForm.list[0].flightRoute
} else if (from.name == 'DmLog') {
this.routeSatus = 'dmLog'
route = this.infoForm.list[0].flightRoute
this.getIdDimension(this.infoForm.list[0].id)
} else {
this.routeSatus = null
}
if (to.name == 'FlightAllocConfigInfo' && from.name != 'DmLog') {
this.getRouteDimension({ fltNo: this.infoForm.fltNo, fltDate: this.infoForm.fltDate, route: route ? route : '', status: this.$route.params.status })
}
if (this.$route.params.handle == 'add') {
this.getRoutes(this.infoForm.fltNo)
}
},
deep: true
},
},
methods: {
//页面选项
dictData() {
allDictData().then((res) => {
if (res.code != 200) {
this.msgError(res.msg)
return;
}
this.checkBoxItem.cargoType = res.data.cargoType;
this.checkBoxItem.cargoStatus = res.data.cargoStatus;
this.checkBoxItem.puporpux = res.data.puporpux;
this.checkBoxItem.serviceCode = this.dicSort(res.data.serviceCode.sort((a, b) =>
a.chineseName.localeCompare(b.chineseName)
));
this.checkBoxItem.handlingCode = this.dicSort(this.sorttodo(res.data.handlingCode, "BLANK"));
this.checkBoxItem.subCategory = this.dicSort(this.sorttodo(res.data.subCategory, "Blank"));
});
},
//id查询维度信息
getIdDimension(val) {
this.routeList = []
this.infoForm.list = []
findByFlightId(val).then(res => {
if (res.code === 200) {
if (res.data.list) {
this.routeList.push(
{
fltNo: res.data.list.purposeOfFlightNo,
route: res.data.list.flightRoute,
routePriority: '1'
}
)
this.infoForm.fltNo = res.data.list.purposeOfFlightNo
this.infoForm.fltDate = res.data.list.ruleDate
this.infoForm.route = res.data.list.flightRoute
this.infoForm.list.push(this.dataHandle(res.data.list))
} else {
this.isEmpty = true
}
} else {
this.msgWarning("为查询到数据!")
this.isEmpty = true
}
}).catch(err => {
console.log(err)
this.isEmpty = true
})
},
//获取航班航线维度
getRouteDimension(val) {
this.routeList = []
this.infoForm.list = []
let obj = {
purposeOfFlightNo: val.fltNo,
flightDate: val.fltDate,
flightRoute: val.route,
status: val.status ? val.status : ''
}
if (flag == 0) {
errorList.push(element);
if (this.$route.params.handle != 'add') {
findDestinationFltRuleByFlightNo(obj).then(res => {
if (res.code === 200) {
this.routeList = res.data.routeList
if (res.data.list.length > 0) {
//请求到数据
if (this.infoForm.route != null && this.infoForm.route != null) {
//航线不为空,对应到这条航线下的这条维度(直接处理插入数据)
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//如果是从航班维护界面跳转且航班类型为White Tail则直接显示当前航线维度
res.data.list.forEach(item => {
this.infoForm.list.push(this.dataHandle(item))
})
} else {
//航班类型为Purple Tail则显示所有航线维度
this.routeList.forEach(route => {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
//航线对应插入数据
routeStatus = 2
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routeStatus == 1) {
//否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
} else {
//航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
this.routeList.forEach(route => {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
//航线对应插入数据
routeStatus = 2
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routeStatus == 1) {
//否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
} else {
//未请求到数据
if (this.infoForm.route != null && this.infoForm.route != '') {
//航线不为空,获取该航线下无日期通用维度设置
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
status: this.$route.params.status
}).then(response => {
if (response.data.list.length > 0) {
//查询到通用维度,去除id status,航线赋值,航线优先级赋值
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//航班类型White Tail只展示当前航线维度
response.data.list.forEach(item => {
item.id = undefined
item.status = undefined
item.flightRoute = this.infoForm.route
this.routeList.forEach(route => {
if (route.route === this.infoForm.route) {
item.routePriority = route.routePriority
}
})
this.infoForm.list.push(this.dataHandle(item))
})
} else {
//航班类型Purple Tail展示全部航线维度
let routesStatus = 1
this.routeList.forEach(route => {
response.data.list.forEach(item => {
if (route.route === item.flightRoute) {
routesStatus = 2
item.id = undefined
item.status = undefined
item.flightRoute = this.infoForm.route
item.routePriority = route.routePriority
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routesStatus == 1) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
} else {
//未查询到,插入占位基础数据使用户新建
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//航班类型White Tail只展示当前航线维度
this.routeList.forEach((item) => {
if (item.route === this.infoForm.route) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: this.infoForm.route,
routePriority: item.routePriority,
})
}
})
} else {
//航班类型Purple Tail展示全部航线维度
this.isEmpty = true
// this.routeList.forEach((route) => {
// this.infoForm.list.push({
// purposeOfFlightNo: this.infoForm.fltNo,
// ruleDate: this.infoForm.fltDate,
// flightRoute: route.route,
// routePriority: route.routePriority,
// })
// })
}
}
}).catch(err => {
this.isEmpty = true
console.log(err)
})
} else {
//航线为空,提示未找到维度数据
if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
status: this.$route.params.status
}).then(response => {
if (response.data.list.length > 0) {
this.routeList.forEach(route => {
let routeStatus = 1
response.data.list.forEach(item => {
if (item.flightRoute == route.route) {
routeStatus = 2
item.id = undefined
item.status = undefined
item.routePriority = route.routePriority
this.infoForm.list.push(
this.dataHandle(item)
)
}
})
if (routeStatus == 1) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
} else {
this.isEmpty = true
}
}).catch(err => {
this.isEmpty = true
console.log(err)
})
}
}
}
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
}
});
if (errorList.length != 0) {
this.msgWarning("URSA不包含中[" + errorList + "]错误,URSA不包含必须属于URSA包含中的类型")
this.btnLoading = false;
return;
}
}
let service = []
this.serviceCode.forEach(item => {
if (item.status === 1 && this.form.serviceCode.includes(item.chineseName)) {
service.push(item.chineseName)
}
})
this.form.serviceCode = service
let hand = []
this.handlingCode.forEach(item => {
if (item.status === 1 && this.form.handlingCode.includes(item.chineseName)) {
hand.push(item.chineseName)
}
})
this.form.handlingCode = hand
let sub = []
this.subCategory.forEach(item => {
if (item.status === 1 && this.form.subCategory.includes(item.chineseName)) {
sub.push(item.chineseName)
}
})
},
//新增获取航线
getRoutes(val) {
this.routeList = []
this.infoForm.list = []
if (this.status == 'add') {
if (val != '' || val != null) {
this.infoForm.fltNo = this.upCase(val)
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 => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: item.route,
routePriority: item.ordinal
})
})
} else {
this.routeList = []
this.infoForm.list = []
}
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
}
},
//保存
submit(val) {
this.loading = true
let routeArr = []
let data = this.setDataHandle(this.infoForm.list[val])
this.routeList.forEach((item, idx) => {
routeArr.push(item.route)
})
data.routeSpecifyDateSeq = routeArr.join(';')
data.ruleDate = this.infoForm.fltDate
this.infoForm.list[val].routePriority = this.routeList[val].routePriority
if (this.infoForm.route != null && this.infoForm.route != '') {
this.routeList.forEach(item => {
if (item.route == this.infoForm.route) {
data.routePriority = item.routePriority
}
})
data.flightRoute = this.infoForm.route
} else {
data.flightRoute = this.routeList[val].route
data.routePriority = this.routeList[val].routePriority
}
updateOrAddFlight(data).then(res => {
this.loading = false
if (res.code === 200) {
this.fltNoDisabled = true
this.msgSuccess('保存成功!')
this.infoForm.list[val] = this.dataHandle(res.data)
this.$forceUpdate()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//删除
del(val) {
if (this.infoForm.list[val].id) {
if (this.infoForm.list[val].status == "1") {
this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
confirmButtonText: "确定",
showCancelButton: false,
type: "warning",
});
} else {
this.loading = true
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton: true,
type: "warning",
}).then(() => {
delFlightId(this.infoForm.list[val].id)
.then((res) => {
this.loading = false
res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg)
let obj = {
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: this.infoForm.list[val].flightRoute,
routePriority: this.infoForm.list[val].routePriority,
}
this.infoForm.list[val] = obj
this.$forceUpdate()
}).catch(() => {
this.loading = false
});
});
}
} else {
this.infoForm.list[val] = {
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: this.routeList[val].route,
routePriority: this.routeList[val].routePriority,
}
}
},
//新增
newRoute(val) {
this.infoForm.list[val].purposeOfFlightNo = this.infoForm.fltNo
this.infoForm.list[val].ruleDate = this.infoForm.fltDate
this.infoForm.list[val].flightRoute = this.routeList[val].route
this.infoForm.list[val].routePriority = this.routeList[val].routePriority
this.infoForm.list[val].isLocation = '1'
this.infoForm.list[val].typeOfGoods = []
this.infoForm.list[val].declarationCategory = []
this.infoForm.list[val].puporpuxCode = []
this.infoForm.list[val].serviceCode = []
this.infoForm.list[val].handlingCode = []
this.infoForm.list[val].subCategory = []
console.log(this.infoForm)
this.$forceUpdate()
},
//启用,停用
changeStatus(idx) {
this.loading = true
let status = this.infoForm.list[idx].status
let tip = status === '1' ? "停用" : "启用";
this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
status == '1' ? status = '3' : status = '1'
enableOrDisable(this.infoForm.list[idx].id, status)
.then((res) => {
this.loading = false
if (res.code != 200) {
this.msgError(res.msg);
} else {
this.msgSuccess(tip + "成功");
this.infoForm.list[idx] = this.dataHandle(res.data)
this.$forceUpdate()
}
})
.catch(() => {
this.loading = false
});
}).catch(() => {
this.loading = false
})
},
//保存航班优先级
setRoutes() {
this.loading = true
let routeArr = []
let arr = []
let infoForm = this.infoForm.list
this.routeList.forEach((item, idx) => {
routeArr.push(item.route)
this.infoForm.list[idx].routePriority = item.routePriority
})
infoForm.forEach((val, index) => {
val.routeSpecifyDateSeq = routeArr.join(';')
val.routePriority = this.routeList[index].routePriority
this.setDataHandle(val) ? arr.push(this.setDataHandle(val)) : ''
})
this.$confirm("是否要保存,如果保存下方的维度会一同进行保存!", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
batchUpdateOrAddFlight(arr).then(res => {
this.loading = false
if (res.code === 200) {
res.data.forEach((item, idx) => {
this.infoForm.list[idx] = this.dataHandle(item)
})
this.$forceUpdate()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}).catch(() => {
this.infoForm.list.map((item, idx) => {
if (item.isLocation) {
this.infoForm.list[idx] = this.dataHandle(item)
}
})
this.$forceUpdate()
this.loading = false
})
},
//航线优先级修改
drag(val) {
this.routeList = val
// this.routeList.map((item, index) => {
// item.routePriority = val[index].routePriority
// })
},
//刷新控件
change(e) {
this.$forceUpdate()
},
//数据处理
dataHandle(val) {
val.isLocation = '1'
val.location ? val.isLocation = '1' : ''
val.notLocation ? val.isLocation = '2' : ''
val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数
val.maxWeight == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大重量
val.minNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最小件数
val.minWeight == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最小件数
val.typeOfGoods != null ? val.typeOfGoods = val.typeOfGoods.split(';') : val.typeOfGoods = []//申报类型
val.declarationCategory != null ? val.declarationCategory = val.declarationCategory.split(';') : val.declarationCategory = []//货物类型
val.puporpuxCode != null ? val.puporpuxCode = val.puporpuxCode.split(';') : val.puporpuxCode = []//取件扫描码
val.serviceCode != null ? val.serviceCode = val.serviceCode.split(';') : val.serviceCode = []//serviceCode
val.handlingCode != null ? val.handlingCode = val.handlingCode.split(';') : val.handlingCode = []//handlingCode
val.subCategory != null ? val.subCategory = val.subCategory.split(';') : val.subCategory = []//subCategory
return val
},
//提交数据处理
setDataHandle(val) {
let obj = {}
if (val.isLocation) {
obj = val
obj.isLocation == '1' ? obj.notLocation = '' : obj.location = ''
if (this.form.includeUrsa && this.form.includeUrsa
.length != 0) {
this.form.includeUrsa = this.upCase(this.form.includeUrsa
)
}
if (obj.notLocation && obj.notLocation
.length != 0) {
obj.notLocation = obj.notLocation.toUpperCase(
)
}
if (this.form.notIncludeUrsa && this.form.notIncludeUrsa
.length != 0) {
this.form.notIncludeUrsa = this.upCase(this.form.notIncludeUrsa
)
}
if (obj.location && obj.location
.length != 0) {
obj.location = obj.location.toUpperCase(
)
}
this.form.subCategory = sub
updateOrAddFlight(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess('成功')
this.close();
} else {
this.msgWarning(response.msg)
this.btnLoading = false;
}
});
this.form.typeOfGoods = this.typeOfGoods;
this.form.declarationCategory = this.declarationCategory;
this.form.serviceCode = this.formServiceCode;
this.form.handlingCode = this.formHandlingCode;
this.form.subCategory = this.formSubCategory;
},
if (obj.includeUrsa && obj.includeUrsa.length != 0) {
obj.includeUrsa = obj.includeUrsa.toUpperCase()
}
close() {
this.removes();
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
);
if (this.handleName === 'DMdetail') {
this.$router.push({ name: "DmLog" })
} else {
this.$router.push({ name: "FlightAllocConfig" })
}
},
if (obj.notIncludeUrsa && obj.notIncludeUrsa.length != 0) {
obj.notIncludeUrsa = obj.notIncludeUrsa.toUpperCase()
}
removes() {
if (this.routeName == "FlightAllocConfigAdd") {
sessionStorage.setItem("flightAdd", "remove");
} else {
sessionStorage.setItem("flightInfo" + this.dataId, "remove");
}
},
let puporpux = []
this.checkBoxItem.puporpux.forEach(item => {
if (item.status === 1 && obj.puporpuxCode.includes(item.chineseName)) {
puporpux.push(item.chineseName)
}
})
dictData() {
allDictData().then((response) => {
if (response.code != 200) {
this.msgError(response.msg)
return;
}
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = this.dicSort(dict.serviceCode.sort((a, b) =>
a.chineseName.localeCompare(b.chineseName)
));
this.handlingCode = this.dicSort(this.sorttodo(dict.handlingCode, "BLANK"));
this.subCategory = this.dicSort(this.sorttodo(dict.subCategory, "Blank"));
});
},
let service = []
this.checkBoxItem.serviceCode.forEach(item => {
if (item.status === 1 && obj.serviceCode.includes(item.chineseName)) {
service.push(item.chineseName)
}
})
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
}
},
let hand = []
this.checkBoxItem.handlingCode.forEach(item => {
if (item.status === 1 && obj.handlingCode.includes(item.chineseName)) {
hand.push(item.chineseName)
}
})
beforeDestroy() {
if (this.routeName == "FlightAllocConfigAdd") {
if (sessionStorage.getItem("flightAdd") == "remove") {
sessionStorage.removeItem("flightAdd");
} else {
sessionStorage.setItem("flightAdd", JSON.stringify(this.form));
}
} else {
if (sessionStorage.getItem("flightInfo" + this.dataId) == "remove") {
sessionStorage.removeItem("flightInfo" + this.dataId);
} else {
if (this.handleName != "detail" && this.handleName != "DMdetail") {
sessionStorage.setItem(
"flightInfo" + this.dataId,
JSON.stringify(this.form)
);
}
}
}
},
let sub = []
this.checkBoxItem.subCategory.forEach(item => {
if (item.status === 1 && obj.subCategory.includes(item.chineseName)) {
sub.push(item.chineseName)
}
})
obj.typeOfGoods = obj.typeOfGoods.toString().replace(/,/g, ';')
obj.declarationCategory = obj.declarationCategory.toString(';').replace(/,/g, ';')
obj.puporpuxCode = puporpux.toString().replace(/,/g, ';')
obj.serviceCode = service.toString().replace(/,/g, ';')
obj.handlingCode = hand.toString().replace(/,/g, ';')
obj.subCategory = sub.toString().replace(/,/g, ';')
computed: {
includeUrsa: {
get: function () {
return this.form.includeUrsa;
},
set: function (val) {
this.form.includeUrsa = this.upCase(val);
},
},
notIncludeUrsa: {
get: function () {
return this.form.notIncludeUrsa;
},
set: function (val) {
this.form.notIncludeUrsa = this.upCase(val);
},
},
minNumOfPieces: {
get: function () {
return this.form.minNumOfPieces;
},
set: function (val) {
const reg = /^[1-9]{0,}$/
if (reg.test(val)) {
this.form.minNumOfPieces = val
}
if (val == 0 || val == null || val == "-") {
this.form.minNumOfPieces = undefined;
}
},
},
maxNumOfPieces: {
get: function () {
return this.form.maxNumOfPieces;
},
set: function (val) {
const reg = /^[1-9]{0,}$/
if (reg.test(val)) {
this.form.maxNumOfPieces = val
}
if (val == 0 || val == null || val == "-") {
this.form.maxNumOfPieces = undefined;
}
},
},
minWeight: {
get: function () {
return this.form.minWeight;
},
set: function (val) {
const reg = /^\d{1,1}\d*\.{0,1}\d{0,}$/
console.log(reg.test(val))
if (val == null || val == "-") {
this.form.minWeight = undefined;
} else if (!isNaN(val)) {
this.form.minWeight = val;
}
},
},
maxWeight: {
get: function () {
return this.form.maxWeight;
},
set: function (val) {
if (val == null || val == "-") {
this.form.maxWeight = undefined;
} else if (!isNaN(val)) {
this.form.maxWeight = val;
}
},
return obj
}
},
//排序
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
},
//返回
close() {
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
);
this.$router.push({ name: 'FlightAllocConfig' })
},
},
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.el-textarea.is-disabled .el-textarea__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-input.is-disabled .el-input__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: rgba(255, 255, 255, 0.5);
computed: {}
}
</script>
.el-checkbox__input.is-disabled+span.el-checkbox__label {
color: #303133;
<style lang="scss" scoped>
.fontWeight {
font-size: 16px;
font-weight: 700;
text-indent: 2em;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #303133;
.rowPadding {
padding: 10px 50px;
font-size: 12px;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border-color: #606266;
.routeTip {
margin-left: 35px;
margin-bottom: 20px;
font-size: 16px;
color: #ff4949;
}
.numberInput {
input {
text-align: center;
}
input {
text-align: center;
}
}
</style>
</style>
\ No newline at end of file
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
413fa6f
...
...
@@ -768,8 +768,10 @@ export default {
let obj = {
handle: 'update',
fltNo: val.fltNo,
fltDate: val.fltDate,
status: 'flightInformationMaintenance'
fltDate: val.fltDate ? val.fltDate : null,
route: val.flightKindName != 'Purple Tail' ? val.route : '',
routeStatus: 'flightInformationMaintenance' + val.flightKindName,
status: '1'
}
this.$router.push({
name: 'FlightAllocConfigInfo',
...
...
src/views/basicInformation/queryCargo/dialog.vue
View file @
413fa6f
...
...
@@ -16,10 +16,10 @@
</el-col>
</el-row>
</el-form>
<Tables ref="cargoLog" ductName="cargoLog" :order="false" :
data="data.tableData" :headerData="tableHeader
"
tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page
"
:
limitSize="selectData.size" :pageSizes="[100]" :pagination="false" :loading="loading
"
@currentChange="currentChange">
<Tables ref="cargoLog" ductName="cargoLog" :order="false" :
border='false' :data="data.tableData
"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false" :height="tableHeight
"
:
page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false
"
:loading="loading"
@currentChange="currentChange">
</Tables>
<div slot="footer" class="dialog-footer">
<el-button @click="close">关 闭</el-button>
...
...
@@ -93,4 +93,5 @@ export default {
</script>
<style scoped>
</style>
\ No newline at end of file
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
413fa6f
...
...
@@ -49,7 +49,7 @@
<el-col :span="6">
<el-form-item label="配载航班号">
<el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="4"
clearable></el-input>
clearable
@change="planeNoChange"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
...
...
@@ -129,6 +129,24 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<template slot="label">
<div style="display:inline-block">配载航线
<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>
</template>
<el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限"
:disabled="routeList.length == 0" clearable @change="routeSelectChange"
:key="formData.cargoPlaneRoute">
<el-option v-for="(item, index) in routeList" :label="item" :value="item" :key="item">
<Tooltips :content="item" :refName="item"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
...
...
@@ -137,11 +155,11 @@
</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(0)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(1)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']"
@click="release">释放舱位</el-button>
...
...
@@ -170,7 +188,7 @@
<template v-slot:waybillNo="scope">
<el-link type="primary" @click="logView(scope.row)">
{{
scope.row.waybillNo
scope.row.waybillNo
}}<i class="el-icon-link"></i> </el-link>
</template>
</Tables>
...
...
@@ -192,7 +210,7 @@
</template>
<script>
import { findConditionData, findCargoData, releaseCargo } from "@/api/cargoSelect";
import { findConditionData, findCargoData, releaseCargo
, getFlightsRoutes
} from "@/api/cargoSelect";
import { downLoadXlsx } from "@/utils/zipdownload";
import Dialog from "./dialog.vue";
...
...
@@ -229,6 +247,7 @@ export default {
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
cargoPlaneRoute: null,
limitStart: 1,
limitSize: 100,
}, //表单数据
...
...
@@ -286,8 +305,9 @@ export default {
findConditionData: {}, //货物查询条件
tableData: [], //表格数据
cargoLog: {},
allWeight: 0,
allQty: 0,
routeList: [],
allWeight: 0,//总重量
allQty: 0,//总件数
shiftKey: false,
valueFormat: "yyyy-MM-dd",
tableLoading: false,
...
...
@@ -358,6 +378,8 @@ export default {
this.formData.cargoPlaneStart = this.$route.params.fltDate
this.formData.cargoPlaneEnd = this.$route.params.fltDate
this.formData.cargoPlaneNo = this.$route.params.fltNo
this.formData.cargoPlaneRoute = this.$route.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
} else {
//否则请求原页面缓存状态
...
...
@@ -426,6 +448,8 @@ export default {
this.formData.cargoPlaneStart = from.params.fltDate
this.formData.cargoPlaneEnd = from.params.fltDate
this.formData.cargoPlaneNo = from.params.fltNo
this.formData.cargoPlaneRoute = from.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
}
}
...
...
@@ -462,20 +486,22 @@ export default {
}
findCargoData(this.formData)
.then((res) => {
if (res.code == 200) {
this.tableData = res.data.list;
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].index = i;
setTimeout(() => {
if (res.code == 200) {
this.tableData = res.data.list;
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].index = i;
}
} else {
this.msgWarning('未查询到数据')
}
} else {
this.msgWarning(
'未查询到数据'
)
this.msgWarning(
res.msg
)
}
} else {
this.msgWarning(res.msg)
}
this.tableLoading = false;
this.tableLoading = false;
})
})
.catch(() => {
this.tableLoading = false;
...
...
@@ -604,6 +630,22 @@ export default {
this.page = val.page;
this.select();
},
//配载航班号获取航线
planeNoChange(val) {
getFlightsRoutes(val.split(';')).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
routeSelectChange(val) {
this.$forceUpdate()
// this.formData.cargoPlaneRoute = val
},
//排序
sortChange(val) {
let data = [];
...
...
src/views/index.vue
View file @
413fa6f
...
...
@@ -42,8 +42,8 @@
</el-form-item>
</el-form>
<el-row class="card2">
<el-col :span="1" v-for="item in
tableData
">
<div class="fltBox" @click="rowClick(
item
)"
<el-col :span="1" v-for="item in
fltBox
">
<div class="fltBox" @click="rowClick(
{ fltNo: item.fltNo, fltDate: item.fltDate, route: '' }
)"
:style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
<div class="fltName">{{ item.fltNo }}</div>
<div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }}
...
...
@@ -88,6 +88,7 @@ export default {
page: 1,
size: 1
},//查询条件
fltBox: [],
tableData: [],//table数据
tableHeader: this.tableHeaders['index'],//表头
fltKindIdList: [],//航班类型
...
...
@@ -126,10 +127,12 @@ export default {
},
//获取首页信息(日期查询)
async getFlight() {
this.fltBox = []
this.loading = true
getOneDayFlight(this.selectData).then(res => {
this.loading = false
if (res.code === 200) {
this.getfltBox(JSON.parse(JSON.stringify(res.data.list)))
this.tableData = res.data.list
this.percentage = res.data.percentage
this.totalWeight = res.data.totalWeight
...
...
@@ -142,11 +145,30 @@ export default {
console.log(err)
})
},
getfltBox(val) {
val.forEach(flt => {
let status = 1
this.fltBox.forEach(item => {
if (item.fltNo == flt.fltNo) {
item.percentage = flt.percentage + item.percentage
status = 2
}
})
if (status == 1) {
this.fltBox.push(flt)
}
})
},
//某行被点击
rowClick(val) {
let obj = {}
obj.fltNo = val.fltNo
obj.fltDate = val.fltDate
if (val.flightKindName == 'Purple Tail') {
obj.route = ''
} else {
obj.route = val.route
}
this.$router.push({ name: 'QueryCargo', params: obj })
},
//翻页
...
...
src/views/systemConfig/dictionaryConfig/dialog.vue
View file @
413fa6f
...
...
@@ -39,7 +39,7 @@
<el-input type="text" v-model="newDictionary.fltNo" disabled></el-input>
</el-form-item>
<el-form-item label="航线">
<Drag :
data
="routeList" @drag="drag"></Drag>
<Drag :
routes
="routeList" @drag="drag"></Drag>
</el-form-item>
</div>
</div>
...
...
src/views/systemConfig/dictionaryConfig/index.vue
View file @
413fa6f
...
...
@@ -4,8 +4,8 @@
<!-- cardHeader -->
<div slot="header" class="clearfix">
<span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
}}</span>
<div style="float: right; padding: 3px 0">
<span class="selectLabel mr10">切换字典表</span>
...
...
@@ -96,7 +96,7 @@
<template v-slot:fltNo="scope">
<el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })">
{{
scope.row.fltNo
scope.row.fltNo
}}<i class="el-icon-link"></i> </el-link>
</template>
<template slot="optionColumn">
...
...
src/views/systemConfig/goodsStation/dialog.vue
0 → 100644
View file @
413fa6f
<template>
<div>
<el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" placeholder="请输入货站名称"></el-input>
</el-form-item>
<el-form-item label="品名" prop="goodsList">
<el-input type="textarea" v-model="formData.goodsList" rows="4" placeholder="请输入品名,多个用“;”隔开">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchAddGoods } from "@/api/goodsStation"
export default {
name: '',
props: {
open: {
type: Boolean,
default: false
},
},
data() {
return {
formData: {
goodsStation: null,
goodsList: null
},
rules: {
goodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "blur",
},
],
goodsList: [
{
required: true,
message: "品名不能为空",
trigger: "blur",
},
],
},
loading: false,
}
},
watch: {
},
methods: {
//提交
submit() {
let obj = {}
obj.goodsStation = this.formData.goodsStation
if (this.formData.goodsList != null && this.formData.goodsList != '') {
obj.goodsList = this.formData.goodsList.split(';')
}
this.$refs['addForm'].validate(val => {
if (val) {
this.loading = true
batchAddGoods(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess('添加成功')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
})
},
//取消
close() {
this.formData = {
goodsStation: null,
goodsList: null
}
this.$refs["addForm"].clearValidate();
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
src/views/systemConfig/goodsStation/index.vue
0 → 100644
View file @
413fa6f
<template>
<div>
<el-form class="form-header" ref="selectForm" label-width="auto" label-position="left"
style="margin-bottom:10px" @submit.native.prevent size="small">
<el-row>
<el-col :span="6">
<el-form-item label="货站名称">
<el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="50" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="display:flex;padding:10px 20px">
<el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['system:goodsStation:add']"
@click="add">新 增
</el-button>
<el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['system:goodsStation:delete']"
style="margin-left:10px" :disabled="checkData.length==0" @click="batchDel">
删 除
</el-button>
<el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px"
@click="downloadTempleate">下载模板
</el-button>
<el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx"
class="upload-demo">
<el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button>
</el-upload>
</div>
<Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
:order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
:limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
:pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
@currentChange="currentChange">
<template slot="optionColumn">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['system:goodsStation:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :open="open" @close="close" />
<UpDateResult :dialogVisible="resultOpen" :resultData="errorData" @close="resultClose" />
</div>
</template>
<script>
import { downLoadTemplate } from "@/api/flightInfoImport";
import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import Dialog from './dialog.vue'
import UpDateResult from './upDateResult.vue'
export default {
name: 'GoodsStation',
components: {
Dialog,
UpDateResult
},
data() {
return {
selectionData: {
goodsStation: '',
size: 20,
page: 1
},
tableData: [],
tableHeader: this.tableHeaders['goodsStation'],
checkData: [],
fileList: [],
errorData: [],
tableHeight: null,
totalCount: 0,
loading: false,
open: false,
resultOpen: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
this.selection(1)
},
watch: {
$route(to, from) {
if (to.name == 'GoodsStation') {
this.selection()
}
}
},
methods: {
//查询
selection(val) {
this.tableData = []
this.checkData = []
this.loading = true
if (val === 1) {
this.selectionData.page = 1
}
searchGoods(this.selectionData).then(res => {
this.loading = false
if (res.code === 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//新增
add() {
this.open = true
},
//删除
del(val) {
this.$confirm("是否要删除这条记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods([val.id])
}).catch(() => {
})
},
//批量删除
batchDel() {
let arr = []
this.checkData.forEach(item => {
arr.push(item.id)
})
this.$confirm("是否要删除这些记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods(arr)
}).catch(() => {
})
},
//删除请求
deleteGoods(val) {
batchDeleteGoods(val).then(res => {
if (res.code === 200) {
this.msgSuccess('删除成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//复选
tableSelect(val) {
this.checkData = val.selection
},
//全选
tableSelectAll(val) {
this.checkData = val
},
//分页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
//上传excel
uploadExcel(option) {
const file = option.file;
this.loading = true;
importGoods(file, '').then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else {
this.$message.warning(res.msg);
this.errorData = res.data;
if (this.errorData.length > 0) {
this.resultOpen = true
}
}
} else {
this.$message.success(res.msg);
this.errorData = res.data;
this.selection(1)
}
});
},
//下载模板
downloadTempleate() {
downLoadTemplate('goodsStation').then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
})
},
handleRemove(file, fileList) {
//清掉上传的文件
this.errorData = [];
this.fileList = [];
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
close() {
this.open = false
this.selection(1)
},
resultClose() {
this.resultOpen = false
this.selection(1)
}
}
}
</script>
<style lang="scss" scoped>
.upload-demo {
display: flex;
.el-upload-list__item:first-child {
margin-top: 5px !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
src/views/systemConfig/goodsStation/upDateResult.vue
0 → 100644
View file @
413fa6f
<template>
<div>
<el-dialog title="新 增" :visible.sync="dialogVisible" width="50%" top="1vh" :close-on-click-modal="false"
:show-close="false" append-to-body center>
<el-table ref="filterTable" class="mt20" :data="resultData" size="small" border>
<el-table-column label="行号" prop="line" width="50" align="center">
</el-table-column>
<el-table-column label="错误信息" prop="errorMessage" width="200">
<template slot-scope="scope">
<div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div>
</template>
</el-table-column>
<el-table-column v-if="resultData.length == 0"></el-table-column>
<el-table-column v-for="(value, key) in this.resultData[0]" :key="key"
v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key"
:prop="key"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'UpDateResult',
props: {
dialogVisible: {
type: Boolean,
default: false
},
resultData: {
type: Array,
default: null
}
},
data() {
return {
}
},
wactch: {
dialogVisible(val) {
if (val) {
}
}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
src/views/systemConfig/goodsStationFlight/dialog.vue
0 → 100644
View file @
413fa6f
<template>
<div>
<el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" placeholder="请输入货站名称"></el-input>
</el-form-item>
<el-form-item label="航班" prop="flightList">
<el-input type="textarea" v-model="formData.flightList" rows="4" placeholder="请输入航班,多个用“;”隔开">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchAddStationFlight } from '@/api/goodsStationFlight'
export default {
name: '',
props: {
open: {
type: Boolean,
default: false
},
},
data() {
return {
formData: {
goodsStation: null,
flightList: null
},
rules: {
goodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "blur",
},
],
flightList: [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
},
],
},
loading: false,
}
},
watch: {
},
methods: {
//提交
submit() {
let obj = {}
obj.goodsStation = this.formData.goodsStation
if (this.formData.flightList != null && this.formData.flightList != '') {
obj.flightList = this.formData.flightList.split(';')
}
this.$refs['addForm'].validate(val => {
if (val) {
this.loading = true
batchAddStationFlight(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess('添加成功!')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
})
},
//取消
close() {
this.$refs["addForm"].clearValidate();
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
src/views/systemConfig/goodsStationFlight/index.vue
0 → 100644
View file @
413fa6f
<template>
<div>
<el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px"
@submit.native.prevent size="small">
<el-row>
<el-col :span="6">
<el-form-item label="货站名称">
<el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="50" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="display:flex;padding:10px 20px">
<el-button icon="el-icon-search" :loading="loading" type="primary" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['system:goodsStationFlight:add']"
@click="add">新 增
</el-button>
<el-button icon="el-icon-delete" type="danger" size="small" style="margin:0 10px"
:disabled="checkData.length == 0" v-hasPermi="['system:goodsStationFlight:delete']" @click="batchDel">
删 除
</el-button>
</div>
<Tables ref="goodsStationFlight" ductName="goodsStationFlight" :data="tableData" :headerData="tableHeader"
:selection="true" :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
:limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
:pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
@currentChange="currentChange">
<template slot="optionColumn">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['system:goodsStationFlight:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :open="open" @close="close" />
</div>
</template>
<script>
import { searchStationFlight, batchDeleteGoods } from '@/api/goodsStationFlight'
import Dialog from './dialog.vue'
export default {
name: 'GoodsStationFlight',
components: {
Dialog
},
data() {
return {
selectionData: {
size: 20,
page: 1
},
tableData: [],
tableHeader: this.tableHeaders['goodsStationFlight'],
checkData: [],
tableHeight: null,
totalCount: 0,
loading: false,
open: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200
this.selection(1)
},
watch: {
$route(to, from) {
if (to.name == 'GoodsStationFlight') {
this.selection()
}
}
},
methods: {
//查询
selection(val) {
this.tableData = []
this.checkData = []
this.loading = true
if (val == 1) {
this.selectionData.page = 1
}
searchStationFlight(this.selectionData).then(res => {
this.loading = false
if (res.code === 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
his.loading = false
console.log(err)
})
},
add() {
this.open = true
},
//删除
del(val) {
this.$confirm("是否要删除这条记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods([val.id])
}).catch(() => { })
},
//批量删除
batchDel() {
let arr = []
this.checkData.forEach(item => {
arr.push(item.id)
})
this.$confirm("是否要删除这些记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods(arr)
}).catch(() => {
})
},
//删除请求
deleteGoods(val) {
batchDeleteGoods(val).then(res => {
if (res.code === 200) {
this.msgSuccess('操作成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//复选
tableSelect(val) {
this.checkData = val.selection
},
//全选
tableSelectAll(val) {
this.checkData = val
},
//分页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
close() {
this.open = false
this.selection(1)
}
}
}
</script>
<style lang="scss" scoped>
</style>
src/views/systemLog/dmLog/index.vue
View file @
413fa6f
...
...
@@ -64,14 +64,14 @@
<template v-slot:awbNbr="scope">
<el-link type="primary" @click="gotoWeatherTable(scope.row)">
{{
scope.row.awbNbr
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: {
handle: 'DMdetail', id: scope.row.allocDimId
} })">
@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.flightFltNo
scope.row.flightFltNo
}}<i class="el-icon-link"></i> </el-link>
<span v-else>{{ scope.row.flightFltNo }}</span>
</template>
...
...
@@ -153,7 +153,7 @@ export default {
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 } })
this.$router.push({ name: 'weatherTable', params: { data: res.data.list
, awbNbr: val.awbNbr
} })
} else {
this.msgWarning('未查询到该条数据的流水')
}
...
...
src/views/systemLog/dmLog/weatherTable.vue
View file @
413fa6f
<template>
<div style="padding:10px">
<el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button>
<el-card header="流水信息">
<Tables ref="weatherTable" ductName="weatherTable" :order="true" :data="data" :headerData="tableHeader"
:showOverflowTooltip="false" :height="tableHeight" :page="selectData.page" :limitSize="selectData.size"
:pageSizes="[100]" :pagination="false" :loading="loading" @currentChange="currentChange">
<Tables ref="weatherTable" ductName="weatherTable" :order="true" :border="false" :data="data"
:headerData="tableHeader" :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page"
:limitSize="selectData.size" :pageSizes="[100]" :pagination="false" :loading="loading"
@currentChange="currentChange">
</Tables>
<div class="ml20 mt20">
<el-button size="small" @click="close">返 回</el-button>
</div>
</el-card>
</div>
</template>
...
...
@@ -70,7 +69,6 @@ export default {
(item) => item.path === this.$route.path
),
);
sessionStorage.removeItem('accsid')
this.$router.push({ name: 'DmLog' })
},
//翻页
...
...
@@ -80,4 +78,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment