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
b6692430
Commit
b6692430
authored
May 27, 2023
by
zhoutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
空运暂存
parent
9ce80206
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
531 additions
and
263 deletions
+531
-263
boxAir.js
src/api/ecw/boxAir.js
+19
-0
editAirForm.vue
src/views/ecw/box/editAirForm.vue
+169
-0
indexAir.vue
src/views/ecw/box/indexAir.vue
+343
-263
No files found.
src/api/ecw/boxAir.js
0 → 100644
View file @
b6692430
import
request
from
"
@/utils/request
"
;
// 创建出货
export
function
createbox
(
data
)
{
return
request
({
url
:
"
/shipment/box/createAir
"
,
method
:
"
post
"
,
data
:
data
,
});
}
// 更新出货
export
function
updatebox
(
data
)
{
return
request
({
url
:
"
/shipment/box/update
"
,
method
:
"
put
"
,
data
:
data
,
});
}
\ No newline at end of file
src/views/ecw/box/editAirForm.vue
0 → 100644
View file @
b6692430
<
template
>
<div
class=
"shippingSea-dialog"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
>
<el-radio-group
v-model=
"form.transportType"
>
<el-radio
v-for=
"dict in transportTypes"
:key=
"dict.value"
:label=
"dict.value"
>
{{
$l
(
dict
,
'
label
'
)
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
>
<el-select
v-model=
"form.shippingChannelId"
:placeholder=
"$t('请选择出货渠道')"
>
<el-option
v-for=
"item in channelList"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('始发地')"
prop=
"startWarehouseId"
>
<el-select
v-model=
"form.startWarehouseId"
:placeholder=
"$t('请选择始发地')"
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的地')"
prop=
"destWarehouseId"
>
<el-select
v-model=
"form.destWarehouseId"
:placeholder=
"$t('请选择目的地')"
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的港清关')"
prop=
"transportType"
>
<el-radio-group
v-model=
"form.qingguan"
>
<el-radio
:label=
"1"
>
{{
$t
(
'
我司
'
)
}}
</el-radio>
<el-radio
:label=
"2"
>
{{
$t
(
'
客户
'
)
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if=
"form.qingguan==1"
prop=
"qingguan2"
:rules=
"[
{ required: true, message: this.$t('清关方式不能为空'), trigger: 'blur' }
]">
<el-radio-group
v-model=
"form.qingguan2"
>
<el-radio
:label=
"1"
>
{{
$t
(
'
我司清关
'
)
}}
</el-radio>
<el-radio
:label=
"2"
>
{{
$t
(
'
合作方清关
'
)
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label=
"$t('发货方式')"
prop=
"transportType"
>
<el-radio-group
v-model=
"form.fahuo"
>
<el-radio
:label=
"1"
>
{{
$t
(
'
多票
'
)
}}
</el-radio>
<el-radio
:label=
"2"
>
{{
$t
(
'
单票
'
)
}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{
$t
(
'
确定
'
)
}}
</el-button>
<el-button
@
click=
"cancel"
>
{{
$t
(
'
取消
'
)
}}
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
createbox
,
updatebox
}
from
"
@/api/ecw/boxAir
"
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
export
default
{
name
:
"
editAirForm
"
,
inheritAttrs
:
false
,
props
:
{
transportTypes
:
Array
,
warehouseList
:
Array
,
cabinetList
:
Array
,
shipmentObj
:
Object
,
},
created
()
{
this
.
form
=
{
...
this
.
shipmentObj
};
this
.
getChannelList
()
},
data
()
{
return
{
// 表单参数
form
:
{},
channelList
:
[],
// 表单校验
rules
:
{
shippingChannelId
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
出货渠道不能为空
'
),
trigger
:
'
blur
'
}
],
startWarehouseId
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
始发地不能为空
'
),
trigger
:
'
blur
'
}
],
destWarehouseId
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
目的地不能为空
'
),
trigger
:
'
blur
'
}
]
}
};
},
methods
:
{
getChannelList
()
{
getChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
))
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
'
form
'
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
}
this
.
form
.
transportType
=
4
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updatebox
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
修改成功
'
))
this
.
$emit
(
"
closeDialog
"
,
"
edit
"
);
})
return
}
// 添加的提交
createbox
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
新增成功
'
))
this
.
$emit
(
"
closeDialog
"
,
"
edit
"
);
})
})
},
/** 取消按钮 */
cancel
()
{
this
.
$emit
(
"
closeDialog
"
);
},
},
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
"
);
},
},
};
</
script
>
<
style
lang=
"scss"
>
// 海运操作统一弹窗样式
.shippingSea-dialog
{
// 页面内元素弹窗form控件宽度设置
.el-form-item__content
{
>
div
:not
(
.el-input-number
)
{
width
:
100%
;
}
}
.operate-button
{
text-align
:
center
;
}
.two-element-formItem
{
display
:
flex
;
>
:last-child
{
width
:
100%
;
margin-left
:
10px
;
}
}
.two-element
{
.el-form-item__content
{
display
:
flex
;
>
:last-child
{
margin-left
:
10px
;
}
}
}
}
</
style
>
src/views/ecw/box/indexAir.vue
View file @
b6692430
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
:label=
"$t('自编号')"
prop=
"selfNo"
>
<el-form-item
:label=
"$t('自编号')"
prop=
"selfNo"
>
<el-input
v-model=
"queryParams.selfNo"
:placeholder=
"$t('请输入自编号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.selfNo"
:placeholder=
"$t('请输入自编号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('柜号')"
prop=
"cubNo"
>
<el-form-item
:label=
"$t('柜号')"
prop=
"cubNo"
>
<el-input
v-model=
"queryParams.cubNo"
:placeholder=
"$t('请输入柜号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.cubNo"
:placeholder=
"$t('请输入柜号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('始发地')"
prop=
"startWarehouseId"
>
<el-form-item
:label=
"$t('始发地')"
prop=
"startWarehouseId"
>
...
@@ -24,8 +23,7 @@
...
@@ -24,8 +23,7 @@
<el-form-item
:label=
"$t('状态')"
prop=
"boxStatus"
>
<el-form-item
:label=
"$t('状态')"
prop=
"boxStatus"
>
<el-select
v-model=
"queryParams.boxStatus"
:placeholder=
"$t('请选择状态')"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.boxStatus"
:placeholder=
"$t('请选择状态')"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key=
"dict.value"
:label=
"$l(dict, 'label')"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"$l(dict, 'label')"
:value=
"dict.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -36,36 +34,34 @@
...
@@ -36,36 +34,34 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
""
>
<el-form-item
label=
""
>
<el-date-picker
v-model=
"queryParams.dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd HH:mm:ss"
<el-date-picker
v-model=
"queryParams.dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetimerange"
range-separator=
"-"
start-:placeholder=
"$t('开始日期')"
end-:placeholder=
"$t('结束日期')"
/>
type=
"datetimerange"
range-separator=
"-"
start-:placeholder=
"$t('开始日期')"
end-:placeholder=
"$t('结束日期')"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 操作工具栏 -->
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['shipment:box:create:air']"
>
{{
$t
(
'
出货安排
'
)
}}
</el-button>
v-hasPermi=
"['shipment:box:create:air']"
>
{{
$t
(
'
出货安排
'
)
}}
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['shipment:box:export:air']"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
:loading=
"exportLoading"
v-hasPermi=
"['shipment:box:export:air']"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<!-- 列表 -->
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
:label=
"$t('自编号')"
align=
"center"
prop=
"selfNo"
/>
<el-table-column
:label=
"$t('自编号')"
align=
"center"
prop=
"selfNo"
/>
<el-table-column
:label=
"$t('柜号')"
align=
"center"
prop=
"cubNo"
/>
<el-table-column
:label=
"$t('运输方式')"
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=
"$t('出货渠道')"
align=
"center"
prop=
"shippingChannelId"
>
<el-table-column
:label=
"$t('出货渠道')"
align=
"center"
prop=
"shippingChannelId"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -73,19 +69,19 @@
...
@@ -73,19 +69,19 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"方数(预装/已装)"
align=
"center"
prop=
"squareNumber"
/>
<el-table-column
label=
"方数(预装/已装)"
align=
"center"
prop=
"squareNumber"
/>
<el-table-column
label=
"重量(预装/已装)"
align=
"center"
prop=
"weight"
/>
<el-table-column
label=
"重量(预装/已装)"
align=
"center"
prop=
"weight"
/>
<el-table-column
:label=
"$t('状态')"
align=
"center"
prop=
"boxStatus"
>
<el-table-column
:label=
"$t('状态')"
align=
"center"
prop=
"boxStatus"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPMENT_STATUS"
:value=
"scope.row.boxStatus"
/>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPMENT_STATUS"
:value=
"scope.row.boxStatus"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('日期')"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
:label=
"$t('日期')"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
new
Date
(
scope
.
row
.
createTime
).
format
(
'
yyyy-MM-dd hh:mm:ss
'
)
}}
</span>
<span>
{{
new
Date
(
scope
.
row
.
createTime
).
format
(
'
yyyy-MM-dd hh:mm:ss
'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -95,276 +91,360 @@
...
@@ -95,276 +91,360 @@
v-hasPermi=
"['shipment:box:update']"
>
{{
$t
(
'
修改
'
)
}}
</el-button>
v-hasPermi=
"['shipment:box:update']"
>
{{
$t
(
'
修改
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['shipment:box:delete']"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
-->
v-hasPermi=
"['shipment:box:delete']"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
-->
<el-dropdown
trigger=
"click"
@
command=
"(command)=>handleCommand(scope.row, command)"
>
<el-dropdown
trigger=
"click"
@
command=
"(command) => handleCommand(scope.row, command)"
>
<el-button
type=
"primary"
>
<el-button
type=
"primary"
>
{{
$t
(
'
操作
'
)
}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
{{
$t
(
'
操作
'
)
}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"edit"
>
{{
$t
(
'
编辑
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"edit"
>
{{
$t
(
'
编辑
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"air"
>
{{
$t
(
'
操作
'
)
}}
-
{{
$t
(
'
空运
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"air"
>
{{
$t
(
'
操作
'
)
}}
-
{{
$t
(
'
空运
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"error"
>
{{
$t
(
'
异常登记
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"error"
>
{{
$t
(
'
异常登记
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"cost"
>
{{
$t
(
'
费用登记
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"cost"
>
{{
$t
(
'
费用登记
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"delete"
>
{{
$t
(
'
删除
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"delete"
>
{{
$t
(
'
删除
'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!-- 分页组件 -->
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
append-to-body
>
<el-dialog
:title=
"dialogCfg.title"
:visible.sync=
"dialogCfg.open"
:width=
"dialogCfg.width"
:fullscreen=
"dialogCfg.fullscreen"
append-to-body
class=
"shippingSea-dialog"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<
template
v-if=
"dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'"
>
<editAirForm
v-if=
"dialogCfg.open"
@
closeDialog=
"closeDialog"
:shipmentObj=
"currRow"
:warehouseList=
"warehouseList"
:transportTypes=
"transportTypes"
/>
</
template
>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
>
<
template
v-if=
"dialogCfg.dialogType === 'cost'"
>
<el-select
v-model=
"form.shippingChannelId"
:placeholder=
"$t('请选择出货渠道')"
>
<costForm
v-if=
"dialogCfg.open"
@
closeDialog=
"closeDialog"
:shipmentObj=
"currRow"
/>
<el-option
v-for=
"item in channelList"
:label=
"item.nameZh"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</
template
>
</el-select>
<
template
v-if=
"dialogCfg.dialogType === 'error'"
>
</el-form-item>
<regError
v-if=
"dialogCfg.open"
@
closeDialog=
"closeDialog"
:shipmentObj=
"currRow"
:allUsers=
"allUsers"
/>
</
template
>
<el-form-item
:label=
"$t('始发地')"
prop=
"startWarehouseId"
>
<
template
v-if=
"dialogCfg.dialogType === 'editLadingBill'"
>
<el-select
v-model=
"form.startWarehouseId"
:placeholder=
"$t('请选择始发地')"
>
<ladingBill
v-if=
"dialogCfg.open"
@
closeDialog=
"closeDialog"
:shipmentObj=
"currRow"
:getCabinetName=
"getCabinetName"
/>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</
template
>
</el-select>
<
template
v-if=
"dialogCfg.dialogType === 'notice'"
>
</el-form-item>
<div
class=
"notice-dialog"
>
<div
class=
"notice-title"
>
<el-form-item
:label=
"$t('目的地')"
prop=
"destWarehouseId"
>
{{
<el-select
v-model=
"form.destWarehouseId"
:placeholder=
"$t('请选择目的地')"
>
$t
(
'
您有{cnt
}
个待处理出货操作,请尽快前往处理
'
,
{
<el-option
v-for=
"item in importWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
cnt
:
noticeList
.
length
</el-select>
}
)
</el-form-item>
}}
:
<
/div
>
</el-form>
<
el
-
table
:
data
=
"
noticeList
"
height
=
"
500px
"
border
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<
el
-
table
-
column
:
label
=
"
$t('自编号')
"
align
=
"
center
"
prop
=
"
selfNo
"
/>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{$t('确定')}}
</el-button>
<
el
-
table
-
column
:
label
=
"
$t('类型')
"
align
=
"
center
"
>
<el-button
@
click=
"cancel"
>
{{$t('取消')}}
</el-button>
<
template
slot
-
scope
=
"
scope
"
>
</div>
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE
"
:
value
=
"
String(scope.row.noticeType)
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('预计时间')
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
formatDate
(
scope
.
row
.
createTime
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('操作')
"
align
=
"
center
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
type
=
"
text
"
@
click
=
"
handleCommand(scope.row, 'handle')
"
>
{{
$t
(
'
处理
'
)
}}
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
el
-
row
class
=
"
operate-button
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
closeDialog
"
>
{{
$t
(
'
关闭窗口
'
)
}}
<
/el-button
>
<
/el-row
>
<
/div
>
<
/template
>
<
/el-dialog
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
createbox
,
updatebox
,
deletebox
,
getbox
,
getboxPage
,
exportboxExcel
}
from
"
@/api/ecw/box
"
;
import
{
createbox
,
updatebox
,
deletebox
,
getbox
,
getboxPage
,
exportboxExcel
}
from
'
@/api/ecw/box
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
import
{
getWarehouseList
}
from
'
@/api/ecw/warehouse
'
import
costForm
from
'
./costForm.vue
'
export
default
{
import
regError
from
'
./regError.vue
'
name
:
"
box
"
,
import
editAirForm
from
'
./editAirForm.vue
'
components
:
{},
data
()
{
return
{
dateTypes
:[
{
value
:
'
1
'
,
label
:
this
.
$t
(
'
分拣时间
'
)},
{
value
:
'
2
'
,
label
:
this
.
$t
(
'
装柜时间
'
)},
{
value
:
'
3
'
,
label
:
this
.
$t
(
'
起运时间
'
)},
{
value
:
'
4
'
,
label
:
this
.
$t
(
'
到港时间
'
)},
{
value
:
'
5
'
,
label
:
this
.
$t
(
'
清关时间
'
)},
{
value
:
'
6
'
,
label
:
this
.
$t
(
'
提货时间
'
)},
],
export
default
{
name
:
'
indexAir
'
,
components
:
{
costForm
,
regError
,
editAirForm
}
,
data
()
{
return
{
dateTypes
:
[
{
value
:
'
1
'
,
label
:
this
.
$t
(
'
分拣时间
'
)
}
,
{
value
:
'
2
'
,
label
:
this
.
$t
(
'
装柜时间
'
)
}
,
{
value
:
'
3
'
,
label
:
this
.
$t
(
'
起运时间
'
)
}
,
{
value
:
'
4
'
,
label
:
this
.
$t
(
'
到港时间
'
)
}
,
{
value
:
'
5
'
,
label
:
this
.
$t
(
'
清关时间
'
)
}
,
{
value
:
'
6
'
,
label
:
this
.
$t
(
'
提货时间
'
)
}
],
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 导出遮罩层
// 导出遮罩层
exportLoading
:
false
,
exportLoading
:
false
,
// 显示搜索条件
// 显示搜索条件
showSearch
:
true
,
showSearch
:
true
,
// 总条数
// 总条数
total
:
0
,
total
:
0
,
// 出货列表
// 出货列表
list
:
[],
list
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
''
,
// 是否显示弹出层
// 弹出类型
dialogCfg
:
{
title
:
''
,
dialogType
:
''
,
width
:
'
600px
'
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
dateRangeCreateTime
:
[],
fullscreen
:
false
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
selfNo
:
null
,
cubNo
:
null
,
cabinetId
:
null
,
boxStatus
:
null
,
startWarehouseId
:
null
,
destWarehouseId
:
null
,
transportType
:
null
,
},
channelList
:[],
warehouseList
:
[],
// 表单参数
form
:
{},
// 表单校验
rules
:
{
shippingChannelId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
出货渠道不能为空
"
),
trigger
:
"
blur
"
}],
startWarehouseId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
始发地不能为空
"
),
trigger
:
"
blur
"
}],
destWarehouseId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
目的地不能为空
"
),
trigger
:
"
blur
"
}],
}
};
},
computed
:
{
exportWarehouseList
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
2
'
||
item
.
type
==
'
3
'
)
}
,
}
,
importWarehouseList
()
{
dateRangeCreateTime
:
[],
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
'
1
'
||
item
.
type
==
'
3
'
)
transportTypes
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
selfNo
:
null
,
cubNo
:
null
,
cabinetId
:
null
,
boxStatus
:
null
,
startWarehouseId
:
null
,
destWarehouseId
:
null
,
transportType
:
null
}
,
}
,
channelList
:
[],
warehouseList
:
[],
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
shippingChannelId
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
出货渠道不能为空
'
),
trigger
:
'
blur
'
}
],
startWarehouseId
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
始发地不能为空
'
),
trigger
:
'
blur
'
}
],
destWarehouseId
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
目的地不能为空
'
),
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
()
{
getShipChannelName
()
{
return
shippingChannelId
=>
{
return
(
shippingChannelId
)
=>
{
for
(
let
index
in
this
.
channelList
)
{
for
(
let
index
in
this
.
channelList
)
{
let
channelItem
=
this
.
channelList
[
index
];
let
channelItem
=
this
.
channelList
[
index
]
if
(
channelItem
.
channelId
==
shippingChannelId
)
{
if
(
channelItem
.
channelId
==
shippingChannelId
)
{
return
this
.
$l
(
channelItem
,
'
name
'
);
return
this
.
$l
(
channelItem
,
'
name
'
)
}
}
}
return
'
/
'
}
}
return
'
/
'
}
}
}
}
,
created
()
{
this
.
transportTypes
=
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
).
filter
((
item
)
=>
item
.
value
==
"
3
"
);
console
.
log
(
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
'
this.transportTypes
'
)
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
}
)
}
,
}
,
created
()
{
/** 取消按钮 */
getWarehouseList
().
then
(
res
=>
this
.
warehouseList
=
res
.
data
);
cancel
()
{
this
.
getList
();
this
.
open
=
false
this
.
getChannelList
();
this
.
reset
()
}
,
}
,
methods
:
{
/* 关闭弹窗 */
getChannelList
(){
closeDialog
(
type
)
{
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
this
.
$set
(
this
.
dialogCfg
,
"
open
"
,
false
);
},
if
(
type
===
"
add
"
||
type
===
"
edit
"
)
{
/** 查询列表 */
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
();
this
.
getList
();
},
}
/** 重置按钮操作 */
}
,
resetQuery
()
{
/** 表单重置 */
this
.
dateRangeCreateTime
=
[];
reset
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
form
=
{
this
.
handleQuery
();
id
:
undefined
,
},
cabinetId
:
undefined
,
/** 新增按钮操作 */
startWarehouseId
:
undefined
,
handleAdd
()
{
destWarehouseId
:
undefined
,
this
.
reset
();
transportType
:
undefined
this
.
open
=
true
;
}
this
.
title
=
this
.
$t
(
"
添加出货
"
);
this
.
resetForm
(
'
form
'
)
},
}
,
/** 修改按钮操作 */
/** 搜索按钮操作 */
handleUpdate
(
row
)
{
handleQuery
()
{
this
.
reset
();
this
.
queryParams
.
pageNo
=
1
const
id
=
row
.
id
;
this
.
getList
()
getbox
(
id
).
then
(
response
=>
{
}
,
this
.
form
=
response
.
data
;
/** 重置按钮操作 */
this
.
open
=
true
;
resetQuery
()
{
this
.
title
=
this
.
$t
(
"
修改出货
"
);
this
.
dateRangeCreateTime
=
[]
});
this
.
resetForm
(
'
queryForm
'
)
},
this
.
handleQuery
()
/** 提交按钮 */
}
,
submitForm
()
{
/** 新增按钮操作 */
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
handleAdd
()
{
if
(
!
valid
)
{
this
.
$set
(
this
.
dialogCfg
,
'
title
'
,
this
.
$t
(
'
添加出货
'
))
return
;
this
.
$set
(
this
.
dialogCfg
,
'
dialogType
'
,
'
add
'
)
}
this
.
$set
(
this
.
dialogCfg
,
'
width
'
,
'
600px
'
)
this
.
$set
(
this
.
dialogCfg
,
'
fullscreen
'
,
false
)
this
.
$set
(
this
.
dialogCfg
,
'
open
'
,
true
)
this
.
currRow
=
{
transportType
:
'
1
'
}
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
()
const
id
=
row
.
id
getbox
(
id
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
this
.
open
=
true
this
.
title
=
this
.
$t
(
'
修改出货
'
)
}
)
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
'
form
'
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
}
this
.
form
.
transportType
=
3
;
this
.
form
.
transportType
=
3
// 修改的提交
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updatebox
(
this
.
form
).
then
(
response
=>
{
updatebox
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
));
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
修改成功
'
))
this
.
open
=
false
;
this
.
open
=
false
this
.
getList
();
this
.
getList
()
});
}
)
return
;
return
}
}
// 添加的提交
// 添加的提交
createbox
(
this
.
form
).
then
(
response
=>
{
createbox
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
新增成功
'
))
this
.
open
=
false
;
this
.
open
=
false
this
.
getList
();
this
.
getList
()
});
}
)
});
}
)
},
}
,
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
id
=
row
.
id
;
const
id
=
row
.
id
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除出货编号为{id}的数据项?
'
,
{
id
})).
then
(
function
()
{
this
.
$modal
return
deletebox
(
id
);
.
confirm
(
this
.
$t
(
'
是否确认删除出货编号为{id
}
的数据项?
'
,
{
id
}
))
}).
then
(()
=>
{
.
then
(
function
()
{
this
.
getList
();
return
deletebox
(
id
)
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
));
}
)
}).
catch
(()
=>
{
.
then
(()
=>
{
});
this
.
getList
()
},
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
删除成功
'
))
/** 导出按钮操作 */
}
)
handleExport
()
{
.
catch
(()
=>
{
}
)
// 处理查询参数
}
,
let
params
=
{...
this
.
queryParams
};
/** 导出按钮操作 */
params
.
pageNo
=
undefined
;
handleExport
()
{
params
.
pageSize
=
undefined
;
// 处理查询参数
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
let
params
=
{
...
this
.
queryParams
}
// 执行导出
params
.
pageNo
=
undefined
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认导出所有出货数据项?
'
)).
then
(()
=>
{
params
.
pageSize
=
undefined
this
.
exportLoading
=
true
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
)
return
exportboxExcel
(
params
);
// 执行导出
}).
then
(
response
=>
{
this
.
$modal
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
.
confirm
(
this
.
$t
(
'
是否确认导出所有出货数据项?
'
))
this
.
exportLoading
=
false
;
.
then
(()
=>
{
}).
catch
(()
=>
{
this
.
exportLoading
=
true
});
return
exportboxExcel
(
params
)
},
}
)
/** 查看按钮操作 */
.
then
((
response
)
=>
{
handleCommand
(
row
,
command
)
{
this
.
$download
.
excel
(
response
,
'
${table.classComment
}
.xls
'
)
switch
(
command
)
{
this
.
exportLoading
=
false
case
'
sea
'
:
}
)
this
.
$router
.
push
(
'
/box/shippingSea/
'
+
row
.
id
)
.
catch
(()
=>
{
}
)
break
;
}
,
/** 查看按钮操作 */
handleCommand
(
row
,
command
)
{
switch
(
command
)
{
case
'
sea
'
:
this
.
$router
.
push
(
'
/box/shippingSea/
'
+
row
.
id
)
break
case
'
edit
'
:
case
'
edit
'
:
this
.
handleUpdate
(
row
);
this
.
handleUpdate
(
row
)
break
;
break
case
'
delete
'
:
case
'
delete
'
:
this
.
handleDelete
(
row
);
this
.
handleDelete
(
row
)
break
;
break
}
}
},
}
}
};
}
}
<
/script
>
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
.
notice
-
dialog
{
::
v
-
deep
.
notice
-
title
{
font
-
size
:
24
px
;
font
-
weight
:
bold
;
margin
-
bottom
:
10
px
;
}
::
v
-
deep
.
operate
-
button
{
margin
-
top
:
10
px
;
text
-
align
:
center
;
}
}
<
/style
>
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