Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
eeaaa5c2
Commit
eeaaa5c2
authored
Jul 13, 2022
by
wanglianghe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海运、空运、海空联运列表
parent
453ae2ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
799 additions
and
51 deletions
+799
-51
indexAir.vue
src/views/ecw/box/indexAir.vue
+371
-0
indexSea.vue
src/views/ecw/box/indexSea.vue
+401
-0
indexSeaAir.vue
src/views/ecw/box/indexSeaAir.vue
+27
-51
No files found.
src/views/ecw/box/indexAir.vue
0 → 100644
View file @
eeaaa5c2
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"自编号"
prop=
"orderNo"
>
<el-input
v-model=
"queryParams.orderNo"
placeholder=
"请输入自编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"柜号"
prop=
"cubNo"
>
<el-input
v-model=
"queryParams.cubNo"
placeholder=
"请输入柜号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startWarehouseId"
>
<el-select
v-model=
"queryParams.startWarehouseId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destWarehouseId"
>
<el-select
v-model=
"queryParams.destWarehouseId"
placeholder=
"请选择目的地"
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"boxStatus"
>
<el-select
v-model=
"queryParams.boxStatus"
placeholder=
"请选择状态"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"date"
>
<el-select
v-model=
"queryParams.dateType"
placeholder=
"请选择时间类型"
clearable
size=
"small"
>
<el-option
v-for=
"item in dateTypes"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
>
<el-date-picker
v-model=
"queryParams.dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['shipment:box:create']"
>
出货安排
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['shipment:box:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"自编号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"柜号"
align=
"center"
prop=
"cubNo"
/>
<el-table-column
label=
"出货渠道"
align=
"center"
prop=
"shippingChannelId"
>
<template
slot-scope=
"scope"
>
<span>
{{
getShipChannelName
(
scope
.
row
.
shippingChannelId
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"方数(预装/已装)"
align=
"center"
prop=
"squareNumber"
/>
<el-table-column
label=
"重量(预装/已装)"
align=
"center"
prop=
"weight"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"boxStatus"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPMENT_STATUS"
:value=
"scope.row.boxStatus"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"日期"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
new
Date
(
scope
.
row
.
createTime
).
format
(
'
yyyy-MM-dd
'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['shipment:box:query']"
>
查看
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['shipment:box:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['shipment:box:delete']"
>
删除
</el-button>
-->
<el-dropdown
trigger=
"click"
@
command=
"(command)=>handleCommand(scope.row, command)"
>
<el-button
type=
"primary"
>
操作
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"edit"
>
编辑
</el-dropdown-item>
<el-dropdown-item
command=
"air"
>
操作-空运
</el-dropdown-item>
<el-dropdown-item
command=
"error"
>
异常登记
</el-dropdown-item>
<el-dropdown-item
command=
"cost"
>
费用登记
</el-dropdown-item>
<el-dropdown-item
command=
"delete"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"出货渠道"
prop=
"shippingChannelId"
>
<el-select
v-model=
"form.shippingChannelId"
placeholder=
"请选择出货渠道"
>
<el-option
v-for=
"item in channelList"
:label=
"item.nameZh"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startWarehouseId"
>
<el-select
v-model=
"form.startWarehouseId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destWarehouseId"
>
<el-select
v-model=
"form.destWarehouseId"
placeholder=
"请选择目的地"
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createbox
,
updatebox
,
deletebox
,
getbox
,
getboxPage
,
exportboxExcel
}
from
"
@/api/ecw/box
"
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
export
default
{
name
:
"
box
"
,
components
:
{},
data
()
{
return
{
dateTypes
:[
{
value
:
'
1
'
,
label
:
'
分拣时间
'
},
{
value
:
'
2
'
,
label
:
'
装柜时间
'
},
{
value
:
'
3
'
,
label
:
'
起运时间
'
},
{
value
:
'
4
'
,
label
:
'
到港时间
'
},
{
value
:
'
5
'
,
label
:
'
清关时间
'
},
{
value
:
'
6
'
,
label
:
'
提货时间
'
},
],
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 出货列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
orderNo
:
null
,
cubNo
:
null
,
cabinetId
:
null
,
boxStatus
:
null
,
startWarehouseId
:
null
,
destWarehouseId
:
null
,
transportType
:
null
,
},
channelList
:[],
warehouseList
:
[],
// 表单参数
form
:
{},
// 表单校验
rules
:
{
shippingChannelId
:
[{
required
:
true
,
message
:
"
出货渠道不能为空
"
,
trigger
:
"
blur
"
}],
startWarehouseId
:
[{
required
:
true
,
message
:
"
始发地不能为空
"
,
trigger
:
"
blur
"
}],
destWarehouseId
:
[{
required
:
true
,
message
:
"
目的地不能为空
"
,
trigger
:
"
blur
"
}],
}
};
},
computed
:
{
exportWarehouseList
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
2
'
||
item
.
type
==
'
3
'
)
},
importWarehouseList
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
1
'
||
item
.
type
==
'
3
'
)
},
getShipChannelName
()
{
return
shippingChannelId
=>
{
for
(
let
index
in
this
.
channelList
)
{
let
channelItem
=
this
.
channelList
[
index
];
if
(
channelItem
.
channelId
==
shippingChannelId
)
{
return
channelItem
.
nameZh
;
}
}
return
'
/
'
}
}
},
created
()
{
getWarehouseList
().
then
(
res
=>
this
.
warehouseList
=
res
.
data
);
this
.
getList
();
this
.
getChannelList
();
},
methods
:
{
getChannelList
(){
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
transportType
=
3
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getboxPage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
cabinetId
:
undefined
,
startWarehouseId
:
undefined
,
destWarehouseId
:
undefined
,
transportType
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加出货
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getbox
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改出货
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
this
.
form
.
transportType
=
3
;
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updatebox
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createbox
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除出货编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deletebox
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有出货数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportboxExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
},
/** 查看按钮操作 */
handleCommand
(
row
,
command
)
{
console
.
log
(
row
,
command
)
switch
(
command
)
{
case
'
sea
'
:
this
.
$router
.
push
(
'
/box/shippingSea/
'
+
row
.
id
)
break
;
case
'
edit
'
:
this
.
handleUpdate
(
row
);
break
;
case
'
delete
'
:
this
.
handleDelete
(
row
);
break
;
}
},
}
};
</
script
>
src/views/ecw/box/indexSea.vue
0 → 100644
View file @
eeaaa5c2
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"自编号"
prop=
"orderNo"
>
<el-input
v-model=
"queryParams.orderNo"
placeholder=
"请输入自编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"柜号"
prop=
"cubNo"
>
<el-input
v-model=
"queryParams.cubNo"
placeholder=
"请输入柜号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"柜型"
prop=
"cabinetId"
>
<el-select
v-model=
"queryParams.cabinetId"
placeholder=
"请选择柜型"
>
<el-option
v-for=
"item in cabinetList"
:label=
"item.name"
:value=
"item.name"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startWarehouseId"
>
<el-select
v-model=
"queryParams.startWarehouseId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destWarehouseId"
>
<el-select
v-model=
"queryParams.destWarehouseId"
placeholder=
"请选择目的地"
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"date"
>
<el-select
v-model=
"queryParams.dateType"
placeholder=
"请选择时间类型"
clearable
size=
"small"
>
<el-option
v-for=
"item in dateTypes"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
>
<el-date-picker
v-model=
"queryParams.dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"boxStatus"
>
<el-select
v-model=
"queryParams.boxStatus"
placeholder=
"请选择状态"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<el-select
v-model=
"queryParams.transportType"
placeholder=
"请选择运输方式"
clearable
size=
"small"
>
<el-option
v-for=
"dict in transportTypes"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['shipment:box:create']"
>
出货安排
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['shipment:box:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"自编号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"柜号"
align=
"center"
prop=
"cubNo"
/>
<el-table-column
label=
"柜型"
align=
"center"
prop=
"cabinetId"
>
<template
slot-scope=
"scope"
>
<span>
{{
getCabinetName
(
scope
.
row
.
cabinetId
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"运输方式"
align=
"center"
prop=
"transportType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"scope.row.transportType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"方数(预装/已装)"
align=
"center"
prop=
"squareNumber"
/>
<el-table-column
label=
"重量(预装/已装)"
align=
"center"
prop=
"weight"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"boxStatus"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPMENT_STATUS"
:value=
"scope.row.boxStatus"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"日期"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
new
Date
(
scope
.
row
.
createTime
).
format
(
'
yyyy-MM-dd
'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['shipment:box:query']"
>
查看
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['shipment:box:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['shipment:box:delete']"
>
删除
</el-button>
-->
<el-dropdown
trigger=
"click"
@
command=
"(command)=>handleCommand(scope.row, command)"
>
<el-button
type=
"primary"
>
操作
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"edit"
>
编辑
</el-dropdown-item>
<el-dropdown-item
command=
"sea"
>
操作-海运
</el-dropdown-item>
<el-dropdown-item
command=
"error"
>
异常登记
</el-dropdown-item>
<el-dropdown-item
command=
"cost"
>
费用登记
</el-dropdown-item>
<el-dropdown-item
command=
"delete"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<el-radio-group
v-model=
"form.transportType"
>
<el-radio
v-for=
"dict in transportTypes"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"柜型"
prop=
"cabinetId"
>
<el-select
v-model=
"form.cabinetId"
placeholder=
"请选择柜型"
>
<el-option
v-for=
"item in cabinetList"
:label=
"item.name"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startWarehouseId"
>
<el-select
v-model=
"form.startWarehouseId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destWarehouseId"
>
<el-select
v-model=
"form.destWarehouseId"
placeholder=
"请选择目的地"
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createbox
,
updatebox
,
deletebox
,
getbox
,
getboxPage
,
exportboxExcel
}
from
"
@/api/ecw/box
"
;
import
{
getCabinetPage
}
from
"
@/api/ecw/cabinet
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
export
default
{
name
:
"
box
"
,
components
:
{},
data
()
{
return
{
dateTypes
:[
{
value
:
'
1
'
,
label
:
'
预装时间
'
},
{
value
:
'
2
'
,
label
:
'
装柜时间
'
},
{
value
:
'
3
'
,
label
:
'
起运时间
'
},
{
value
:
'
4
'
,
label
:
'
到港时间
'
},
{
value
:
'
5
'
,
label
:
'
清关时间
'
},
{
value
:
'
6
'
,
label
:
'
提货时间
'
},
],
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 出货列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
orderNo
:
null
,
cubNo
:
null
,
cabinetId
:
null
,
boxStatus
:
null
,
startWarehouseId
:
null
,
destWarehouseId
:
null
,
transportType
:
null
,
},
cabinetList
:[],
warehouseList
:
[],
transportTypes
:
this
.
getDictDatas
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
// 表单参数
form
:
{},
// 表单校验
rules
:
{
transportType
:
[{
required
:
true
,
message
:
"
运输方式不能为空
"
,
trigger
:
"
blur
"
}],
cabinetId
:
[{
required
:
true
,
message
:
"
柜型不能为空
"
,
trigger
:
"
blur
"
}],
startWarehouseId
:
[{
required
:
true
,
message
:
"
始发地不能为空
"
,
trigger
:
"
blur
"
}],
destWarehouseId
:
[{
required
:
true
,
message
:
"
目的地不能为空
"
,
trigger
:
"
blur
"
}],
}
};
},
computed
:
{
exportWarehouseList
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
2
'
||
item
.
type
==
'
3
'
)
},
importWarehouseList
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
1
'
||
item
.
type
==
'
3
'
)
},
getCabinetName
()
{
return
cabinetId
=>
{
for
(
let
index
in
this
.
cabinetList
)
{
let
cabinetItem
=
this
.
cabinetList
[
index
];
if
(
cabinetItem
.
id
==
cabinetId
)
{
return
cabinetItem
.
name
;
}
}
return
'
/
'
}
}
},
created
()
{
this
.
transportTypes
=
this
.
transportTypes
.
filter
(
item
=>
item
.
value
==
'
1
'
||
item
.
value
==
'
2
'
);
getWarehouseList
().
then
(
res
=>
this
.
warehouseList
=
res
.
data
);
getCabinetPage
(
null
).
then
(
response
=>
{
this
.
cabinetList
=
response
.
data
.
list
;
});
this
.
getList
();
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
transportTypeList
=
[
'
1
'
,
'
2
'
];
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getboxPage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
cabinetId
:
undefined
,
startWarehouseId
:
undefined
,
destWarehouseId
:
undefined
,
transportType
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加出货
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getbox
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改出货
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updatebox
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createbox
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除出货编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deletebox
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有出货数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportboxExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
},
/** 查看按钮操作 */
handleCommand
(
row
,
command
)
{
console
.
log
(
row
,
command
)
switch
(
command
)
{
case
'
sea
'
:
this
.
$router
.
push
(
'
/box/shippingSea/
'
+
row
.
id
)
break
;
case
'
edit
'
:
this
.
handleUpdate
(
row
);
break
;
case
'
delete
'
:
this
.
handleDelete
(
row
);
break
;
}
},
}
};
</
script
>
src/views/ecw/box/index.vue
→
src/views/ecw/box/index
SeaAir
.vue
View file @
eeaaa5c2
...
...
@@ -17,13 +17,13 @@
<el-form-item
label=
"始发地"
prop=
"startWarehouseId"
>
<el-select
v-model=
"queryParams.startWarehouseId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in expo
erCity
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-option
v-for=
"item in expo
rtWarehouse
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destWarehouseId"
>
<el-select
v-model=
"queryParams.destWarehouseId"
placeholder=
"请选择目的地"
>
<el-option
v-for=
"item in import
City
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-option
v-for=
"item in import
Warehouse
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -47,14 +47,6 @@
</el-form-item>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<el-select
v-model=
"queryParams.transportType"
placeholder=
"请选择运输方式"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
...
...
@@ -126,8 +118,6 @@
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"edit"
>
编辑
</el-dropdown-item>
<el-dropdown-item
command=
"sea"
>
操作-海运
</el-dropdown-item>
<el-dropdown-item
command=
"air"
>
操作-空运
</el-dropdown-item>
<el-dropdown-item
command=
"seaAir"
>
操作-海空联运
</el-dropdown-item>
<el-dropdown-item
command=
"error"
>
异常登记
</el-dropdown-item>
<el-dropdown-item
command=
"cost"
>
费用登记
</el-dropdown-item>
...
...
@@ -145,19 +135,13 @@
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<el-radio-group
v-model=
"form.transportType"
@
change=
"changeTransportType"
>
<el-radio
v-for=
"dict in this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"
:key=
"dict.value"
:label=
"parseInt(dict.value)"
>
{{dict.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"出货渠道"
prop=
"shippingChannelId"
v-if=
"form.transportType === 3 || form.transportType === 4"
>
<el-form-item
label=
"出货渠道"
prop=
"shippingChannelId"
>
<el-select
v-model=
"form.shippingChannelId"
placeholder=
"请选择出货渠道"
>
<el-option
v-for=
"item in channelList"
:label=
"item.nameZh"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"柜型"
prop=
"cabinetId"
v-if=
"form.transportType !== 3"
>
<el-form-item
label=
"柜型"
prop=
"cabinetId"
>
<el-select
v-model=
"form.cabinetId"
placeholder=
"请选择柜型"
>
<el-option
v-for=
"item in cabinetList"
:label=
"item.name"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
...
...
@@ -165,13 +149,13 @@
<el-form-item
label=
"始发地"
prop=
"startWarehouseId"
>
<el-select
v-model=
"form.startWarehouseId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in expo
erCity
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-option
v-for=
"item in expo
rtWarehouse
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destWarehouseId"
>
<el-select
v-model=
"form.destWarehouseId"
placeholder=
"请选择目的地"
>
<el-option
v-for=
"item in import
City
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-option
v-for=
"item in import
Warehouse
List"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -186,9 +170,9 @@
<
script
>
import
{
createbox
,
updatebox
,
deletebox
,
getbox
,
getboxPage
,
exportboxExcel
}
from
"
@/api/ecw/box
"
;
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
;
import
{
getCabinetPage
}
from
"
@/api/ecw/cabinet
"
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
export
default
{
name
:
"
box
"
,
...
...
@@ -196,7 +180,7 @@
data
()
{
return
{
dateTypes
:[
{
value
:
'
1
'
,
label
:
'
预装时间
/分拣时间
'
},
{
value
:
'
1
'
,
label
:
'
预装时间
'
},
{
value
:
'
2
'
,
label
:
'
装柜时间
'
},
{
value
:
'
3
'
,
label
:
'
起运时间
'
},
{
value
:
'
4
'
,
label
:
'
到港时间
'
},
...
...
@@ -233,14 +217,15 @@
destWarehouseId
:
null
,
transportType
:
null
,
},
tradeCityList
:
[],
cabinetList
:[],
channelList
:[],
warehouseList
:
[],
// 表单参数
form
:
{},
// 表单校验
rules
:
{
transportType
:
[{
required
:
true
,
message
:
"
运输方式不能为空
"
,
trigger
:
"
blur
"
}],
shippingChannelId
:
[{
required
:
true
,
message
:
"
出货渠道不能为空
"
,
trigger
:
"
blur
"
}],
cabinetId
:
[{
required
:
true
,
message
:
"
柜型不能为空
"
,
trigger
:
"
blur
"
}],
startWarehouseId
:
[{
required
:
true
,
message
:
"
始发地不能为空
"
,
trigger
:
"
blur
"
}],
destWarehouseId
:
[{
required
:
true
,
message
:
"
目的地不能为空
"
,
trigger
:
"
blur
"
}],
...
...
@@ -248,11 +233,11 @@
};
},
computed
:
{
expo
erCity
List
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
||
item
.
type
==
3
)
expo
rtWarehouse
List
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
2
'
||
item
.
type
==
'
3
'
)
},
import
City
List
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
||
item
.
type
==
3
)
import
Warehouse
List
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
1
'
||
item
.
type
==
'
3
'
)
},
getCabinetName
()
{
...
...
@@ -281,7 +266,7 @@
},
created
()
{
get
TradeCityList
().
then
(
res
=>
this
.
tradeCity
List
=
res
.
data
);
get
WarehouseList
().
then
(
res
=>
this
.
warehouse
List
=
res
.
data
);
getCabinetPage
(
null
).
then
(
response
=>
{
this
.
cabinetList
=
response
.
data
.
list
;
});
...
...
@@ -293,19 +278,13 @@
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
},
changeTransportType
(
value
)
{
if
(
value
===
3
)
{
this
.
form
.
cabinetId
=
null
;
}
else
if
(
value
==
1
||
value
==
2
)
{
this
.
form
.
shippingChannelId
=
null
;
}
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
transportType
=
4
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getboxPage
(
params
).
then
(
response
=>
{
...
...
@@ -364,19 +343,8 @@
return
;
}
if
(
this
.
form
.
transportType
!=
3
)
{
if
(
!
this
.
form
.
cabinetId
)
{
this
.
$message
.
error
(
'
柜型不能为空
'
);
return
;
}
}
if
(
this
.
form
.
transportType
==
3
||
this
.
form
.
transportType
==
4
)
{
if
(
!
this
.
form
.
shippingChannelId
)
{
this
.
$message
.
error
(
'
出货渠道不能为空
'
);
return
;
}
}
this
.
form
.
transportType
=
4
;
console
.
log
(
this
.
form
);
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
...
...
@@ -430,6 +398,14 @@
case
'
sea
'
:
this
.
$router
.
push
(
'
/box/shippingSea/
'
+
row
.
id
)
break
;
case
'
edit
'
:
this
.
handleUpdate
(
row
);
break
;
case
'
delete
'
:
this
.
handleDelete
(
row
);
break
;
}
},
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment