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
3d3079ef
Commit
3d3079ef
authored
Jan 07, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
备货选择订单商品箱明细优化
parent
bfa55653
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
132 additions
and
3 deletions
+132
-3
order.js
src/api/ecw/order.js
+9
-0
ChooseOrderProducts.vue
...ews/ecw/order/stocking/components/ChooseOrderProducts.vue
+109
-0
Package.vue
src/views/ecw/order/stocking/components/Package.vue
+6
-1
WarehouseRecordDetail.vue
...cw/order/warehousing/components/WarehouseRecordDetail.vue
+8
-2
No files found.
src/api/ecw/order.js
View file @
3d3079ef
...
@@ -1023,3 +1023,12 @@ export function getParentOrder(orderId){
...
@@ -1023,3 +1023,12 @@ export function getParentOrder(orderId){
method
:
'
get
'
method
:
'
get
'
})
})
}
}
// 获取订单入仓商品明细通用属性集合,用于备货选择订单商品到明细
export
function
getOrderItemCommonAttr
(
orderId
,
excludeOrderWarehouseInId
){
return
request
({
url
:
'
/order/order-warehouse-in/get-order-warehouse-in-common-attr-list
'
,
method
:
'
get
'
,
params
:
{
orderId
,
excludeOrderWarehouseInId
}
})
}
src/views/ecw/order/stocking/components/ChooseOrderProducts.vue
0 → 100644
View file @
3d3079ef
<
template
>
<el-dialog
:title=
"$t('选择订单商品')"
:visible.sync=
"visible"
append-to-body
width=
"90vw"
>
<el-table
ref=
"multipleTable"
:data=
"orderItemDetails"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
:label=
"$t('品名')"
prop=
"name"
>
<template
#default
="
{row}">
{{
$l
(
row
,
"
prodName
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('品牌')"
prop=
"brand"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
brandName
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('材质')"
prop=
"material"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
materialLabel
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('商品特性')"
prop=
"attr"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
prodAttrNames
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('用途')"
prop=
"unit"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
usageNames
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
prop=
"quantityAll"
></el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"handleClose"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
ProductSelector
from
"
@/components/ProductSelector
"
import
WarehouseAreaSelect
from
"
@/components/WarehouseAreaSelect
"
import
{
getFeeTypeByOrderProduct
,
getProductBrankPage
}
from
"
@/api/ecw/productBrank
"
import
{
cancelProcessInstance
}
from
"
@/api/bpm/processInstance
"
import
WorkFlow
from
"
@/components/WorkFlow
"
import
{
DICT_TYPE
,
getDictDataLabel
,
getDictDatas
}
from
"
@/utils/dict
"
import
{
finishPacked
,
getOrderItemCommonAttr
,
orderWarehouseIn
,
orderWarehouseInUpdateApply
}
from
"
@/api/ecw/order
"
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
import
{
addProduct
}
from
"
@/api/ecw/product
"
import
WarehouseRecordDetail
from
"
@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue
"
;
import
ImageAndVideoUpload
from
"
@/components/ImageAndVideoUpload/index.vue
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
export
default
{
props
:
{
orderId
:
{
type
:
Number
,
default
:
undefined
},
warehouseInId
:
Number
},
data
(){
return
{
visible
:
true
,
// 备选的商品明细
orderItemDetails
:
[],
multipleSelection
:[]
}
},
watch
:{
visible
(
val
){
if
(
!
val
)
{
this
.
$emit
(
'
close
'
)
}
},
},
async
created
()
{
getOrderItemCommonAttr
(
this
.
orderId
,
this
.
warehouseInId
).
then
(
res
=>
{
this
.
orderItemDetails
=
res
.
data
})
},
methods
:
{
handleSelectionChange
(
e
){
console
.
log
(
"
handleSelectionChange
"
,
e
)
this
.
multipleSelection
=
e
},
handleSubmit
(){
// 品名+品牌+材质+商品特性+用途一致的会合并,数量累加
// https://zentao.test.jdshangmen.com/task-view-3423.html
let
arr
=
[]
this
.
multipleSelection
.
forEach
(
item
=>
{
let
index
=
arr
.
findIndex
(
i
=>
{
return
i
.
prodId
==
item
.
prodId
&&
i
.
brand
==
item
.
brand
&&
i
.
material
==
item
.
material
&&
i
.
prodAttrIds
==
item
.
prodAttrIds
&&
i
.
usageIds
==
item
.
usageIds
})
if
(
index
==
-
1
)
{
arr
.
push
({...
item
})
}
else
{
arr
[
index
].
quantityAll
+=
item
.
quantityAll
}
})
this
.
$emit
(
"
success
"
,
arr
)
},
handleClose
()
{
this
.
visible
=
false
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/order/stocking/components/Package.vue
View file @
3d3079ef
...
@@ -196,7 +196,12 @@
...
@@ -196,7 +196,12 @@
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<
template
v-slot=
"{ row, column, $index}"
>
<WarehouseRecordDetail
v-model=
"form.table[$index].orderWarehouseInDetailsVOList"
show-choose-order-item
:order-id=
"order.orderId"
/>
<WarehouseRecordDetail
v-model=
"form.table[$index].orderWarehouseInDetailsVOList"
show-choose-order-item
:order-id=
"order.orderId"
:warehouse-in-id=
"row.id"
/>
<el-popconfirm
<el-popconfirm
v-if=
"$index >= protectRowCount"
v-if=
"$index >= protectRowCount"
title=
"确定要删除该行记录吗?"
title=
"确定要删除该行记录吗?"
...
...
src/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue
View file @
3d3079ef
...
@@ -37,7 +37,12 @@
...
@@ -37,7 +37,12 @@
<el-button
type=
"primary"
@
click=
"handleSave"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"handleSave"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<choose-order-products
v-if=
"showChooseDialog"
:order-id=
"orderId"
@
close=
"showChooseDialog=false"
@
success=
"handleChooseOrderProducts"
></choose-order-products>
<choose-order-products
v-if=
"showChooseDialog"
:order-id=
"orderId"
:warehouse-in-id=
"warehouseInId"
@
close=
"showChooseDialog=false"
@
success=
"handleChooseOrderProducts"
></choose-order-products>
</div>
</div>
</template>
</template>
...
@@ -74,7 +79,8 @@ export default {
...
@@ -74,7 +79,8 @@ export default {
},
},
// 是否显示添加订单商品按钮
// 是否显示添加订单商品按钮
showChooseOrderItem
:
Boolean
,
showChooseOrderItem
:
Boolean
,
orderId
:
Number
orderId
:
Number
,
warehouseInId
:
Number
},
},
data
()
{
data
()
{
...
...
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