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
1739a835
Commit
1739a835
authored
Aug 21, 2022
by
我在何方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合单拆单
parent
5e9a7c39
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
480 additions
and
205 deletions
+480
-205
orderHandle.js
src/api/ecw/orderHandle.js
+121
-0
pending.vue
src/views/ecw/order/pending.vue
+7
-2
prepayDeal.vue
src/views/ecw/order/prepayDeal.vue
+4
-20
singleApply.vue
src/views/ecw/order/singleApply.vue
+122
-42
splitApply.vue
src/views/ecw/order/splitApply.vue
+226
-141
No files found.
src/api/ecw/orderHandle.js
0 → 100644
View file @
1739a835
import
request
from
'
@/utils/request
'
// 根据合并订单编号(或订单号)获得已合单列表和待合单列表
export
function
getMergeListByOrderNo
(
query
){
return
request
({
url
:
'
/order/merge/getMergeListByOrderNo
'
,
method
:
'
get
'
,
params
:
query
,
})
}
//创建订单合单申请
export
function
createMerge
(
data
)
{
return
request
({
url
:
'
/order/merge/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 取消订单拆单
export
function
cancelMerge
(
data
)
{
return
request
({
url
:
'
/order/merge/cancel
'
,
method
:
'
delete
'
,
data
:
data
})
}
//拆单申请提交
export
function
splitApply
(
data
)
{
return
request
({
url
:
'
/order/split/apply
'
,
method
:
'
put
'
,
data
:
data
})
}
// 创建订单拆单
export
function
createSplit
(
data
)
{
return
request
({
url
:
'
/order/split/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新订单拆单
export
function
updateSplit
(
data
)
{
return
request
({
url
:
'
/order/split/update
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除订单拆单
export
function
deleteSplit
(
id
)
{
return
request
({
url
:
'
/order/split/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
//取消申请拆单
export
function
cancelApply
(
data
)
{
return
request
({
url
:
'
/order/split/cancel-apply
'
,
method
:
'
put
'
,
data
:
data
})
}
// 获得订单拆单
export
function
getSplit
(
id
)
{
return
request
({
url
:
'
/order/split/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得订单拆单分页
export
function
getSplitPage
(
query
)
{
return
request
({
url
:
'
/order/split/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出订单拆单 Excel
export
function
exportSplitExcel
(
query
)
{
return
request
({
url
:
'
/order/split/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
//通过订单号获取拆单列表和拆单项明细
export
function
getSplitList
(
query
)
{
return
request
({
url
:
'
/order/split/list-by-order-id
'
,
method
:
'
get
'
,
params
:
query
})
}
// 创建订单拆单项 - 放入
export
function
createSplitItem
(
data
)
{
return
request
({
url
:
'
/order/split-item/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 删除订单拆单项
export
function
deleteSplitItem
(
id
)
{
return
request
({
url
:
'
/order/split-item/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
src/views/ecw/order/pending.vue
View file @
1739a835
...
...
@@ -14,7 +14,8 @@
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"orderData.status"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"送货日期"
>
<span
v-if=
"orderData"
>
{{
orderData
.
status
>=
5
?(
orderData
.
orderItemVOList
.
length
>
0
?
orderData
.
orderItemVOList
[
0
].
warehouseInInfoVO
.
firstInTime
:
'
无
'
):(
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
deliveryDate
:
'
无
'
)
}}
</span>
{{
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
deliveryDate
||
'
无
'
:
'
无
'
}}
<!--
<span
v-if=
"orderData"
>
{{
orderData
.
status
>=
5
?(
orderData
.
orderItemVOList
.
length
>
0
?
parseTime
(
orderData
.
orderItemVOList
[
0
].
warehouseInInfoVO
.
firstInTime
):
'
无
'
):(
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
deliveryDate
:
'
无
'
)
}}
</span>
-->
</el-descriptions-item>
<el-descriptions-item
label=
"运输方式"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"orderData.transportId"
/>
...
...
@@ -82,7 +83,11 @@
</
template
>
</el-table-column>
<el-table-column
label=
"处理人"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"处理时间"
align=
"center"
prop=
'handlerTime'
/>
<el-table-column
label=
"处理时间"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
handlerTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.orderExceptionStatus>0"
>
已完成
</el-tag>
...
...
src/views/ecw/order/prepayDeal.vue
View file @
1739a835
...
...
@@ -26,7 +26,7 @@
<el-row>
<el-form-item
label=
"运输路线:"
>
<span
v-if=
"orderData"
>
【
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"orderData.transportId"
/>
】
</span>
{{
orderData
?
getRouterNameById
(
orderData
.
lineId
):
''
}}
{{
orderData
?
getRouterNameById
():
''
}}
</el-form-item>
</el-row>
<div
v-if=
"orderExceptionData.orderExceptionType!=3||orderExceptionData.orderExceptionType!=9||orderExceptionData.orderExceptionType!=10||orderExceptionData.orderExceptionType!=11"
>
...
...
@@ -174,7 +174,6 @@
<
script
>
import
FileUpload
from
'
@/components/FileUpload
'
import
{
getDictData
,
getDictDatas
}
from
'
@/utils/dict
'
import
{
openedRouterList
as
getOpenedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
getOrder
}
from
'
@/api/ecw/order
'
import
{
getExceptionById
,
handlerExceptionByExceptionId
,
getOrderItemById
}
from
"
@/api/ecw/orderException
"
...
...
@@ -240,27 +239,12 @@
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
// 获取路线
getOpenedRouterList
(){
let
params
=
{}
if
(
this
.
list
.
departureId
){
params
.
startCityId
=
this
.
list
.
departureId
}
if
(
this
.
list
.
objectiveId
){
params
.
destCityId
=
this
.
list
.
objectiveId
}
getOpenedRouterList
(
params
).
then
(
res
=>
this
.
routerList
=
res
.
data
)
},
// 根据线路id显示线路名称
getRouterNameById
(
routerId
){
// return routerId => {
let
router
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
routerId
)
console
.
log
({
router
})
if
(
router
){
return
'
从【
'
+
router
.
startTitleZh
+
'
】发往【
'
+
router
.
destTitleZh
+
'
】
'
getRouterNameById
(){
if
(
this
.
orderData
.
logisticsInfoDto
)
{
return
'
从【
'
+
this
.
orderData
.
logisticsInfoDto
.
startTitleZh
+
'
】发往【
'
+
this
.
orderData
.
logisticsInfoDto
.
destTitleZh
+
'
】
'
}
return
'
无
'
// }
},
submitForm
(){
console
.
log
(
this
.
handlerParams
)
...
...
src/views/ecw/order/singleApply.vue
View file @
1739a835
...
...
@@ -2,31 +2,32 @@
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-card>
<div
slot=
"header"
class=
"card-title"
>
合单申请-
{{
orderData
.
order
Sn
||
''
}}
</div>
<div
slot=
"header"
class=
"card-title"
>
合单申请-
{{
orderData
.
order
No
||
''
}}
</div>
<el-descriptions
:column=
"4"
>
<el-descriptions-item
label=
"唛头"
>
{{
orderData
.
marks
?
orderData
.
marks
:
'
无
'
}}
{{
orderData
.
marks
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"已到箱数/总箱数"
>
{{
orderData
.
sumNum
?
orderData
.
sumNum
:
0
+
'
/
'
+
orderData
.
totalNum
?
orderData
.
totalNum
:
0
}}
<span>
{{
orderData
.
sumNum
||
0
}}
/
{{
orderData
.
costVO
?
orderData
.
costVO
.
totalNum
:
0
}}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"订单状态"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"orderData.status"
/>
<!--
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"orderData.status"
/>
-->
{{
orderData
.
status
==
99
?
'
异常
'
:
'
正常
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"送货日期"
>
{{
orderData
.
date
?
orderData
.
d
ate
:
'
无
'
}}
{{
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
deliveryD
ate
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"运输方式"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"orderData.transportId"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"出货渠道"
>
{{
orderData
.
channel
Name
||
'
/
'
}}
{{
orderData
.
channel
Id
?
getChannelName
(
orderData
.
channelId
):
'
/
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"始发地"
>
{{
importCityName
(
orderData
.
startWarehouseId
)
}}
{{
orderData
.
logisticsInfoDto
?
orderData
.
logisticsInfoDto
.
startTitleZh
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"目的地"
>
{{
importCityName
(
orderData
.
startWarehouseId
)
}}
{{
orderData
.
logisticsInfoDto
?
orderData
.
logisticsInfoDto
.
destTitleZh
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"发货人姓名"
>
{{
orderData
.
consignorVO
?
orderData
.
consignorVO
.
name
||
'
无
'
:
'
无
'
}}
...
...
@@ -35,7 +36,7 @@
{{
orderData
.
consignorVO
?
orderData
.
consignorVO
.
company
||
'
无
'
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"发货电话"
>
{{
orderData
.
consignorVO
?
orderData
.
consignorVO
.
phone
||
'
无
'
:
'
无
'
}}
{{
orderData
.
consignorVO
?(
orderData
.
consignorVO
.
phone
?(
orderData
.
consignorVO
.
countryCode
+
orderData
.
consignorVO
.
phone
):
'
无
'
)
:
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"4"
>
...
...
@@ -46,7 +47,7 @@
{{
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
company
||
'
无
'
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"收货电话"
>
{{
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
phone
||
'
无
'
:
'
无
'
}}
{{
orderData
.
consigneeVO
?(
orderData
.
consigneeVO
.
phone
?(
orderData
.
consigneeVo
.
countryCode
+
orderData
.
consigneeVO
.
phone
):
'
无
'
)
:
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
...
...
@@ -54,31 +55,39 @@
<el-card
class=
"card"
>
<!-- 列表 -->
<div
slot=
"header"
class=
"card-title"
>
已合单订单
</div>
<el-table
v-loading=
"loading"
border
:data=
"list"
>
<el-table
v-loading=
"loading"
border
:data=
"list
.mergedList"
style=
"width: 200px;
"
>
<el-table-column
label=
"序号"
align=
"center"
prop=
"id"
type=
"index"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"订单号"
align=
"center"
scope=
"orderSn"
/>
<el-table-column
label=
"唛头"
align=
"center"
scope=
"marks"
/>
<el-table-column
label=
"订单号"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
mergedOrder
.
orderNo
}}
</span>
</
template
>
</el-table-column>
<!-- <el-table-column label="唛头" align="center">
<template slot-scope="scope">
<span>{{scope.row.mergedOrder.marks}}</span>
</template>
</el-table-column>
<el-table-column label="始发地" align="center">
<template slot-scope="scope">
<span>
{{
importCityName
(
scope
.
row
.
startWarehous
eId
)
}}
</span>
<span>{{importCityName(scope.row.
mergedOrder.orderDepartureVO.departur
eId)}}</span>
</template>
</el-table-column>
<el-table-column label="入仓货物属性" align="center">
<template slot-scope="scope">
<span>合计:</span>
<span>
{{
scope
.
row
.
totalNum
+
'
箱
'
+
scope
.
row
.
volume
+
'
m³
'
+
scope
.
row
.
w
eight
+
'
kg
'
}}
</span>
<span>{{scope.row.
mergedOrder.sumNum+'箱 '+scope.row.mergedOrder.sumVolume+'m³ '+scope.row.mergedOrder.sumW
eight+'kg'}}</span>
</template>
</el-table-column>
<el-table-column label="入仓时间" align="center" prop='createTime' />
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<dict-tag
:type=
"DICT_TYPE.
ORDER
_STATUS"
:value=
"scope.row.status"
/>
<dict-tag :type="DICT_TYPE.
AUDIT
_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
</el-table-column>
-->
</el-table>
</el-card>
<el-card
class=
"card"
>
...
...
@@ -92,47 +101,68 @@
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"订单号"
align=
"center"
scope=
"orderSn"
/>
<el-table-column
label=
"唛头"
align=
"center"
scope=
"marks"
/>
<el-table-column
label=
"订单号"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
orderNo
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"唛头"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
marks
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"始发地"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
importCityName
(
scope
.
row
.
s
tartWarehous
eId
)
}}
</span>
<span>
{{
importCityName
(
scope
.
row
.
s
cope
.
row
.
orderDepartureVO
.
departur
eId
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"入仓货物属性"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
合计:
</span>
<span>
{{
scope
.
row
.
totalNum
+
'
箱
'
+
scope
.
row
.
volume
+
'
m³
'
+
scope
.
row
.
w
eight
+
'
kg
'
}}
</span>
<span>
{{
scope
.
row
.
sumNum
+
'
箱
'
+
scope
.
row
.
sumVolume
+
'
m³
'
+
scope
.
row
.
sumW
eight
+
'
kg
'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"入仓时间"
align=
"center"
prop=
'createTime'
/>
<el-table-column
label=
"入仓时间"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
rucangTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"scope.row.status"
/>
<!--
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"scope.row.status"
/>
-->
{{
scope
.
row
.
status
==
99
?
'
异常
'
:
'
正常
'
}}
</
template
>
</el-table-column>
</el-table>
<el-row
v-if=
"singleData.length>0"
>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<!-- <el-row v-if="singleData.length>0">
<el-checkbox v-model="checked">需要仓库打包</el-checkbox>
</el-row>
</el-row>
-->
</el-card>
<div
slot=
"footer"
class=
"card"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
提交
</el-button>
<el-button
plain
type=
"primary"
@
click=
"submitForm"
>
取消
</el-button>
<work-flow
v-if=
'singleData.length>0'
xmlkey=
"merge_order"
v-model=
"selectedUsers"
></work-flow>
<div
slot=
"footer"
class=
"card footer_btn"
v-if=
"singleData.length>0"
>
<el-button
v-if=
"orderData.status!=16"
type=
"primary"
@
click=
"submitForm"
>
提交申请
</el-button>
<el-button
v-if=
"orderData.status!=16"
plain
type=
"primary"
@
click=
"$router.back()"
>
取消
</el-button>
<el-button
v-if=
"orderData.status==16"
type=
"primary"
disabled
>
审核中
</el-button>
<el-button
v-if=
"orderData.status==16"
plain
type=
"primary"
@
click=
"cancelMerge"
>
取消审核
</el-button>
<el-button
v-if=
"orderData.status==16"
plain
type=
"primary"
@
click=
"$router.back()"
>
返回
</el-button>
</div>
</div>
</template>
<
script
>
import
{
get
OrderExceptionPage
}
from
"
@/api/ecw/orderException
"
import
{
get
MergeListByOrderNo
,
createMerge
,
cancelMerge
}
from
"
@/api/ecw/orderHandle
"
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getChannel
}
from
'
@/api/ecw/channel
'
import
{
getModel
}
from
'
@/api/bpm/model
'
import
WorkFlow
from
'
@/components/WorkFlow/
'
export
default
{
name
:
"
SingleApply
"
,
components
:
{
WorkFlow
},
data
()
{
return
{
...
...
@@ -142,12 +172,24 @@ export default {
list
:
[],
singleData
:[],
tradeCityList
:[],
multipleSelection
:[],
loading
:
false
loading
:
false
,
queryParams
:{
mergedOrderNo
:
'
UG2200012S
'
,
page
:
1
,
rosw
:
10
},
selectedUsers
:[],
total
:
0
,
orderNos
:
''
};
},
created
()
{
// this.getList();
if
(
this
.
$route
.
query
.
orderNo
)
{
this
.
queryParams
.
mergedOrderNo
=
op
.
orderNo
this
.
getList
()
}
else
{
this
.
getList
()
}
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
},
methods
:
{
...
...
@@ -155,27 +197,62 @@ export default {
getList
()
{
this
.
loading
=
true
;
// 执行查询
get
OrderExceptionPage
(
this
.
queryParams
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
orderData
=
response
.
data
get
MergeListByOrderNo
(
this
.
queryParams
).
then
(
response
=>
{
this
.
list
=
response
.
data
;
this
.
total
=
response
.
data
.
unMergeList
.
total
;
this
.
orderData
=
response
.
data
.
orderInfo
this
.
loading
=
false
;
this
.
singleData
=
response
.
data
.
unMergeList
.
list
;
});
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
var
orderNo
=
[]
val
.
forEach
((
item
)
=>
{
orderNo
.
push
(
item
.
mergedOrder
.
orderNo
)
})
this
.
orderNos
=
orderNo
.
join
(
'
,
'
)
},
importCityName
(
id
){
var
arr
=
this
.
tradeCityList
.
filter
(
item
=>
item
.
id
==
id
)
return
arr
.
length
>
0
?
arr
[
0
].
titleZh
:
'
无
'
},
getChannelName
(){
getChannel
(
this
.
orderData
.
channelId
).
then
(
res
=>
{
this
.
orderData
.
channelName
=
res
.
data
.
nameZh
getChannelName
(
id
){
getChannel
(
id
).
then
(
res
=>
{
return
res
.
data
.
nameZh
})
},
cancelMerge
(){
let
that
=
this
if
(
!
that
.
orderNos
){
that
.
$message
.
error
(
"
请选择取消合单的订单
"
);
return
}
var
params
=
{
id
:
that
.
orderData
.
orderId
,
copyUserId
:
that
.
selectedUsers
,
orderNos
:
that
.
orderNos
,
}
cancelMerge
(
params
).
then
(
res
=>
{
that
.
$message
.
success
(
"
取消成功
"
);
that
.
getList
()
})
},
submitForm
(){
let
that
=
this
if
(
!
that
.
orderNos
){
that
.
$message
.
error
(
"
请选择待合单的订单
"
);
return
}
var
params
=
{
applyOrderNo
:
queryParams
.
mergedOrderNo
,
copyUserId
:
that
.
selectedUsers
,
orderNos
:
that
.
orderNos
,
status
:
1
}
createMerge
(
params
).
then
(
res
=>
{
that
.
$message
.
success
(
"
修改成功
"
);
that
.
getList
()
})
}
}
}
...
...
@@ -189,4 +266,7 @@ export default {
.card
{
margin-top
:
20px
;
}
.footer_btn
{
padding-bottom
:
60px
;
}
</
style
>
src/views/ecw/order/splitApply.vue
View file @
1739a835
...
...
@@ -2,27 +2,27 @@
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-card>
<div
slot=
"header"
class=
"card-title"
>
拆单申请-
{{
orderData
.
order
Sn
||
''
}}
</div>
<div
slot=
"header"
class=
"card-title"
>
拆单申请-
{{
orderData
.
order
No
||
''
}}
</div>
<div
class=
"btn-header"
>
<span
class=
"card-title"
>
原单信息
</span>
<div>
<span
v-if=
"orderData.status==
0
"
class=
"red"
>
异常无法拆单
</span>
<span
v-if=
"orderData.status==
99
"
class=
"red"
>
异常无法拆单
</span>
<el-button
v-else
type=
"primary"
@
click=
"addSplit"
>
新建拆单
</el-button>
</div>
</div>
<el-descriptions
:column=
"4"
>
<el-descriptions-item
label=
"唛头"
>
{{
orderData
.
marks
?
orderData
.
marks
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"已到箱数/总箱数"
>
{{
orderData
.
sumNum
?
orderData
.
sumNum
:
0
+
'
/
'
+
orderData
.
totalNum
?
orderData
.
totalNum
:
0
}}
<span>
{{
orderData
.
sumNum
||
0
}}
/
{{
orderData
.
costVO
?
orderData
.
costVO
.
totalNum
:
0
}}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"订单状态"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"orderData.status"
/>
<!--
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"orderData.status"
/>
-->
{{
orderData
.
status
==
99
?
'
异常
'
:
'
正常
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"送货日期"
>
{{
orderData
.
date
?
orderData
.
d
ate
:
'
无
'
}}
{{
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
deliveryD
ate
:
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"4"
>
...
...
@@ -30,10 +30,10 @@
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"orderData.transportId"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"始发地"
>
{{
importCityName
(
orderData
.
startWarehouseId
)
}}
{{
orderData
.
logisticsInfoDto
?
orderData
.
logisticsInfoDto
.
startTitleZh
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"目的地"
>
{{
importCityName
(
orderData
.
startWarehouseId
)
}}
{{
orderData
.
logisticsInfoDto
?
orderData
.
logisticsInfoDto
.
destTitleZh
:
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"4"
>
...
...
@@ -44,7 +44,7 @@
{{
orderData
.
consignorVO
?
orderData
.
consignorVO
.
company
||
'
无
'
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"发货电话"
>
{{
orderData
.
consignorVO
?
orderData
.
consignorVO
.
phone
||
'
无
'
:
'
无
'
}}
{{
orderData
.
consignorVO
?(
orderData
.
consignorVO
.
phone
?(
orderData
.
consignorVO
.
countryCode
+
orderData
.
consignorVO
.
phone
):
'
无
'
)
:
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"4"
>
...
...
@@ -55,7 +55,7 @@
{{
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
company
||
'
无
'
:
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"收货电话"
>
{{
orderData
.
consigneeVO
?
orderData
.
consigneeVO
.
phone
||
'
无
'
:
'
无
'
}}
{{
orderData
.
consigneeVO
?
(
orderData
.
consigneeVO
.
phone
?(
orderData
.
consigneeVo
.
countryCode
+
orderData
.
consigneeVO
.
phone
):
'
无
'
)
:
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
...
...
@@ -63,19 +63,19 @@
<el-card
class=
"card"
>
<!-- 列表 -->
<div
slot=
"header"
class=
"card-title"
>
货物信息
</div>
<el-table
v-loading=
"loading"
border
:data=
"orderData.l
ist"
:summary-method=
"getSummaries"
show-summary
>
<el-table-column
label=
"序号"
align=
"center"
prop=
"id"
type=
"index"
>
<template
slot-scope=
"scope"
>
<el-table
id=
'table'
v-loading=
"loading"
border
:data=
"orderData.orderItemVOL
ist"
:summary-method=
"getSummaries"
show-summary
>
<el-table-column
label=
"序号"
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=
"品名"
align=
"center"
scope=
"orderSn"
>
<el-table-column
label=
"品名"
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=
"填单货物属性"
align=
"center"
>
<el-table-column
label=
"填单货物属性"
align=
"center"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-row>
<span>
品牌:
...
...
@@ -83,17 +83,17 @@
</span>
</el-row>
<el-row>
<span>
箱数:
{{
scope
.
row
.
totalNum
}}
</span>
<span>
箱数:
{{
scope
.
row
.
num
||
'
未填
'
}}
</span>
</el-row>
<el-row>
<span>
体积:
{{
scope
.
row
.
volume
}}
m³
</span>
<span>
体积:
{{
scope
.
row
.
volume
||
'
未填
'
}}
m³
</span>
</el-row>
<el-row>
<span>
重量:
{{
scope
.
row
.
weight
}}
kg
</span>
<span>
重量:
{{
scope
.
row
.
weight
||
'
未填
'
}}
kg
</span>
</el-row>
</
template
>
</el-table-column>
<el-table-column
label=
"入库货物属性"
align=
"center"
>
<el-table-column
label=
"入库货物属性"
align=
"center"
width=
"400"
>
<
template
slot-scope=
"scope"
>
<el-row>
<span>
规格:
{{
scope
.
row
.
boxGauge
}}
</span>
...
...
@@ -102,13 +102,17 @@
<span>
品牌:
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.brandType"
/>
</span>
<span
style=
"margin-left: 10px;"
>
箱数:
{{
scope
.
row
.
total
Num
}}
</span>
<span
style=
"margin-left: 10px;"
>
体积:
{{
scope
.
row
.
volume
}}
m³
</span>
<span
style=
"margin-left: 10px;"
>
重量:
{{
scope
.
row
.
weight
}}
kg
</span>
<span
style=
"margin-left: 10px;"
>
箱数:
{{
scope
.
row
.
warehouseInInfoVO
.
cartons
Num
}}
</span>
<span
style=
"margin-left: 10px;"
>
体积:
{{
scope
.
row
.
warehouseInInfoVO
.
volume
}}
m³
</span>
<span
style=
"margin-left: 10px;"
>
重量:
{{
scope
.
row
.
w
arehouseInInfoVO
.
w
eight
}}
kg
</span>
</el-row>
</
template
>
</el-table-column>
<el-table-column
label=
"最后操作时间"
align=
"center"
prop=
'createTime'
/>
<el-table-column
label=
"最后操作时间"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"scope.row.status"
/>
...
...
@@ -122,26 +126,29 @@
<div
v-for=
"(item, index) in splitData"
:key=
"index"
>
<div
class=
"btn-header"
>
<div>
<span
class=
"card-title"
>
{{item.orderSn}}
</span>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"item.transportId"
/>
<span>
发往:{{importCityName(item.startWarehouseId)}}
</span>
<p
class=
"card-info"
>
<span
class=
"card-title"
>
{{item.orderNo}}
</span>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"item.transportId"
/>
<span>
发往:{{importCityName(item.dstWarehouseId)}}
</span>
</p>
</div>
<div>
<el-button
type=
"primary"
@
click=
"addShop(index)"
>
放入
</el-button>
<el-button
type=
"primary"
plain
@
click=
"deleteSplit(index)"
>
删除
</el-button>
<el-button
v-if=
"index==0"
disabled
type=
"primary"
@
click=
"addShop(index)"
>
放入
</el-button>
<el-button
v-if=
"index!=0"
type=
"primary"
@
click=
"addShop(index)"
>
放入
</el-button>
<el-button
type=
"primary"
plain
@
click=
"deleteSplit(item.id)"
>
删除
</el-button>
</div>
</div>
<el-table
border
:data=
"item.
l
ist"
>
<el-table
border
:data=
"item.
orderSplitItemBackVOL
ist"
>
<el-table-column
label=
"序号"
align=
"center"
prop=
"id"
type=
"index"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"中文名"
align=
"center"
scope
=
"prodTitleZh"
/>
<el-table-column
label=
"英文名"
align=
"center"
scope
=
"prodTitleEn"
/>
<el-table-column
label=
"品牌"
align=
"center"
scope=
"brandType"
>
<el-table-column
label=
"中文名"
align=
"center"
prop
=
"prodTitleZh"
/>
<el-table-column
label=
"英文名"
align=
"center"
prop
=
"prodTitleEn"
/>
<el-table-column
label=
"品牌"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.brandType"
/>
</
template
>
...
...
@@ -158,25 +165,29 @@
</el-table-column>
<el-table-column
label=
"箱数"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
num
}}
m³
</span>
<span>
{{
scope
.
row
.
num
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeShop(index,scope.$index)"
>
移出
</el-button>
<el-button
v-if=
"index==0"
disabled
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeShop(scope.row.id)"
>
移出
</el-button>
<el-button
v-else
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeShop(scope.row.id)"
>
移出
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</el-card>
<div
slot=
"footer"
class=
"card"
>
<el-button
v-if=
"orderData.status!=0"
type=
"primary"
@
click=
"submitForm"
>
提交申请
</el-button>
<el-button
plain
type=
"primary"
@
click=
"submitForm"
>
取消
</el-button>
<work-flow
xmlkey=
"split_order"
v-model=
"selectedUsers"
></work-flow>
<div
slot=
"footer"
class=
"card footer_btn"
v-if=
"orderData.status!=99"
>
<el-button
v-if=
"orderData.status!=19"
type=
"primary"
@
click=
"submitForm"
>
提交申请
</el-button>
<el-button
v-if=
"orderData.status!=19"
plain
type=
"primary"
@
click=
"$router.back()"
>
取消
</el-button>
<el-button
v-if=
"orderData.status==19"
type=
"primary"
disabled
>
审核中
</el-button>
<el-button
v-if=
"orderData.status==19"
plain
type=
"primary"
@
click=
"cancelSplit"
>
取消审核
</el-button>
<el-button
v-if=
"orderData.status==19"
plain
type=
"primary"
@
click=
"$router.back()"
>
返回
</el-button>
</div>
<!-- 对话框(添加 / 修改) -->
<el-dialog
title=
"新建拆单"
:visible.sync=
"open"
width=
"400px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form
Split
"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-form-item
label=
"运输方式"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"form.transportId"
formatter=
"number"
/>
...
...
@@ -184,13 +195,13 @@
</el-row>
<el-row>
<el-form-item
label=
"目的仓库:"
>
<el-select
v-model=
"form.destWarehouseId"
placeholder=
"请选择目的仓库"
@
change=
"changeDest"
>
<el-select
v-model=
"form.destWarehouseId"
placeholder=
"请选择目的仓库"
>
<el-option
v-for=
"item in importCityList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"出货渠道"
>
<el-form-item
label=
"出货渠道"
v-if=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"
>
<el-select
v-model=
"form.channelId"
placeholder=
"请选择出货渠道"
>
<el-option
v-for=
"item in channelData"
:key=
"item.channelId"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
<el-option
:disabled=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-for=
"item in channelData"
:key=
"item.channelId"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
</el-row>
...
...
@@ -202,19 +213,19 @@
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog
title=
"放入品名"
:visible.sync=
"
openShop
"
width=
"400px"
append-to-body
>
<el-dialog
title=
"放入品名"
:visible.sync=
"
shopOpen
"
width=
"400px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"80px"
>
<el-row>
<el-form-item
label=
"中文品名:"
>
<el-select
v-model=
"shopForm.prodTitleZh"
placeholder=
"请选择中文品名"
@
change=
"changeProdTitleZh"
>
<el-option
v-for=
"item in
splitData.l
ist"
:label=
"item.prodTitleZh"
:value=
"item.prodTitleZh"
:key=
"item.prodTitleZh"
></el-option>
<el-option
v-for=
"item in
orderData.orderItemVOL
ist"
:label=
"item.prodTitleZh"
:value=
"item.prodTitleZh"
:key=
"item.prodTitleZh"
></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item
label=
"英文品名:"
>
<el-select
v-model=
"shopForm.prodTitleEn"
placeholder=
"请选择英文品名"
@
change=
"changeProdTitleEn"
>
<el-option
v-for=
"item in
splitData.l
ist"
:label=
"item.prodTitleEn"
:value=
"item.prodTitleEn"
:key=
"item.prodTitleEn"
></el-option>
<el-option
v-for=
"item in
orderData.orderItemVOL
ist"
:label=
"item.prodTitleEn"
:value=
"item.prodTitleEn"
:key=
"item.prodTitleEn"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"剩余箱数:"
>
...
...
@@ -237,15 +248,18 @@
</template>
<
script
>
import
{
getOrderExceptionPage
}
from
"
@/api/ecw/orderException
"
import
{
getDictData
,
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getSplitList
,
splitApply
,
createSplit
,
cancelApply
,
createSplitItem
,
deleteSplitItem
,
deleteSplit
}
from
"
@/api/ecw/orderHandle
"
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getChannelPage
}
from
'
@/api/ecw/channel
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
{
getOrder
}
from
'
@/api/ecw/order
'
export
default
{
name
:
"
SplitApply
"
,
components
:
{
WorkFlow
},
data
()
{
return
{
...
...
@@ -261,103 +275,153 @@ export default {
form
:{
},
openShop
:
false
,
selectedUsers
:[],
shopOpen
:
false
,
shopForm
:{},
// 表单校验
rules
:
{
transportId
:
[{
required
:
true
,
message
:
"
请选择运输方式
"
,
trigger
:
"
blur
"
}],
warehouseIds
:
[{
required
:
true
,
message
:
"
请选择目的仓库
"
,
trigger
:
"
blur
"
}],
channelId
:
[{
required
:
true
,
message
:
"
请选择出货渠道
"
,
trigger
:
"
blur
"
}],
transportId
:
[{
required
:
true
,
message
:
"
请选择运输方式
"
,
trigger
:
"
change
"
}],
warehouseIds
:
[{
required
:
true
,
message
:
"
请选择目的仓库
"
,
trigger
:
"
change
"
}],
channelId
:
[{
required
:
true
,
message
:
"
请选择出货渠道
"
,
trigger
:
"
change
"
}],
},
// 表单校验
shopRules
:
{
prodTitleZh
:
[{
required
:
true
,
message
:
"
请选择中文品名
"
,
trigger
:
"
blur
"
}],
prodTitleEn
:
[{
required
:
true
,
message
:
"
请选择英文品名
"
,
trigger
:
"
blur
"
}],
prodTitleZh
:
[{
required
:
true
,
message
:
"
请选择中文品名
"
,
trigger
:
"
change
"
}],
prodTitleEn
:
[{
required
:
true
,
message
:
"
请选择英文品名
"
,
trigger
:
"
change
"
}],
},
queryParams
:{
orderId
:
96
,
lang
:
0
},
query
:{
pageSize
:
20
,
pageNo
:
1
,
}
page
:
1
,
rows
:
20
},
splitItemIndex
:
0
};
},
created
()
{
// this.getList();
this
.
getChannel
()
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
if
(
this
.
$route
.
query
.
orderId
)
{
this
.
queryParams
.
orderId
=
op
.
orderId
this
.
getList
()
this
.
getOrder
()
}
else
{
this
.
getList
()
this
.
getOrder
()
}
},
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
"
;
});
},
},
},
computed
:{
getDictData
(){
return
(
type
,
value
)
=>
getDictData
(
type
,
value
)
||
{}
},
getDictDatas
(){
return
getDictDatas
},
importCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
}
},
methods
:
{
getOrder
(){
this
.
loading
=
true
;
getOrder
(
this
.
queryParams
.
orderId
).
then
(
response
=>
{
this
.
orderData
=
response
.
data
;
this
.
query
.
destWarehouseId
=
response
.
data
.
logisticsInfoDto
.
startWarehouseId
this
.
loading
=
false
});
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 执行查询
getOrderExceptionPage
(
this
.
queryParams
).
then
(
response
=>
{
this
.
orderData
=
response
.
data
this
.
form
.
destWarehouseId
=
response
.
data
.
destWarehouseId
getSplitList
(
this
.
queryParams
).
then
(
response
=>
{
this
.
splitData
=
response
.
data
this
.
loading
=
false
;
this
.
query
.
warehouseIds
=
response
.
data
.
destWarehouseId
this
.
getChannel
()
});
},
getChannel
(){
getChannel
Page
(
this
.
query
).
then
(
res
=>
this
.
channelData
=
res
.
data
.
list
)
getChannel
List
().
then
(
res
=>
this
.
channelData
=
res
.
data
)
},
changeDest
(){
this
.
query
.
warehouseIds
=
this
.
form
.
destWarehouseId
this
.
getChannel
()
},
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
console
.
log
(
rowIndex
)
if
(
rowIndex
==
this
.
orderData
.
orderItemVOList
.
length
)
{
if
(
columnIndex
===
1
)
{
return
[
2
,
3
];
}
else
if
(
columnIndex
>
1
)
{
return
[
0
,
0
];
}
}
},
getSummaries
(){
const
sums
=
[];
if
(
!
this
.
orderData
||
!
this
.
orderData
.
list
||
ths
.
orderData
.
length
==
0
){
sums
[
0
]
=
'
小计
'
if
(
!
this
.
orderData
||
!
this
.
orderData
.
orderItemVOList
||
this
.
orderData
.
length
==
0
){
return
sums
}
sums
[
0
]
=
'
小计
'
var
orderSum
=
0
var
orderV
=
0
var
orderW
=
0
var
leviteSum
=
0
var
leviteV
=
0
var
leviteW
=
0
this
.
orderData
.
l
ist
.
forEach
((
column
,
index
)
=>
{
orderSum
+=
column
.
orderS
um
this
.
orderData
.
orderItemVOL
ist
.
forEach
((
column
,
index
)
=>
{
orderSum
+=
column
.
n
um
orderV
+=
column
.
volume
orderW
+=
column
.
weight
leviteSum
+=
column
.
orderS
um
leviteV
+=
column
.
volume
leviteW
+=
column
.
weight
leviteSum
+=
column
.
warehouseInInfoVO
.
cartonsN
um
leviteV
+=
column
.
warehouseInInfoVO
.
volume
leviteW
+=
column
.
w
arehouseInInfoVO
.
w
eight
});
sums
[
1
]
=
''
sums
[
2
]
=
'
下单统计:
'
+
orderSum
+
'
箱
'
+
orderV
+
'
m³
'
+
orderW
+
'
kg
'
sums
[
3
]
=
'
入仓统计:
'
+
leviteSum
+
'
箱
'
+
leviteV
+
'
m³
'
+
leviteW
+
'
kg
'
sums
[
4
]
=
''
sums
[
5
]
=
''
sums
[
1
]
=
'
下单统计:
'
+
orderSum
+
'
箱
'
+
orderV
+
'
m³
'
+
orderW
+
'
kg
'
+
'
入仓统计:
'
+
leviteSum
+
'
箱
'
+
leviteV
+
'
m³
'
+
leviteW
+
'
kg
'
return
sums
;
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
importCityName
(
id
){
var
arr
=
this
.
tradeCityList
.
filter
(
item
=>
item
.
id
==
id
)
return
arr
.
length
>
0
?
arr
[
0
].
titleZh
:
'
无
'
},
submitForm
(){
var
params
=
{
orderId
:
this
.
queryParams
.
orderId
,
copyUserId
:
this
.
selectedUsers
}
splitApply
(
params
).
then
(
res
=>
{
this
.
$modal
.
msgSuccess
(
"
申请成功
"
);
that
.
getList
()
})
},
addShop
(
index
){
this
.
splitIndex
=
index
this
.
shopForm
.
prodTitleZh
=
this
.
orderData
.
list
[
0
].
prodTitleZh
this
.
shopForm
.
prodTitleEn
=
this
.
orderData
.
list
[
0
].
prodTitleEn
var
sum
=
list
.
num
this
.
splitData
.
list
.
forEach
((
item
)
=>
{
if
(
item
.
prodTitleZh
==
this
.
shopForm
.
prodTitleZh
){
sum
-=
item
.
num
}
})
this
.
shopForm
.
sum
=
sum
this
.
splitItemIndex
=
index
this
.
shopOpen
=
true
},
addSplit
(){
...
...
@@ -365,39 +429,38 @@ export default {
},
changeProdTitleZh
(){
var
list
=
[]
list
=
this
.
orderData
.
list
.
filter
(
item
=>
item
.
prodTitleZh
==
this
.
shopForm
.
prodTitleZh
)
var
sum
=
list
.
num
this
.
splitData
.
list
.
forEach
((
item
)
=>
{
if
(
item
.
prodTitleZh
==
this
.
shopForm
.
prodTitleZh
){
sum
-=
item
.
num
}
})
this
.
shopForm
.
sum
=
sum
list
=
this
.
orderData
.
orderItemVOList
.
filter
(
item
=>
item
.
prodTitleZh
==
this
.
shopForm
.
prodTitleZh
)
this
.
shopForm
.
sum
=
list
[
0
].
num
this
.
shopForm
.
orderItemId
=
list
[
0
].
orderItemId
this
.
shopForm
.
prodTitleEn
=
list
[
0
].
prodTitleEn
},
changeProdTitleEn
(){
var
list
=
[]
list
=
this
.
orderData
.
list
.
filter
(
item
=>
item
.
prodTitleEn
==
this
.
shopForm
.
prodTitleEn
)
var
sum
=
list
.
num
this
.
splitData
.
list
.
forEach
((
item
)
=>
{
if
(
item
.
prodTitleEn
==
this
.
shopForm
.
prodTitleEn
){
sum
-=
item
.
num
}
})
this
.
shopForm
.
sum
=
sum
list
=
this
.
orderData
.
orderItemVOList
.
filter
(
item
=>
item
.
prodTitleEn
==
this
.
shopForm
.
prodTitleEn
)
this
.
shopForm
.
sum
=
list
[
0
].
num
this
.
shopForm
.
prodTitleZh
=
list
[
0
].
prodTitleZh
},
haddleAdd
(){
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
})
this
.
splitData
.
push
(
this
.
form
)
if
(
this
.
splitData
.
length
==
0
){
this
.
splitData
[
0
].
list
=
this
.
orderData
.
list
let
that
=
this
if
(
!
that
.
form
.
transportId
){
that
.
$message
.
error
(
"
请选择运输方式
"
);
}
this
.
open
=
false
if
(
!
that
.
form
.
destWarehouseId
){
that
.
$message
.
error
(
"
请选择目的仓库
"
);
}
// 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
}
createSplit
(
params
).
then
(
res
=>
{
that
.
getList
()
})
that
.
open
=
false
},
cancel
(){
this
.
open
=
false
...
...
@@ -409,35 +472,51 @@ export default {
return
;
}
})
var
isExit
=
this
.
splitData
[
this
.
splitIndex
].
list
.
filter
(
item
=>
item
.
prodTitleEn
==
this
.
shopForm
.
prodTitleEn
)
if
(
isExit
&&
isExit
.
length
==
1
){
this
.
splitData
[
this
.
splitIndex
].
list
.
forEach
((
item
)
=>
{
item
.
num
=
this
.
shopForm
.
num
item
.
remarks
=
this
.
shopForm
.
remarks
})
}
else
{
var
list
=
this
.
orderData
.
list
.
filter
(
item
=>
item
.
prodTitleEn
==
this
.
shopForm
.
prodTitleEn
)
list
.
num
=
this
.
shopForm
.
num
list
.
remarks
=
this
.
shopForm
.
remarks
this
.
splitData
[
this
.
splitIndex
].
list
.
push
(
list
)
var
params
=
{
num
:
this
.
shopForm
.
num
,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderSplitId
:
this
.
splitData
[
this
.
splitItemIndex
].
id
,
remarks
:
this
.
shopForm
.
remarks
}
createSplitItem
(
params
).
then
(
res
=>
{
that
.
$message
.
success
(
"
放入成功
"
);
this
.
getList
()
this
.
shopForm
=
{}
})
this
.
shopOpen
=
false
},
removeShop
(
splitIndex
,
index
){
this
.
splitData
[
splitIndex
].
list
.
splice
(
index
,
1
)
removeShop
(
id
){
let
that
=
this
that
.
$confirm
(
'
是否移除货物吗?
'
).
then
(
function
()
{
deleteSplitItem
(
id
).
then
(
res
=>
{
that
.
$message
.
success
(
"
移除成功
"
);
that
.
getList
()
})
})
},
cancelSplit
(){
let
that
=
this
that
.
$confirm
(
'
是否取消审核吗?
'
).
then
(
function
()
{
cancelApply
({
orderId
:
that
.
queryParams
.
orderId
}).
then
(
res
=>
{
that
.
$message
.
success
(
"
取消成功
"
);
that
.
getList
()
})
})
},
shopCancel
(){
this
.
shopOpen
=
false
this
.
shopForm
=
{}
},
/** 删除按钮操作 */
deleteSplit
(
index
)
{
const
orderId
=
this
.
splitData
[
index
].
orderSn
this
.
$modal
.
confirm
(
'
是否确认删除订单号为"
'
+
orderId
+
'
"的数据项?
'
).
then
(
function
()
{
this
.
splitData
.
splice
(
index
,
1
)
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{
});
deleteSplit
(
id
)
{
let
that
=
this
that
.
$confirm
(
'
是否确认删除新拆的订单吗?
'
).
then
(
function
()
{
deleteSplit
(
id
).
then
(
res
=>
{
that
.
$message
.
success
(
"
删除成功
"
);
that
.
getList
()
})
})
},
}
}
...
...
@@ -448,11 +527,14 @@ export default {
font-weight
:
bold
;
margin-top
:
10px
;
}
.card-info
{
font-size
:
16px
;
}
.card
{
margin-top
:
20px
;
}
.btn-header
{
width
:
8
0%
;
width
:
9
0%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
...
...
@@ -462,4 +544,7 @@ export default {
color
:
#ff3430
;
font-size
:
15px
;
}
.footer_btn
{
padding-bottom
:
60px
;
}
</
style
>
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