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
60ce1bfb
Commit
60ce1bfb
authored
Jun 17, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
最新的订单拆单适配
parent
0223bfad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
18 deletions
+70
-18
index.vue
src/views/ecw/order/splitApply/index.vue
+70
-18
No files found.
src/views/ecw/order/splitApply/index.vue
View file @
60ce1bfb
...
...
@@ -142,10 +142,8 @@
</p>
</div>
<div>
<el-button
v-if=
"index==0"
disabled
type=
"primary"
@
click=
"addShop(index)"
>
{{$t('放入')}}
</el-button>
<el-button
v-if=
"index!=0"
type=
"primary"
@
click=
"addShop(index)"
>
{{$t('放入')}}
</el-button>
<!--<el-button v-if="index==0" disabled type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button>-->
<el-button
:disabled=
"index < splitData.length - 1"
type=
"primary"
plain
@
click=
"deleteSplit(item.id)"
>
{{$t('删除')}}
</el-button>
<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"
>
...
...
@@ -247,16 +245,21 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"1500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"120px"
size=
"mini"
>
<el-form-item
:label=
"$t('中文品名')"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.
pordid"
:placeholder=
"$t('请选择中文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in
splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleZh"
:value=
"item.i
d"
:key=
"item.prodTitleZh"
></el-option>
<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.orderItemI
d"
:key=
"item.prodTitleZh"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('英文品名')"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择英文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleEn"
:value=
"item.i
d"
:key=
"item.prodTitleEn"
></el-option>
</el-select>
<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.orderItemI
d"
:key=
"item.prodTitleEn"
></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('剩余箱数')}}{{ shopForm.sum || 0 }}
</div>
<div>
...
...
@@ -276,7 +279,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-form ref="tableForm" :model="shopForm" size="mini">-->
<el-table
...
...
@@ -504,7 +507,7 @@ import {
import
{
getWarehouseList
,
quantityRequired
}
from
'
@/api/ecw/warehouse
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
{
getOrder
,
splitItemUpdate
}
from
'
@/api/ecw/order
'
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
"
;
...
...
@@ -564,7 +567,11 @@ export default {
splitItemIndex
:
0
,
quantitySum
:
0
,
// 当前查看的入仓记录
currentWarehouseRecord
:
null
currentWarehouseRecord
:
null
,
// 订单入仓记录
warehouseInList
:
[],
// 当前选择的入仓记录ID
selectedWarehouseInId
:
null
};
},
async
created
()
{
...
...
@@ -591,7 +598,10 @@ export default {
})*/
}
})
// 获取入仓记录
getOrderWarehouseIn
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
this
.
warehouseInList
=
res
.
data
})
},
watch
:
{
//监听table这个对象
...
...
@@ -663,6 +673,40 @@ export default {
chargeWeight
:
data
.
chargeWeight
.
toNumber
(),
quantity
:
data
.
quantity
.
toNumber
()
}
},
// 根据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
.
num
}),
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
:
{
...
...
@@ -831,7 +875,7 @@ export default {
}
this
.
open
=
true
},
changeProdTitleZh
(
val
){
/*
changeProdTitleZh(val){
var list = []
list = this.splitData[0].orderSplitItemBackVOList.filter(item=>item.id == val)
this.shopForm.sum = list[0].num
...
...
@@ -845,7 +889,7 @@ export default {
}
this.numcheck()
},
},
*/
numcheck
(){
quantityRequired
(
this
.
orderData
.
lineId
).
then
(
res
=>
{
this
.
quantityshow
=
res
.
data
...
...
@@ -969,8 +1013,16 @@ export default {
if
(
!
this
.
shopForm
.
specsRecordVOList
){
this
.
$set
(
this
.
shopForm
,
'
specsRecordVOList
'
,[])
}
const
warehouseInItem
=
this
.
getOrderItemWarehouseIn
(
this
.
shopForm
.
orderItemId
).
find
(
item
=>
item
.
id
===
this
.
selectedWarehouseInId
)
if
(
!
warehouseInItem
){
return
this
.
$message
.
info
(
this
.
$t
(
"
未找到对应入仓记录
"
))
}
let
{
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
}
=
warehouseInItem
let
num
=
warehouseInItem
.
cartonsNum
// 根据入仓记录添加一行
this
.
shopForm
.
specsRecordVOList
.
push
({
orderLocationList
:
[]
specificationType
,
boxGauge1
,
boxGauge2
,
boxGauge3
,
volume
,
weight
,
num
,
orderLocationList
:
warehouseInItem
.
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