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
a7115d5e
Commit
a7115d5e
authored
Jul 24, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
解决订单列表冲突
parents
7e3ecda5
a98b01d2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
428 additions
and
28 deletions
+428
-28
mutexOrder.js
src/api/ecw/mutexOrder.js
+51
-0
order.js
src/api/ecw/order.js
+17
-0
index.js
src/router/index.js
+24
-2
edit.vue
src/views/ecw/customer/edit.vue
+4
-4
feeApplication.vue
src/views/ecw/order/feeApplication.vue
+58
-21
index.vue
src/views/ecw/order/index.vue
+3
-1
mutexOrder.vue
src/views/ecw/order/mutexOrder.vue
+137
-0
notMutexOrder.vue
src/views/ecw/order/notMutexOrder.vue
+134
-0
No files found.
src/api/ecw/mutexOrder.js
0 → 100644
View file @
a7115d5e
// export function
import
request
from
'
@/utils/request
'
export
function
guanlianList
(
params
){
return
request
({
url
:
'
order/mutual/getMutualOrderByOrderId
'
,
method
:
'
post
'
,
data
:
params
,
})
};
//未加入互斥
export
function
getUnGuanlianOrderByOrderId
(
data
){
return
request
({
url
:
'
order/mutual/getUnMutualOrderByOrderId
'
,
method
:
'
post
'
,
data
:
data
,
})
}
//加入互斥
export
function
guanlianCreate
(
data
){
return
request
({
url
:
'
order/mutual/create
'
,
method
:
'
post
'
,
data
:
data
,
})
}
//批量加入互斥
export
function
ordeRcreateBatch
(
data
){
return
request
({
url
:
'
order/mutual/createBatch
'
,
method
:
'
post
'
,
data
:
data
,
})
}
//移出互斥
export
function
deleteGuanlianOrderByOrderId
(
data
){
return
request
({
url
:
'
/order/mutual/deleteMutualOrderByOrderId
'
,
method
:
'
delete
'
,
data
:
data
})
}
// 批量移出互斥
export
function
deleteBatchGuanlianOrderByOrderId
(
data
){
return
request
({
url
:
'
/order/mutual/deleteBatchMutualOrderByOrderId
'
,
method
:
'
delete
'
,
data
:
data
,
})
}
src/api/ecw/order.js
View file @
a7115d5e
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
import
{
param
}
from
"
@/utils
"
;
// 创建订单
// 创建订单
export
function
createOrder
(
data
)
{
export
function
createOrder
(
data
)
{
...
@@ -77,6 +78,22 @@ export function feeApplicationListByOrderId(query){
...
@@ -77,6 +78,22 @@ export function feeApplicationListByOrderId(query){
data
:
data
,
data
:
data
,
})
})
}
}
//费用申请修改
export
function
applicationUpdate
(
data
){
return
request
({
url
:
'
/order/fee-application/update
'
,
method
:
'
put
'
,
data
:
data
,
})
}
export
function
ApplicationListByOrderId
(
params
){
return
request
({
url
:
'
order/fee-application/listByOrderId
'
,
method
:
'
get
'
,
params
:
params
})
}
// 创建特殊
// 创建特殊
export
function
specialNeedCreate
(
data
){
export
function
specialNeedCreate
(
data
){
return
request
({
return
request
({
...
...
src/router/index.js
View file @
a7115d5e
...
@@ -305,7 +305,7 @@ export const constantRoutes = [
...
@@ -305,7 +305,7 @@ export const constantRoutes = [
title
:
'
添加关联订单
'
,
title
:
'
添加关联订单
'
,
icon
:
''
,
icon
:
''
,
activeMenu
:
'
/order/addAssociatedOrder
'
,
activeMenu
:
'
/order/addAssociatedOrder
'
,
noCache
:
fals
e
,
noCache
:
tru
e
,
}
}
},
},
{
{
...
@@ -341,8 +341,30 @@ export const constantRoutes = [
...
@@ -341,8 +341,30 @@ export const constantRoutes = [
activeMenu
:
'
/order/feeApplication
'
activeMenu
:
'
/order/feeApplication
'
}
}
},
{
path
:
'
mutex-order/:orderId
'
,
component
:()
=>
import
(
'
@/views/ecw/order/mutexOrder
'
),
name
:
'
mutexOrder
'
,
props
:
true
,
meta
:
{
title
:
'
订单互斥
'
,
icon
:
''
,
activeMenu
:
'
/order/mutexOrder
'
,
noCache
:
true
,
}
},{
path
:
'
not-mutex-order/:orderId
'
,
component
:()
=>
import
(
'
@/views/ecw/order/notMutexOrder
'
),
name
:
'
notMutexOrder
'
,
props
:
true
,
meta
:{
title
:
'
未加入互斥
'
,
icon
:
''
,
activeMenu
:
'
/order/notMutexOrder
'
,
noCache
:
true
,
}
}
}
],
],
},
},
{
{
...
...
src/views/ecw/customer/edit.vue
View file @
a7115d5e
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"国家"
prop=
"country"
>
<el-form-item
label=
"国家"
prop=
"country"
>
<el-select
v-model=
"form.country"
placeholder=
"请选择国家"
>
<el-select
v-model=
"form.country"
placeholder=
"请选择国家"
>
<el-option
v-for=
"dict in
getDictDatas(DICT_TYPE.COUNTRY)
"
<el-option
v-for=
"dict in
countryList
"
:key=
"dict.
value"
:label=
"dict.label"
:value=
"parseInt(dict.value
)"
/>
:key=
"dict.
id"
:label=
"dict.nameZh"
:value=
"parseInt(dict.id
)"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -299,7 +299,7 @@
...
@@ -299,7 +299,7 @@
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
<el-select
v-model=
"row.isDefault"
placeholder=
"设为默认"
>
<el-select
v-model=
"row.isDefault"
placeholder=
"设为默认"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"
parseInt
(dict.value)"
/>
:key=
"dict.value"
:label=
"dict.label"
:value=
"
Number
(dict.value)"
/>
</el-select>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -370,7 +370,7 @@
...
@@ -370,7 +370,7 @@
<
script
>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
upload
from
'
@/components/ImageUpload
'
import
upload
from
'
@/components/ImageUpload
'
import
{
createCustomer
,
getCustomer
,
updateCustomer
}
from
'
@/api/ecw/customer
'
import
{
createCustomer
,
getCustomer
,
updateCustomer
,
}
from
'
@/api/ecw/customer
'
import
{
getNodeList
}
from
"
@/api/ecw/node
"
import
{
getNodeList
}
from
"
@/api/ecw/node
"
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductList
}
from
'
@/api/ecw/product
'
import
{
getProductList
}
from
'
@/api/ecw/product
'
...
...
src/views/ecw/order/feeApplication.vue
View file @
a7115d5e
...
@@ -14,28 +14,28 @@
...
@@ -14,28 +14,28 @@
<el-table
:data=
"list"
>
<el-table
:data=
"list"
>
<el-table-column
label=
"序号"
type=
"index"
></el-table-column>
<el-table-column
label=
"序号"
type=
"index"
></el-table-column>
<el-table-column
label=
"费用类型"
>
<el-table-column
label=
"费用类型"
>
<template
v-slot:default
=
"scope"
>
<template
v-slot:default
=
"scope"
>
<dict-selector
:type=
"DICT_TYPE.FEE_TYPE"
v-model=
"scope.row.feeType"
/>
<dict-selector
:
disabled=
"isModify[forbidden(scope.row)]"
:
type=
"DICT_TYPE.FEE_TYPE"
v-model=
"scope.row.feeType"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"金额"
>
<el-table-column
label=
"金额"
>
<
template
v-slot:default =
'scope'
>
<
template
v-slot:default =
'scope'
>
<el-input
v-model=
"scope.row.applicationFee"
></el-input>
<el-input
:disabled=
"isModify[forbidden(scope.row)]"
v-model=
"scope.row.applicationFee"
></el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"货币类型"
>
<el-table-column
label=
"货币类型"
>
<
template
v-slot:default =
'scope'
>
<
template
v-slot:default =
'scope'
>
<dict-selector
:type=
"DICT_TYPE.COMMISSION_CURRENCY_TYPE"
v-model=
"scope.row.applicationFeeCurrency"
/>
<dict-selector
:disabled=
"isModify[forbidden(scope.row)]"
:type=
"DICT_TYPE.COMMISSION_CURRENCY_TYPE"
v-model=
"scope.row.applicationFeeCurrency"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"付款类型"
>
<el-table-column
label=
"付款类型"
>
<
template
v-slot
:default =
'scope'
>
<
template
v-slot
=
{row}
>
<dict-selector
:type=
"DICT_TYPE.PAY_TYPE"
v-model=
"scope.
row.payType"
/>
<dict-selector
:disabled=
"isModify[forbidden(row)]"
:type=
"DICT_TYPE.PAY_TYPE"
v-model=
"
row.payType"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注"
>
<el-table-column
label=
"备注"
>
<
template
v-slot:default=
"scope"
>
<
template
v-slot:default=
"scope"
>
<el-input
v-model=
"scope.row.remarks"
type=
"textarea"
></el-input>
<el-input
:disabled=
"isModify[forbidden(scope.row)]"
v-model=
"scope.row.remarks"
type=
"textarea"
></el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"确认收款"
>
<el-table-column
label=
"确认收款"
>
...
@@ -45,13 +45,13 @@
...
@@ -45,13 +45,13 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"申请人"
>
<el-table-column
label=
"申请人"
>
<
template
v-slot:default =
"scope"
>
<
template
v-slot:default =
"scope"
>
{{
scope
.
row
.
status
==
0
?
'
未提交
'
:
scope
.
row
.
applicationAuthor
}}
{{
scope
.
row
.
status
==
=
0
?
'
未提交
'
:
scope
.
row
.
applicationAuthor
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<
template
v-slot:default =
'scope'
>
<
template
v-slot:default =
'scope'
>
<el-button
type=
"text"
v-if=
"scope.row.status !== 0"
>
{{
status
[
scope
.
row
.
status
]
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status !== 0"
>
{{
STATUS
[
scope
.
row
.
status
]
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status === 2"
>
修改
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status === 2"
@
click=
"modify(scope.row)"
>
修改
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -63,10 +63,9 @@
...
@@ -63,10 +63,9 @@
</template>
</template>
<
script
>
<
script
>
import
{
getOrder
,
feeApplication
ListByOrderId
,
feeApplicationCre
ate
}
from
"
@/api/ecw/order
"
;
import
{
getOrder
,
feeApplication
Create
,
ApplicationListByOrderId
,
applicationUpd
ate
}
from
"
@/api/ecw/order
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
Template
from
"
@/views/cms/template
"
;
import
Template
from
"
@/views/cms/template
"
;
let
status
=
{
0
:
'
未提交
'
,
1
:
'
审核中
'
,
2
:
'
审核通过
'
,
3
:
'
审核不通
'
}
export
default
{
export
default
{
name
:
"
feeApplication
"
,
name
:
"
feeApplication
"
,
components
:
{
Template
},
components
:
{
Template
},
...
@@ -79,22 +78,32 @@ export default {
...
@@ -79,22 +78,32 @@ export default {
list
:[],
list
:[],
DICT_TYPE
,
DICT_TYPE
,
getDictDatas
,
getDictDatas
,
status
STATUS
:{},
isModify
:[],
isModifyIf
:
false
}
}
},
},
created
()
{
created
()
{
getOrder
(
this
.
orderId
).
then
(
r
=>
{
getOrder
(
this
.
orderId
).
then
(
r
=>
{
this
.
orderDetails
=
r
.
data
this
.
orderDetails
=
r
.
data
})
})
this
.
feeApplicationFn
();
this
.
getOrderList
()
},
this
.
getDictDatas
(
this
.
DICT_TYPE
.
AUDIT_STATUS
).
forEach
(
e
=>
{
methods
:{
this
.
STATUS
[
e
.
value
]
=
e
.
label
feeApplicationFn
(){
feeApplicationListByOrderId
({
orderId
:
this
.
orderId
}).
then
(
r
=>
{
console
.
log
(
r
)
})
})
},
},
computed
:{
forbidden
(){
return
(
row
)
=>
{
return
this
.
list
.
findIndex
(
e
=>
e
.
id
=
row
.
id
)
}
}
},
methods
:{
addCost
(){
addCost
(){
if
(
this
.
list
.
some
(
e
=>
e
.
status
===
0
||
e
.
status
===
1
)){
return
this
.
$message
.
success
(
'
当前有申请费用为审核中或未提交,请审核后在申请
'
);
}
this
.
list
.
push
(
this
.
list
.
push
(
{
{
orderId
:
this
.
orderId
,
orderId
:
this
.
orderId
,
...
@@ -107,13 +116,41 @@ export default {
...
@@ -107,13 +116,41 @@ export default {
status
:
0
,
status
:
0
,
}
}
)
)
this
.
isModify
.
push
(
false
)
this
.
isModifyIf
=
false
;
},
},
submit
(){
submit
(){
feeApplicationCreate
(
this
.
list
[
0
]).
then
(
r
=>
{
if
(
this
.
isModifyIf
){
console
.
log
(
r
);
applicationUpdate
({...
this
.
list
[
this
.
isModify
.
findIndex
(
e
=>
e
===
false
)],
status
:
1
}).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
getOrderList
();
this
.
$message
.
success
(
'
修改成功
'
);
}
})
}
else
{
if
(
this
.
list
[
this
.
list
.
length
-
1
].
status
!==
0
){
feeApplicationCreate
(
{...
this
.
list
[
this
.
list
.
length
-
1
],
status
:
1
}).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
getOrderList
();
this
.
$message
.
success
(
'
添加成功
'
);
}
})
})
}
}
}
}
},
getOrderList
(){
ApplicationListByOrderId
({
orderId
:
this
.
orderId
}).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
list
=
r
.
data
;
this
.
list
.
forEach
(()
=>
this
.
isModify
.
push
(
true
))
}
})
},
modify
(
row
){
this
.
isModifyIf
=
true
;
this
.
$set
(
this
.
isModify
,
this
.
list
.
findIndex
(
e
=>
e
.
id
=
row
.
id
),
false
)
}
}
}
}
</
script
>
</
script
>
...
...
src/views/ecw/order/index.vue
View file @
a7115d5e
...
@@ -156,6 +156,7 @@
...
@@ -156,6 +156,7 @@
<el-button
type=
"text"
size=
"mini"
@
click=
"$router.push(`/order/fee-application/$
{scope.row.orderId}`)">费用申请
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"$router.push(`/order/fee-application/$
{scope.row.orderId}`)">费用申请
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"orderId = scope.row.orderId;isShow = true"
>
特需
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"orderId = scope.row.orderId;isShow = true"
>
特需
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"$router.push(`/order/associated-order/$
{scope.row.orderId}`)" >关联
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"$router.push(`/order/associated-order/$
{scope.row.orderId}`)" >关联
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"$router.push(`/order/mutex-order/$
{scope.row.orderId}`)" >互斥
</el-button>
<el-popover
<el-popover
style=
"margin-left: 10px;"
style=
"margin-left: 10px;"
...
@@ -169,6 +170,7 @@
...
@@ -169,6 +170,7 @@
</div>
</div>
<el-button
type=
"text"
slot=
"reference"
>
打印
</el-button>
<el-button
type=
"text"
slot=
"reference"
>
打印
</el-button>
</el-popover>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/ecw/order/mutexOrder.vue
0 → 100644
View file @
a7115d5e
<
template
>
<div
class=
"associated-order"
>
<h1
class=
"title"
>
互斥订单-
{{
orderDetails
.
orderNo
}}
</h1>
<el-divider></el-divider>
<orde-details-form
:details =
"orderDetails"
></orde-details-form>
<el-divider></el-divider>
<el-form
inline
label-width=
"100px"
>
<el-form-item
label=
"订单号"
><div
class=
"content"
>
<el-input
v-model=
"params.relateOrderId"
></el-input>
</div></el-form-item>
<el-form-item><div
class=
"content"
>
<el-button
@
click=
"getList"
>
查询
</el-button>
</div></el-form-item>
</el-form>
<el-divider></el-divider>
<div
style=
"display: flex;align-items: center;"
>
<h1
class=
"title"
>
已加入互斥订单列表
</h1>
<div
style=
"flex: 1;margin-left: 20px;"
>
<el-button
:disabled=
"multipleSelection.length === 0"
type=
"primary"
@
click=
"batchGuanlianOrderByOrderId(multipleSelection.map(e =>(
{orderId:orderId,mutualOrderId:e.orderId})))" >批量移出
</el-button>
</div>
<div>
<el-button
type=
"primary"
@
click=
"$router.push('/order/not-mutex-order/'+ orderId)"
>
添加互斥订单
</el-button>
</div>
</div>
<el-table
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
label=
"订单号"
prop=
"orderNo"
></el-table-column>
<el-table-column
label=
"唛头"
prop=
"marks"
></el-table-column>
<el-table-column
label=
"货物数据"
></el-table-column>
<el-table-column
label=
"入仓时间"
prop=
"remarks"
></el-table-column>
<el-table-column
label=
"状态"
prop=
"status"
>
<template
v-slot:default=
"scope"
>
<dict-tag
:value=
"scope.row.status"
:type=
"DICT_TYPE.ORDER_STATUS"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"操作人"
></el-table-column>
<el-table-column
label=
"操作时间"
prop=
"createTime"
></el-table-column>
<el-table-column
label=
"操作"
>
<
template
v-slot:default=
'scope'
>
<el-button
type=
"text"
@
click =
"guanlianOrderByOrderId(scope.row.orderId)"
>
移出
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
//关联订单
import
ordeDetailsForm
from
"
@/views/ecw/order/components/ordeDetailsForm
"
;
import
{
getOrder
}
from
"
@/api/ecw/order
"
;
import
{
deleteBatchGuanlianOrderByOrderId
,
deleteGuanlianOrderByOrderId
,
guanlianList
,
}
from
"
@/api/ecw/mutexOrder
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
export
default
{
name
:
"
mutexOrder
"
,
props
:{
orderId
:[
String
,
Boolean
]
},
components
:{
ordeDetailsForm
},
data
(){
return
{
orderDetails
:{},
params
:{
orderId
:
undefined
,
mutualOrderId
:
undefined
},
list
:[],
DICT_TYPE
,
getDictDatas
,
multipleSelection
:[]
}
},
created
()
{
this
.
params
.
orderId
=
this
.
orderId
;
this
.
getList
();
getOrder
(
this
.
orderId
).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
orderDetails
=
r
.
data
;
}
})
},
methods
:{
getList
(){
guanlianList
(
this
.
params
).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
list
=
r
.
data
}
})
},
guanlianOrderByOrderId
(
id
){
deleteGuanlianOrderByOrderId
({
orderId
:
this
.
orderId
,
mutualOrderId
:
id
}).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
getList
()
this
.
$message
.
success
(
'
操作成功
'
);
}
})
},
batchGuanlianOrderByOrderId
(
val
){
deleteBatchGuanlianOrderByOrderId
(
val
).
then
(
r
=>
{
this
.
getList
()
this
.
$message
.
success
(
'
操作成功
'
);
this
.
multipleSelection
=
[]
})
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
}
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.associated-order
{
padding
:
20px
;
box-sizing
:
border-box
;
.title
{
font-size
:
30px
;
font-weight
:
600
;
}
}
</
style
>
src/views/ecw/order/notMutexOrder.vue
0 → 100644
View file @
a7115d5e
<
template
>
<div
class=
"add-associated-order"
>
<h1
class=
"title"
>
订单号:
{{
orderDetails
.
orderNo
}}
选择订单
</h1>
<el-divider></el-divider>
<el-form
inline
label-width=
"85px"
label-position=
"left"
>
<el-form-item
label=
"订单号"
>
<div
class=
"content"
>
<el-input
v-model=
"mutualOrderId"
></el-input>
</div>
</el-form-item>
<el-form-item>
<el-button
@
click=
"getUnassociatedOrder"
>
查询
</el-button>
</el-form-item>
</el-form>
<h1
class=
"title"
>
未加入关联订单列表
</h1>
<el-divider></el-divider>
<el-table
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
label=
"序号"
type=
"index"
></el-table-column>
<el-table-column
label=
"订单号"
prop=
"orderNo"
></el-table-column>
<el-table-column
label=
"唛头"
prop=
"marks"
></el-table-column>
<el-table-column
label=
"货物数据"
></el-table-column>
<el-table-column
label=
"入仓时间"
prop=
"rucangtime"
></el-table-column>
<el-table-column
label=
"状态"
>
<template
v-slot:default=
"scope"
>
<dict-tag
:value=
"scope.row.status"
:type=
"DICT_TYPE.ORDER_STATUS"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"操作人"
></el-table-column>
<el-table-column
label=
"操作时间"
></el-table-column>
<el-table-column
label=
"操作"
>
<
template
v-slot:default=
"scope"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"joinAssociation(scope.row.orderId)"
>
加入互斥
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-row
style=
"margin-top: 40px"
>
<el-col>
<el-button
type=
"primary"
@
click=
"batchJoin(multipleSelection.map(e => e.orderId))"
:disabled=
"multipleSelection.length === 0"
>
批量加入互斥
</el-button>
<el-button
@
click=
"$router.push('/order/mutex-order/'+ orderId);"
>
取消
</el-button>
</el-col>
</el-row>
</div>
</template>
<
script
>
//添加关联订单
import
{
getOrder
}
from
"
@/api/ecw/order
"
;
import
Template
from
"
@/views/cms/template
"
;
import
{
getUnGuanlianOrderByOrderId
,
guanlianCreate
,
ordeRcreateBatch
}
from
"
@/api/ecw/mutexOrder
"
;
export
default
{
name
:
"
notMutexOrder
"
,
components
:
{
Template
},
props
:
{
orderId
:
[
String
,
Number
]
},
data
()
{
return
{
orderDetails
:
{},
mutualOrderId
:
''
,
list
:
[],
multipleSelection
:
[],
}
},
created
()
{
getOrder
(
this
.
orderId
).
then
(
r
=>
{
if
(
r
.
code
===
0
)
{
this
.
orderDetails
=
r
.
data
;
}
})
this
.
getUnassociatedOrder
();
},
mounted
()
{
},
methods
:
{
getUnassociatedOrder
()
{
getUnGuanlianOrderByOrderId
({
orderId
:
this
.
orderId
,
mutualOrderId
:
this
.
mutualOrderId
?
this
.
mutualOrderId
:
0
}).
then
(
r
=>
{
if
(
r
.
code
===
0
)
{
this
.
list
=
r
.
data
}
})
},
joinAssociation
(
val
)
{
guanlianCreate
({
orderId
:
this
.
orderId
,
mutualOrderId
:
val
}).
then
(
this
.
operation
)
},
batchJoin
(
val
)
{
let
p
=
val
.
map
(
e
=>
({
orderId
:
this
.
orderId
,
mutualOrderId
:
e
}))
ordeRcreateBatch
(
p
).
then
(
this
.
operation
)
},
operation
(
r
)
{
if
(
r
.
code
===
0
)
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
getUnassociatedOrder
();
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.add-associated-order
{
padding
:
20px
;
box-sizing
:
border-box
;
.title
{
font-size
:
30px
;
font-weight
:
600
;
text-align
:
left
;
}
.el-form
{
.content
{
width
:
300px
;
}
}
}
</
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