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
4df61f41
Commit
4df61f41
authored
Jun 05, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善打包页面
parent
86ac0e37
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
316 additions
and
728 deletions
+316
-728
order.js
src/api/ecw/order.js
+26
-0
dict.js
src/utils/dict.js
+1
-0
Package.vue
src/views/ecw/order/stocking/components/Package.vue
+235
-567
index.vue
src/views/ecw/order/stocking/index.vue
+54
-161
No files found.
src/api/ecw/order.js
View file @
4df61f41
...
...
@@ -803,3 +803,29 @@ export function exportReadyStock(params){
responseType
:
'
blob
'
})
}
// 无需打包
export
function
noNeedPack
(
orderItemId
){
return
request
({
url
:
'
/order/order-warehouse-in/no-need-to-pack
'
,
method
:
'
get
'
,
params
:
{
orderItemId
}
})
}
// 完成打包
export
function
finishPacked
(
data
){
return
request
({
url
:
'
/order/order-warehouse-in/finish-packed
'
,
method
:
'
post
'
,
data
})
}
// 完成备货
export
function
finishStock
(
data
){
return
request
({
url
:
'
/order/order-warehouse-in/finish-stocked
'
,
method
:
'
put
'
,
data
})
}
src/utils/dict.js
View file @
4df61f41
...
...
@@ -120,6 +120,7 @@ export const DICT_TYPE = {
ECW_CUSTOMER_TRANSPORT_TYPE
:
'
customer_transport_type
'
,
// 客户出货渠道(跟运输方式相同,但是显示全部)
ECW_ORDER_APPROVAL_TYPE
:
'
order_approval_type
'
,
// 订单相关审批类型
ECW_FEE_SOURCE
:
'
fee_source
'
,
// 费用来源
STOCK_UP_EXCEPTION_TYPE
:
'
stock_up_exception_type
'
,
// 备货异常类型
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
...
...
src/views/ecw/order/stocking/components/Package.vue
View file @
4df61f41
<
template
>
<div
style=
"display: inline-block;margin-right: 10px"
>
<el-button
size=
"mini"
@
click=
"visible = true"
type=
"text"
>
{{
title
}}
</el-button>
<el-dialog
:title=
"title + ' - ' + warehousing.orderNo"
:visible.sync=
"visible"
width=
"1280px"
>
<el-tabs
v-model=
"activeName"
type=
"card"
>
<el-tab-pane
:label=
"edit ? $t('货物修改') : $t('货物入仓')"
name=
"first"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"formRules"
label-width=
"80px"
>
<el-descriptions
border
:column=
"2"
>
<el-descriptions-item>
<template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
中文品名
'
)
}}
</
template
>
<span
style=
"min-width: 200px;margin-right: 15px;display: inline-block"
>
<product-selector
v-if=
"!order.parentOrderId && !isAdd"
v-model=
"form.prodId"
@
change=
"onProductChange"
determined
/>
<span
v-else
>
{{ warehousing.prodTitleZh }}
</span>
{{ warehousing.prodTitleZh }}
</span>
<el-button
v-if=
"!order.parentOrderId && !isAdd"
type=
"text"
@
click=
"isShowProduct = true"
>
添加新商品
</el-button>
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
英文品名
'
)
}}
</
template
>
<product-selector
v-if=
"!order.parentOrderId && !isAdd"
lang=
"En"
v-model=
"form.prodId"
@
change=
"onProductChange"
determined
/>
<span
v-else
>
{{ warehousing.prodTitleEn }}
</span>
<span>
{{ warehousing.prodTitleEn }}
</span>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('品牌')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
品牌
'
)
}}
</
template
>
...
...
@@ -33,7 +26,7 @@
remote
@
change=
"handleBrandChange"
:remote-method=
"getProductBrandPage"
clearable
>
disabled
>
<el-option
v-for=
"item in brandList"
:key=
"item.id"
...
...
@@ -51,29 +44,29 @@
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
收费模式
'
)
}}
</
template
>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('填单参数')"
>
{{ $t('箱数:') }}
<el-input
size=
"mini"
v-if=
"edit"
v-model=
"warehousing.num"
style=
"display: inline-block;width: 100px"
></el-input
>
<span
v-else
>
{{ warehousing.num }}
</span><br>
{{ $t('体积:') }}
<el-input
size=
"mini"
v-if=
"edit"
v-model=
"warehousing.volume"
style=
"display: inline-block;width: 100px"
></el-input
>
<span
v-else
>
{{ warehousing.volume }}
</span>
m³
<br>
{{ $t('重量:') }}
<el-input
size=
"mini"
v-if=
"edit"
v-model=
"warehousing.weight"
style=
"display: inline-block;width: 100px"
></el-input
>
<span
v-else
>
{{ warehousing.weight }}
</span>
Kg
<el-descriptions-item
:label=
"$t('填单参数')"
>
{{ $t('箱数:') }}
<span>
{{ warehousing.num }}
</span><br
>
{{ $t('体积:') }}
<span>
{{ warehousing.volume }}
</span>
m³
<br
>
{{ $t('重量:') }}
<span
>
{{ warehousing.weight }}
</span>
Kg
</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('材质')"
style=
"margin-top: 20px"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
v-model=
"form.material"
clearable
></dict-selector
>
<dict-tag
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
:value=
"orderItemB.material"
clearable
></dict-tag
>
</el-form-item>
</el-col>
<el-col
:span=
"16"
>
<el-form-item
:label=
"$t('入仓特性')"
style=
"margin-top: 20px"
>
<el-checkbox-group
v-model=
"form.prodAttrIds"
>
<el-checkbox-group
v-model=
"form.prodAttrIds"
disabled
>
<el-checkbox
v-for=
"item in attrList"
:key=
"item.id"
:label=
"item.id"
>
{{ item.attrName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item
:label=
"$t('入仓时间')"
v-if=
"!edit"
>
<el-date-picker
v-model=
"form.inTime"
type=
"datetime"
:placeholder=
"$t('请选择入仓时间')"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item
>
<!--
<el-form-item :label="$t('入仓时间')" v-if="!edit">
{{form.inTime}}
</el-form-item>--
>
</el-form>
<el-card
class=
"box-card"
>
...
...
@@ -189,278 +182,24 @@
<
template
v-slot=
"{ row, column, $index}"
>
<el-popconfirm
v-if=
"$index >= protectRowCount"
title=
"确定要删除该行入仓
记录吗?"
title=
"确定要删除该行
记录吗?"
@
confirm=
"handleDeleteRow($index)"
>
<template
v-slot:reference
>
<el-button
size=
"mini"
type=
"danger"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
</
template
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
<el-tab-pane
:label=
"$t('添加新品名')"
name=
"second"
v-if=
"!edit"
>
<el-form
ref=
"form1"
:model=
"form1"
:rules=
"formRules"
label-width=
"80px"
>
<el-descriptions
border
:column=
"2"
>
<el-descriptions-item>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
中文品名
'
)
}}
</
template
>
<el-form-item
required
label=
""
prop=
"prodId"
label-width=
"0"
>
<product-selector
v-model=
"form1.prodId"
@
change=
"onProductChange1"
/>
<el-button
type=
"text"
@
click=
"isShowProduct = true"
style=
"margin-left: 15px"
>
添加新商品
</el-button>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
英文品名
'
)
}}
</
template
>
<el-form-item
required
label=
""
prop=
"prodId"
label-width=
"0"
>
<product-selector
lang=
"En"
v-model=
"form1.prodId"
@
change=
"onProductChange1"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('品牌')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
品牌
'
)
}}
</
template
>
<el-form-item
required
label=
""
prop=
"brand"
label-width=
"0"
>
<el-select
v-model=
"form1.brand"
:placeholder=
"$t('可修改')"
filterable
remote
@
change=
"handleBrandChange"
:remote-method=
"getProductBrandPage1"
clearable
>
<el-option
v-for=
"item in brandList1"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('是否备案')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
是否备案
'
)
}}
</
template
>
{{ isBeian1 }}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('收费模式')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
收费模式
'
)
}}
</
template
>
{{ feeType1 }}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('填单参数')"
>
{{ $t('非填单货物') }}
</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('材质')"
style=
"margin-top: 20px"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
v-model=
"form1.material"
clearable
></dict-selector>
</el-form-item>
</el-col>
<el-col
:span=
"16"
>
<el-form-item
:label=
"$t('入仓特性')"
style=
"margin-top: 20px"
>
<el-checkbox-group
v-model=
"form1.prodAttrIds"
>
<el-checkbox
v-for=
"item in attrList"
:key=
"item.id"
:label=
"item.id"
>
{{ item.attrName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item
:label=
"$t('入仓时间')"
>
<el-date-picker
v-model=
"form1.inTime"
type=
"datetime"
:placeholder=
"$t('请选择入仓时间')"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
</el-form>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{ $t('入仓记录') }}
</span>
<el-button
style=
"float: right;margin-left: 15px"
size=
"mini"
type=
"primary"
icon=
"el-icon-minus"
circle
@
click=
"handleDelete(1)"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"handleAdd(1)"
></el-button>
</div>
<el-form
ref=
"tableForm1"
:model=
"form1"
:rules=
"tableFormRules"
size=
"mini"
>
<el-table
:data=
"form1.table"
style=
"width: 100%"
>
<el-table-column
:label=
"$t('箱数')"
width=
"150px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
箱数
'
)
}}
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
cartonsNum
}}
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
,
form1
.
table
[
$index
].
unit
)
}}
</span>
<el-input
v-else
v-model=
"form1.table[$index].cartonsNum"
placeholder=
""
>
<span
slot=
"append"
>
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
,
form1
.
table
[
$index
].
unit
)
}}
</span>
</el-input>
<dict-selector
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"form1.table[$index].specificationType"
@
change=
"handleVolume($index, 1)"
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
width=
"100px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
包装类型
'
)
}}
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
,
form1
.
table
[
$index
].
unit
)
}}
</span>
<dict-selector
v-else
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"form1.table[$index].unit"
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
长
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
boxGauge
?
form1
.
table
[
$index
].
boxGauge
.
split
(
'
*
'
)[
0
]
:
''
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"form1.table[$index].boxGauge1"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
宽
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
boxGauge
?
form1
.
table
[
$index
].
boxGauge
.
split
(
'
*
'
)[
1
]
:
''
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"form1.table[$index].boxGauge2"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
高
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
boxGauge
?
form1
.
table
[
$index
].
boxGauge
.
split
(
'
*
'
)[
2
]
:
''
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"form1.table[$index].boxGauge3"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"体积(m³)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
体积
'
)
}}
</span>
(m³)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
volume
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"form1.table[$index].volume"
placeholder=
""
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"重量(Kg)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
重量
'
)
}}
</span>
(Kg)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
weight
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"form1.table[$index].weight"
placeholder=
""
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
width=
"130px"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
quantityAll
}}
</span>
<el-input
v-else
v-model.number=
"form1.table[$index].quantityAll"
placeholder=
""
>
<template
slot=
"append"
>
{{
$t
(
'
个
'
)
}}
</
template
>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"form1.table[$index].id"
>
{{
form1
.
table
[
$index
].
expressNo
}}
</span>
<el-input
v-else
v-model=
"form1.table[$index].expressNo"
placeholder=
""
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
width=
"150px"
>
<
template
v-slot=
"{ row, column, $index }"
>
<warehouse-area-select
v-model=
"form1.table[$index].orderLocationBackVOList"
:readonly=
"form1.table[$index].id && !edit"
:order-id=
"orderId"
:order-item-id=
"warehousing.orderItemId"
:warehouse-in-id=
"form1.table[$index].id"
:warehouse-id=
"warehouseId"
:is-editing=
"edit"
></warehouse-area-select>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-popconfirm
title=
"确定要删除该行入仓记录吗?"
@
confirm=
"handleDeleteRow($index, 1)"
>
<template
v-slot:reference
>
<el-button
size=
"mini"
type=
"danger"
>
删除
</el-button>
</
template
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
</el-tabs>
<div
v-if=
"edit && order.status !== 3"
>
<h2>
{{ $t('审批流程') }}
</h2>
<work-flow
xmlkey=
"free_apply"
v-model=
"selectedUsers"
/>
<!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div>
<span
slot=
"footer"
>
<
template
v-if=
"!isEditing"
>
<el-button
@
click=
"handleClose"
>
{{
$t
(
'
关 闭
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit()"
>
{{
edit
?
$t
(
'
确认修改
'
)
:
$t
(
'
提 交
'
)
}}
</el-button>
</
template
>
<
template
v-else
>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + formId)"
>
{{
$t
(
'
审核中
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleCancelProcessInstance"
>
{{
$t
(
'
取消审核
'
)
}}
</el-button>
<el-button
@
click=
"handleClose"
>
{{
$t
(
'
返回
'
)
}}
</el-button>
</
template
>
<
template
v-else
>
</
template
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{ $t('完成打包') }}
</el-button>
<el-button
@
click=
"handleClose"
>
{{ $t('返回')}}
</el-button>
</span>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog
title=
"添加商品"
:visible.sync=
"isShowProduct"
width=
"550px"
append-to-body
>
<el-form
ref=
"productForm"
:model=
"productForm"
:rules=
"productRules"
label-width=
"110px"
>
<el-form-item
:label=
"$t('商品类型')"
prop=
"typeId"
>
<el-select
v-model=
"productForm.typeId"
:placeholder=
"$t('选择商品类型')"
clearable
>
<el-option
v-for=
"types in typeList"
:key=
"types.id"
:label=
"types.titleZh"
:value=
"types.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('中文标题')"
prop=
"titleZh"
>
<el-input
v-model=
"productForm.titleZh"
:placeholder=
"$t('请输入中文标题')"
/>
</el-form-item>
<el-form-item
:label=
"$t('英文标题')"
prop=
"titleEn"
>
<el-input
v-model=
"productForm.titleEn"
:placeholder=
"$t('请输入英文标题')"
/>
</el-form-item>
<el-form-item
:label=
"$t('商品特性')"
prop=
"attrArray"
>
<el-select
v-model=
"productForm.attrArray"
:placeholder=
"$t('选择商品特性')"
clearable
multiple
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"productSubmit"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"productCancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
...
...
@@ -470,13 +209,13 @@ import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBr
import
{
cancelProcessInstance
}
from
"
@/api/bpm/processInstance
"
import
WorkFlow
from
"
@/components/WorkFlow
"
import
{
DICT_TYPE
,
getDictDataLabel
,
getDictDatas
}
from
"
@/utils/dict
"
import
{
orderWarehouseIn
,
orderWarehouseInUpdateApply
}
from
"
@/api/ecw/order
"
import
{
finishPacked
,
orderWarehouseIn
,
orderWarehouseInUpdateApply
}
from
"
@/api/ecw/order
"
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
import
{
addProduct
}
from
"
@/api/ecw/product
"
export
default
{
name
:
"
Warehous
e
"
,
name
:
"
Packag
e
"
,
components
:
{
ProductSelector
,
...
...
@@ -493,15 +232,17 @@ export default {
type
:
Object
,
default
:
undefined
},
// 是否集运
isJiyun
:
{
type
:
Boolean
,
default
:
false
},
//
入仓
修改
//
是否
修改
edit
:
{
type
:
Boolean
,
default
:
false
},
// 订单信息中的商品项
orderItemA
:
{
type
:
Object
,
default
:
()
=>
{
...
...
@@ -512,6 +253,7 @@ export default {
}
}
},
// 入仓的商品项
orderItemB
:
{
type
:
Object
,
default
:
()
=>
{
...
...
@@ -691,7 +433,9 @@ export default {
attrList
:
[]
}
},
created
()
{
this
.
visible
=
true
},
methods
:
{
init
(){
this
.
form
.
brandType
=
this
.
warehousing
.
brandType
...
...
@@ -758,45 +502,6 @@ export default {
},
0
)
},
handleSubmit
()
{
if
(
this
.
activeName
!==
"
first
"
){
// 添加非填单货物
if
(
this
.
form1
.
prodAttrIds
.
indexOf
(
4
)
!==
-
1
)
{
return
this
.
$notify
({
title
:
this
.
$t
(
'
提示
'
),
message
:
this
.
$t
(
"
订单包含不接受货物,请检查
"
),
type
:
'
warning
'
})
}
this
.
$refs
[
'
form1
'
].
validate
(
valid
=>
{
this
.
$refs
[
'
tableForm1
'
].
validate
(
valid1
=>
{
if
(
!
valid
||
!
valid1
)
{
return
}
return
orderWarehouseIn
({
...
this
.
form1
,
brandType
:
this
.
warehousing
.
brandType
,
orderId
:
this
.
warehousing
.
orderId
,
orderItemId
:
undefined
,
orderNo
:
this
.
warehousing
.
orderNo
,
prodAttrIds
:
this
.
form
.
prodAttrIds
.
join
(
'
,
'
),
orderWarehouseInItemDoList
:
this
.
form1
.
table
.
map
(
e
=>
{
return
{
...
e
,
boxGauge
:
e
.
boxGauge1
+
'
*
'
+
e
.
boxGauge2
+
'
*
'
+
e
.
boxGauge3
,
orderLocationCreateReqVOList
:
e
.
orderLocationBackVOList
}
})
}).
then
(
r
=>
{
if
(
r
.
data
)
{
this
.
$message
.
success
(
'
新增入仓成功
'
)
this
.
handleClose
()
}
else
{
this
.
$message
.
success
(
'
新增入仓失败
'
)
}
})
})
})
}
else
{
if
(
this
.
form
.
prodAttrIds
.
indexOf
(
4
)
!==
-
1
)
{
return
this
.
$notify
({
title
:
this
.
$t
(
'
提示
'
),
...
...
@@ -809,46 +514,11 @@ export default {
if
(
!
valid
||
!
valid1
)
{
return
}
if
(
this
.
edit
)
{
// 入仓修改
return
orderWarehouseInUpdateApply
({
...
this
.
form
,
brandType
:
this
.
warehousing
.
brandType
,
orderId
:
this
.
warehousing
.
orderId
,
orderItemId
:
this
.
warehousing
.
orderItemId
,
orderNo
:
this
.
warehousing
.
orderNo
,
num
:
this
.
warehousing
.
num
,
volume
:
(
+
this
.
warehousing
.
volume
)?.
toFixed
(
2
)
||
''
,
weight
:
(
+
this
.
warehousing
.
weight
)?.
toFixed
(
2
)
||
''
,
prodId
:
this
.
form
.
prodId
,
prodAttrIds
:
this
.
form
.
prodAttrIds
.
join
(
'
,
'
),
"
orderWarehouseInUpdateItemDoList
"
:
this
.
form
.
table
.
map
(
e
=>
{
return
{
...
e
,
boxGauge
:
e
.
boxGauge1
+
'
*
'
+
e
.
boxGauge2
+
'
*
'
+
e
.
boxGauge3
,
orderLocationCreateReqVOList
:
e
.
orderLocationBackVOList
}
}),
copyUserId
:
this
.
selectedUsers
}).
then
(
r
=>
{
if
(
r
.
data
)
{
this
.
$message
.
success
(
r
.
msg
||
'
入仓修改发起成功
'
)
this
.
handleClose
()
}
else
{
this
.
$message
.
success
(
r
.
msg
||
'
入仓修改发起失败
'
)
}
})
}
else
{
// 首次入仓、入仓补充
return
orderWarehouseIn
({
...
this
.
form
,
brandType
:
this
.
warehousing
.
brandType
,
return
finishPacked
({
orderId
:
this
.
warehousing
.
orderId
,
orderItemId
:
this
.
warehousing
.
orderItemId
,
orderNo
:
this
.
warehousing
.
orderNo
,
isAppend
:
this
.
isAdd
?
true
:
undefined
,
prodAttrIds
:
this
.
form
.
prodAttrIds
.
join
(
'
,
'
),
orderWarehouseInItemDoList
:
this
.
form
.
table
.
map
(
e
=>
{
orderWarehouseInItemDtoList
:
this
.
form
.
table
.
map
(
e
=>
{
return
{
...
e
,
boxGauge
:
e
.
boxGauge1
+
'
*
'
+
e
.
boxGauge2
+
'
*
'
+
e
.
boxGauge3
,
...
...
@@ -857,16 +527,14 @@ export default {
}),
}).
then
(
r
=>
{
if
(
r
.
data
)
{
this
.
$message
.
success
(
'
入仓
成功
'
)
this
.
$message
.
success
(
'
打包
成功
'
)
this
.
handleClose
()
}
else
{
this
.
$message
.
success
(
'
入仓
失败
'
)
this
.
$message
.
success
(
'
打包
失败
'
)
}
})
}
})
})
}
},
handleCancelProcessInstance
(){
this
.
$prompt
(
'
请输入取消原因?
'
,
this
.
$t
(
"
取消流程
"
),
{
...
...
src/views/ecw/order/stocking/index.vue
View file @
4df61f41
...
...
@@ -85,16 +85,16 @@
prop=
"address"
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index }"
>
<el-button
size=
"mini"
type=
"warning"
@
click=
"
$alert('TODO'
)"
>
{{
$t
(
'
无需打包
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"
$router.push(`package?orderId=$
{row.orderId}
&
orderItemId=${row.orderItemId}`
)">
{{
$t
(
'
打包
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"
$router.push(`package?orderId=$
{row.orderId}
&
orderItemId=${row.orderItemId}`
)">
{{
$t
(
'
修改打包
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"warning"
@
click=
"
noNeedPack(row
)"
>
{{
$t
(
'
无需打包
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"
package(row, $t('打包')
)"
>
{{
$t
(
'
打包
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"
package(row, $t('修改打包')
)"
>
{{
$t
(
'
修改打包
'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<
h2
v-if=
"orderSpecialNeeds.length > 0"
>
{{$t('特殊需求')}}
</h2
>
<
!--<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2>--
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"200px"
>
<el-form-item
:label=
"$i18n.locale === 'en_US' ? item.labelEn : item.label"
v-for=
"(item, index) in orderSpecialNeeds"
:key=
"item.value"
style=
"width: 600px"
>
<
!--<
el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)">
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" slot="append" style="width: 100px">
<el-option
...
...
@@ -105,7 +105,7 @@
</el-option>
</el-select>
</el-input>
</el-form-item>
</el-form-item>
-->
<h2>
{{$t('订单数据')}}
</h2>
<el-form-item
:label=
"$t('总方数')"
style=
"width: 380px"
>
...
...
@@ -124,22 +124,23 @@
<span
style=
"font-size: 18px"
>
{{$t('入仓影像')}}
</span>
</div>
<div>
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"form.
u
rls"
></image-and-video-upload>
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"form.
exceptionU
rls"
></image-and-video-upload>
</div>
</el-card>
<div
style=
"text-align: center;margin-top: 15px"
v-if=
"!(order.status !== 3 && isEdit)"
>
<div
style=
"text-align: center;margin-top: 15px"
>
<el-button
@
click=
"escapeBol = true;"
type=
"primary"
>
{{$t('转异')}}
</el-button>
<el-button
type=
"primary"
@
click=
"
finishVisible = true
"
>
{{$t('完成备货')}}
</el-button>
<el-button
type=
"primary"
@
click=
"
handleSubmit
"
>
{{$t('完成备货')}}
</el-button>
</div>
</el-form>
<el-dialog
:title=
"order.orderNo + $t('订单转异')"
center
:visible.sync=
"escapeBol"
>
<el-form
label-position=
"top"
label-width=
"200"
ref=
"exceptionForm"
:model=
"form"
:rules=
"exceptionRules"
>
<el-form-item
:label=
"$t('
原因
类型')"
prop=
"manualExceptionType"
>
<dict-selector
v-model=
"form.manualExceptionType"
form-type=
"checkbox"
:type=
"DICT_TYPE.
MANUAL
_EXCEPTION_TYPE"
multiple
></dict-selector>
<el-form-item
:label=
"$t('
异常
类型')"
prop=
"manualExceptionType"
>
<dict-selector
v-model=
"form.manualExceptionType"
form-type=
"checkbox"
:type=
"DICT_TYPE.
STOCK_UP
_EXCEPTION_TYPE"
multiple
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('附件')"
>
<image-upload
v-model=
"form.exceptionUrls"
></image-upload>
<!--<image-upload v-model="form.exceptionUrls"></image-upload>-->
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"form.exceptionUrls"
></image-and-video-upload>
</el-form-item>
<el-form-item
:label=
"$t('详细信息')"
>
<el-input
v-model=
"form.descZh"
type=
"textarea"
></el-input>
...
...
@@ -152,16 +153,25 @@
</el-dialog>
<print-tag
v-if=
"isShowPrintTag"
:order-id=
"orderId"
@
close=
"isShowPrintTag = false"
></print-tag>
<package
:order=
"order"
:order-item-a=
"packageOrderItem"
:order-item-b=
"packageWarehouseItem"
:title=
"packageTitle"
v-if=
"!!packageOrderItem"
@
close=
"packageOrderItem=null;packageOrderItem=null"
></package>
</div>
</template>
<
script
>
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
finishPacked
,
finishStock
,
getLabelByOrder
,
getLabelWaitInByOrder
,
getOrder
,
getOrderWarehouseIn
,
getSpecialListByOrderId
,
listByOrderId
,
getSpecialListByOrderId
,
listByOrderId
,
noNeedPack
,
orderWarehouseInFinish
,
orderWarehouseInUpdateLabel
,
rollbackDelete
,
warehousePictureList
}
from
'
@/api/ecw/order
'
...
...
@@ -194,17 +204,7 @@ export default {
this
.
getOrderItemList
()
getSpecialListByOrderId
(
this
.
orderId
).
then
(
r
=>
this
.
specialList
=
r
.
data
)
Promise
.
all
([
this
.
getOrder
(),
listByOrderId
({
orderId
:
this
.
orderId
}).
then
(
r
=>
{
this
.
form
.
orderLocationCreateReqVOList
=
r
.
data
})
]).
then
(()
=>
{
/*// 等待仓库id和已选的储位后初始化储位信息
this.$nextTick(() => {
this.$refs.area.updateArea()
})*/
})
this
.
getOrder
()
}
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
},
...
...
@@ -217,12 +217,9 @@ export default {
finishVisible
:
false
,
warehousingVisible
:
false
,
form
:
{
orderSpecialNeedReceivableReqVoList
:
[],
orderLocationCreateReqVOList
:
[],
exceptionUrls
:[],
descZh
:
''
,
manualExceptionType
:[],
urls
:
[],
sumVolume
:
''
,
sumWeight
:
''
,
},
...
...
@@ -257,7 +254,13 @@ export default {
},
trigger
:
'
change
'
}
]
}
},
// 打包弹层的标题
packageTitle
:
null
,
// 当前打包的订单商品项
packageOrderItem
:
null
,
// 打包商品的入仓商品项
packageWarehouseItem
:
null
}
},
...
...
@@ -288,67 +291,17 @@ export default {
return
arr
.
indexOf
(
state
)
==
-
1
}
},
handleLabelSubmit
(){
orderWarehouseInUpdateLabel
({
...
this
.
label
,
orderId
:
this
.
orderId
}).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
$message
.
success
(
r
.
msg
||
this
.
$t
(
'
修改标签箱号成功
'
))
}
})
},
// 箱号标签回显
getLabelByOrder
(){
getLabelByOrder
(
this
.
orderId
).
then
(
r
=>
{
if
(
r
.
code
===
0
&&
!!
r
.
data
&&
r
.
data
.
length
>
0
)
{
this
.
label
.
orderLabelDtoList
=
r
.
data
}
else
{
// 没有历史数据,查默认值
getLabelWaitInByOrder
(
this
.
orderId
).
then
(
r
=>
{
console
.
log
(
r
)
if
(
r
.
code
===
0
&&
!!
r
.
data
)
{
this
.
label
.
orderLabelDtoList
=
[
r
.
data
]
}
})
}
})
},
handleLabelAdd
(
index
){
this
.
label
.
orderLabelDtoList
.
splice
(
index
+
1
,
0
,
{
"
end
"
:
''
,
"
start
"
:
''
})
},
getTowSum
(){
// let sumVolume = 0
// let sumWeight = 0
// this.order.orderItemVOList.forEach(e => {
// if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
// if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
// })
this
.
form
.
sumVolume
=
this
.
order
.
sumVolume
// || sumVolume
this
.
form
.
sumWeight
=
this
.
order
.
sumWeight
// || sumWeight
},
getOrder
(){
return
getOrder
(
this
.
orderId
).
then
(
r
=>
{
this
.
order
=
r
.
data
this
.
getTowSum
()
this
.
form
.
sumVolume
=
this
.
order
.
sumVolume
this
.
form
.
sumWeight
=
this
.
order
.
sumWeight
}).
then
(()
=>
{
this
.
getLabelByOrder
()
//
this.getLabelByOrder()
this
.
getWarehousePictureList
()
})
},
specialHas0
(){
let
result
=
false
this
.
form
.
orderSpecialNeedReceivableReqVoList
.
forEach
(
e
=>
{
if
(
e
.
receivableMoney
===
'
0
'
||
e
.
receivableMoney
===
''
){
result
=
true
}
})
return
result
},
// 提交转异
handleException
()
{
this
.
$refs
.
exceptionForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
...
...
@@ -358,84 +311,30 @@ export default {
}
})
},
// 完成备货
async
handleSubmit
()
{
if
(
this
.
specialHas0
())
{
const
confirm
=
await
this
.
$confirm
(
this
.
$t
(
'
有特需费用为0或未填写,请问是否继续?
'
),
this
.
$t
(
'
注意
'
),
{
confirmButtonText
:
this
.
$t
(
'
继续
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
),
type
:
'
warning
'
})
if
(
confirm
!==
'
confirm
'
){
return
}
}
let
form
=
{
orderSpecialNeedReceivableReqVoList
:
this
.
form
.
orderSpecialNeedReceivableReqVoList
,
"
orderLocationCreateReqVOList
"
:
this
.
form
.
orderLocationCreateReqVOList
,
"
orderId
"
:
this
.
order
.
orderId
,
urls
:
this
.
form
.
urls
,
sumVolume
:
this
.
form
.
sumVolume
,
sumWeight
:
this
.
form
.
sumWeight
,
isAppend
:
this
.
isAdd
}
// 标签箱号
if
(
this
.
order
.
parentOrderId
)
{
form
.
labelList
=
this
.
label
.
orderLabelDtoList
||
[]
}
// TODO 判断是否有未完成打包
if
(
this
.
escapeBol
)
{
form
.
exceptionUrls
=
this
.
form
.
exceptionUrls
.
length
!==
0
?
this
.
form
.
exceptionUrls
?.
split
(
'
,
'
)
:
[]
form
.
descZh
=
this
.
form
.
descZh
;
form
.
manualExceptionType
=
this
.
form
.
manualExceptionType
.
join
(
'
,
'
)
}
orderWarehouseInFinish
(
form
).
then
(
r
=>
{
if
(
r
.
code
===
0
)
{
this
.
escapeBol
=
false
;
this
.
finishVisible
=
false
const
message
=
!
r
.
data
?
this
.
$t
(
'
该订单已成功入仓,是否打印?
'
)
:
`<h3>
${
this
.
$t
(
'
货物已入仓,存在异常
'
)}
</h3>
${
this
.
$t
(
'
该订单已成功入仓,是否打印?
'
)}
`
this
.
$confirm
(
message
,
this
.
$t
(
'
货物已入仓
'
),
{
confirmButtonText
:
this
.
$t
(
'
是
'
),
cancelButtonText
:
this
.
$t
(
'
否
'
),
dangerouslyUseHTMLString
:
true
}
).
then
(()
=>
{
this
.
isShowPrint
=
true
}).
catch
(()
=>
{
// this.$store.dispatch('tagsView/delVisitedView')
this
.
$message
.
success
(
this
.
$t
(
'
入仓成功
'
))
this
.
$tab
.
closePage
()
})
}
let
form
=
{...
this
.
form
}
form
.
orderId
=
this
.
orderId
form
.
manualExceptionType
=
form
.
manualExceptionType
.
join
(
'
,
'
)
finishStock
(
form
).
then
(
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
操作成功
'
))
})
},
handleWarehousingReturn
(
item
){
this
.
$confirm
(
item
.
prodTitleZh
+
this
.
$t
(
'
退仓后不可恢复,是否确认退仓?
'
),
this
.
$t
(
'
确定要退仓?
'
),
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
),
type
:
'
warning
'
}).
then
(()
=>
{
rollbackDelete
({
"
orderId
"
:
item
.
orderId
,
"
orderItemId
"
:
item
.
orderItemId
}).
then
(()
=>
{
this
.
$message
({
type
:
'
success
'
,
message
:
this
.
$t
(
'
货物退仓成功!
'
)
});
this
.
getOrderItemList
()
this
.
getOrder
()
// 显示打包弹层
package
(
row
,
title
=
null
){
this
.
packageOrderItem
=
row
this
.
packageWarehouseItem
=
this
.
orderItemList
.
find
(
item
=>
item
.
orderItemId
=
row
.
orderItemId
)
this
.
packageTitle
=
title
||
this
.
$t
(
'
打包
'
)
},
// 无需打包
noNeedPack
(
row
){
noNeedPack
(
row
.
orderItemId
).
then
(
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
操作成功
'
))
})
}).
catch
(
e
=>
{
});
}
},
},
watch
:
{
orderSpecialNeeds
(
val
){
val
.
forEach
(
e
=>
{
...
...
@@ -455,12 +354,6 @@ export default {
return
this
.
orderItemList
.
find
(
item
=>
item
.
orderItemId
==
orderItemId
)
}
},
isAdd
()
{
return
this
.
$route
.
path
===
"
/order/warehousing-add
"
},
isEdit
()
{
return
this
.
$route
.
path
===
"
/order/warehousing-update
"
},
title
()
{
return
this
.
$i18n
.
locale
===
'
en_US
'
?
this
.
$route
.
meta
.
titleEn
:
this
.
$route
.
name
},
...
...
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