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
d66066bb
Commit
d66066bb
authored
Jul 06, 2023
by
我在何方
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator
into dev
parents
763c5060
fe2fb604
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
2496 additions
and
311 deletions
+2496
-311
App.vue
src/App.vue
+10
-1
customer.js
src/api/ecw/customer.js
+3
-1
indirectCustomer.js
src/api/ecw/indirectCustomer.js
+3
-2
apiAccessLog.js
src/api/infra/apiAccessLog.js
+2
-0
apiErrorLog.js
src/api/infra/apiErrorLog.js
+1
-0
operatelog.js
src/api/system/operatelog.js
+2
-2
index.vue
src/components/CustomerSelector/index.vue
+5
-0
index.vue
src/components/WarehouseAreaSelect/index.vue
+6
-3
en_US.json
src/i18n/languages/en_US.json
+2
-1
Navbar.vue
src/layout/components/Navbar.vue
+8
-4
request.js
src/utils/request.js
+1
-1
detail.vue
src/views/bpm/processInstance/detail.vue
+5
-0
copy.vue
src/views/bpm/task/copy.vue
+2
-2
index.vue
src/views/ecw/box/shippingAir/nodePage/mergePkg/index.vue
+26
-13
seaProcess.vue
src/views/ecw/box/shippingAir/seaProcess.vue
+6
-1
splitOrder.vue
...views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
+441
-148
supplementOrder.vue
.../ecw/box/shippingSea/nodePage/cabinet/supplementOrder.vue
+1
-0
preinstall.vue
src/views/ecw/box/shippingSea/nodePage/preinstall.vue
+17
-6
utils.js
src/views/ecw/box/shippingSea/utils.js
+2
-2
customerLog.vue
src/views/ecw/customer/customerLog.vue
+2
-5
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+92
-63
receiptDetail.vue
src/views/ecw/financial/receiptDetail.vue
+3
-1
detail.vue
src/views/ecw/offer/detail.vue
+1
-1
cargoControl.vue
src/views/ecw/order/cargoControl.vue
+1
-1
BoxSplitDetail.vue
src/views/ecw/order/components/BoxSplitDetail.vue
+28
-6
PrintWarehouseReceipt.vue
src/views/ecw/order/components/PrintWarehouseReceipt.vue
+2
-1
SplitDetail.vue
src/views/ecw/order/components/SplitDetail.vue
+48
-21
TransferCargo.vue
src/views/ecw/order/components/TransferCargo.vue
+5
-4
edit.vue
src/views/ecw/order/edit.vue
+2
-2
prepayDeal.vue
src/views/ecw/order/prepayDeal.vue
+1
-1
PutIn.vue
src/views/ecw/order/splitApply/components/PutIn.vue
+413
-0
WarehouseRecord.vue
...views/ecw/order/splitApply/components/WarehouseRecord.vue
+95
-0
index.vue
src/views/ecw/order/splitApply/index.vue
+1223
-0
transferWarehousing.vue
src/views/ecw/order/transferWarehousing.vue
+34
-16
Warehouse.vue
src/views/ecw/order/warehousing/components/Warehouse.vue
+3
-2
No files found.
src/App.vue
View file @
d66066bb
...
@@ -49,11 +49,20 @@ export default {
...
@@ -49,11 +49,20 @@ export default {
.items-center
{
.items-center
{
align-items
:
center
;
align-items
:
center
;
}
}
.flex-between
{
display
:
flex
;
justify-content
:
space-between
;
}
.empty-placeholder
{
.empty-placeholder
{
padding
:
50px
;
padding
:
50px
;
text-align
:
center
;
text-align
:
center
;
}
}
$sizes
:
0
,
10
,
20
,
30
,
50
,
100
,
150
,
200
,
300
,
500
,
800
,
1000
;
/*给el-input-number一个紧凑的样式*/
.el-input-number.is-controls-right.tight
.el-input__inner
{
padding-right
:
30px
;
padding-left
:
5px
;
}
$sizes
:
0
,
10
,
20
,
30
,
50
,
75
,
100
,
150
,
200
,
300
,
500
,
800
,
1000
;
@for
$i
from
1
through
length
(
$sizes
){
@for
$i
from
1
through
length
(
$sizes
){
$item
:
nth
(
$sizes
,
$i
);
$item
:
nth
(
$sizes
,
$i
);
.ml-
#{
$item
}
{
.ml-
#{
$item
}
{
...
...
src/api/ecw/customer.js
View file @
d66066bb
...
@@ -48,7 +48,9 @@ export function getCustomerPage(query) {
...
@@ -48,7 +48,9 @@ export function getCustomerPage(query) {
return
request
({
return
request
({
url
:
'
/ecw/customer/page
'
,
url
:
'
/ecw/customer/page
'
,
method
:
'
get
'
,
method
:
'
get
'
,
params
:
query
params
:
query
,
timeout
:
60000
})
})
}
}
/**
/**
...
...
src/api/ecw/indirectCustomer.js
View file @
d66066bb
...
@@ -25,7 +25,8 @@ export function getCustomerPage(query) {
...
@@ -25,7 +25,8 @@ export function getCustomerPage(query) {
return
request
({
return
request
({
url
:
'
/ecw/indirect-customer/page
'
,
url
:
'
/ecw/indirect-customer/page
'
,
method
:
'
get
'
,
method
:
'
get
'
,
params
:
query
params
:
query
,
timeout
:
30000
})
})
}
}
...
@@ -53,4 +54,4 @@ export function deleteIndirectCustomer(id) {
...
@@ -53,4 +54,4 @@ export function deleteIndirectCustomer(id) {
url
:
'
/ecw/indirect-customer/delete?id=
'
+
id
,
url
:
'
/ecw/indirect-customer/delete?id=
'
+
id
,
method
:
'
delete
'
method
:
'
delete
'
})
})
}
}
\ No newline at end of file
src/api/infra/apiAccessLog.js
View file @
d66066bb
...
@@ -5,7 +5,9 @@ export function getApiAccessLogPage(query) {
...
@@ -5,7 +5,9 @@ export function getApiAccessLogPage(query) {
return
request
({
return
request
({
url
:
'
/infra/api-access-log/page
'
,
url
:
'
/infra/api-access-log/page
'
,
method
:
'
get
'
,
method
:
'
get
'
,
timeout
:
1000
*
60
*
3
,
params
:
query
params
:
query
})
})
}
}
...
...
src/api/infra/apiErrorLog.js
View file @
d66066bb
...
@@ -13,6 +13,7 @@ export function getApiErrorLogPage(query) {
...
@@ -13,6 +13,7 @@ export function getApiErrorLogPage(query) {
return
request
({
return
request
({
url
:
'
/infra/api-error-log/page
'
,
url
:
'
/infra/api-error-log/page
'
,
method
:
'
get
'
,
method
:
'
get
'
,
timeout
:
1000
*
60
*
3
,
params
:
query
params
:
query
})
})
}
}
...
...
src/api/system/operatelog.js
View file @
d66066bb
...
@@ -5,7 +5,7 @@ export function listOperateLog(query) {
...
@@ -5,7 +5,7 @@ export function listOperateLog(query) {
return
request
({
return
request
({
url
:
'
/system/operate-log/page
'
,
url
:
'
/system/operate-log/page
'
,
method
:
'
get
'
,
method
:
'
get
'
,
timeout
:
5
*
6000
,
timeout
:
5
*
6000
0
,
params
:
query
params
:
query
})
})
}
}
...
@@ -16,7 +16,7 @@ export function exportOperateLog(query) {
...
@@ -16,7 +16,7 @@ export function exportOperateLog(query) {
url
:
'
/system/operate-log/export
'
,
url
:
'
/system/operate-log/export
'
,
method
:
'
get
'
,
method
:
'
get
'
,
params
:
query
,
params
:
query
,
timeout
:
5
*
6000
,
timeout
:
5
*
6000
0
,
responseType
:
'
blob
'
responseType
:
'
blob
'
})
})
}
}
src/components/CustomerSelector/index.vue
View file @
d66066bb
...
@@ -52,6 +52,8 @@ export default {
...
@@ -52,6 +52,8 @@ export default {
this
.
list
.
unshift
(
res
.
data
)
this
.
list
.
unshift
(
res
.
data
)
this
.
index
=
0
this
.
index
=
0
})
})
}
else
{
this
.
index
=
index
}
}
},
},
remoteMethod
(
keyword
){
remoteMethod
(
keyword
){
...
@@ -61,6 +63,9 @@ export default {
...
@@ -61,6 +63,9 @@ export default {
getCustomerSelect
(
params
)
getCustomerSelect
(
params
)
.
then
(
res
=>
this
.
list
=
res
.
data
.
list
)
.
then
(
res
=>
this
.
list
=
res
.
data
.
list
)
.
finally
(()
=>
this
.
loading
=
false
)
.
finally
(()
=>
this
.
loading
=
false
)
},
reset
(){
this
.
index
=
null
}
}
}
}
}
}
...
...
src/components/WarehouseAreaSelect/index.vue
View file @
d66066bb
...
@@ -142,7 +142,8 @@ export default {
...
@@ -142,7 +142,8 @@ export default {
if
(
f
.
selected
)
result
.
push
({
if
(
f
.
selected
)
result
.
push
({
orderId
:
this
.
orderId
,
orderId
:
this
.
orderId
,
wareId
:
f
.
pid
,
wareId
:
f
.
pid
,
areaId
:
f
.
id
areaId
:
f
.
id
,
locationName
:
f
.
code
})
})
else
{
else
{
f
.
positionList
?.
forEach
(
g
=>
{
f
.
positionList
?.
forEach
(
g
=>
{
...
@@ -151,7 +152,8 @@ export default {
...
@@ -151,7 +152,8 @@ export default {
orderId
:
this
.
orderId
,
orderId
:
this
.
orderId
,
wareId
:
g
.
domainId
,
wareId
:
g
.
domainId
,
areaId
:
g
.
areaId
,
areaId
:
g
.
areaId
,
locationId
:
g
.
id
locationId
:
g
.
id
,
locationName
:
f
.
code
+
g
.
code
})
})
else
g
.
children
?.
forEach
(
k
=>
{
else
g
.
children
?.
forEach
(
k
=>
{
// 子位置
// 子位置
...
@@ -159,7 +161,8 @@ export default {
...
@@ -159,7 +161,8 @@ export default {
orderId
:
this
.
orderId
,
orderId
:
this
.
orderId
,
wareId
:
k
.
domainId
,
wareId
:
k
.
domainId
,
areaId
:
k
.
areaId
,
areaId
:
k
.
areaId
,
locationId
:
k
.
id
locationId
:
k
.
id
,
locationName
:
f
.
code
+
k
.
code
})
})
})
})
})
})
...
...
src/i18n/languages/en_US.json
View file @
d66066bb
...
@@ -3896,5 +3896,6 @@
...
@@ -3896,5 +3896,6 @@
"入仓方数"
:
""
,
"入仓方数"
:
""
,
"收费方数"
:
""
,
"收费方数"
:
""
,
"可放入重量"
:
""
,
"可放入重量"
:
""
,
"可放入收费重量"
:
""
"可放入收费重量"
:
""
,
"确定注销并退出系统吗?"
:
"Are you sure to log out and exit the system?"
}
}
src/layout/components/Navbar.vue
View file @
d66066bb
...
@@ -94,10 +94,14 @@ export default {
...
@@ -94,10 +94,14 @@ export default {
}
}
},
},
created
()
{
created
()
{
// 未避免频繁内存溢出,减少请求记录感染,开发的时候不轮询消息
if
(
process
.
env
.
NODE_ENV
!=
'
development
'
){
setInterval
(()
=>
{
this
.
updateMessage
()
},
10000
)
}
this
.
updateMessage
()
this
.
updateMessage
()
setInterval
(()
=>
{
this
.
updateMessage
()
},
10000
)
},
},
components
:
{
components
:
{
Breadcrumb
,
Breadcrumb
,
...
@@ -158,7 +162,7 @@ export default {
...
@@ -158,7 +162,7 @@ export default {
saveLocale(value)
saveLocale(value)
}, */
}, */
async
logout
()
{
async
logout
()
{
this
.
$modal
.
confirm
(
'
确定注销并退出系统吗?
'
,
'
提示
'
).
then
(()
=>
{
this
.
$modal
.
confirm
(
this
.
$t
(
'
确定注销并退出系统吗?
'
),
this
.
$t
(
'
提示
'
)
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
location
.
href
=
'
/
'
;
location
.
href
=
'
/
'
;
})
})
...
...
src/utils/request.js
View file @
d66066bb
...
@@ -16,7 +16,7 @@ const service = axios.create({
...
@@ -16,7 +16,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL
:
(
localStorage
.
VUE_APP_BASE_API
||
process
.
env
.
VUE_APP_BASE_API
)
+
'
/admin-api/
'
,
// 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/
baseURL
:
(
localStorage
.
VUE_APP_BASE_API
||
process
.
env
.
VUE_APP_BASE_API
)
+
'
/admin-api/
'
,
// 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/
// 超时
// 超时
timeout
:
10000
timeout
:
1000
*
3
0
})
})
// request拦截器
// request拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
service
.
interceptors
.
request
.
use
(
config
=>
{
...
...
src/views/bpm/processInstance/detail.vue
View file @
d66066bb
...
@@ -281,6 +281,11 @@ export default {
...
@@ -281,6 +281,11 @@ export default {
component
:
"
BoxSplitDetail
"
,
component
:
"
BoxSplitDetail
"
,
id
:
this
.
processInstance
.
businessKey
,
id
:
this
.
processInstance
.
businessKey
,
},
},
// 退场拆单,跟出货装柜拆单一样
exit_split
:
{
component
:
"
BoxSplitDetail
"
,
id
:
this
.
processInstance
.
businessKey
,
},
merge_detail
:
{
merge_detail
:
{
component
:
"
MergeDetail
"
,
component
:
"
MergeDetail
"
,
id
:
this
.
processInstance
.
businessKey
,
id
:
this
.
processInstance
.
businessKey
,
...
...
src/views/bpm/task/copy.vue
View file @
d66066bb
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
<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=
"
process
Id"
>
<el-form-item
:label=
"$t('流程编号')"
prop=
"
instance
Id"
>
<el-input
v-model=
"queryParams.instanceId"
:placeholder=
"$t('请输入流程编号')"
clearable
/>
<el-input
v-model=
"queryParams.instanceId"
:placeholder=
"$t('请输入流程编号')"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('流程名称')"
prop=
"processName"
>
<el-form-item
:label=
"$t('流程名称')"
prop=
"processName"
>
<el-input
v-model=
"queryParams.processName"
:placeholder=
"$t('请输入任务名称')"
clearable
/>
<el-input
v-model=
"queryParams.processName"
:placeholder=
"$t('请输入任务名称')"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('流程分类')"
prop=
"
processName
"
>
<el-form-item
:label=
"$t('流程分类')"
prop=
"
categoryId
"
>
<el-select
v-model=
"queryParams.categoryId"
:placeholder=
"$t('请选择流程分类')"
clearable
>
<el-select
v-model=
"queryParams.categoryId"
:placeholder=
"$t('请选择流程分类')"
clearable
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY)"
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY)"
:key=
"dict.value"
:label=
"$l(dict, 'label')"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"$l(dict, 'label')"
:value=
"dict.value"
/>
...
...
src/views/ecw/box/shippingAir/nodePage/mergePkg/index.vue
View file @
d66066bb
...
@@ -34,14 +34,14 @@
...
@@ -34,14 +34,14 @@
</el-row>
</el-row>
<el-row
style=
"margin-top: 5px"
>
<el-row
style=
"margin-top: 5px"
>
<el-table
border
:data=
"pagList"
max-height=
"600px"
>
<el-table
border
:data=
"pagList"
max-height=
"600px"
>
<el-table-column
align=
"center"
:label=
"$t('序号')"
width=
"50"
prop=
"tidanNum
"
/>
<el-table-column
align=
"center"
:label=
"$t('序号')"
width=
"50"
type=
"index
"
/>
<el-table-column
:label=
"$t('箱号')"
align=
"center"
prop=
"pkgNum"
/>
<el-table-column
:label=
"$t('箱号')"
align=
"center"
prop=
"pkgNum"
/>
<el-table-column
:label=
"$t('尺寸')"
width=
"250px"
align=
"center"
>
<el-table-column
:label=
"$t('尺寸')"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
pkgLength
}}
*
{{
scope
.
row
.
pkgWidth
}}
*
{{
scope
.
row
.
pkgHight
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
pkgLength
}}
*
{{
scope
.
row
.
pkgWidth
}}
*
{{
scope
.
row
.
pkgHight
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('订单数')"
width=
"250px"
align=
"center"
prop=
"orderCount"
/>
<el-table-column
:label=
"$t('订单数')"
align=
"center"
prop=
"orderCount"
/>
<el-table-column
:label=
"$t('箱数')"
width=
"250px"
align=
"center"
prop=
"sumCount"
/>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
prop=
"sumCount"
/>
<el-table-column
:label=
"$t('入仓体积')"
width=
"250px"
align=
"center"
prop=
"sumVolume"
/>
<el-table-column
:label=
"$t('入仓体积')"
align=
"center"
prop=
"sumVolume"
/>
<el-table-column
:label=
"$t('入仓重量')"
align=
"center"
prop=
"sumWeight"
/>
<el-table-column
:label=
"$t('入仓重量')"
align=
"center"
prop=
"sumWeight"
/>
<el-table-column
:label=
"$t('入仓数量(个)')"
align=
"center"
prop=
"sumQuantity"
/>
<el-table-column
:label=
"$t('入仓数量(个)')"
align=
"center"
prop=
"sumQuantity"
/>
<el-table-column
:label=
"$t('状态')"
align=
"center"
prop=
"tallyStatus"
>
<el-table-column
:label=
"$t('状态')"
align=
"center"
prop=
"tallyStatus"
>
...
@@ -49,12 +49,12 @@
...
@@ -49,12 +49,12 @@
{{
statusData
[
scope
.
row
.
status
]
}}
{{
statusData
[
scope
.
row
.
status
]
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('创建时间')"
align=
"center"
>
<el-table-column
:label=
"$t('创建时间')"
align=
"center"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
formatDate
(
scope
.
row
.
createTime
,
'
YYYY-MM-DD HH:mm:ss
'
)
}}
{{
formatDate
(
scope
.
row
.
createTime
,
'
YYYY-MM-DD HH:mm:ss
'
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
align=
"center"
width=
"260"
class-name=
"small-padding fixed-width"
>
<el-table-column
:label=
"$t('操作')"
align=
"center"
width=
"260"
class-name=
"small-padding fixed-width"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.status == 1"
type=
"text"
size=
"small"
@
click=
"editMerge(scope.row)"
>
{{
$t
(
'
编辑
'
)
}}
</el-button>
<el-button
v-if=
"scope.row.status == 1"
type=
"text"
size=
"small"
@
click=
"editMerge(scope.row)"
>
{{
$t
(
'
编辑
'
)
}}
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"pkgPage(scope.row)"
>
{{
$t
(
'
装箱
'
)
}}
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"pkgPage(scope.row)"
>
{{
$t
(
'
装箱
'
)
}}
</el-button>
...
@@ -63,6 +63,8 @@
...
@@ -63,6 +63,8 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
</el-row>
</el-row>
</el-row>
</el-row>
<!-- 新增合包箱 -->
<!-- 新增合包箱 -->
...
@@ -76,18 +78,18 @@
...
@@ -76,18 +78,18 @@
</el-form-item>
</el-form-item>
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('长')"
prop=
"pkgLength"
>
<el-form-item
:label=
"$t('长')"
prop=
"pkgLength"
:rules=
"[{ validator: validatorPositiveNumber, message: $t('格式错误'), trigger: 'blur'}]"
>
<el-input
-number
v-model=
"addMergeForm.pkgLength"
:controls=
"false"
:precision=
"2
"
style=
"width: 100px"
/>
<el-input
v-model=
"addMergeForm.pkgLength
"
style=
"width: 100px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('宽')"
prop=
"pkgWidth"
>
<el-form-item
:label=
"$t('宽')"
prop=
"pkgWidth"
:rules=
"[{ validator: validatorPositiveNumber, message: $t('格式错误'), trigger: 'blur'}]"
>
<el-input
-number
v-model=
"addMergeForm.pkgWidth"
:controls=
"false"
:precision=
"2
"
style=
"width: 100px"
/>
<el-input
v-model=
"addMergeForm.pkgWidth
"
style=
"width: 100px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('高')"
prop=
"pkgHight"
>
<el-form-item
:label=
"$t('高')"
prop=
"pkgHight"
:rules=
"[{ validator: validatorPositiveNumber, message: $t('格式错误'), trigger: 'blur'}]"
>
<el-input
-number
v-model=
"addMergeForm.pkgHight"
:controls=
"false"
:precision=
"2
"
style=
"width: 100px"
/>
<el-input
v-model=
"addMergeForm.pkgHight
"
style=
"width: 100px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -133,7 +135,16 @@ export default {
...
@@ -133,7 +135,16 @@ export default {
printTag
printTag
},
},
data
()
{
data
()
{
let
validatorPositiveNumber
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
||
value
==
''
)
return
callback
();
if
(
!
value
)
return
callback
(
new
Error
(
'
请输入数字
'
))
if
(
!
Number
(
value
))
return
callback
(
new
Error
(
'
请输入有效数字
'
))
let
reg
=
/
((
^
[
1-9
]\d
*
)
|^0
)(\.\d
*
){0,1}
$/
;
if
(
!
reg
.
test
(
value
))
return
callback
(
new
Error
(
'
请输入有效数字
'
));
callback
();
}
return
{
return
{
validatorPositiveNumber
,
pagList
:
[],
pagList
:
[],
statusData
:
[
''
,
'
未装箱
'
,
'
装箱中
'
,
'
已封箱
'
],
statusData
:
[
''
,
'
未装箱
'
,
'
装箱中
'
,
'
已封箱
'
],
// 查询参数
// 查询参数
...
@@ -142,6 +153,7 @@ export default {
...
@@ -142,6 +153,7 @@ export default {
rows
:
10
,
rows
:
10
,
shipmentId
:
this
.
$attrs
.
shipmentObj
.
id
shipmentId
:
this
.
$attrs
.
shipmentObj
.
id
},
},
total
:
0
,
// 出货信息
// 出货信息
shipmentObj
:
this
.
$attrs
.
shipmentObj
,
shipmentObj
:
this
.
$attrs
.
shipmentObj
,
addMergedialogVisible
:
false
,
addMergedialogVisible
:
false
,
...
@@ -173,6 +185,7 @@ export default {
...
@@ -173,6 +185,7 @@ export default {
getList
()
{
getList
()
{
getMergePkgList
(
this
.
queryParams
).
then
((
res
)
=>
{
getMergePkgList
(
this
.
queryParams
).
then
((
res
)
=>
{
this
.
pagList
=
res
.
data
.
list
this
.
pagList
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
})
})
},
},
editMerge
(
row
)
{
editMerge
(
row
)
{
...
...
src/views/ecw/box/shippingAir/seaProcess.vue
View file @
d66066bb
...
@@ -139,7 +139,7 @@ export default {
...
@@ -139,7 +139,7 @@ export default {
},
},
/** 节点点击 */
/** 节点点击 */
nodeClick
(
currIndex
,
node
)
{
nodeClick
(
currIndex
,
node
)
{
if
(
!
checkPermi
([
'
box:
'
+
node
.
type
+
'
:action
'
]))
{
if
(
!
checkPermi
([
'
box
Air
:
'
+
node
.
type
+
'
:action
'
]))
{
this
.
$message
.
error
(
this
.
$t
(
"
没有此操作的权限
"
));
this
.
$message
.
error
(
this
.
$t
(
"
没有此操作的权限
"
));
return
;
return
;
}
}
...
@@ -240,6 +240,11 @@ export default {
...
@@ -240,6 +240,11 @@ export default {
continue
;
continue
;
}
}
//合包非必须步骤
if
(
type
===
"
mergePkg
"
){
++
nodeIndex
;
}
const
{
start
,
wait
,
end
}
=
status
;
const
{
start
,
wait
,
end
}
=
status
;
if
(
start
.
includes
(
val
[
keyName
]))
{
if
(
start
.
includes
(
val
[
keyName
]))
{
...
...
src/views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
View file @
d66066bb
...
@@ -141,42 +141,47 @@
...
@@ -141,42 +141,47 @@
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('入仓体积')"
align=
"center"
>
<el-table-column
:label=
"$t('入仓体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.volume"
@
change=
"updateField(scope.row, 'volume')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.volume"
@
change=
"updateField(scope.row, 'volume')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
m³
</span>
<span
slot=
"append"
>
m³
</span>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('收费体积')"
align=
"center"
>
<el-table-column
:label=
"$t('收费体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.chargeVolume"
@
change=
"updateField(scope.row, 'chargeVolume')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.chargeVolume"
@
change=
"updateField(scope.row, 'chargeVolume')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
m³
</span>
<span
slot=
"append"
>
m³
</span>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('入仓重量')"
align=
"center"
>
<el-table-column
:label=
"$t('入仓重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.weight"
@
change=
"updateField(scope.row, 'weight')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.weight"
@
change=
"updateField(scope.row, 'weight')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
kg
</span>
<span
slot=
"append"
>
kg
</span>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('收费重量')"
align=
"center"
>
<el-table-column
:label=
"$t('收费重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.chargeWeight"
@
change=
"updateField(scope.row, 'chargeWeight')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.chargeWeight"
@
change=
"updateField(scope.row, 'chargeWeight')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
kg
</span>
<span
slot=
"append"
>
kg
</span>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('货值')"
align=
"center"
>
<el-table-column
:label=
"$t('货值')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.worth"
@
change=
"updateField(scope.row, 'worth')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.worth"
@
change=
"updateField(scope.row, 'worth')"
size=
"mini"
>
<span
slot=
"append"
>
{{
$t
(
'
美
元
'
)
}}
</span>
<span
slot=
"append"
>
{{
$t
(
'
元
'
)
}}
</span>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
num
}}
</span>
<el-button
type=
"text"
@
click=
"showWarehouse(scope.row)"
>
{{
scope
.
row
.
num
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量(个)')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
quantity
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -205,80 +210,188 @@
...
@@ -205,80 +210,188 @@
</div>
</div>
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"1500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"150px"
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"150px"
inline
>
<el-row>
<el-form-item
:label=
"$t('中文品名')+':'"
prop=
"orderItemId"
>
<el-form-item
:label=
"$t('中文品名')+':'"
prop=
"orderItemId"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择中文品名')"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择中文品名')"
@
change=
"onProdChange"
>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleZh"
:value=
"item.orderItemId"
:key=
"item.id"
></el-option>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleZh"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('英文品名')+':'"
prop=
"orderItemId"
>
</el-row>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择英文品名')"
>
<el-row>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleEn"
:value=
"item.orderItemId"
:key=
"item.id"
></el-option>
<el-form-item
:label=
"$t('英文品名')+':'"
prop=
"orderItemId"
>
</el-select>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择英文品名')"
@
change=
"onProdChange"
>
</el-form-item>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleEn"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
</el-select>
<div
class=
"page-title"
>
{{$t('品名可拆数据')}}
</div>
</el-form-item>
<div
class=
"pl-20"
>
<el-row>
<span
class=
"mr-10"
>
{{$t('箱数')}}:{{ Math.min(mainOrderItem.num, maxNum) || 0 }}
</span>
<el-col
:span=
"12"
>
<span
class=
"mr-10"
>
{{ $t('入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³
</span>
<el-form-item
:label=
"$t('剩余箱数')+':'"
>
<span
class=
"mr-10"
>
{{ $t('收费方数') }}:{{ mainOrderItem.chargeVolume || 0 }}m³
</span>
{{shopForm.leftNum||0}}
<span
class=
"mr-10"
>
{{ $t('入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg
</span>
</el-form-item>
<span
class=
"mr-10"
>
{{ $t('收费重量') }}:{{ mainOrderItem.chargeWeight || 0 }}kg
</span>
</el-col>
<span
class=
"mr-10"
>
{{ $t('数量(个)') }}:{{ mainOrderItem.quantity || 0 }}
</span>
<!--剩余数量计算不出来,显示没意义-->
<span
class=
"mr-10"
>
{{ $t('剩余货值') }}:{{ mainOrderItem.worth || 0 }}{{ $t('元') }}
</span>
<!--<el-col :span="12" v-show="isQuantity">
</div>
<el-form-item :label="$t('剩余数量(个)')+':'">
<div
class=
"page-title"
>
{{$t('可拆入仓记录')}}
</div>
{{shopForm.leftQuantity||0}}
<el-table
</el-form-item>
:data=
"getOrderItemWarehouseIn(shopForm.orderItemId)"
</el-col>-->
style=
"width: 100%"
>
</el-row>
<el-table-column
:label=
"$t('箱数')"
>
<el-form-item
:label=
"$t('放入箱数')+':'"
>
<
template
v-slot=
"{row,$index}"
>
<el-input-number
v-model=
"shopForm.num"
controls-position=
"right"
:min=
"0"
:max=
"+shopForm.leftNum"
@
change=
"calcAverg"
></el-input-number>
{{
Math
.
min
(
getWarehouseLeftData
(
row
,
'
num
'
),
leftSplitNum
)
}}
</el-form-item>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"row.specificationType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
>
<
template
v-slot=
"{row,$index}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"row.unit"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge2
}}
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge3
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入仓体积(m³)"
>
<
template
v-slot=
"{row,$index}"
>
{{
getWarehouseLeftData
(
row
,
'
volume
'
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入仓重量(Kg)"
prop=
"weight"
>
<
template
v-slot=
"{row,$index}"
>
{{
getWarehouseLeftData
(
row
,
'
weight
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
prop=
"quantity"
>
<
template
v-slot=
"{row,$index}"
>
{{
getWarehouseLeftData
(
row
,
'
quantity
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
v-slot=
"{ row, column, $index }"
>
<warehouse-area-select
v-model=
"row.orderLocationBackVOList"
readonly
:warehouse-id=
"currentWarehouseId"
></warehouse-area-select>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-tag
v-if=
"getWarehouseInSplitData(row.id,'num') >= row.cartonsNum"
disabled
size=
"mini"
type=
"primary"
>
{{
$t
(
'
已拆完
'
)
}}
</el-tag>
<el-button
v-else
size=
"mini"
type=
"primary"
@
click=
"putInRecord(row)"
:disabled=
"leftSplitNum
<
=
0
"
>
放入
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
class=
"flex-between mt-20 mb-10"
>
<div
class=
"page-title"
style=
"margin: 0"
>
{{$t('已放入入仓记录')}}
</div>
<el-button
type=
"danger"
size=
"mini"
@
click=
"clearAll"
>
清空放入数据
</el-button>
</div>
<el-table
:data=
"shopForm.specsRecordVOList"
style=
"width: 100%"
>
<el-table-column
:label=
"$t('箱数')"
width=
"200px"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
num
}}
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"row.specificationType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
width=
"100px"
>
<
template
v-slot=
"{row,$index}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"row.unit"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge2
}}
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge3
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入仓体积(m³)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
volume
}}
</
template
>
</el-table-column>
<!--<el-table-column label="收费体积(m³)" prop="chargeVolume"></el-table-column>-->
<el-table-column
label=
"入仓重量(Kg)"
prop=
"weight"
></el-table-column>
<!--<el-table-column label="收费重量(Kg)" prop="chargeWeight"></el-table-column>-->
<el-table-column
:label=
"$t('数量')"
width=
"130px"
prop=
"quantity"
></el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
v-slot=
"{ row, column, $index }"
>
{{
getLocationName
(
row
.
orderLocationList
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"deleteRow($index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
label-width=
"0"
>
<div
class=
"page-title"
>
放入数据
</div>
{{ $t('剩余入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³,
<div
class=
"pl-20 mb-10"
>
{{$t('剩余收费方数')}}:{{ mainOrderItem.chargeVolume || 0 }}m³
<span
class=
"mr-10"
>
{{$t('箱数')}}:{{ putin.num || 0 }},
</span>
</el-form-item>
<span
class=
"mr-10"
>
{{ $t('数量(个)') }}:{{ putin.quantity || 0 }},
</span>
<span
class=
"mr-10"
>
{{ $t('入仓方数') }}:{{ putin.volume || 0 }}m³,
</span>
<span
class=
"mr-10"
>
{{ $t('入仓重量') }}:{{ putin.weight || 0 }}kg
</span>
</div>
<el-form-item
:label=
"$t('收费方数')"
prop=
"chargeVolume"
>
<el-input-number
v-model=
"shopForm.chargeVolume"
controls-position=
"right"
></el-input-number>
m³
</el-form-item>
<el-form-item
:label=
"$t('收费重量')"
prop=
"chargeWeight"
>
<el-input-number
v-model=
"shopForm.chargeWeight"
controls-position=
"right"
></el-input-number>
kg
</el-form-item>
<el-form-item
:label=
"$t('入仓体积')"
>
<el-form-item
:label=
"$t('放入货值')"
>
<el-input-number
v-model=
"shopForm.volume"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.volume"
></el-input-number>
<el-input-number
v-model=
"shopForm.worth"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.worth"
>
</el-form-item>
<
template
slot=
"append"
>
{{
$t
(
'
元
'
)
}}
</
template
>
<el-form-item
:label=
"$t('收费体积')"
>
</el-input-number>
<el-input-number
v-model=
"shopForm.chargeVolume"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.chargeVolume"
></el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('备注信息')"
>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
label-width=
"0"
>
<el-input
v-model=
"shopForm.remark"
></el-input>
{{ $t('剩余入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg,
</el-form-item>
{{$t('剩余收费重量')}}:{{ mainOrderItem.chargeWeight || 0 }}kg
</el-form-item>
<el-form-item
:label=
"$t('入仓重量')"
>
<el-input-number
v-model=
"shopForm.weight"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.weight"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('收费重量')"
>
<el-input-number
v-model=
"shopForm.chargeWeight"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.chargeWeight"
></el-input-number>
</el-form-item>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
label-width=
"0"
>
{{ $t('剩余货值') }}:{{ mainOrderItem.worth || 0 }}{{ $t('美元') }}
</el-form-item>
<el-form-item
:label=
"$t('放入货值')"
>
<el-input-number
v-model=
"shopForm.worth"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.worth"
></el-input-number>
</el-form-item>
<!--按照原型这里需要显示剩余数量,但是事实无法计算剩余数量,因为已装数量是未知的-->
<el-form-item
:label=
"$t('放入数量(个)')+':'"
prop=
"quantity"
v-if=
"isQuantity"
>
<el-input-number
v-model=
"shopForm.quantity"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.quantity || undefined"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('备注信息')+':'"
>
<el-input
v-model=
"shopForm.remarks"
></el-input>
</el-form-item>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"shopAdd"
>
{{$t('确定')}}
</el-button>
<el-button
type=
"primary"
@
click=
"shopAdd"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"shopCancel"
>
{{$t('取消')}}
</el-button>
<el-button
@
click=
"shopCancel"
>
{{$t('取消')}}
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<warehouse-record
v-if=
"currentWarehouseRecord"
:list=
"currentWarehouseRecord"
append-to-body
></warehouse-record>
<put-in
v-if=
"currentPutIn"
:warehouse-record=
"currentPutIn"
@
close=
"currentPutIn=null"
@
submit=
"handlePutin"
:warehouse-id=
"currentWarehouseId"
:maxNum=
"leftSplitNum"
append-to-body
></put-in>
</div>
</div>
</template>
</template>
...
@@ -292,15 +405,23 @@ import {
...
@@ -292,15 +405,23 @@ import {
import
{
quantityRequired
}
from
"
@/api/ecw/warehouse
"
;
import
{
quantityRequired
}
from
"
@/api/ecw/warehouse
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
WorkFlow
from
"
@/components/WorkFlow
"
;
import
WorkFlow
from
"
@/components/WorkFlow
"
;
import
{
getOrder
,
splitItemUpdate
}
from
"
@/api/ecw/order
"
;
import
{
getOrder
,
getOrderWarehouseIn
,
splitItemUpdate
}
from
"
@/api/ecw/order
"
;
import
{
serviceMsg
,
toReviewDetail
}
from
"
../../utils
"
;
import
{
serviceMsg
,
toReviewDetail
}
from
"
../../utils
"
;
import
{
createApproval
,
approvalCancel
,
splitList
}
from
"
@/api/ecw/boxSea
"
;
import
{
createApproval
,
approvalCancel
,
splitList
}
from
"
@/api/ecw/boxSea
"
;
import
Decimal
from
"
decimal.js
"
;
import
Decimal
from
"
decimal.js
"
;
import
Warehouse
from
"
@/views/ecw/order/warehousing/components/Warehouse
"
;
import
WarehouseRecord
from
"
@/views/ecw/order/splitApply/components/WarehouseRecord
"
;
import
WarehouseAreaSelect
from
"
@/components/WarehouseAreaSelect
"
;
import
PutIn
from
"
@/views/ecw/order/splitApply/components/PutIn.vue
"
;
export
default
{
export
default
{
name
:
"
splitOrder
"
,
name
:
"
splitOrder
"
,
inheritAttrs
:
false
,
inheritAttrs
:
false
,
components
:
{
components
:
{
PutIn
,
WarehouseAreaSelect
,
WarehouseRecord
,
Warehouse
,
WorkFlow
WorkFlow
},
},
props
:
{
props
:
{
...
@@ -343,7 +464,15 @@ export default {
...
@@ -343,7 +464,15 @@ export default {
isQuantity
:
false
,
isQuantity
:
false
,
// 主单数据
// 主单数据
mainOrder
:
{
orderSplitItemBackVOList
:
{}}
mainOrder
:
{
orderSplitItemBackVOList
:
{}},
// 当前查看的入仓记录
currentWarehouseRecord
:
null
,
// 订单入仓记录
warehouseInList
:
[],
// 当前选择的入仓记录ID
selectedWarehouseInId
:
null
,
// 当前正在放入的入仓记录
currentPutIn
:
null
};
};
},
},
created
()
{
created
()
{
...
@@ -353,6 +482,15 @@ export default {
...
@@ -353,6 +482,15 @@ export default {
this
.
queryParams
.
orderId
=
this
.
currRow
.
orderId
;
this
.
queryParams
.
orderId
=
this
.
currRow
.
orderId
;
this
.
getOrderDetail
();
this
.
getOrderDetail
();
this
.
getSplit
();
this
.
getSplit
();
// 获取入仓记录
getOrderWarehouseIn
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
this
.
warehouseInList
=
res
.
data
})
this
.
$nextTick
(()
=>
{
window
.
$vm
=
this
})
},
},
watch
:
{
watch
:
{
//监听table这个对象
//监听table这个对象
...
@@ -373,6 +511,16 @@ export default {
...
@@ -373,6 +511,16 @@ export default {
});
});
},
},
},
},
// 切换放入品名
'
shopForm.orderItemId
'
(){
// 默认取以前放入的品名
this
.
shopForm
.
specsRecordVOList
=
[]
let
specsRecordVOList
=
this
.
splitData
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)?.
specsRecordVOList
||
[]
specsRecordVOList
.
forEach
(
item
=>
{
const
[
boxGauge1
,
boxGauge2
,
boxGauge3
]
=
item
.
boxGauge
.
split
(
'
*
'
)
this
.
shopForm
.
specsRecordVOList
.
push
({...
item
,
boxGauge1
,
boxGauge2
,
boxGauge3
})
})
}
},
},
computed
:
{
computed
:
{
isAudit
()
{
isAudit
()
{
...
@@ -395,6 +543,125 @@ export default {
...
@@ -395,6 +543,125 @@ export default {
mainOrderItem
(){
mainOrderItem
(){
if
(
!
this
.
shopForm
.
orderItemId
||
!
this
.
mainOrder
.
orderSplitItemBackVOList
.
length
)
return
{}
if
(
!
this
.
shopForm
.
orderItemId
||
!
this
.
mainOrder
.
orderSplitItemBackVOList
.
length
)
return
{}
return
this
.
mainOrder
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
||
{}
return
this
.
mainOrder
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
||
{}
},
// 放入数据
putin
(){
let
data
=
{
num
:
new
Decimal
(
0
),
volume
:
new
Decimal
(
0
),
chargeVolume
:
new
Decimal
(
0
),
weight
:
new
Decimal
(
0
),
chargeWeight
:
new
Decimal
(
0
),
quantity
:
new
Decimal
(
0
)
}
this
.
shopForm
.
specsRecordVOList
&&
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
data
.
num
=
data
.
num
.
plus
(
new
Decimal
(
item
.
num
||
0
))
data
.
volume
=
data
.
volume
.
plus
(
new
Decimal
(
item
.
volume
||
0
))
data
.
chargeVolume
=
data
.
chargeVolume
.
plus
(
new
Decimal
(
item
.
chargeVolume
||
0
))
data
.
weight
=
data
.
weight
.
plus
(
new
Decimal
(
item
.
weight
||
0
))
data
.
chargeWeight
=
data
.
chargeWeight
.
plus
(
new
Decimal
(
item
.
chargeWeight
||
0
))
data
.
quantity
=
data
.
quantity
.
plus
(
new
Decimal
(
item
.
quantity
||
0
))
})
return
{
num
:
data
.
num
.
toNumber
(),
volume
:
data
.
volume
.
toNumber
(),
chargeVolume
:
data
.
chargeVolume
.
toNumber
(),
weight
:
data
.
weight
.
toNumber
(),
chargeWeight
:
data
.
chargeWeight
.
toNumber
(),
quantity
:
data
.
quantity
.
toNumber
()
}
},
// 当前仓库ID
currentWarehouseId
(){
return
this
.
orderData
.
adjustToDestWarehouseId
||
this
.
orderData
.
logisticsInfoDto
.
startWarehouseId
},
// 当前选择的入仓记录
/*currentWarehouseItem(){
return this.getOrderItemWarehouseIn(this.shopForm.orderItemId).find(item => item.id === this.selectedWarehouseInId)
},*/
// 根据orderItemId获取入仓记录
getOrderItemWarehouseIn
()
{
return
orderItemId
=>
{
const
list
=
this
.
warehouseInList
.
find
(
item
=>
item
.
orderItemId
==
orderItemId
)?.
orderWarehouseInBackItemDoList
||
[]
return
list
.
map
(
item
=>
{
let
[
boxGauge1
,
boxGauge2
,
boxGauge3
]
=
item
.
boxGauge
.
split
(
'
*
'
)
let
labelArr
=
[
this
.
$t
(
'
{num}箱
'
,
{
num
:
item
.
cartonsNum
}),
this
.
$l
(
this
.
getDictDatas
(
this
.
DICT_TYPE
.
WAREHOUSING_SPECIFICATION_TYPE
).
find
(
dict
=>
dict
.
value
==
item
.
specificationType
),
'
label
'
),
this
.
$t
(
'
长{boxGauge1}cm
'
,
{
boxGauge1
}),
this
.
$t
(
'
宽{boxGauge2}cm
'
,
{
boxGauge2
}),
this
.
$t
(
'
高{boxGauge3}cm
'
,
{
boxGauge3
}),
this
.
$t
(
'
方数{volume}m³
'
,
{
volume
:
item
.
volume
}),
this
.
$t
(
'
重量{weight}kg
'
,
{
weight
:
item
.
weight
})
]
if
(
item
.
quantityAll
)
{
labelArr
.
push
(
this
.
$t
(
'
数量{n}
'
,
{
n
:
item
.
quantityAll
}))
}
if
(
item
.
expressNo
)
{
labelArr
.
push
(
this
.
$t
(
'
快递{expressNo}
'
,
{
expressNo
:
item
.
expressNo
}))
}
if
(
item
.
orderLocationBackVOList
&&
item
.
orderLocationBackVOList
.
length
)
{
labelArr
.
push
(
this
.
$t
(
'
储位{location}
'
,
{
location
:
item
.
orderLocationBackVOList
.
map
(
v
=>
v
.
code
||
v
.
areaName
+
(
v
.
locationName
||
''
)).
join
(
'
,
'
)
}))
}
item
.
boxGauge1
=
boxGauge1
item
.
boxGauge2
=
boxGauge2
item
.
boxGauge3
=
boxGauge3
item
.
text
=
labelArr
.
join
(
'
,
'
)
return
item
})
}
},
// 根据入仓记录ID筛选出他的全部拆出记录(不含主单的)
getWarehouseInspecsRecordVOList
(){
return
warehouseInId
=>
{
let
specsRecordVOList
=
[]
// 这里是正在操作放入,但是还没确定提交的
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
if
(
item
.
warehouseInId
==
warehouseInId
)
specsRecordVOList
.
push
(
item
)
})
return
specsRecordVOList
}
},
// 根据入仓ID获取拆出数据
getWarehouseInSplitData
(){
return
(
warehouseInId
,
field
)
=>
{
let
total
=
new
Decimal
(
0
)
this
.
getWarehouseInspecsRecordVOList
(
warehouseInId
).
forEach
(
item
=>
{
total
=
total
.
plus
(
new
Decimal
(
item
[
field
]
||
0
))
})
return
total
.
toNumber
()
}
},
// 获取入仓记录的剩余数据
getWarehouseLeftData
(){
return
(
warehouseRecord
,
field
)
=>
{
let
warehouseField
=
field
if
(
field
===
'
num
'
){
warehouseField
=
'
cartonsNum
'
}
if
(
field
===
'
quantity
'
){
warehouseField
=
'
quantityAll
'
}
let
total
=
new
Decimal
(
warehouseRecord
[
warehouseField
]
||
0
)
this
.
getWarehouseInspecsRecordVOList
(
warehouseRecord
.
id
).
forEach
(
item
=>
{
total
=
total
.
minus
(
new
Decimal
(
item
[
field
]
||
0
))
})
return
total
.
toNumber
()
}
},
// 最大可装箱数 原单箱数 - 已装箱数
maxNum
(){
return
this
.
currRow
.
num
-
this
.
currRow
.
installNum
},
// 剩余可拆箱数
leftSplitNum
(){
let
num
=
this
.
maxNum
-
this
.
putin
.
num
/*this.splitData.orderSplitItemBackVOList.forEach(item =>{
num -= item.num
})*/
return
num
}
}
},
},
methods
:
{
methods
:
{
...
@@ -435,13 +702,13 @@ export default {
...
@@ -435,13 +702,13 @@ export default {
this
.
mainOrder
=
data
.
find
(
item
=>
item
.
isMaster
)
this
.
mainOrder
=
data
.
find
(
item
=>
item
.
isMaster
)
});
});
},
},
itemDisabled
(
data
)
{
/*
itemDisabled(data) {
const { orderSplitItemBackVOList = [] } = this.splitData;
const { orderSplitItemBackVOList = [] } = this.splitData;
const isExist = orderSplitItemBackVOList.find(
const isExist = orderSplitItemBackVOList.find(
(item) => item.orderItemId === data.orderItemId
(item) => item.orderItemId === data.orderItemId
);
);
return isExist ? true : false;
return isExist ? true : false;
},
},
*/
/* 查询拆单项 */
/* 查询拆单项 */
querySplitGoods
()
{
querySplitGoods
()
{
getSplitList
({
getSplitList
({
...
@@ -536,102 +803,47 @@ export default {
...
@@ -536,102 +803,47 @@ export default {
this
.
shopForm
=
{};
this
.
shopForm
=
{};
this
.
shopOpen
=
true
;
this
.
shopOpen
=
true
;
this
.
isQuantity
=
false
;
this
.
isQuantity
=
false
;
// 重置表单数据
this
.
shopForm
=
{
specsRecordVOList
:[]}
},
},
// 更改放入品名后触发,计算重量体积等默认值
onProdChange
(){
// 根据键值(中文名或者英文名)来获取对应商品的信息,注:这里应该可以采用orderItemId来获取更优,而不是商品名称,同名可能导致异常
let
orderItem
=
this
.
orderData
.
orderItemVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
console
.
log
({
orderItem
})
// 剩余可装箱数,订单入仓箱数 - 订单已装箱数 - 已拆箱数
let
leftNum
=
Decimal
(
this
.
currRow
.
num
).
minus
(
this
.
currRow
.
installNum
).
minus
(
this
.
totalSplit
(
'
num
'
))
// 剩余箱数
this
.
$set
(
this
.
shopForm
,
'
leftNum
'
,
leftNum
)
// 如果主单商品项的入仓箱数小于可装箱数,则取商品项数据
leftNum
=
Math
.
min
(
leftNum
,
this
.
mainOrderItem
.
num
)
// 放入箱数
this
.
$set
(
this
.
shopForm
,
'
num
'
,
leftNum
)
this
.
calcAverg
()
},
// 按比例计算体积重量的默认值
calcAverg
(){
// 装箱比例
const
rate
=
this
.
shopForm
.
num
/
this
.
mainOrderItem
.
num
// 放入个数,剩余个数是算不出来的,因为不知道已装数量,所以放入数量只能按照总数的比例计算
this
.
$set
(
this
.
shopForm
,
'
quantity
'
,
Math
.
ceil
(
this
.
mainOrderItem
.
quantity
*
rate
||
0
*
rate
))
// 数量,体积,重量等按照比例给默认值
this
.
$set
(
this
.
shopForm
,
'
volume
'
,
(
this
.
mainOrderItem
.
volume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeVolume
'
,
(
this
.
mainOrderItem
.
chargeVolume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
weight
'
,
(
this
.
mainOrderItem
.
weight
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeWeight
'
,
(
this
.
mainOrderItem
.
chargeWeight
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
(
this
.
mainOrderItem
.
worth
*
rate
).
toFixed
(
2
))
},
/*async getSelectData(item) {
await quantityRequired(this.orderData.lineId).then((res) => {
if (res.data) {
this.isQuantity = true;
this.shopRules.putQuantity = [
{
required: true,
message: this.$t("请输入数量(个)"),
trigger: "change",
},
];
} else {
this.isQuantity = false;
delete this.shopRules.putQuantity;
}
});
},*/
shopAdd
()
{
shopAdd
()
{
this
.
$refs
[
"
shopForm
"
].
validate
((
valid
)
=>
{
this
.
$refs
[
"
shopForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// 放入箱数自动计算出来的,所以不需要在做判断了
if
(
this
.
putin
.
num
===
0
)
{
/*
// 输入箱数大于实装箱数
const total = this.totalSplitNum();
const canSplitNum = Decimal.sub(
this.currRow.num,
this.currRow.installNum
).toNumber();
const remain = Decimal.sub(canSplitNum, total).toNumber();
if (this.shopForm.num > remain) {
this.$message.error(this.$t("放入箱数不能大于总箱数"));
return;
}*/
if
(
this
.
shopForm
.
num
===
0
)
{
this
.
$message
.
error
(
this
.
$t
(
"
放入箱数不能为0
"
));
this
.
$message
.
error
(
this
.
$t
(
"
放入箱数不能为0
"
));
return
;
return
;
}
}
if
(
this
.
shopForm
.
quantity
===
0
&&
this
.
isQuantity
)
{
if
(
this
.
putin
.
quantity
===
0
&&
this
.
isQuantity
)
{
this
.
$message
.
error
(
this
.
$t
(
"
放入数量(个)不能为0
"
));
this
.
$message
.
error
(
this
.
$t
(
"
放入数量(个)不能为0
"
));
return
;
return
;
}
}
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
item
.
boxGauge
=
`
${
item
.
boxGauge1
}
*
${
item
.
boxGauge2
}
*
${
item
.
boxGauge3
}
`
})
let
params
=
{
let
params
=
{
num
:
this
.
shopForm
.
num
,
num
:
this
.
putin
.
num
,
// quantity: this.shopForm.quantity,
// quantity: this.shopForm.quantity,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderSplitId
:
this
.
splitData
.
id
,
orderSplitId
:
this
.
splitData
.
id
,
remarks
:
this
.
shopForm
.
remarks
,
remarks
:
this
.
shopForm
.
remarks
,
volume
:
this
.
shopForm
.
volume
,
volume
:
this
.
putin
.
volume
,
weight
:
this
.
shopForm
.
weight
,
weight
:
this
.
putin
.
weight
,
chargeWeight
:
this
.
shopForm
.
chargeWeight
,
chargeWeight
:
this
.
putin
.
chargeWeight
,
chargeVolume
:
this
.
shopForm
.
chargeVolume
,
chargeVolume
:
this
.
putin
.
chargeVolume
,
worth
:
this
.
shopForm
.
worth
worth
:
this
.
shopForm
.
worth
||
0
,
specsRecordVOList
:
this
.
shopForm
.
specsRecordVOList
,
shipmentSplit
:
true
};
};
// 按数量计费的才需要传递数量
// 按数量计费的才需要传递数量
if
(
this
.
isQuantity
){
if
(
this
.
isQuantity
){
params
.
quantity
=
this
.
shopForm
.
quantity
params
.
quantity
=
this
.
putin
.
quantity
}
}
createSplitItem
(
params
).
then
((
res
)
=>
{
createSplitItem
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
this
.
querySplitGoods
();
this
.
querySplitGoods
();
this
.
$refs
[
"
shopForm
"
].
resetFields
();
this
.
$refs
[
"
shopForm
"
].
resetFields
();
this
.
shopOpen
=
false
;
});
});
this
.
shopOpen
=
false
;
}
}
});
});
},
},
...
@@ -667,6 +879,87 @@ export default {
...
@@ -667,6 +879,87 @@ export default {
toReviewDetail
.
apply
(
this
,
[
cabinetSplitInfo
.
bpmProcessId
]);
toReviewDetail
.
apply
(
this
,
[
cabinetSplitInfo
.
bpmProcessId
]);
this
.
$emit
(
"
closeDialog2
"
,
"
close
"
);
this
.
$emit
(
"
closeDialog2
"
,
"
close
"
);
},
},
// 添加一行
addRow
(){
if
(
!
this
.
shopForm
.
specsRecordVOList
){
this
.
$set
(
this
.
shopForm
,
'
specsRecordVOList
'
,[])
}
if
(
!
this
.
currentWarehouseItem
){
return
this
.
$message
.
info
(
this
.
$t
(
"
请选择入仓记录
"
))
}
let
{
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
}
=
this
.
currentWarehouseItem
let
num
=
this
.
currentWarehouseItem
.
cartonsNum
// 根据入仓记录添加一行
this
.
shopForm
.
specsRecordVOList
.
push
({
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
,
num
,
orderLocationList
:
this
.
currentWarehouseItem
.
orderLocationBackVOList
})
},
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
deleteRow
(
index
){
const
spliceIndex
=
typeof
index
!==
'
number
'
?
this
.
shopForm
.
specsRecordVOList
.
length
-
1
:
index
this
.
shopForm
.
specsRecordVOList
.
splice
(
spliceIndex
,
1
)
},
// 计算体积
calcVolume
(
row
){
let
volume
=
Decimal
(
row
.
boxGauge1
||
0
)
.
times
(
Decimal
(
row
.
boxGauge2
||
0
))
.
times
(
Decimal
(
row
.
boxGauge3
||
0
)).
div
(
1000000
)
// 如果是箱的单位要乘以箱数
if
(
row
.
specificationType
===
1
)
{
row
.
volume
=
volume
.
times
(
Decimal
(
row
.
num
||
0
))
}
// 最低0.01
volume
=
Math
.
max
(
0.01
,
volume
.
toNumber
().
toFixed
(
2
))
this
.
$set
(
row
,
'
volume
'
,
volume
)
this
.
$set
(
row
,
'
chargeVolume
'
,
volume
)
},
// 显示入库记录
showWarehouse
(
row
){
if
(
!
row
.
specsRecordVOList
){
return
this
.
$message
.
info
(
this
.
$t
(
'
暂无入仓记录
'
))
}
this
.
currentWarehouseRecord
=
row
.
specsRecordVOList
},
// 获取储位名称
getLocationName
(
locationArr
){
if
(
!
locationArr
||
!
locationArr
.
length
)
return
''
let
arr
=
[]
locationArr
.
forEach
(
item
=>
{
arr
.
push
(
`
${
item
.
areaName
||
''
}${
item
.
locationName
||
''
}
`
)
})
return
Array
.
from
(
new
Set
(
arr
)).
join
(
"
,
"
)
},
// 根据入仓记录打开放入弹层
putInRecord
(
row
){
this
.
currentPutIn
=
row
// 此条入仓记录已拆出的入仓记录,这样在放入的时候可以确保不超过此入仓记录的数量
this
.
currentPutIn
.
specsRecordVOList
=
this
.
getWarehouseInspecsRecordVOList
(
row
.
id
)
},
// 放入回调
handlePutin
(
list
){
if
(
!
list
.
length
){
return
this
.
$message
.
error
(
this
.
$t
(
"
请至少放入一条数据
"
))
}
list
.
forEach
(
item
=>
{
this
.
shopForm
.
specsRecordVOList
.
push
({...
item
})
})
this
.
currentPutIn
=
null
// 根据比例计算默认的收费方数和收费重量
const
orderItem
=
this
.
orderData
.
orderItemVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
const
rate
=
this
.
putin
.
num
/
orderItem
.
warehouseInInfoVO
.
cartonsNum
this
.
$set
(
this
.
shopForm
,
'
chargeVolume
'
,
(
orderItem
.
chargeVolume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeWeight
'
,
(
orderItem
.
chargeWeight
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
(
orderItem
.
worth
*
rate
).
toFixed
(
2
))
},
// 清空放入记录
clearAll
(){
this
.
$confirm
(
this
.
$t
(
"
确定要清空放入数据么?
"
)).
then
(
res
=>
{
this
.
shopForm
.
specsRecordVOList
=
[]
})
}
},
},
};
};
</
script
>
</
script
>
...
...
src/views/ecw/box/shippingSea/nodePage/cabinet/supplementOrder.vue
View file @
d66066bb
...
@@ -279,6 +279,7 @@ export default {
...
@@ -279,6 +279,7 @@ export default {
secId
:
this
.
partData
.
id
,
secId
:
this
.
partData
.
id
,
shipmentId
:
this
.
$attrs
.
shipmentObj
.
id
,
shipmentId
:
this
.
$attrs
.
shipmentObj
.
id
,
orderId
:
item
.
orderId
,
orderId
:
item
.
orderId
,
isCover
:
1
};
};
if
(
type
===
"
all
"
)
{
if
(
type
===
"
all
"
)
{
params
.
orderItemIdList
=
item
.
boxOrderItemList
.
map
(
params
.
orderItemIdList
=
item
.
boxOrderItemList
.
map
(
...
...
src/views/ecw/box/shippingSea/nodePage/preinstall.vue
View file @
d66066bb
...
@@ -563,14 +563,24 @@ export default {
...
@@ -563,14 +563,24 @@ export default {
const
{
columns
,
data
}
=
param
;
const
{
columns
,
data
}
=
param
;
const
sums
=
[];
const
sums
=
[];
columns
.
forEach
((
column
,
index
)
=>
{
columns
.
forEach
((
column
,
index
)
=>
{
if
(
column
.
property
===
"
brand
Type
"
)
{
if
(
column
.
property
===
"
fee
Type
"
)
{
sums
[
index
]
=
this
.
$t
(
"
合计
"
);
sums
[
index
]
=
this
.
$t
(
"
合计
"
);
return
;
return
;
}
}
if
(
column
.
property
===
"
num
"
)
{
if
(
column
.
property
===
"
warehouseInInfoVO.cartonsNum
"
)
{
sums
[
index
]
=
new
Decimal
(
var
num
=
0
this
.
calcSum
(
column
.
property
,
data
)
let
values
=
data
?.
map
((
item
)
=>
Number
(
item
.
warehouseInInfoVO
.
cartonsNum
))
??
[];
).
toNumber
();
if
(
!
values
.
every
((
value
)
=>
isNaN
(
value
)))
{
num
=
values
.
reduce
((
prev
,
curr
)
=>
{
const
value
=
Number
(
curr
);
if
(
!
isNaN
(
value
))
{
return
prev
+
curr
;
}
else
{
return
prev
;
}
}
,
0
);
}
sums
[
index
]
=
num
}
}
if
(
column
.
property
===
"
volumeWeight
"
)
{
if
(
column
.
property
===
"
volumeWeight
"
)
{
let
volume
=
this
.
calcSum
(
"
volume
"
,
data
);
let
volume
=
this
.
calcSum
(
"
volume
"
,
data
);
...
@@ -653,6 +663,7 @@ export default {
...
@@ -653,6 +663,7 @@ export default {
orderItemIdList
:
item
.
boxOrderItemList
.
map
(
orderItemIdList
:
item
.
boxOrderItemList
.
map
(
(
data
)
=>
data
.
orderItemId
(
data
)
=>
data
.
orderItemId
),
),
isCover
:
0
}
;
}
;
createGoods
(
params
)
createGoods
(
params
)
...
@@ -785,7 +796,7 @@ export default {
...
@@ -785,7 +796,7 @@ export default {
}
,
}
,
/* 获取参数 */
/* 获取参数 */
getParams
()
{
getParams
()
{
const
{
rucangtime
=
[]
}
=
this
.
queryParams
;
let
rucangtime
=
this
.
queryParams
.
rucangtime
?
this
.
queryParams
.
rucangtime
:[]
return
{
return
{
...
this
.
queryParams
,
...
this
.
queryParams
,
...
this
.
$attrs
.
params
,
...
this
.
$attrs
.
params
,
...
...
src/views/ecw/box/shippingSea/utils.js
View file @
d66066bb
...
@@ -1209,11 +1209,11 @@ const constantDict = {
...
@@ -1209,11 +1209,11 @@ const constantDict = {
billingMethod
:
[
billingMethod
:
[
{
{
value
:
"
1
"
,
value
:
"
1
"
,
label
:
i18n
.
$t
(
"
电放
"
),
label
:
i18n
.
$t
(
"
正本
"
),
},
},
{
{
value
:
"
2
"
,
value
:
"
2
"
,
label
:
i18n
.
$t
(
"
正本
"
),
label
:
i18n
.
$t
(
"
电放
"
),
},
},
],
],
// 是否有文件
// 是否有文件
...
...
src/views/ecw/customer/customerLog.vue
View file @
d66066bb
...
@@ -72,10 +72,7 @@
...
@@ -72,10 +72,7 @@
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_OPERATE_TYPE"
:value=
"row.operateType"
></dict-tag>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_OPERATE_TYPE"
:value=
"row.operateType"
></dict-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('操作人')"
prop=
"operator"
>
<el-table-column
:label=
"$t('操作人')"
prop=
"operatorName"
>
<
template
v-slot=
"{row}"
>
{{
operatorFn
(
row
.
operator
)
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('操作时间')"
prop=
"operator"
>
<el-table-column
:label=
"$t('操作时间')"
prop=
"operator"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
...
@@ -119,7 +116,7 @@
...
@@ -119,7 +116,7 @@
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_OPERATE_TYPE"
:value=
"dataLog.operateType"
></dict-tag>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_OPERATE_TYPE"
:value=
"dataLog.operateType"
></dict-tag>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('操作人')+':'"
>
<el-form-item
:label=
"$t('操作人')+':'"
>
{{
operatorFn(dataLog.operator)
}}
{{
dataLog.operatorName
}}
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('操作时间')+':'"
>
<el-form-item
:label=
"$t('操作时间')+':'"
>
{{parseTime(dataLog.createTime)}}
{{parseTime(dataLog.createTime)}}
...
...
src/views/ecw/financial/creatCollection.vue
View file @
d66066bb
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
>
>
<span
style=
"margin-right:20px"
><span
style=
"color: #ff4949;"
>
*
</span>
{{
$t
(
'
客户
'
)
}}
</span>
<span
style=
"margin-right:20px"
><span
style=
"color: #ff4949;"
>
*
</span>
{{
$t
(
'
客户
'
)
}}
</span>
<customer-selector
<customer-selector
ref=
"customer"
v-model=
"form.customerId"
v-model=
"form.customerId"
@
change=
"customerChange"
@
change=
"customerChange"
/>
/>
...
@@ -767,8 +768,17 @@ export default {
...
@@ -767,8 +768,17 @@ export default {
}
;
}
;
}
,
}
,
activated
(){
activated
(){
console
.
log
(
11
)
if
(
this
.
$route
.
query
.
id
)
{
// this.getList();
this
.
flag
=
true
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
getReceivableData
()
}
if
(
this
.
$route
.
query
.
receiptId
&&
this
.
$route
.
query
.
receiptId
!=
0
)
{
this
.
receiptId
=
this
.
$route
.
query
.
receiptId
;
this
.
getReceivableInfo
()
}
else
{
this
.
removeData
()
}
}
,
}
,
directives
:
{
directives
:
{
'
el-select-loadmore
'
:
{
'
el-select-loadmore
'
:
{
...
@@ -812,69 +822,11 @@ export default {
...
@@ -812,69 +822,11 @@ export default {
if
(
that
.
$route
.
query
.
id
)
{
if
(
that
.
$route
.
query
.
id
)
{
this
.
flag
=
true
this
.
flag
=
true
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
id
=
this
.
$route
.
query
.
id
;
console
.
log
(
this
.
id
)
this
.
getReceivableData
()
getReceiptInfoByIds
({
id
:
this
.
id
}
).
then
(
res
=>
{
if
(
res
.
data
.
rateValidateDate
)
res
.
data
.
rateValidateDate
=
dayjs
(
res
.
data
.
rateValidateDate
).
format
(
'
YYYY-MM-DD HH:mm:ss
'
)
this
.
form
=
Object
.
assign
({
}
,
this
.
form
,
res
.
data
)
}
)
await
getInvoicingItem
({
id
:
this
.
id
}
).
then
(
res
=>
{
this
.
list
=
[...
res
.
data
]
this
.
list
.
map
(
v
=>
{
if
(
!
v
.
taxPoint
){
v
.
taxAmount
=
v
.
totalAmount
}
}
)
}
)
getReceiptAccountList
({
id
:
this
.
id
}
).
then
(
res
=>
{
if
(
res
.
data
.
length
>
0
)
{
// totalAmount
res
.
data
=
[...
res
.
data
,
{
type
:
'
total
'
,
writeOffAmount
:
res
.
data
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
writeOffAmount
||
0
),
0
),
collectionAmount
:
[]
}
]
}
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
res
.
data
])
this
.
$nextTick
(()
=>
{
// const dollarList = this.list.filter(v => v.currencyId === 1)
// const discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const d = this.form.receiptAccountList.find(v => v.currencyId == 1)
// d && (d.discountTotal = discountDollar)
// const rmbList = this.list.filter(v => v.currencyId === 2)
// const discountRmb = rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const r = this.form.receiptAccountList.find(v => v.currencyId == 2)
// r && (r.discountTotal = discountRmb)
// const nairaList = this.list.filter(v => v.currencyId === 3)
// const discountNaira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const n = this.form.receiptAccountList.find(v => v.currencyId == 3)
// n && (n.discountTotal = discountNaira)
this
.
form
.
receiptAccountList
.
forEach
((
item
,
index
)
=>
{
this
.
rateChange
(
item
,
index
)
}
);
this
.
calculation
()
}
)
}
)
}
}
if
(
that
.
$route
.
query
.
receiptId
&&
that
.
$route
.
query
.
receiptId
!==
'
0
'
)
{
if
(
that
.
$route
.
query
.
receiptId
&&
that
.
$route
.
query
.
receiptId
!==
'
0
'
)
{
this
.
receiptId
=
this
.
$route
.
query
.
receiptId
;
this
.
receiptId
=
this
.
$route
.
query
.
receiptId
;
getReceivableInfoByIds
({
id
:
this
.
receiptId
}
).
then
(
res
=>
{
this
.
getReceivableInfo
()
this
.
list
=
[{...
res
.
data
}
]
this
.
list
.
map
(
v
=>
{
if
(
!
v
.
taxPoint
){
v
.
taxAmount
=
v
.
totalAmount
}
}
)
this
.
calculation
()
getOrder
(
res
.
data
.
orderId
).
then
(
response
=>
{
// console.log(response.data)
if
(
response
.
data
.
customerId
)
this
.
$set
(
this
.
form
,
'
customerId
'
,
response
.
data
.
customerId
)
}
)
}
)
}
}
// this.getList();
// this.getList();
...
@@ -961,6 +913,69 @@ export default {
...
@@ -961,6 +913,69 @@ export default {
this
.
pages
=
(
res
.
data
.
total
/
this
.
codePage
.
pageSize
)
+
1
this
.
pages
=
(
res
.
data
.
total
/
this
.
codePage
.
pageSize
)
+
1
}
)
}
)
}
,
200
)
}
,
200
)
}
,
getReceivableData
(){
getReceiptInfoByIds
({
id
:
this
.
id
}
).
then
(
res
=>
{
if
(
res
.
data
.
rateValidateDate
)
res
.
data
.
rateValidateDate
=
dayjs
(
res
.
data
.
rateValidateDate
).
format
(
'
YYYY-MM-DD HH:mm:ss
'
)
this
.
form
=
Object
.
assign
({
}
,
this
.
form
,
res
.
data
)
}
)
getInvoicingItem
({
id
:
this
.
id
}
).
then
(
res
=>
{
this
.
list
=
[...
res
.
data
]
this
.
list
.
map
(
v
=>
{
if
(
!
v
.
taxPoint
){
v
.
taxAmount
=
v
.
totalAmount
}
}
)
}
)
getReceiptAccountList
({
id
:
this
.
id
}
).
then
(
res
=>
{
if
(
res
.
data
.
length
>
0
)
{
// totalAmount
res
.
data
=
[...
res
.
data
,
{
type
:
'
total
'
,
writeOffAmount
:
res
.
data
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
writeOffAmount
||
0
),
0
),
collectionAmount
:
[]
}
]
}
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
res
.
data
])
this
.
$nextTick
(()
=>
{
// const dollarList = this.list.filter(v => v.currencyId === 1)
// const discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const d = this.form.receiptAccountList.find(v => v.currencyId == 1)
// d && (d.discountTotal = discountDollar)
// const rmbList = this.list.filter(v => v.currencyId === 2)
// const discountRmb = rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const r = this.form.receiptAccountList.find(v => v.currencyId == 2)
// r && (r.discountTotal = discountRmb)
// const nairaList = this.list.filter(v => v.currencyId === 3)
// const discountNaira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const n = this.form.receiptAccountList.find(v => v.currencyId == 3)
// n && (n.discountTotal = discountNaira)
this
.
form
.
receiptAccountList
.
forEach
((
item
,
index
)
=>
{
this
.
rateChange
(
item
,
index
)
}
);
this
.
calculation
()
}
)
}
)
}
,
getReceivableInfo
(){
getReceivableInfoByIds
({
id
:
this
.
receiptId
}
).
then
(
res
=>
{
this
.
list
=
[{...
res
.
data
}
]
this
.
list
.
map
(
v
=>
{
if
(
!
v
.
taxPoint
){
v
.
taxAmount
=
v
.
totalAmount
}
}
)
this
.
calculation
()
getOrder
(
res
.
data
.
orderId
).
then
(
response
=>
{
// console.log(response.data)
if
(
response
.
data
.
customerId
)
this
.
$set
(
this
.
form
,
'
customerId
'
,
response
.
data
.
customerId
)
}
)
}
)
}
,
}
,
getCurrencyLabel
(
id
){
getCurrencyLabel
(
id
){
var
label
=
this
.
currencyList
.
filter
(
item
=>
item
.
id
==
id
)
var
label
=
this
.
currencyList
.
filter
(
item
=>
item
.
id
==
id
)
...
@@ -1210,7 +1225,7 @@ export default {
...
@@ -1210,7 +1225,7 @@ export default {
return
NP
.
divide
(
this
.
currencyList
.
find
(
v
=>
v
.
titleEn
===
'
NGN
'
).
huilv
,
100
).
toFixed
(
6
)
return
NP
.
divide
(
this
.
currencyList
.
find
(
v
=>
v
.
titleEn
===
'
NGN
'
).
huilv
,
100
).
toFixed
(
6
)
}
,
}
,
customerChange
(
value
)
{
customerChange
(
value
)
{
if
(
this
.
flag
)
{
if
(
this
.
flag
||!
value
)
{
this
.
flag
=
false
this
.
flag
=
false
return
return
}
}
...
@@ -1472,12 +1487,26 @@ export default {
...
@@ -1472,12 +1487,26 @@ export default {
const
list
=
[...
this
.
list
]
const
list
=
[...
this
.
list
]
delete
list
[
index
]
delete
list
[
index
]
this
.
list
=
list
.
filter
(
v
=>
v
)
this
.
list
=
list
.
filter
(
v
=>
v
)
this
.
calculation
()
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
page
=
1
;
this
.
queryParams
.
page
=
1
;
this
.
getList
()
this
.
getList
()
}
,
}
,
//清空数据
removeData
(){
console
.
log
(
this
.
form
)
this
.
$refs
.
customer
.
reset
()
this
.
list
=
[]
for
(
var
i
in
this
.
form
){
if
(
i
==
'
receiptAccountList
'
){
this
.
$set
(
this
.
form
,
i
,[])
}
else
{
this
.
$set
(
this
.
form
,
i
,
''
)
}
}
}
}
,
}
,
}
;
}
;
<
/script
>
<
/script
>
...
...
src/views/ecw/financial/receiptDetail.vue
View file @
d66066bb
...
@@ -679,8 +679,10 @@ export default {
...
@@ -679,8 +679,10 @@ export default {
}
}
// total = NP.plus(total, item.writeOffAmount)
// total = NP.plus(total, item.writeOffAmount)
}
)
}
)
console
.
log
(
total
);
let
portion
=
NP
.
divide
(
total
,
amountTotal
)
let
portion
=
NP
.
divide
(
total
,
amountTotal
)
console
.
log
(
portion
);
if
(
!
portion
)
return
0
return
(
portion
*
100
).
toFixed
(
2
)
return
(
portion
*
100
).
toFixed
(
2
)
}
}
}
,
}
,
...
...
src/views/ecw/offer/detail.vue
View file @
d66066bb
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<div
class=
"offer-header"
>
<div
class=
"offer-header"
>
<span
style=
"font-size: 15px;"
>
{{
$t
(
'
报价单号
'
)
}}
:
{{
list
.
number
}}
</span>
<span
style=
"font-size: 15px;"
>
{{
$t
(
'
报价单号
'
)
}}
:
{{
list
.
number
}}
</span>
<div
class=
"btns"
>
<div
class=
"btns"
>
<el-button
v-hasPermi=
"['ecw:offer:update']"
size=
"mini"
type=
"primary"
v-if=
"
list.status!=5
"
@
click=
"$router.push('edit?id=' + offerId)"
>
{{
$t
(
'
编辑
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:offer:update']"
size=
"mini"
type=
"primary"
v-if=
"
[4,5,6].indexOf(list.status) == -1
"
@
click=
"$router.push('edit?id=' + offerId)"
>
{{
$t
(
'
编辑
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:offer:loglist']"
type=
"primary"
v-if=
"[1,3,7].indexOf(list.status) > -1"
size=
"mini"
@
click=
"handleAdd"
>
{{
$t
(
'
跟进
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:offer:loglist']"
type=
"primary"
v-if=
"[1,3,7].indexOf(list.status) > -1"
size=
"mini"
@
click=
"handleAdd"
>
{{
$t
(
'
跟进
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:offer:result']"
type=
"primary"
v-if=
"[3,7].indexOf(list.status) > -1"
size=
"mini"
@
click=
"toResult"
>
{{
$t
(
'
结果
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:offer:result']"
type=
"primary"
v-if=
"[3,7].indexOf(list.status) > -1"
size=
"mini"
@
click=
"toResult"
>
{{
$t
(
'
结果
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:offer:discount','ecw:offer:commission']"
size=
"mini"
v-if=
"[1,3,7].indexOf(list.status) > -1"
type=
"primary"
@
click.native=
"$router.push('/offer/special?offerId=' + offerId)"
>
{{
$t
(
'
特价
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:offer:discount','ecw:offer:commission']"
size=
"mini"
v-if=
"[1,3,7].indexOf(list.status) > -1"
type=
"primary"
@
click.native=
"$router.push('/offer/special?offerId=' + offerId)"
>
{{
$t
(
'
特价
'
)
}}
</el-button>
...
...
src/views/ecw/order/cargoControl.vue
View file @
d66066bb
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<el-table-column
:label=
"$t('唛头')"
align=
"center"
prop=
"marks"
/>
<el-table-column
:label=
"$t('唛头')"
align=
"center"
prop=
"marks"
/>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
prop=
"sumNum"
>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
prop=
"sumNum"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
{{
row
.
inWarehouseState
>
1
?
row
.
sumNum
:
row
.
totalNum
}}
{{
row
.
sumNum
>
0
?
row
.
sumNum
:
row
.
totalNum
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('已放箱数')"
align=
"center"
prop=
"sumWeight"
>
<el-table-column
:label=
"$t('已放箱数')"
align=
"center"
prop=
"sumWeight"
>
...
...
src/views/ecw/order/components/BoxSplitDetail.vue
View file @
d66066bb
...
@@ -46,35 +46,51 @@
...
@@ -46,35 +46,51 @@
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"row.brandType"
/>
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"row.brandType"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('体积')"
>
<el-table-column
:label=
"$t('
入仓
体积')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
volume
}}
m³
</
template
>
<
template
slot-scope=
"{row}"
>
{{
row
.
volume
}}
m³
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('重量')"
>
<el-table-column
:label=
"$t('收费体积')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
chargeVolume
}}
m³
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓重量')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
weight
}}
kg
</
template
>
<
template
slot-scope=
"{row}"
>
{{
row
.
weight
}}
kg
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('收费重量')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
chargeWeight
}}
kg
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('箱数')"
>
<el-table-column
:label=
"$t('箱数')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
num
}}
</
template
>
<
template
slot-scope=
"{row}"
>
<el-button
type=
"text"
@
click=
"showWarehouseRecord(row)"
>
{{
row
.
num
}}
</el-button>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
>
<el-table-column
:label=
"$t('数量')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
quantity
}}
</
template
>
<
template
slot-scope=
"{row}"
>
{{
row
.
quantity
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('货值')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
worth
}}{{
$t
(
'
元
'
)
}}
</
template
>
</el-table-column>
</el-table>
</el-table>
</template>
</template>
<warehouse-record
v-if=
"currentWarehouseRecord"
:list=
"currentWarehouseRecord"
append-to-body
@
close=
"currentWarehouseRecord=null"
></warehouse-record>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getOrder
}
from
'
@/api/ecw/order
'
import
{
getOrder
}
from
'
@/api/ecw/order
'
import
{
getBoxApproval
}
from
'
@/api/ecw/box
'
import
{
getBoxApproval
}
from
'
@/api/ecw/box
'
import
{
getChannel
}
from
'
@/api/ecw/channel
'
import
{
getChannel
}
from
'
@/api/ecw/channel
'
import
WarehouseRecord
from
"
@/views/ecw/order/splitApply/components/WarehouseRecord
"
;
export
default
{
export
default
{
props
:{
components
:
{
WarehouseRecord
},
props
:{
id
:
[
String
,
Number
]
id
:
[
String
,
Number
]
},
},
data
(){
data
(){
return
{
return
{
detail
:
null
,
detail
:
null
,
order
:
null
,
order
:
null
,
channel
:
null
channel
:
null
,
// 查看入仓记录的条目
currentWarehouseRecord
:
null
}
}
},
},
watch
:{
watch
:{
...
@@ -110,6 +126,12 @@ export default {
...
@@ -110,6 +126,12 @@ export default {
getChannel
(
this
.
order
.
channelId
).
then
(
res
=>
{
getChannel
(
this
.
order
.
channelId
).
then
(
res
=>
{
this
.
channel
=
res
.
data
this
.
channel
=
res
.
data
})
})
},
showWarehouseRecord
(
row
){
if
(
!
row
.
specsRecordVOList
){
return
this
.
$message
.
info
(
this
.
$t
(
'
暂无入仓记录
'
))
}
this
.
currentWarehouseRecord
=
row
.
specsRecordVOList
}
}
}
}
}
}
...
@@ -122,4 +144,4 @@ export default {
...
@@ -122,4 +144,4 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/ecw/order/components/PrintWarehouseReceipt.vue
View file @
d66066bb
...
@@ -37,7 +37,8 @@
...
@@ -37,7 +37,8 @@
{{
detail
.
marks
}}
{{
detail
.
marks
}}
</td>
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
{{
item
.
prodTitleZh
}}
<br/>
{{
item
.
prodTitleEn
}}
<div
style=
"white-space: nowrap"
>
{{
item
.
prodTitleZh
}}
</div>
<div
style=
"white-space: nowrap"
>
{{
item
.
prodTitleEn
}}
</div>
</td>
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
{{
item
.
cartonsNum
}}
{{
item
.
cartonsNum
}}
...
...
src/views/ecw/order/components/SplitDetail.vue
View file @
d66066bb
...
@@ -46,31 +46,45 @@
...
@@ -46,31 +46,45 @@
<dict-tag
v-else
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"row.feeType"
/>
<dict-tag
v-else
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"row.feeType"
/>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('体积')"
>
<el-table-column
:label=
"$t('入仓体积')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
volume
}}
m³
</
template
>
<
template
slot-scope=
"{row}"
>
{{
row
.
volume
}}
m³
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('重量')"
>
<el-table-column
:label=
"$t('收费体积')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
weight
}}
kg
</
template
>
<
template
slot-scope=
"{row}"
>
{{
row
.
chargeVolume
}}
m³
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('箱数')"
>
<el-table-column
:label=
"$t('入仓重量')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
num
}}
</
template
>
<
template
slot-scope=
"{row}"
>
{{
row
.
weight
}}
kg
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
>
<el-table-column
:label=
"$t('收费重量')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
quantity
}}
</
template
>
<
template
slot-scope=
"{row}"
>
{{
row
.
chargeWeight
}}
kg
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('备注')"
>
<el-table-column
:label=
"$t('箱数')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
remark
}}
</
template
>
<
template
slot-scope=
"{row}"
>
</el-table-column>
<el-button
type=
"text"
@
click=
"showWarehouseRecord(row)"
>
{{
row
.
num
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
quantity
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('货值')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
worth
}}{{
$t
(
'
元
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('备注')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
remark
}}
</
template
>
</el-table-column>
</el-table>
</el-table>
</template>
</template>
<warehouse-record
v-if=
"currentWarehouseRecord"
:list=
"currentWarehouseRecord"
append-to-body
@
close=
"currentWarehouseRecord=null"
></warehouse-record>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getApproval
,
getOrder
}
from
'
@/api/ecw/order
'
import
{
getApproval
,
getOrder
}
from
'
@/api/ecw/order
'
import
{
getChannel
}
from
'
@/api/ecw/channel
'
import
{
getChannel
}
from
'
@/api/ecw/channel
'
import
{
getSplitList
}
from
'
@/api/ecw/orderHandle
'
import
{
getSplitList
}
from
'
@/api/ecw/orderHandle
'
import
WarehouseRecord
from
"
@/views/ecw/order/splitApply/components/WarehouseRecord
"
;
export
default
{
export
default
{
props
:{
components
:
{
WarehouseRecord
},
props
:{
id
:
[
String
,
Number
]
id
:
[
String
,
Number
]
},
},
data
(){
data
(){
...
@@ -78,7 +92,9 @@ export default {
...
@@ -78,7 +92,9 @@ export default {
detail
:
null
,
detail
:
null
,
order
:
null
,
order
:
null
,
channel
:
null
,
channel
:
null
,
orderSplitBackVOList
:
[]
// orderSplitBackVOList: [],
// 查看入仓记录的条目
currentWarehouseRecord
:
null
}
}
},
},
watch
:{
watch
:{
...
@@ -86,7 +102,7 @@ export default {
...
@@ -86,7 +102,7 @@ export default {
this
.
getData
()
this
.
getData
()
},
},
detail
(){
detail
(){
this
.
getSplit
()
//
this.getSplit()
this
.
getOrder
()
this
.
getOrder
()
},
},
order
(){
order
(){
...
@@ -95,6 +111,11 @@ export default {
...
@@ -95,6 +111,11 @@ export default {
}
}
}
}
},
},
computed
:{
orderSplitBackVOList
(){
return
this
.
detail
?
this
.
detail
.
orderSplitBackVOList
:
[]
}
},
created
(){
created
(){
if
(
this
.
id
){
if
(
this
.
id
){
this
.
getData
()
this
.
getData
()
...
@@ -106,12 +127,12 @@ export default {
...
@@ -106,12 +127,12 @@ export default {
this
.
detail
=
JSON
.
parse
(
res
.
data
.
details
)
this
.
detail
=
JSON
.
parse
(
res
.
data
.
details
)
})
})
},
},
getSplit
(){
/*
getSplit(){
getSplitList({orderId: this.detail.orderId, lang: this.$i18n.locale.toLowerCase().indexOf('zh') > -1 ? 0 : 1 }).then(res => {
getSplitList({orderId: this.detail.orderId, lang: this.$i18n.locale.toLowerCase().indexOf('zh') > -1 ? 0 : 1 }).then(res => {
console.log('getSplitList', res)
console.log('getSplitList', res)
this.orderSplitBackVOList = res.data.orderSplitBackVOList
this.orderSplitBackVOList = res.data.orderSplitBackVOList
})
})
},
},
*/
getOrder
(){
getOrder
(){
getOrder
(
this
.
detail
.
orderId
).
then
(
res
=>
{
getOrder
(
this
.
detail
.
orderId
).
then
(
res
=>
{
this
.
order
=
res
.
data
this
.
order
=
res
.
data
...
@@ -121,7 +142,13 @@ export default {
...
@@ -121,7 +142,13 @@ export default {
getChannel
(
this
.
order
.
channelId
).
then
(
res
=>
{
getChannel
(
this
.
order
.
channelId
).
then
(
res
=>
{
this
.
channel
=
res
.
data
this
.
channel
=
res
.
data
})
})
},
showWarehouseRecord
(
row
){
if
(
!
row
.
specsRecordVOList
){
return
this
.
$message
.
info
(
this
.
$t
(
'
暂无入仓记录
'
))
}
}
this
.
currentWarehouseRecord
=
row
.
specsRecordVOList
}
}
}
}
}
</
script
>
</
script
>
...
@@ -133,4 +160,4 @@ export default {
...
@@ -133,4 +160,4 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/ecw/order/components/TransferCargo.vue
View file @
d66066bb
...
@@ -138,7 +138,8 @@ export default {
...
@@ -138,7 +138,8 @@ export default {
getReleaseInfo
(
this
.
orderId
).
then
(
res
=>
this
.
detail
=
res
.
data
)
getReleaseInfo
(
this
.
orderId
).
then
(
res
=>
this
.
detail
=
res
.
data
)
seasoningCondimentsSelect
({
orderId
:
this
.
orderId
}).
then
(
res
=>
{
seasoningCondimentsSelect
({
orderId
:
this
.
orderId
}).
then
(
res
=>
{
res
.
data
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
item
=>
{
item
.
releaseNum
=
item
.
sumNum
-
item
.
releaseNum
item
.
release
=
item
.
releaseNum
item
.
releaseNum
=
item
.
sumNum
-
item
.
release
})
})
this
.
orders
=
res
.
data
this
.
orders
=
res
.
data
})
})
...
@@ -155,7 +156,7 @@ export default {
...
@@ -155,7 +156,7 @@ export default {
// 放货箱数不能大于可放货箱数
// 放货箱数不能大于可放货箱数
let
errNos
=
[]
let
errNos
=
[]
this
.
selectedOrders
.
forEach
(
item
=>
{
this
.
selectedOrders
.
forEach
(
item
=>
{
if
(
item
.
releaseNum
>
item
.
sumNum
-
item
.
release
Num
){
if
(
item
.
releaseNum
>
item
.
sumNum
-
item
.
release
){
errNos
.
push
(
item
.
orderNo
)
errNos
.
push
(
item
.
orderNo
)
}
}
})
})
...
@@ -172,7 +173,7 @@ export default {
...
@@ -172,7 +173,7 @@ export default {
this
.
$emit
(
'
success
'
)
this
.
$emit
(
'
success
'
)
})
})
})
})
}
}
}
}
...
@@ -192,4 +193,4 @@ export default {
...
@@ -192,4 +193,4 @@ export default {
margin-right
:
10px
;
margin-right
:
10px
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/ecw/order/edit.vue
View file @
d66066bb
...
@@ -497,7 +497,7 @@
...
@@ -497,7 +497,7 @@
<work-flow
xmlkey=
"order_modify"
v-model=
"ccIdArr"
/>
<work-flow
xmlkey=
"order_modify"
v-model=
"ccIdArr"
/>
</el-card>
</el-card>
<el-form
label=
""
style=
"margin: 30px 0"
>
<el-form
-item
label=
""
style=
"margin: 30px 0"
>
<
template
v-if=
"form.applyStatus == 1"
>
<
template
v-if=
"form.applyStatus == 1"
>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + form.formId)"
>
{{
$t
(
'
审核中
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + form.formId)"
>
{{
$t
(
'
审核中
'
)
}}
</el-button>
</
template
>
</
template
>
...
@@ -507,7 +507,7 @@
...
@@ -507,7 +507,7 @@
<el-button
type=
"primary"
@
click=
"submitForm(2)"
v-else
>
{{
$t
(
'
编辑订单
'
)
}}
</el-button>
<!--修改-->
<el-button
type=
"primary"
@
click=
"submitForm(2)"
v-else
>
{{
$t
(
'
编辑订单
'
)
}}
</el-button>
<!--修改-->
</
template
>
</
template
>
<el-button
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{$t('返回')}}
</el-button>
<el-button
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{$t('返回')}}
</el-button>
</el-form>
</el-form
-item
>
</el-form>
</el-form>
<el-dialog
:title=
"$t('批量导入')"
:visible.sync=
"showBatchImportDialog"
width=
"1000px"
:close-on-click-modal=
"false"
>
<el-dialog
:title=
"$t('批量导入')"
:visible.sync=
"showBatchImportDialog"
width=
"1000px"
:close-on-click-modal=
"false"
>
...
...
src/views/ecw/order/prepayDeal.vue
View file @
d66066bb
...
@@ -326,7 +326,6 @@
...
@@ -326,7 +326,6 @@
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
<
el
-
row
:
span
=
"
12
"
v
-
if
=
"
orderExceptionData.orderExceptionType=='order_doc_exception'
"
>
<
el
-
row
:
span
=
"
12
"
v
-
if
=
"
orderExceptionData.orderExceptionType=='order_doc_exception'
"
>
<
el
-
form
-
item
v
-
if
=
"
orderExceptionData.orderExceptionStatus!=2
"
:
label
=
"
$t('报关资料')+':'
"
size
=
"
medium
"
:
require
=
"
true
"
>
<
el
-
form
-
item
v
-
if
=
"
orderExceptionData.orderExceptionStatus!=2
"
:
label
=
"
$t('报关资料')+':'
"
size
=
"
medium
"
:
require
=
"
true
"
>
<
file
-
upload
v
-
model
=
"
handlerParams.fileList
"
:
value
=
"
orderExceptionData.orderExceptionAttr
"
><
/file-upload
>
<
file
-
upload
v
-
model
=
"
handlerParams.fileList
"
:
value
=
"
orderExceptionData.orderExceptionAttr
"
><
/file-upload
>
...
@@ -873,6 +872,7 @@
...
@@ -873,6 +872,7 @@
this
.
selectLine
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
this
.
handlerParams
.
lineId
)
this
.
selectLine
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
this
.
handlerParams
.
lineId
)
}
,
}
,
// getDictData,
// getDictData,
getDictData
,
onTableMounted
(
e
){
onTableMounted
(
e
){
// console.warn('onTableMounted', e)
// console.warn('onTableMounted', e)
}
,
}
,
...
...
src/views/ecw/order/splitApply/components/PutIn.vue
0 → 100644
View file @
d66066bb
<
template
>
<!-- 放入弹层 -->
<el-dialog
:title=
"$t('入仓记录放入确认')"
:visible=
"show"
:before-close=
"closeDialog"
:close-on-click-modal=
"false"
width=
"1500px"
:append-to-body=
"appendToBody"
>
<el-card>
<div
slot=
"header"
>
{{
$t
(
'
可拆出入仓记录
'
)
}}
</div>
<el-table
:data=
"[warehouseRecord]"
>
<el-table-column
:label=
"$t('箱数')"
prop=
"cartonsNum"
>
<template
slot-scope=
"
{row}">
{{
Math
.
min
(
row
.
cartonsNum
,
maxNum
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓类型')"
prop=
"specificationType"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
prop=
"unit"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
:value=
"row.unit"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('长')"
prop=
"boxGauge"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
0
]
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('宽')"
prop=
"boxGauge"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
1
]
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('高')"
prop=
"boxGauge"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
2
]
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('体积') + '(m³)'"
prop=
"volume"
/>
<el-table-column
:label=
"$t('重量') + '(kg)'"
prop=
"weight"
/>
<el-table-column
:label=
"$t('数量(个)')"
prop=
"quantityAll"
/>
<el-table-column
:label=
"$t('入仓快递单号')"
prop=
"expressNo"
/>
<el-table-column
:label=
"$t('首次入仓时间')"
prop=
"inTime"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
inTime
|
parseTime
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
slot-scope=
"{row}"
>
{{
getLocationName
(
row
.
orderLocationBackVOList
)
}}
</
template
>
</el-table-column>
</el-table>
<div>
{{$t('可拆')}}:
{{maxSplitNum}}{{$t('箱')}},
{{$t('体积')}}:{{leftData('volume')}}{{$t('m³')}},
{{$t('重量')}}:{{leftData('weight')}}{{$t('kg')}},
{{$t('数量')}}:{{leftData('quantity')}}{{$t('个')}}
</div>
</el-card>
<el-card
class=
"box-card mt-10"
>
<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=
"deleteRow"
:disabled=
"form.list.length <= 1"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"addRow"
></el-button>
</div>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
size=
"mini"
>
<el-table
:data=
"form.list"
style=
"width: 100%"
>
<el-table-column
:label=
"$t('箱数')"
width=
"200px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
箱数
'
)
}}
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
class=
"flex"
label-width=
"0"
:prop=
"`list.$
{$index}.num`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<!--需求方要求输入后马上计算其他数据,el组件无法绑定keyup事件,所以用原生的input-->
<!--
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-75 tight"
v-model=
"row.num"
:max=
"warehouseRecord.cartonsNum"
@
keyup.native=
"calc(row)"
></el-input-number>
-->
<input
class=
"input"
v-model=
"row.num"
type=
"number"
@
keyup=
"calc(row)"
@
change=
"calc(row)"
:min=
"1"
:max=
"maxSplitNum"
></input>
<dict-selector
class=
"w-75"
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"row.specificationType"
defaultable
></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=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"row.unit"
defaultable
></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=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.boxGauge1"
@
blur=
"calcVolume(row)"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
宽
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.boxGauge2"
@
blur=
"calcVolume(row)"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
高
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.boxGauge3"
@
blur=
"calcVolume(row)"
/>
</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=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`list.$
{$index}.volume`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0.01"
:max=
"warehouseRecord.volume"
class=
"w-100 tight"
v-model=
"row.volume"
/>
</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="{row,$index}">
<el-form-item label-width="0"
:prop="`list.${$index}.chargeVolume`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.chargeVolume"/>
</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=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`list.$
{$index}.weight`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0.01"
:max=
"warehouseRecord.weight"
class=
"w-75 tight"
v-model=
"row.weight"
/>
</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="{row,$index}">
<el-form-item label-width="0"
:prop="`list.${$index}.chargeWeight`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number controls-position="right" :min="0" class="w-75 tight" v-model="row.chargeWeight" type="number"/>
</el-form-item>
</template>
</el-table-column>-->
<el-table-column
:label=
"$t('数量')"
width=
"130px"
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`list.$
{$index}.quantity`"
:rules="{required: false, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0"
:max=
"warehouseRecord.quantityAll > 0 ? warehouseRecord.quantityAll : null"
class=
"w-75 tight"
v-model.number=
"row.quantity"
/>
{{
$t
(
'
个
'
)
}}
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input
v-model=
"row.expressNo"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
v-slot=
"{ row, column, $index }"
>
<!--
<el-button
type=
"primary"
size=
"mini"
@
click=
"showLocation(row, $index)"
>
{{
$t
(
'
选择储位
'
)
}}
</el-button>
-->
<warehouse-area-select
v-model=
"row.orderLocationList"
:warehouse-id=
"warehouseId"
></warehouse-area-select>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-popconfirm
v-if=
"$index > 0"
:title=
"$t('确定要删除该行入仓记录吗?')"
@
confirm=
"deleteRow($index)"
>
<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>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"submit"
>
{{ $t('确定') }}
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
WarehouseAreaSelect
from
"
@/components/WarehouseAreaSelect/index.vue
"
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
Decimal
from
'
decimal.js
'
import
Template
from
"
@/views/cms/template/index.vue
"
;
export
default
{
name
:
"
Putin
"
,
filters
:{
parseTime
},
components
:
{
Template
,
WarehouseAreaSelect
},
props
:{
warehouseRecord
:
Object
,
appendToBody
:
Boolean
,
// 仓库ID,选择储位要用到
warehouseId
:
Number
,
// 数量是否必须
quantityshow
:
Boolean
,
// 最大可拆箱数,装柜拆单用
maxNum
:
Number
,
},
data
(){
return
{
show
:
false
,
// 拆出的入仓记录
form
:{
list
:[]
}
}
},
computed
:{
// 计算当前添加的多条入仓记录总拆出数据
splitTotal
(){
return
field
=>
{
let
total
=
new
Decimal
(
0
)
this
.
form
.
list
.
forEach
(
item
=>
{
total
=
total
.
plus
(
new
Decimal
(
item
[
field
]
||
0
))
})
return
total
.
toNumber
()
}
},
// 计算此入仓记录全部拆出的数量,包含其他拆单订单的
totalSplitSum
(){
return
field
=>
{
let
total
=
new
Decimal
(
0
)
if
(
this
.
warehouseRecord
.
specsRecordVOList
&&
this
.
warehouseRecord
.
specsRecordVOList
.
length
){
this
.
warehouseRecord
.
specsRecordVOList
.
forEach
(
item
=>
{
total
=
total
.
plus
(
new
Decimal
(
item
[
field
]
||
0
))
})
}
return
total
.
plus
(
new
Decimal
(
this
.
splitTotal
(
'
num
'
))).
toNumber
()
}
},
// 剩余数据
leftData
(){
return
(
field
,
containNew
=
false
)
=>
{
// 入仓记录跟拆单记录的箱数字段不同,要做特殊处理
let
warehouseField
=
field
if
(
field
==
'
num
'
)
warehouseField
=
'
cartonsNum
'
if
(
field
==
'
quantity
'
)
warehouseField
=
'
quantityAll
'
let
left
=
new
Decimal
(
this
.
warehouseRecord
[
warehouseField
]
||
0
)
// 累减已拆记录
if
(
this
.
warehouseRecord
.
specsRecordVOList
&&
this
.
warehouseRecord
.
specsRecordVOList
.
length
){
this
.
warehouseRecord
.
specsRecordVOList
.
forEach
(
item
=>
{
left
=
left
.
minus
(
new
Decimal
(
item
[
field
]
||
0
))
})
}
// 如果是包含新数据(本次放入数据)
if
(
containNew
){
// 累减本页添加的入仓记录
this
.
form
.
list
.
forEach
(
item
=>
{
left
=
left
.
minus
(
new
Decimal
(
item
[
field
]
||
0
))
})
}
return
left
.
toNumber
()
}
},
// 可拆箱数
maxSplitNum
(){
return
Math
.
min
(
this
.
maxNum
,
this
.
leftData
(
'
num
'
))
}
},
mounted
()
{
this
.
show
=
true
this
.
$nextTick
(
this
.
addRow
)
},
methods
:{
// 添加一行
addRow
(){
let
{
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
expressNo
,
unit
}
=
this
.
warehouseRecord
let
num
=
Math
.
min
(
this
.
leftData
(
'
num
'
,
true
),
this
.
maxSplitNum
)
let
orderLocationList
=
this
.
warehouseRecord
.
orderLocationBackVOList
if
(
this
.
form
.
list
.
length
){
orderLocationList
=
this
.
form
.
list
[
this
.
form
.
list
.
length
-
1
].
orderLocationList
}
// 根据入仓记录添加一行
let
row
=
{
warehouseInId
:
this
.
warehouseRecord
.
id
,
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
expressNo
,
unit
,
volume
:
0
,
weight
:
0
,
num
:
num
,
quantity
:
0
,
orderLocationList
}
// 如果拆完了则剩下的全部放入,否则按照比例计算
this
.
$nextTick
(()
=>
{
if
(
this
.
leftData
(
'
num
'
,
true
)
<=
0
)
{
row
.
volume
=
this
.
leftData
(
'
volume
'
,
true
)
row
.
weight
=
this
.
leftData
(
'
weight
'
,
true
)
row
.
quantity
=
this
.
leftData
(
'
quantity
'
,
true
)
}
else
{
// 按照比例计算重量体积和数量
this
.
calc
(
row
)
}
})
this
.
form
.
list
.
push
(
row
)
},
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
deleteRow
(
index
){
const
spliceIndex
=
typeof
index
!==
'
number
'
?
this
.
list
-
1
:
index
this
.
form
.
list
.
splice
(
spliceIndex
,
1
)
},
// 计算体积
calcVolume
(
row
){
let
volume
=
Decimal
(
row
.
boxGauge1
||
0
)
.
times
(
Decimal
(
row
.
boxGauge2
||
0
))
.
times
(
Decimal
(
row
.
boxGauge3
||
0
)).
div
(
1000000
)
// 如果是箱的单位要乘以箱数
if
(
row
.
specificationType
===
1
)
{
row
.
volume
=
volume
.
times
(
Decimal
(
row
.
num
||
0
))
}
// 最低0.01
volume
=
Math
.
max
(
0.01
,
volume
.
toNumber
().
toFixed
(
2
))
this
.
$set
(
row
,
'
volume
'
,
volume
)
},
// 获取储位名称
getLocationName
(
locationArr
){
if
(
!
locationArr
||
!
locationArr
.
length
)
return
''
let
arr
=
[]
locationArr
.
forEach
(
item
=>
{
arr
.
push
(
`
${
item
.
areaName
}${
item
.
locationName
||
''
}
`
)
})
return
Array
.
from
(
new
Set
(
arr
)).
join
(
"
,
"
)
},
// 根据箱数计算体积,重量,数量
calc
(
row
){
const
rate
=
row
.
num
/
this
.
warehouseRecord
.
cartonsNum
row
.
volume
=
(
this
.
warehouseRecord
.
volume
*
rate
).
toFixed
(
2
)
row
.
weight
=
(
this
.
warehouseRecord
.
weight
*
rate
).
toFixed
(
2
)
row
.
quantity
=
(
this
.
warehouseRecord
.
quantityAll
*
rate
).
toFixed
(
0
)
},
closeDialog
(){
this
.
show
=
false
this
.
$emit
(
'
close
'
);
},
submit
(){
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
!
valid
){
return
false
}
if
(
this
.
splitTotal
(
'
num
'
)
>
this
.
maxSplitNum
){
return
this
.
$message
.
error
(
"
拆出箱数不能大于可拆箱数
"
)
}
if
(
this
.
splitTotal
(
'
volume
'
)
>
this
.
leftData
(
'
volume
'
)){
return
this
.
$message
.
error
(
"
拆出体积不能大于剩余体积
"
)
}
if
(
this
.
splitTotal
(
'
weight
'
)
>
this
.
leftData
(
'
weight
'
)){
return
this
.
$message
.
error
(
"
拆出重量不能大于剩余重量
"
)
}
// 如果全拆(拆出箱数 == 原入仓箱数),则体积重量也需要全拆
if
(
this
.
splitTotal
(
'
num
'
)
===
this
.
warehouseRecord
.
cartonsNum
){
if
(
this
.
splitTotal
(
'
volume
'
)
!==
this
.
warehouseRecord
.
volume
){
return
this
.
$message
.
error
(
"
全拆拆出体积必须等于原入仓体积
"
)
}
if
(
this
.
splitTotal
(
'
weight
'
)
!==
this
.
warehouseRecord
.
weight
){
return
this
.
$message
.
error
(
"
全拆拆出重量必须等于原入仓体积
"
)
}
}
this
.
$emit
(
'
submit
'
,
this
.
form
.
list
)
})
}
}
}
</
script
>
<
style
scoped
>
.input
{
border
:
1px
solid
#DCDFE6
;
padding
:
5px
6px
;
border-radius
:
5px
;
}
</
style
>
src/views/ecw/order/splitApply/components/WarehouseRecord.vue
0 → 100644
View file @
d66066bb
<
template
>
<!-- 拆单入仓记录 -->
<el-dialog
:title=
"$t('入仓记录')"
:visible=
"show"
:before-close=
"closeDialog"
:close-on-click-modal=
"false"
width=
"1000px"
:append-to-body=
"appendToBody"
>
<el-table
:data=
"list"
>
<el-table-column
type=
"index"
:label=
"$t('序号')"
/>
<el-table-column
:label=
"$t('箱数')"
prop=
"num"
/>
<el-table-column
:label=
"$t('入仓类型')"
prop=
"specificationType"
>
<template
slot-scope=
"
{row}">
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
prop=
"unit"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
:value=
"row.unit"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('长')"
prop=
"boxGauge"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
0
]
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('宽')"
prop=
"boxGauge"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
1
]
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('高')"
prop=
"boxGauge"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
2
]
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('体积') + '(m³)'"
prop=
"volume"
/>
<el-table-column
:label=
"$t('重量') + '(kg)'"
prop=
"weight"
/>
<el-table-column
:label=
"$t('数量(个)')"
prop=
"quantity"
/>
<el-table-column
:label=
"$t('入仓快递单号')"
prop=
"expressNo"
/>
<!--<el-table-column :label="$t('首次入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>-->
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
slot-scope=
"{row}"
>
<!--
{{
getLocationName
(
row
.
orderLocationList
)
}}
-->
<warehouse-area-select
v-model=
"row.orderLocationList"
readonly
:warehouse-id=
"warehouseId"
></warehouse-area-select>
</
template
>
</el-table-column>
</el-table>
</el-dialog>
</template>
<
script
>
import
WarehouseAreaSelect
from
"
@/components/WarehouseAreaSelect/index.vue
"
;
export
default
{
name
:
"
WarehouseRecord
"
,
components
:
{
WarehouseAreaSelect
},
props
:{
list
:{
type
:
Array
,
default
:
[]
},
warehouseId
:
Number
,
appendToBody
:
Boolean
},
data
(){
return
{
show
:
false
}
},
mounted
()
{
this
.
show
=
true
},
methods
:{
// 获取储位名称
getLocationName
(
locationArr
){
if
(
!
locationArr
||
!
locationArr
.
length
)
return
''
let
arr
=
[]
locationArr
.
forEach
(
item
=>
{
arr
.
push
(
`
${
item
.
areaName
}${
item
.
locationName
||
''
}
`
)
})
return
Array
.
from
(
new
Set
(
arr
)).
join
(
"
,
"
)
},
closeDialog
(){
this
.
show
=
false
this
.
$emit
(
'
close
'
);
},
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/order/splitApply/index.vue
0 → 100644
View file @
d66066bb
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-card>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
拆单申请
'
)
}}
-
{{
orderData
.
orderNo
||
''
}}
</div>
<div
class=
"btn-header"
>
<span
class=
"card-title"
>
{{
$t
(
'
原单信息
'
)
}}
</span>
</div>
<el-descriptions
:column=
"4"
>
<el-descriptions-item
:label=
"$t('唛头')"
>
{{
orderData
.
marks
?
orderData
.
marks
:
$t
(
'
无
'
)
}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('已到箱数/总箱数')"
>
<span>
{{
orderData
.
sumNum
||
0
}}
/
{{
orderData
.
costVO
?
orderData
.
costVO
.
totalNum
:
0
}}
</span>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('订单状态')"
>
<!--
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"orderData.status"
/>
-->
{{
orderData
.
abnormalState
!=
0
?
$t
(
'
异常
'
):
$t
(
'
正常
'
)
}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('送货日期')"
>
{{
orderData
.
deliveryDate
||
$t
(
'
无
'
)
}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('运输方式')"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"orderData.transportId"
/>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('始发地')"
>
<template
v-if=
"orderData.logisticsInfoDto"
>
{{
$l
(
orderData
.
logisticsInfoDto
,
'
startTitle
'
)
}}
</
template
>
<
template
v-else
>
{{
$t
(
'
无
'
)
}}
</
template
>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('目的地')"
:span=
"2"
>
<
template
v-if=
"orderData.logisticsInfoDto"
>
{{
$l
(
orderData
.
logisticsInfoDto
,
'
destTitle
'
)
}}
</
template
>
<
template
v-else
>
{{
$t
(
'
无
'
)
}}
</
template
>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('发货人姓名')"
>
{{orderData.consignorVO?orderData.consignorVO.name||$t('无'):$t('无')}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('发货公司')"
>
{{orderData.consignorVO?orderData.consignorVO.company||$t('无'):$t('无')}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('发货电话')"
>
{{!orderData.consignorVO?$t('无'):!orderData.consignorVO.phone?$t('无'):(checkCode(orderData.consignorVO.countryCode)+orderData.consignorVO.phone)}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"4"
>
<el-descriptions-item
:label=
"$t('收货人姓名')"
>
{{orderData.consigneeVO?orderData.consigneeVO.name||$t('无'):$t('无')}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('收货公司')"
>
{{orderData.consigneeVO?orderData.consigneeVO.company||$t('无'):$t('无')}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('收货电话')"
>
{{!orderData.consigneeVO?$t('无'):!orderData.consigneeVO.phone?$t('无'):(checkCode(orderData.consigneeVO.countryCode)+orderData.consigneeVO.phone)}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card
class=
"card"
>
<!-- 列表 -->
<div
slot=
"header"
class=
"card-title"
>
{{$t('货物信息')}}
</div>
<el-table
id=
'table'
v-loading=
"loading"
border
:data=
"orderData.orderItemVOList"
:summary-method=
"getSummaries"
show-summary
>
<el-table-column
:label=
"$t('序号')"
align=
"center"
prop=
"id"
type=
"index"
width=
"60"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('品名')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-row>
{{
scope
.
row
.
prodTitleEn
}}
</el-row>
<el-row>
{{
scope
.
row
.
prodTitleZh
}}
</el-row>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('填单货物属性')"
align=
"center"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-row>
<span>
{{
$t
(
'
品牌
'
)
}}
:
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.brandType"
/>
</span>
</el-row>
<el-row>
<span>
{{
$t
(
'
箱数
'
)
}}
:
{{
scope
.
row
.
num
||
$t
(
'
未填
'
)
}}
</span>
</el-row>
<el-row>
<span>
{{
$t
(
'
体积
'
)
}}
:
{{
scope
.
row
.
volume
||
$t
(
'
未填
'
)
}}
m³
</span>
</el-row>
<el-row>
<span>
{{
$t
(
'
重量
'
)
}}
:
{{
scope
.
row
.
weight
||
$t
(
'
未填
'
)
}}
kg
</span>
</el-row>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入库货物属性')"
align=
"center"
width=
"400"
>
<
template
slot-scope=
"scope"
>
<el-row
v-if=
"scope.row.warehouseInInfoVO"
>
<span>
{{
$t
(
'
规格
'
)
}}
:
{{
scope
.
row
.
warehouseInInfoVO
?
scope
.
row
.
warehouseInInfoVO
.
boxGauge
:
0
}}
</span>
</el-row>
<el-row
v-if=
"scope.row.warehouseInInfoVO"
>
<span>
{{
$t
(
'
品牌
'
)
}}
:
<template
v-if=
"scope.row.brandName"
>
{{
scope
.
row
.
brandName
}}
</
template
>
<dict-tag
v-else
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.feeType"
/>
</span>
<span
style=
"margin-left: 10px;"
>
{{$t('箱数')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.cartonsNum}}
</span>
<span
style=
"margin-left: 10px;"
>
{{$t('体积')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.volume}}m³
</span>
<span
style=
"margin-left: 10px;"
>
{{$t('重量')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.weight}}kg
</span>
<span
style=
"margin-left: 10px;"
>
{{$t('数量(个)')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.quantityAll}}
</span>
</el-row>
<el-row
v-if=
"!scope.row.warehouseInInfoVO"
>
<span>
{{$t('暂时没有入仓信息')}}
</span>
</el-row>
</template>
</el-table-column>
<el-table-column
:label=
"$t('最后操作时间')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('状态')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<!--
{{
orderData
.
abnormalState
!=
0
?
$t
(
'
异常
'
):
$t
(
'
正常
'
)
}}
-->
<dict-tag
:type=
"DICT_TYPE.ORDER_ITEM_STATUS"
:value=
"scope.row.itemStatus"
/>
</
template
>
</el-table-column>
</el-table>
</el-card>
<el-card
class=
"card"
>
<!-- 列表 -->
<div
slot=
"header"
class=
"card-title flex"
>
<div
style=
"flex: 1; display: flex; align-items: center"
>
{{$t('拆单信息')}}
</div>
<div>
<span
v-if=
"orderData.abnormalState!=0"
class=
"red"
>
{{$t('异常无法拆单')}}
</span>
<el-button
v-else
type=
"primary"
@
click=
"addSplit"
:disabled=
"orderData.inWarehouseState==207"
>
{{$t('新建拆单')}}
</el-button>
</div>
</div>
<
template
v-if=
"splitData.length>0"
>
<div
v-for=
"(item, index) in splitData"
:key=
"index"
>
<div
class=
"btn-header"
>
<div>
<p
class=
"card-info"
>
<span
class=
"card-title"
>
{{
item
.
orderNo
}}
</span>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"item.transportId"
/>
<span>
{{
$t
(
'
发往
'
)
}}
:
{{
importCityName
(
item
.
dstWarehouseId
)
}}
</span>
</p>
</div>
<div>
<el-button
type=
"primary"
@
click=
"addShop(index)"
>
{{
$t
(
'
放入
'
)
}}
</el-button>
<el-button
:disabled=
"index
<
splitData
.
length
-
1
"
type=
"primary"
plain
@
click=
"deleteSplit(item.id)"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
</div>
</div>
<el-table
v-if=
"item.orderSplitItemBackVOList"
border
:data=
"item.orderSplitItemBackVOList"
>
<el-table-column
:label=
"$t('序号')"
align=
"center"
prop=
"id"
type=
"index"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('中文名')"
align=
"center"
prop=
"prodTitleZh"
/>
<el-table-column
:label=
"$t('英文名')"
align=
"center"
prop=
"prodTitleEn"
/>
<el-table-column
:label=
"$t('品牌')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.brandName"
>
{{
scope
.
row
.
brandName
}}
</
template
>
<dict-tag
v-else
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.feeType"
/>
</template>
</el-table-column>
<el-table-column
:label=
"$t('入仓体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
volume
}}
m³
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('收费体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.chargeVolume"
@
change=
"updateField(scope.row, 'chargeVolume')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
m³
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
weight
}}
kg
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('收费重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.chargeWeight"
@
change=
"updateField(scope.row, 'chargeWeight')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
kg
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('货值')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.worth"
@
change=
"updateField(scope.row, 'worth')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
{{
$t
(
'
元
'
)
}}
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
prop=
"num"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"currentWarehouseRecord=scope.row.specsRecordVOList"
>
{{
scope
.
row
.
num
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量(个)')"
align=
"center"
prop=
"quantity"
></el-table-column>
<el-table-column
:label=
"$t('操作')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeShop(scope.row.id)"
>
{{
$t
(
'
移出
'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<el-empty
v-else
></el-empty>
</el-card>
<work-flow
xmlkey=
"split_order"
v-model=
"selectedUsers"
></work-flow>
<div
slot=
"footer"
class=
"card footer_btn"
v-if=
"orderData.abnormalState==0"
>
<
template
v-if=
"orderData.inWarehouseState!=207"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{
$t
(
'
提交申请
'
)
}}
</el-button>
<el-button
plain
type=
"primary"
@
click=
"cancel"
>
{{
$t
(
'
取消
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"reset"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
</
template
>
<
template
v-else
>
<el-button
type=
"primary"
@
click=
"$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)"
>
{{
$t
(
'
审核中
'
)
}}
</el-button>
<el-button
plain
type=
"primary"
@
click=
"dialogVisible = true"
>
{{
$t
(
'
取消审核
'
)
}}
</el-button>
<el-button
plain
type=
"primary"
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{
$t
(
'
返回
'
)
}}
</el-button>
</
template
>
</div>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('新建拆单')"
:visible.sync=
"open"
width=
"400px"
append-to-body
>
<el-form
ref=
"formSplit"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
:label=
"$t('运输方式')"
>
<dict-selector
:clearable=
"true"
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
@
change=
"changeTransport"
v-model=
"form.transportId"
/>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
v-if=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"
>
<el-select
v-model=
"form.channelId"
:placeholder=
"$t('请选择出货渠道')"
:clearable=
"true"
>
<el-option
:disabled=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-for=
"item in channelData"
:key=
"item.channelId"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的仓库')"
>
<el-select
v-model=
"form.destWarehouseId"
@
change=
"changeDeatWarehouseId"
:placeholder=
"$t('请选择目的仓库')"
:clearable=
"true"
>
<el-option
v-for=
"items in importCityList"
:label=
"$l(items, 'title')"
:value=
"items.id"
:key=
"items.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"haddleAdd"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"cancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"1500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"120px"
inline
>
<el-form-item
:label=
"$t('中文品名')"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择中文品名')"
>
<el-option
v-for=
"item in orderData.orderItemVOList"
:label=
"item.prodTitleZh"
:value=
"item.orderItemId"
:key=
"item.prodTitleZh"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('英文品名')"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择英文品名')"
>
<el-option
v-for=
"item in orderData.orderItemVOList"
:label=
"item.prodTitleEn"
:value=
"item.orderItemId"
:key=
"item.prodTitleEn"
></el-option>
</el-select>
</el-form-item>
<el-card>
<div
slot=
"header"
class=
"page-title"
>
{{$t('品名可拆数据')}}
</div>
<div
class=
"pl-20"
>
<span
class=
"mr-10"
>
{{$t('箱数')}}:{{ leftData.num || 0 }}
</span>
<span
class=
"mr-10"
>
{{ $t('入仓方数') }}:{{ leftData.volume || 0 }}m³
</span>
<span
class=
"mr-10"
>
{{ $t('收费方数') }}:{{ leftData.chargeVolume || 0 }}m³
</span>
<span
class=
"mr-10"
>
{{ $t('入仓重量') }}:{{ leftData.weight || 0 }}kg
</span>
<span
class=
"mr-10"
>
{{ $t('收费重量') }}:{{ leftData.chargeWeight || 0 }}kg
</span>
<span
class=
"mr-10"
>
{{ $t('数量(个)') }}:{{ leftData.quantity || 0 }}
</span>
<span
class=
"mr-10"
>
{{ $t('剩余货值') }}:{{ leftData.worth || 0 }}{{ $t('元') }}
</span>
</div>
</el-card>
<el-card
class=
"mt-10"
>
<div
slot=
"header"
class=
"page-title"
>
{{$t('可拆入仓记录')}}
</div>
<el-table
:data=
"getOrderItemWarehouseIn(shopForm.orderItemId)"
style=
"width: 100%"
>
<el-table-column
:label=
"$t('箱数')"
>
<
template
v-slot=
"{row,$index}"
>
<!--
{{
row
.
cartonsNum
}}
-->
{{
getWarehouseLeftData
(
row
,
'
num
'
)
}}
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"row.specificationType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
>
<
template
v-slot=
"{row,$index}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"row.unit"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge2
}}
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge3
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入仓体积(m³)"
>
<
template
v-slot=
"{row,$index}"
>
{{
getWarehouseLeftData
(
row
,
'
volume
'
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入仓重量(Kg)"
prop=
"weight"
>
<
template
v-slot=
"{row,$index}"
>
{{
getWarehouseLeftData
(
row
,
'
weight
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
prop=
"quantity"
>
<
template
v-slot=
"{row,$index}"
>
{{
getWarehouseLeftData
(
row
,
'
quantity
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
v-slot=
"{ row, column, $index }"
>
{{
getLocationName
(
row
.
orderLocationBackVOList
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-tag
v-if=
"getWarehouseInSplitData(row.id,'num') >= row.cartonsNum"
disabled
size=
"mini"
type=
"primary"
>
{{
$t
(
'
已拆完
'
)
}}
</el-tag>
<el-button
v-else
size=
"mini"
type=
"primary"
@
click=
"putInRecord(row)"
>
放入
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-card>
<el-card
class=
"mt-10"
>
<div
slot=
"header"
class=
"flex-between mt-20 mb-10"
>
<div
class=
"page-title"
style=
"margin: 0"
>
{{$t('已放入入仓记录')}}
</div>
<el-button
type=
"danger"
size=
"mini"
@
click=
"clearAll"
>
清空放入数据
</el-button>
</div>
<el-table
:data=
"shopForm.specsRecordVOList"
style=
"width: 100%"
>
<el-table-column
:label=
"$t('箱数')"
width=
"200px"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
num
}}
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"row.specificationType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
width=
"100px"
>
<
template
v-slot=
"{row,$index}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"row.unit"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge2
}}
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
boxGauge3
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入仓体积(m³)"
>
<
template
v-slot=
"{row,$index}"
>
{{
row
.
volume
}}
</
template
>
</el-table-column>
<!--<el-table-column label="收费体积(m³)" prop="chargeVolume"></el-table-column>-->
<el-table-column
label=
"入仓重量(Kg)"
prop=
"weight"
></el-table-column>
<!--<el-table-column label="收费重量(Kg)" prop="chargeWeight"></el-table-column>-->
<el-table-column
:label=
"$t('数量')"
width=
"130px"
prop=
"quantity"
></el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
v-slot=
"{ row, column, $index }"
>
{{
getLocationName
(
row
.
orderLocationList
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"deleteRow($index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-card>
<el-card
class=
"mt-10"
>
<div
slot=
"header"
class=
"page-title"
>
放入数据
</div>
<div>
<div
class=
"pl-20 mb-10"
>
<span
class=
"mr-10"
>
{{$t('箱数')}}:{{ putin.num || 0 }},
</span>
<span
class=
"mr-10"
>
{{ $t('数量(个)') }}:{{ putin.quantity || 0 }},
</span>
<span
class=
"mr-10"
>
{{ $t('入仓方数') }}:{{ putin.volume || 0 }}m³,
</span>
<span
class=
"mr-10"
>
{{ $t('入仓重量') }}:{{ putin.weight || 0 }}kg
</span>
</div>
<el-form-item
:label=
"$t('收费方数')"
prop=
"chargeVolume"
>
<el-input-number
v-model=
"shopForm.chargeVolume"
controls-position=
"right"
></el-input-number>
m³
</el-form-item>
<el-form-item
:label=
"$t('收费重量')"
prop=
"chargeWeight"
>
<el-input-number
v-model=
"shopForm.chargeWeight"
controls-position=
"right"
></el-input-number>
kg
</el-form-item>
<el-form-item
:label=
"$t('放入货值')"
>
<el-input-number
v-model=
"shopForm.worth"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.worth"
>
<
template
slot=
"append"
>
{{
$t
(
'
元
'
)
}}
</
template
>
</el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('备注信息')"
>
<el-input
v-model=
"shopForm.remark"
></el-input>
</el-form-item>
</div>
</el-card>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"shopAdd"
:disabled=
"!shopForm.specsRecordVOList || !shopForm.specsRecordVOList.length"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"shopCancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
<el-dialog
:title=
"$t('提示')"
:visible.sync=
"dialogVisible"
width=
"30%"
>
<span
class=
"cancel_notice"
>
{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}
</span>
<div
class=
"cancel_content"
>
<span>
{{$t('取消原因:')}}
</span>
<el-input
v-model=
"reason"
:placeholder=
"$t('请输入取消原因')"
></el-input>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
{{$t('取消')}}
</el-button>
<el-button
type=
"primary"
@
click=
"cancelSplit"
>
{{$t('确定')}}
</el-button>
</span>
</el-dialog>
<el-dialog
:title=
"$t('提示')"
:visible.sync=
"dialogVisible"
width=
"30%"
>
<span
class=
"cancel_notice"
>
{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}
</span>
<div
class=
"cancel_content"
>
<span>
{{$t('取消原因:')}}
</span>
<el-input
v-model=
"reason"
:placeholder=
"$t('请输入取消原因')"
></el-input>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
{{$t('取消')}}
</el-button>
<el-button
type=
"primary"
@
click=
"cancelSplit"
>
{{$t('确定')}}
</el-button>
</span>
</el-dialog>
<warehouse-record
v-if=
"currentWarehouseRecord"
:list=
"currentWarehouseRecord"
:warehouseId=
"currentWarehouseId"
@
close=
"currentWarehouseRecord=null"
></warehouse-record>
<put-in
v-if=
"currentPutIn"
:warehouse-record=
"currentPutIn"
@
close=
"currentPutIn=null"
@
submit=
"handlePutin"
:warehouse-id=
"currentWarehouseId"
:max-num=
"orderData.sumNum"
></put-in>
</div>
</template>
<
script
>
import
{
getDictData
,
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getSplitList
,
splitApply
,
createSplit
,
cancelApply
,
createSplitItem
,
deleteSplitItem
,
deleteSplit
,
deleteAllSplit
}
from
"
@/api/ecw/orderHandle
"
import
{
getWarehouseList
,
quantityRequired
}
from
'
@/api/ecw/warehouse
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
{
getOrder
,
getOrderWarehouseIn
,
splitItemUpdate
}
from
'
@/api/ecw/order
'
import
Decimal
from
'
decimal.js
'
import
WarehouseAreaSelect
from
"
@/components/WarehouseAreaSelect
"
;
import
WarehouseDetail
from
"
@/views/ecw/order/components/WarehouseDetail
"
;
import
WarehouseRecord
from
"
@/views/ecw/order/splitApply/components/WarehouseRecord
"
;
import
PutIn
from
"
@/views/ecw/order/splitApply/components/PutIn.vue
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
export
default
{
name
:
"
SplitApply
"
,
components
:
{
Template
,
WarehouseRecord
,
WarehouseDetail
,
WarehouseAreaSelect
,
WorkFlow
,
PutIn
},
data
()
{
return
{
checked
:
false
,
reason
:
''
,
dialogVisible
:
false
,
orderData
:{},
splitData
:[],
orderApprovalBackVO
:{},
splitIndex
:
0
,
channelData
:[],
tradeCityList
:[],
multipleSelection
:[],
loading
:
false
,
open
:
false
,
form
:{
},
importCityList
:[],
selectedUsers
:[],
shopOpen
:
false
,
quantityshow
:
false
,
shopForm
:{
specsRecordVOList
:
[]
},
// 表单校验
rules
:
{
transportId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择运输方式
"
),
trigger
:
"
change
"
}],
warehouseIds
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择目的仓库
"
),
trigger
:
"
change
"
}],
channelId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择出货渠道
"
),
trigger
:
"
change
"
}],
},
// 表单校验
shopRules
:
{
chargeVolume
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请填写收费方数
"
),
trigger
:
"
blur
"
}],
chargeWeight
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请填写收费重量
"
),
trigger
:
"
blur
"
}],
},
queryParams
:{
orderId
:
null
,
lang
:
0
},
query
:{
page
:
1
,
rows
:
20
},
// splitItemIndex:0,
quantitySum
:
0
,
// 当前查看的入仓记录
currentWarehouseRecord
:
null
,
// 订单入仓记录
warehouseInList
:
[],
// 当前选择的入仓记录ID
// selectedWarehouseInId: null,
// 当前正在放入的入仓记录
currentPutIn
:
null
};
},
async
created
()
{
this
.
getChannel
()
getWarehouseList
().
then
(
res
=>
{
this
.
tradeCityList
=
res
.
data
this
.
importCityList
=
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
})
if
(
this
.
$route
.
query
.
orderId
)
{
this
.
queryParams
.
orderId
=
this
.
$route
.
query
.
orderId
}
Promise
.
all
([
this
.
getList
(),
this
.
getOrder
()]).
then
(
res
=>
{
console
.
log
(
"
拆单数据
"
,
this
.
splitData
,
this
.
splitData
.
length
)
if
(
this
.
orderData
.
inWarehouseState
!=
207
&&
this
.
splitData
.
length
){
this
.
reset
()
}
})
// 获取入仓记录
getOrderWarehouseIn
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
this
.
warehouseInList
=
res
.
data
})
},
watch
:
{
//监听table这个对象
tableData
:
{
// 立即监听
immediate
:
true
,
handler
()
{
this
.
$nextTick
(()
=>
{
const
tds
=
document
.
querySelectorAll
(
"
#table .el-table__footer-wrapper tr>td
"
);
// colSpan合并列
tds
[
1
].
colSpan
=
5
;
tds
[
1
].
style
.
textAlign
=
"
left
"
;
tds
[
2
].
style
.
display
=
"
none
"
;
tds
[
3
].
style
.
display
=
"
none
"
;
tds
[
4
].
style
.
display
=
"
none
"
;
tds
[
5
].
style
.
display
=
"
none
"
;
});
},
},
// 关闭放入弹层的时候清理弹层表单内容
shopOpen
(
show
){
if
(
!
show
){
this
.
shopForm
=
{}
}
},
// 切换品名需要重置已放入的记录
'
shopForm.orderItemId
'
(){
// 默认取以前放入的品名
let
split
=
this
.
splitData
.
find
(
item
=>
item
.
id
==
this
.
splitData
[
this
.
splitIndex
].
id
)
this
.
shopForm
.
specsRecordVOList
=
[]
if
(
split
)
{
let
specsRecordVOList
=
split
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)?.
specsRecordVOList
||
[]
specsRecordVOList
.
forEach
(
item
=>
{
const
[
boxGauge1
,
boxGauge2
,
boxGauge3
]
=
item
.
boxGauge
.
split
(
'
*
'
)
this
.
shopForm
.
specsRecordVOList
.
push
({...
item
,
boxGauge1
,
boxGauge2
,
boxGauge3
})
})
}
}
},
computed
:{
getDictData
(){
return
(
type
,
value
)
=>
getDictData
(
type
,
value
)
||
{}
},
getDictDatas
(){
return
getDictDatas
},
// 放入品名试选择的商品项
orderItem
(){
if
(
!
this
.
orderData
||
!
this
.
shopForm
.
orderItemId
)
return
{}
return
this
.
orderData
.
orderItemVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
||
{}
},
// 主单数据,也就是拆分剩余的数据,可用来限制拆单放入的最大值
mainOrderItem
(){
if
(
!
this
.
shopForm
.
orderItemId
)
return
{}
return
this
.
orderData
.
orderItemVOList
.
find
(
item
=>
item
.
orderItemId
===
this
.
shopForm
.
orderItemId
)
},
// 剩余可拆数据,父订单的入仓数据 - 全部拆单的品名数据
leftData
(){
if
(
!
this
.
shopForm
.
orderItemId
)
return
{}
let
data
=
{
num
:
new
Decimal
(
this
.
orderItem
.
warehouseInInfoVO
?.
cartonsNum
||
0
),
volume
:
new
Decimal
(
this
.
orderItem
.
warehouseInInfoVO
?.
volume
||
0
),
weight
:
new
Decimal
(
this
.
orderItem
.
warehouseInInfoVO
?.
weight
||
0
),
quantity
:
new
Decimal
(
this
.
orderItem
.
warehouseInInfoVO
?.
quantityAll
||
0
),
chargeVolume
:
new
Decimal
(
this
.
orderItem
.
chargeVolume
||
0
),
chargeWeight
:
new
Decimal
(
this
.
orderItem
.
chargeWeight
||
0
),
worth
:
new
Decimal
(
this
.
orderItem
.
worth
||
0
),
}
// 全部拆单的放入数据累减
this
.
splitData
.
forEach
(
split
=>
{
split
.
orderSplitItemBackVOList
.
forEach
(
splitItem
=>
{
// 正在拆的要排除,不然会重复计算
if
(
splitItem
.
orderItemId
==
this
.
shopForm
.
orderItemId
&&
split
.
id
==
this
.
splitData
[
this
.
splitIndex
].
id
){
return
}
// 每个品名的入仓记录挨个累减其他数据
if
(
splitItem
.
orderItemId
==
this
.
shopForm
.
orderItemId
){
// 每个品名都要累减收费数据
data
.
chargeVolume
=
data
.
chargeVolume
.
minus
(
new
Decimal
(
splitItem
.
chargeVolume
||
0
))
data
.
chargeWeight
=
data
.
chargeWeight
.
minus
(
new
Decimal
(
splitItem
.
chargeWeight
||
0
))
data
.
worth
=
data
.
worth
.
minus
(
new
Decimal
(
splitItem
.
worth
||
0
))
data
.
num
=
data
.
num
.
minus
(
new
Decimal
(
splitItem
.
num
||
0
))
data
.
volume
=
data
.
volume
.
minus
(
new
Decimal
(
splitItem
.
volume
||
0
))
data
.
weight
=
data
.
weight
.
minus
(
new
Decimal
(
splitItem
.
weight
||
0
))
data
.
quantity
=
data
.
quantity
.
minus
(
new
Decimal
(
splitItem
.
quantity
||
0
))
}
})
})
return
data
},
// 放入数据
putin
(){
let
data
=
{
num
:
new
Decimal
(
0
),
volume
:
new
Decimal
(
0
),
weight
:
new
Decimal
(
0
),
quantity
:
new
Decimal
(
0
)
}
this
.
shopForm
.
specsRecordVOList
&&
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
data
.
num
=
data
.
num
.
plus
(
new
Decimal
(
item
.
num
||
0
))
data
.
volume
=
data
.
volume
.
plus
(
new
Decimal
(
item
.
volume
||
0
))
data
.
weight
=
data
.
weight
.
plus
(
new
Decimal
(
item
.
weight
||
0
))
data
.
quantity
=
data
.
quantity
.
plus
(
new
Decimal
(
item
.
quantity
||
0
))
})
return
{
num
:
data
.
num
.
toNumber
(),
volume
:
data
.
volume
.
toNumber
(),
weight
:
data
.
weight
.
toNumber
(),
quantity
:
data
.
quantity
.
toNumber
()
}
},
// 当前仓库ID,选择储位的时候需要用到
currentWarehouseId
(){
return
this
.
orderData
.
adjustToDestWarehouseId
||
this
.
orderData
.
logisticsInfoDto
.
startWarehouseId
},
// 当前选择的入仓记录
/*currentWarehouseItem(){
return this.getOrderItemWarehouseIn(this.shopForm.orderItemId).find(item => item.id === this.selectedWarehouseInId)
},*/
// 根据orderItemId获取入仓记录
getOrderItemWarehouseIn
()
{
return
orderItemId
=>
{
const
list
=
this
.
warehouseInList
.
find
(
item
=>
item
.
orderItemId
==
orderItemId
)?.
orderWarehouseInBackItemDoList
||
[]
return
list
.
map
(
item
=>
{
let
[
boxGauge1
,
boxGauge2
,
boxGauge3
]
=
item
.
boxGauge
.
split
(
'
*
'
)
let
labelArr
=
[
this
.
$t
(
'
{num}箱
'
,
{
num
:
item
.
cartonsNum
}),
this
.
$l
(
this
.
getDictDatas
(
this
.
DICT_TYPE
.
WAREHOUSING_SPECIFICATION_TYPE
).
find
(
dict
=>
dict
.
value
==
item
.
specificationType
),
'
label
'
),
this
.
$t
(
'
长{boxGauge1}cm
'
,
{
boxGauge1
}),
this
.
$t
(
'
宽{boxGauge2}cm
'
,
{
boxGauge2
}),
this
.
$t
(
'
高{boxGauge3}cm
'
,
{
boxGauge3
}),
this
.
$t
(
'
方数{volume}m³
'
,
{
volume
:
item
.
volume
}),
this
.
$t
(
'
重量{weight}kg
'
,
{
weight
:
item
.
weight
})
]
if
(
item
.
quantityAll
)
{
labelArr
.
push
(
this
.
$t
(
'
数量{n}
'
,
{
n
:
item
.
quantityAll
}))
}
if
(
item
.
expressNo
)
{
labelArr
.
push
(
this
.
$t
(
'
快递{expressNo}
'
,
{
expressNo
:
item
.
expressNo
}))
}
if
(
item
.
orderLocationBackVOList
&&
item
.
orderLocationBackVOList
.
length
)
{
labelArr
.
push
(
this
.
$t
(
'
储位{location}
'
,
{
location
:
item
.
orderLocationBackVOList
.
map
(
v
=>
v
.
code
||
v
.
areaName
+
(
v
.
locationName
||
''
)).
join
(
'
,
'
)
}))
}
item
.
boxGauge1
=
boxGauge1
item
.
boxGauge2
=
boxGauge2
item
.
boxGauge3
=
boxGauge3
item
.
text
=
labelArr
.
join
(
'
,
'
)
return
item
})
}
},
// 根据入仓记录ID筛选出他的全部拆出记录
getWarehouseInspecsRecordVOList
(){
return
warehouseInId
=>
{
let
specsRecordVOList
=
[]
// 这里是全部已放入的
this
.
splitData
.
forEach
((
split
,
splitIndex
)
=>
{
split
.
orderSplitItemBackVOList
.
forEach
(
splitItem
=>
{
// 当前正在拆的品名不包含,因为后面shopForm.specsRecordVOList会包含
if
(
splitIndex
==
this
.
splitIndex
&&
splitItem
.
orderItemId
==
this
.
shopForm
.
orderItemId
){
return
}
splitItem
.
specsRecordVOList
&&
splitItem
.
specsRecordVOList
.
forEach
(
specs
=>
{
if
(
specs
.
warehouseInId
===
warehouseInId
){
specsRecordVOList
.
push
(
specs
)
}
})
})
})
// 这里是全部正在操作放入,但是还没确定提交的
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
if
(
item
.
warehouseInId
==
warehouseInId
)
specsRecordVOList
.
push
(
item
)
})
return
specsRecordVOList
}
},
// 根据入仓ID获取拆出数据
getWarehouseInSplitData
(){
return
(
warehouseInId
,
field
)
=>
{
let
total
=
new
Decimal
(
0
)
this
.
getWarehouseInspecsRecordVOList
(
warehouseInId
).
forEach
(
item
=>
{
total
=
total
.
plus
(
new
Decimal
(
item
[
field
]
||
0
))
})
return
total
.
toNumber
()
}
},
// 获取入仓记录的剩余数据
getWarehouseLeftData
(){
return
(
warehouseRecord
,
field
)
=>
{
let
warehouseField
=
field
if
(
field
==
'
num
'
)
warehouseField
=
'
cartonsNum
'
if
(
field
==
'
quantity
'
)
warehouseField
=
'
quantityAll
'
let
total
=
new
Decimal
(
warehouseRecord
[
warehouseField
]
||
0
)
this
.
getWarehouseInspecsRecordVOList
(
warehouseRecord
.
id
).
forEach
(
item
=>
{
total
=
total
.
minus
(
new
Decimal
(
item
[
field
]
||
0
))
})
return
total
.
toNumber
()
}
}
},
methods
:
{
/*检查并提交字段(体积,重量)修改*/
updateField
(
row
,
field
){
let
val
=
parseFloat
(
row
[
field
])
if
(
!
val
||
val
<
0
){
this
.
$message
.
error
(
this
.
$t
(
'
数据无效
'
))
return
this
.
getList
()
}
splitItemUpdate
(
row
).
then
(()
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
修改成功
'
))
}).
finally
(()
=>
{
this
.
getList
()
})
},
checkCode
(
data
){
if
(
data
.
indexOf
(
'
+
'
)
==-
1
){
return
'
+
'
+
data
}
return
data
},
changeTransport
(
e
){
this
.
$set
(
this
.
form
,
'
transportId
'
,
e
)
console
.
log
(
this
.
form
.
transportId
)
this
.
$forceUpdate
()
},
changeDeatWarehouseId
(
e
){
this
.
$forceUpdate
()
this
.
$set
(
this
.
form
,
'
destWarehouseId
'
,
e
)
console
.
log
(
this
.
form
.
destWarehouseId
)
},
getOrder
(){
this
.
loading
=
true
;
return
getOrder
(
this
.
queryParams
.
orderId
).
then
(
response
=>
{
this
.
orderData
=
response
.
data
this
.
query
.
destWarehouseId
=
response
.
data
.
logisticsInfoDto
.
startWarehouseId
this
.
loading
=
false
});
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 执行查询
return
getSplitList
(
this
.
queryParams
).
then
(
response
=>
{
this
.
splitData
=
response
.
data
.
orderSplitBackVOList
this
.
orderApprovalBackVO
=
response
.
data
this
.
loading
=
false
;
});
},
getChannel
(){
getChannelList
().
then
(
res
=>
this
.
channelData
=
res
.
data
)
},
changeDest
(){
this
.
query
.
warehouseIds
=
this
.
form
.
destWarehouseId
},
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
rowIndex
==
this
.
orderData
.
orderItemVOList
.
length
)
{
if
(
columnIndex
===
1
)
{
return
[
2
,
3
];
}
else
if
(
columnIndex
>
1
)
{
return
[
0
,
0
];
}
}
},
getSummaries
(){
const
sums
=
[];
sums
[
0
]
=
this
.
$t
(
'
小计
'
)
if
(
!
this
.
orderData
||
!
this
.
orderData
.
orderItemVOList
||
this
.
orderData
.
length
==
0
){
return
sums
}
var
orderSum
=
0
var
orderV
=
0
var
orderW
=
0
var
leviteSum
=
0
var
leviteV
=
0
var
leviteW
=
0
this
.
orderData
.
orderItemVOList
.
forEach
((
column
,
index
)
=>
{
orderSum
+=
column
.
num
orderV
+=
column
.
volume
orderW
+=
column
.
weight
leviteSum
+=
column
.
warehouseInInfoVO
?
column
.
warehouseInInfoVO
.
cartonsNum
:
0
leviteV
+=
column
.
warehouseInInfoVO
?
column
.
warehouseInInfoVO
.
volume
:
0
leviteW
+=
column
.
warehouseInInfoVO
?
column
.
warehouseInInfoVO
.
weight
:
0
});
sums
[
1
]
=
this
.
$t
(
'
下单统计
'
)
+
'
'
+
orderSum
+
'
'
+
this
.
$t
(
'
箱
'
)
+
'
'
+
orderV
.
toFixed
(
2
)
+
'
m³
'
+
orderW
+
'
kg
'
+
'
'
+
this
.
$t
(
'
入仓统计:
'
)
+
leviteSum
+
'
'
+
this
.
$t
(
'
箱
'
)
+
'
'
+
leviteV
.
toFixed
(
2
)
+
'
m³
'
+
leviteW
+
'
kg
'
return
sums
;
},
importCityName
(
id
){
var
arr
=
this
.
tradeCityList
.
filter
(
item
=>
item
.
id
==
id
)
return
arr
.
length
>
0
?
arr
[
0
].
titleZh
:
this
.
$t
(
'
无
'
)
},
submitForm
(){
if
(
this
.
splitData
.
length
==
0
){
this
.
$modal
.
msgError
(
this
.
$t
(
"
请先新建拆单
"
))
return
}
var
params
=
{
orderId
:
this
.
queryParams
.
orderId
,
copyUserId
:
this
.
selectedUsers
}
splitApply
(
params
).
then
(
res
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
申请成功
"
));
this
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
})
},
addShop
(
index
){
this
.
splitIndex
=
index
this
.
shopOpen
=
true
// 重置表单数据
this
.
shopForm
=
{
specsRecordVOList
:[]}
},
addSplit
(){
this
.
form
.
transportId
=
this
.
orderData
.
transportId
this
.
form
.
destWarehouseId
=
this
.
orderData
.
destWarehouseId
if
(
this
.
orderData
.
logisticsInfoDto
&&
this
.
orderData
.
logisticsInfoDto
.
destTitleZh
){
this
.
form
.
destWarehouseId
=
this
.
importCityList
.
find
(
item
=>
item
.
titleZh
==
this
.
orderData
.
logisticsInfoDto
.
destTitleZh
).
id
if
(
this
.
orderData
.
logisticsInfoDto
&&
this
.
orderData
.
logisticsInfoDto
.
channelId
){
this
.
form
.
channelId
=
this
.
orderData
.
logisticsInfoDto
.
channelId
}
}
this
.
open
=
true
},
/*changeProdTitleZh(val){
var list = []
list = this.splitData[0].orderSplitItemBackVOList.filter(item=>item.id == val)
this.shopForm.sum = list[0].num
this.quantitySum = list[0].quantity
this.shopForm.orderItemId = list[0].orderItemId
this.shopForm.prodTitleEn = list[0].prodTitleEn
this.shopForm.prodTitleZh = list[0].prodTitleZh
// 默认给一个
if(!this.shopForm.specsRecordVOList || !this.shopForm.specsRecordVOList.length){
this.addRow()
}
this.numcheck()
},*/
// 查询数量是否必填
numcheck
(){
quantityRequired
(
this
.
orderData
.
lineId
).
then
(
res
=>
{
this
.
quantityshow
=
res
.
data
})
},
// 输入方数箱数后,按照平均值计算数量和体积重量数据
numChange
(){
/*var sum = parseInt(this.quantitySum/this.shopForm.num)
this.$set(this.shopForm,'quantity',sum)*/
let
rate
=
this
.
shopForm
.
num
/
this
.
mainOrderItem
.
num
this
.
$set
(
this
.
shopForm
,
'
quantity
'
,
Math
.
ceil
(
this
.
mainOrderItem
.
quantity
*
rate
))
this
.
$set
(
this
.
shopForm
,
'
volume
'
,
(
this
.
mainOrderItem
.
volume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeVolume
'
,
(
this
.
mainOrderItem
.
chargeVolume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
weight
'
,
(
this
.
mainOrderItem
.
weight
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeWeight
'
,
(
this
.
mainOrderItem
.
chargeWeight
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
(
this
.
mainOrderItem
.
worth
*
rate
).
toFixed
(
2
))
},
/*changeProdTitleEn(){
var list = []
list = this.splitData[0].orderSplitItemBackVOList.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn)
this.shopForm.sum = list[0].num
this.quantitySum = list[0].quantity
this.shopForm.prodTitleZh = list[0].prodTitleZh
},*/
haddleAdd
(){
let
that
=
this
if
(
!
that
.
form
.
transportId
){
that
.
$message
.
error
(
this
.
$t
(
"
请选择运输方式
"
));
return
}
if
(
!
that
.
form
.
destWarehouseId
){
that
.
$message
.
error
(
this
.
$t
(
"
请选择目的仓库
"
));
return
}
// if(!this.form.channelId){
// this.$modal.msgError("请选择出货渠道");
// }
var
params
=
{
dstWarehouseId
:
that
.
form
.
destWarehouseId
,
parentOrderId
:
that
.
orderData
.
orderId
,
parentOrderNo
:
that
.
orderData
.
orderNo
,
transportId
:
that
.
form
.
transportId
,
channelId
:
that
.
form
.
channelId
}
createSplit
(
params
).
then
(
res
=>
{
that
.
getList
()
})
that
.
open
=
false
},
/*cancel(){
this.open = false
this.form = {}
},*/
shopAdd
(){
this
.
$refs
[
"
shopForm
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
if
(
!
this
.
shopForm
.
specsRecordVOList
.
length
){
return
this
.
$message
.
error
(
this
.
$t
(
"
请放入品名
"
));
}
// 放入数据不能大于可拆数据
if
(
this
.
putin
.
num
>
this
.
leftData
.
num
){
return
this
.
$message
.
error
(
this
.
$t
(
"
放入箱数不能大于可拆箱数
"
));
}
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
item
.
boxGauge
=
`
${
item
.
boxGauge1
}
*
${
item
.
boxGauge2
}
*
${
item
.
boxGauge3
}
`
})
var
params
=
{
num
:
this
.
putin
.
num
,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderSplitId
:
this
.
splitData
[
this
.
splitIndex
].
id
,
remark
:
this
.
shopForm
.
remark
,
volume
:
this
.
putin
.
volume
,
chargeVolume
:
this
.
shopForm
.
chargeVolume
,
weight
:
this
.
putin
.
weight
,
chargeWeight
:
this
.
shopForm
.
chargeWeight
,
worth
:
this
.
shopForm
.
worth
||
0
,
specsRecordVOList
:
this
.
shopForm
.
specsRecordVOList
}
// 体积重量不能为0
const
fields
=
{
'
volume
'
:
this
.
$t
(
'
体积
'
),
'
weight
'
:
this
.
$t
(
'
重量
'
),
'
chargeVolume
'
:
this
.
$t
(
'
收费体积
'
),
'
chargeWeight
'
:
this
.
$t
(
'
收费重量
'
),
}
let
errFields
=
[]
Object
.
keys
(
fields
).
forEach
(
field
=>
{
if
(
params
[
field
]
<
0.01
){
errFields
.
push
(
fields
[
field
])
}
})
if
(
errFields
.
length
){
return
this
.
$message
.
error
(
this
.
$t
(
"
{field}最少为0.01
"
,
{
field
:
errFields
.
join
(
"
,
"
)}))
}
/*if(this.quantityshow){
params.quantity = this.shopForm.quantity
}*/
createSplitItem
(
params
).
then
(
async
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
await
this
.
getList
()
this
.
shopForm
=
{}
this
.
shopOpen
=
false
})
})
},
removeShop
(
id
){
let
that
=
this
that
.
$confirm
(
that
.
$t
(
'
是否移除货物吗?
'
)).
then
(
function
()
{
deleteSplitItem
(
id
).
then
(
res
=>
{
that
.
$message
.
success
(
that
.
$t
(
"
移除成功
"
));
that
.
getList
()
})
})
},
cancelSplit
(){
let
that
=
this
if
(
!
that
.
reason
){
that
.
$message
.
error
(
that
.
$t
(
"
请输入取消原因
"
));
return
}
cancelApply
({
orderId
:
that
.
queryParams
.
orderId
,
reason
:
that
.
reason
}).
then
(
res
=>
{
that
.
$message
.
success
(
that
.
$t
(
"
取消成功
"
));
that
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
})
},
shopCancel
(){
this
.
shopOpen
=
false
this
.
shopForm
=
{}
},
/** 删除按钮操作 */
deleteSplit
(
id
)
{
let
that
=
this
that
.
$confirm
(
that
.
$t
(
'
是否确认删除新拆的订单吗?
'
)).
then
(
function
()
{
deleteSplit
(
id
).
then
(
res
=>
{
that
.
$message
.
success
(
that
.
$t
(
"
删除成功
"
));
that
.
getList
()
})
})
},
// 添加一行
/*addRow(){
if(!this.shopForm.specsRecordVOList){
this.$set(this.shopForm,'specsRecordVOList',[])
}
if(!this.currentWarehouseItem){
return this.$message.info(this.$t("请选择入仓记录"))
}
let { specificationType, boxGauge1, boxGauge2, boxGauge3, volume, weight } = this.currentWarehouseItem
let num = this.currentWarehouseItem.cartonsNum
// 根据入仓记录添加一行
this.shopForm.specsRecordVOList.push({
specificationType, boxGauge1, boxGauge2, boxGauge3, volume, weight,num,
orderLocationList: this.currentWarehouseItem.orderLocationBackVOList
})
},*/
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
deleteRow
(
index
){
const
spliceIndex
=
typeof
index
!==
'
number
'
?
this
.
shopForm
.
specsRecordVOList
.
length
-
1
:
index
this
.
shopForm
.
specsRecordVOList
.
splice
(
spliceIndex
,
1
)
},
// 计算体积
calcVolume
(
row
){
let
volume
=
Decimal
(
row
.
boxGauge1
||
0
)
.
times
(
Decimal
(
row
.
boxGauge2
||
0
))
.
times
(
Decimal
(
row
.
boxGauge3
||
0
)).
div
(
1000000
)
// 如果是箱的单位要乘以箱数
if
(
row
.
specificationType
===
1
)
{
row
.
volume
=
volume
.
times
(
Decimal
(
row
.
num
||
0
))
}
// 最低0.01
volume
=
Math
.
max
(
0.01
,
volume
.
toNumber
().
toFixed
(
2
))
this
.
$set
(
row
,
'
volume
'
,
volume
)
this
.
$set
(
row
,
'
chargeVolume
'
,
volume
)
},
// 显示入库记录
showWarehouse
(
row
){
if
(
!
row
.
specsRecordVOList
){
return
this
.
$message
.
info
(
this
.
$t
(
'
暂无入仓记录
'
))
}
this
.
currentWarehouseRecord
=
row
.
specsRecordVOList
},
// 获取储位名称
getLocationName
(
locationArr
){
if
(
!
locationArr
||
!
locationArr
.
length
)
return
''
let
arr
=
[]
locationArr
.
forEach
(
item
=>
{
arr
.
push
(
`
${
item
.
areaName
||
''
}${
item
.
locationName
||
''
}
`
)
})
return
Array
.
from
(
new
Set
(
arr
)).
join
(
"
,
"
)
},
// 根据入仓记录打开放入弹层
putInRecord
(
row
){
this
.
currentPutIn
=
row
// 此条入仓记录已拆出的入仓记录,这样在放入的时候可以确保不超过此入仓记录的数量
let
specsRecordVOList
=
this
.
getWarehouseInspecsRecordVOList
(
row
.
id
)
this
.
currentPutIn
.
specsRecordVOList
=
specsRecordVOList
},
// 放入回调
handlePutin
(
list
){
if
(
!
list
.
length
){
return
this
.
$message
.
error
(
this
.
$t
(
"
请至少放入一条数据
"
))
}
list
.
forEach
(
item
=>
{
this
.
shopForm
.
specsRecordVOList
.
push
({...
item
})
})
this
.
currentPutIn
=
null
// 根据比例计算默认的收费方数和收费重量
const
orderItem
=
this
.
orderData
.
orderItemVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
const
rate
=
this
.
putin
.
num
/
orderItem
.
warehouseInInfoVO
.
cartonsNum
this
.
$set
(
this
.
shopForm
,
'
chargeVolume
'
,
(
orderItem
.
chargeVolume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeWeight
'
,
(
orderItem
.
chargeWeight
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
(
orderItem
.
worth
*
rate
).
toFixed
(
2
))
},
// 清空放入记录
clearAll
(){
this
.
$confirm
(
this
.
$t
(
"
确定要清空放入数据么?
"
)).
then
(
res
=>
{
this
.
shopForm
.
specsRecordVOList
=
[]
})
},
// 重置
reset
(){
return
deleteAllSplit
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
this
.
getList
()
})
},
// 取消
async
cancel
(){
await
this
.
reset
()
this
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
}
}
}
</
script
>
<
style
scoped
>
.page-title
{
margin
:
0
;
}
.card-title
{
font-size
:
18px
;
font-weight
:
bold
;
margin-top
:
10px
;
}
.card-info
{
font-size
:
16px
;
}
.card
{
margin-top
:
20px
;
}
.btn-header
{
width
:
90%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin
:
20px
0
;
}
.red
{
color
:
#ff3430
;
font-size
:
15px
;
}
.footer_btn
{
padding-bottom
:
60px
;
}
.cancel_notice
{
font-size
:
16px
;
font-weight
:
600
;
}
.cancel_content
{
display
:
flex
;
align-items
:
center
;
padding-top
:
20px
;
}
.cancel_content
span
{
width
:
100px
;
}
::v-deep
.el-form-item--mini.is-error
{
margin-bottom
:
18px
;
}
</
style
>
src/views/ecw/order/transferWarehousing.vue
View file @
d66066bb
...
@@ -18,7 +18,12 @@
...
@@ -18,7 +18,12 @@
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('填单货物属性')"
>
<el-table-column
:label=
"$t('填单货物属性')"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
<div>
{{
$t
(
'
品牌
'
)
}}
:无
</div><div>
{{
$t
(
'
箱数
'
)
}}
:
{{
row
.
num
}}
</div><div>
{{
$t
(
'
体积
'
)
}}
:
{{
row
.
volume
}}
m³
</div><div>
{{
$t
(
'
重量
'
)
}}
:
{{
row
.
weight
}}
Kg
</div>
<div>
{{
$t
(
'
品牌
'
)
}}
:
{{
(
brandList
.
find
(
item
=>
item
.
id
==
row
.
brand
)
||
{
}
).
titleZh
}}
<
span
v
-
if
=
"
!row.brand
"
>
{{
$t
(
'
无
'
)
}}
<
/span> </
div
>
<
div
>
{{
$t
(
'
箱数
'
)
}}
:
{{
row
.
num
}}
<
/div
>
<
div
>
{{
$t
(
'
体积
'
)
}}
:
{{
row
.
volume
}}
m
³
<
/div
>
<
div
>
{{
$t
(
'
重量
'
)
}}
:
{{
row
.
weight
}}
Kg
<
/div
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('入库货物属性')
"
>
<
el
-
table
-
column
:
label
=
"
$t('入库货物属性')
"
>
...
@@ -26,13 +31,18 @@
...
@@ -26,13 +31,18 @@
<
div
v
-
for
=
"
(item,index) in row.orderWarehouseInBackItemDoList
"
:
key
=
"
index
"
>
<
div
v
-
for
=
"
(item,index) in row.orderWarehouseInBackItemDoList
"
:
key
=
"
index
"
>
<
div
>
{{
$t
(
'
规格
'
)
}}
:
{{
item
.
boxGauge
.
split
(
'
*
'
).
map
(
item
=>
`${item
}
cm`
).
join
(
'
*
'
)
}}
<
/div
>
<
div
>
{{
$t
(
'
规格
'
)
}}
:
{{
item
.
boxGauge
.
split
(
'
*
'
).
map
(
item
=>
`${item
}
cm`
).
join
(
'
*
'
)
}}
<
/div
>
<
div
>
<
div
>
<
div
>
{{
$t
(
'
品牌
'
)
}}
:
{{(
brandList
.
find
(
item
=>
item
.
id
==
row
.
brand
)
||
{
}
).
titleZh
}}
<
div
>
{{
$t
(
'
品牌
'
)
}}
:
{{(
brandList
.
find
(
item
=>
item
.
id
==
row
.
brand
)
||
{
}
).
titleZh
}}
<
/div
>
<
span
v
-
if
=
"
!row.brand
"
>
{{
$t
(
'
无
'
)
}}
<
/span></
div
>
<
div
>
{{
$t
(
'
箱数
'
)
}}
:
{{
item
.
cartonsNum
}}
<
/div
>
<
div
>
{{
$t
(
'
箱数
'
)
}}
:
{{
item
.
cartonsNum
}}
<
/div
>
<
div
>
{{
$t
(
'
体积
'
)
}}
:
{{
item
.
volume
}}
CMB
<
/div
>
<
div
>
{{
$t
(
'
体积
'
)
}}
:
{{
item
.
volume
}}
CMB
<
/div
>
<
div
>
{{
$t
(
'
重量
'
)
}}
:
{{
item
.
weight
}}
KG
<
/div
>
<
div
>
{{
$t
(
'
重量
'
)
}}
:
{{
item
.
weight
}}
KG
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
p
v
-
if
=
"
row.orderWarehouseInBackItemDoList.length === 0
"
>
{{
$t
(
'
暂无货物入库信息
'
)
}}
<
/p
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('最后操作时间')
"
>
<
el
-
table
-
column
:
label
=
"
$t('最后操作时间')
"
>
...
@@ -42,7 +52,7 @@
...
@@ -42,7 +52,7 @@
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('状态')
"
>
<
el
-
table
-
column
:
label
=
"
$t('状态')
"
>
<
template
v
-
slot
=
"
{row
}
"
>
<
template
v
-
slot
=
"
{row
}
"
>
{{
calculationStatus
(
row
.
cartonsNumDiff
)
}}
{{
calculationStatus
(
row
)
}}
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
...
@@ -265,13 +275,19 @@ export default {
...
@@ -265,13 +275,19 @@ export default {
}
,
}
,
calculationStatus
(){
calculationStatus
(){
return
(
val
)
=>
{
return
(
val
)
=>
{
if
(
val
>
0
){
let
des
=
''
return
`${this.$t('多')
}
${val
}
${this.$t('箱')
}
`
switch
(
val
.
diffType
)
{
}
else
if
(
val
<
0
){
case
2
:
return
`${this.$t('少')
}
${Math.abs(val)
}
${this.$t('箱')
}
`
des
=
`${this.$t('多了')
}
${val.cartonsNumDiff
}
${this.$t('箱')
}
`
}
else
{
break
return
this
.
$t
(
'
准确到齐
'
)
case
3
:
}
des
=
`${this.$t('少了')
}
${val.cartonsNumDiff
}
${this.$t('箱')
}
`
break
case
4
:
des
=
this
.
$t
(
'
准确到齐
'
)
break
}
return
des
}
}
}
}
}
,
}
,
...
@@ -373,11 +389,13 @@ export default {
...
@@ -373,11 +389,13 @@ export default {
volume
+=
Number
(
i
.
volume
)
volume
+=
Number
(
i
.
volume
)
num
+=
Number
(
i
.
num
)
num
+=
Number
(
i
.
num
)
weight
+=
Number
(
i
.
weight
)
weight
+=
Number
(
i
.
weight
)
i
.
orderWarehouseInBackItemDoList
.
forEach
(
m
=>
{
if
(
i
.
orderWarehouseInBackItemDoList
){
Wvolume
+=
Number
(
m
.
volume
||
0
)
i
.
orderWarehouseInBackItemDoList
.
forEach
(
m
=>
{
Wnum
+=
Number
(
m
.
cartonsNum
||
0
)
Wvolume
+=
Number
(
m
.
volume
||
0
)
Wweight
+=
Number
(
m
.
weight
||
0
)
Wnum
+=
Number
(
m
.
cartonsNum
||
0
)
}
)
Wweight
+=
Number
(
m
.
weight
||
0
)
}
)
}
}
)
}
)
let
text
=
`${this.$t('下单统计')
}
:${num
}
${this.$t('箱')
}
${volume.toFixed(2)
}
m³ ${weight.toFixed(2)
}
Kg`
let
text
=
`${this.$t('下单统计')
}
:${num
}
${this.$t('箱')
}
${volume.toFixed(2)
}
m³ ${weight.toFixed(2)
}
Kg`
let
text2
=
` ${this.$t('入仓统计')
}
:${Wnum
}
${this.$t('箱')
}
${Wvolume.toFixed(2)
}
m³ ${Wweight.toFixed(2)
}
Kg`
let
text2
=
` ${this.$t('入仓统计')
}
:${Wnum
}
${this.$t('箱')
}
${Wvolume.toFixed(2)
}
m³ ${Wweight.toFixed(2)
}
Kg`
...
...
src/views/ecw/order/warehousing/components/Warehouse.vue
View file @
d66066bb
...
@@ -967,10 +967,11 @@ export default {
...
@@ -967,10 +967,11 @@ export default {
const
form
=
val
===
1
?
this
.
form1
:
this
.
form
const
form
=
val
===
1
?
this
.
form1
:
this
.
form
const
formLength
=
form
.
table
.
length
const
formLength
=
form
.
table
.
length
let
orderLocationBackVOList
=
[]
let
orderLocationBackVOList
=
[]
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
// 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
// 上面弄错了,默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3484.html
if
(
formLength
>
0
)
{
if
(
formLength
>
0
)
{
orderLocationBackVOList
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
table
[
formLength
-
1
].
orderLocationBackVOList
))
orderLocationBackVOList
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
table
[
formLength
-
1
].
orderLocationBackVOList
))
}
*/
}
form
.
table
.
push
({
form
.
table
.
push
({
"
boxGauge1
"
:
this
.
isJiyun
?
0
:
''
,
"
boxGauge1
"
:
this
.
isJiyun
?
0
:
''
,
"
boxGauge2
"
:
this
.
isJiyun
?
0
:
''
,
"
boxGauge2
"
:
this
.
isJiyun
?
0
:
''
,
...
...
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