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
37d36a26
Commit
37d36a26
authored
Jun 18, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善装柜拆单
parent
4330e29a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
16 deletions
+80
-16
splitOrder.vue
...views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
+75
-10
index.vue
src/views/ecw/order/splitApply/index.vue
+5
-6
No files found.
src/views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
View file @
37d36a26
...
...
@@ -213,16 +213,20 @@
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"1500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"150px"
size=
"mini"
>
<el-form-item
:label=
"$t('中文品名')+':'"
prop=
"orderItemId"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择中文品名')"
@
change=
"onProdChange"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择中文品名')"
>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleZh"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('英文品名')+':'"
prop=
"orderItemId"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择英文品名')"
@
change=
"onProdChange"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择英文品名')"
>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleEn"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('选择入仓记录')"
>
<el-select
:placeholder=
"$t('选择入仓记录')"
v-model=
"selectedWarehouseInId"
clearable
>
<el-option
v-for=
"item in getOrderItemWarehouseIn(shopForm.orderItemId)"
:label=
"item.text"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('剩余数据')"
>
<div>
{{$t('剩余箱数')}}:{{ mainOrderItem.num || 0 }}
</div>
<div>
...
...
@@ -242,7 +246,7 @@
<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=
"shopForm.specsRecordVOList.length <= 1"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"addRow"
:disabled=
"!shopForm.orderItemId"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"addRow"
:disabled=
"!shopForm.orderItemId
|| !selectedWarehouseInId
"
></el-button>
</div>
<el-table
:data=
"shopForm.specsRecordVOList"
...
...
@@ -434,7 +438,7 @@ import {
import
{
quantityRequired
}
from
"
@/api/ecw/warehouse
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
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
{
createApproval
,
approvalCancel
,
splitList
}
from
"
@/api/ecw/boxSea
"
;
import
Decimal
from
"
decimal.js
"
;
...
...
@@ -493,7 +497,11 @@ export default {
// 主单数据
mainOrder
:
{
orderSplitItemBackVOList
:
{}},
// 当前查看的入仓记录
currentWarehouseRecord
:
null
currentWarehouseRecord
:
null
,
// 订单入仓记录
warehouseInList
:
[],
// 当前选择的入仓记录ID
selectedWarehouseInId
:
null
};
},
created
()
{
...
...
@@ -503,6 +511,11 @@ export default {
this
.
queryParams
.
orderId
=
this
.
currRow
.
orderId
;
this
.
getOrderDetail
();
this
.
getSplit
();
// 获取入仓记录
getOrderWarehouseIn
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
this
.
warehouseInList
=
res
.
data
})
},
watch
:
{
//监听table这个对象
...
...
@@ -572,6 +585,48 @@ export default {
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
})
}
}
},
methods
:
{
...
...
@@ -713,8 +768,10 @@ export default {
this
.
shopForm
=
{};
this
.
shopOpen
=
true
;
this
.
isQuantity
=
false
;
// 重置表单数据
this
.
shopForm
=
{
specsRecordVOList
:[]}
},
// 更改放入品名后触发,计算重量体积等默认值
/
*/
/ 更改放入品名后触发,计算重量体积等默认值
onProdChange(){
// 根据键值(中文名或者英文名)来获取对应商品的信息,注:这里应该可以采用orderItemId来获取更优,而不是商品名称,同名可能导致异常
let orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
...
...
@@ -735,7 +792,7 @@ export default {
this.addRow()
}
// this.calcAverg()
},
},
*/
// 按比例计算体积重量的默认值
/*calcAverg(){
// 装箱比例
...
...
@@ -792,7 +849,8 @@ export default {
chargeWeight
:
this
.
putin
.
chargeWeight
,
chargeVolume
:
this
.
putin
.
chargeVolume
,
worth
:
this
.
shopForm
.
worth
||
0
,
specsRecordVOList
:
this
.
shopForm
.
specsRecordVOList
specsRecordVOList
:
this
.
shopForm
.
specsRecordVOList
,
shipmentSplit
:
true
};
// 按数量计费的才需要传递数量
if
(
this
.
isQuantity
){
...
...
@@ -844,8 +902,15 @@ export default {
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
({
orderLocationList
:
[]
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
,
num
,
orderLocationList
:
this
.
currentWarehouseItem
.
orderLocationBackVOList
})
},
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
...
...
src/views/ecw/order/splitApply/index.vue
View file @
37d36a26
...
...
@@ -1036,16 +1036,15 @@ export default {
if
(
!
this
.
shopForm
.
specsRecordVOList
){
this
.
$set
(
this
.
shopForm
,
'
specsRecordVOList
'
,[])
}
const
warehouseInItem
=
this
.
currentWarehouseItem
if
(
!
warehouseInItem
){
return
this
.
$message
.
info
(
this
.
$t
(
"
未找到对应入仓记录
"
))
if
(
!
this
.
currentWarehouseItem
){
return
this
.
$message
.
info
(
this
.
$t
(
"
请选择入仓记录
"
))
}
let
{
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
}
=
warehouseIn
Item
let
num
=
warehouseIn
Item
.
cartonsNum
let
{
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
}
=
this
.
currentWarehouse
Item
let
num
=
this
.
currentWarehouse
Item
.
cartonsNum
// 根据入仓记录添加一行
this
.
shopForm
.
specsRecordVOList
.
push
({
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
,
num
,
orderLocationList
:
warehouseIn
Item
.
orderLocationBackVOList
orderLocationList
:
this
.
currentWarehouse
Item
.
orderLocationBackVOList
})
},
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
...
...
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