Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
wx-notification
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 50e3fe4e
authored
Feb 02, 2026
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调拨发货
1 parent
403edcd5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
193 additions
and
57 deletions
src/api/allocate.js
src/views/cannibalize/components/approveComp.vue
src/views/cannibalize/components/rejectComp.vue
src/views/cannibalize/components/sendOutComp.vue
src/views/cannibalize/index.vue
src/views/cannibalize/record.vue
src/views/cannibalize/reviewStatus.vue
src/api/allocate.js
0 → 100644
View file @
50e3fe4
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-11-20 10:20:52
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-02-02 16:29:23
* @FilePath: \wx-notification\src\api\purchase.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const
url
=
'/rop-dj-smartcarlife/router'
export
default
{
/**h5调拨-详情 */
allocateOrderDetail
(
data
=
{})
{
data
.
method
=
'dj.smartcarlife.api.stock.allocate.h5.detail'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
/**采购发货-驳回 */
shipmentReject
(
data
=
{})
{
data
.
method
=
'dj.api.smarcarlife.purchaseOrder.shipmentReject'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
/**运营审核 */
operatorAudit
(
data
=
{})
{
data
.
method
=
'dj.smartcarlife.api.stockAllocate.operatorAudit'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
/**运营驳回 */
operatorReject
(
data
=
{})
{
data
.
method
=
'dj.smartcarlife.api.stockAllocate.operatorReject'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
/**商务审核 */
businessAudit
(
data
=
{})
{
data
.
method
=
'dj.smartcarlife.api.stockAllocate.businessAudit'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
/**商务驳回-驳回 */
businessReject
(
data
=
{})
{
data
.
method
=
' dj.smartcarlife.api.stockAllocate.businessReject'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
/**发货主体 */
selectShippingEntityInfoAll
(
data
=
{})
{
data
.
method
=
'dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
// 调拨仓库列表
selectYqMerchantList
(
data
=
{})
{
data
.
method
=
'dj.smartcarlife.api.stock.allocate.h5.yqMerchant.list'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
// 出库门店列表
selectServicemerchantList
(
data
=
{})
{
data
.
method
=
'dj.api.servicemerchantref.list'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
}
}
src/views/cannibalize/components/approveComp.vue
View file @
50e3fe4
...
...
@@ -2,20 +2,21 @@
<
template
>
<h-dialog
ref=
"myDialog"
:title=
"title"
:isVisible=
"isVisible"
@
confirm=
"handleSubmit"
@
cancel=
"handleCancel"
>
<div
class=
"formObj"
>
<div
class=
"cell"
@
click=
"handleSelect
"
v-if=
"[2, 5
].includes(staffType)"
>
<div
class=
"cell"
@
click=
"handleSelect
(2)"
v-if=
"['3'
].includes(staffType)"
>
<div
class=
"label"
>
调出
门店
调出
仓库
<span
class=
"require"
>
*
</span>
</div>
<van-cell
is-link
:value=
"approveForm.
sendOut
MerchantName"
/>
<van-cell
is-link
:value=
"approveForm.
callOutYq
MerchantName"
/>
</div>
<div
class=
"cell"
@
click=
"handleSelect
"
v-if=
"[2, 5
].includes(staffType)"
>
<div
class=
"cell"
@
click=
"handleSelect
(1)"
v-if=
"['3'
].includes(staffType)"
>
<div
class=
"label"
>
调出
仓库
调出
门店
<span
class=
"require"
>
*
</span>
</div>
<van-cell
is-link
:value=
"approveForm.
send
OutMerchantName"
/>
<van-cell
is-link
:value=
"approveForm.
call
OutMerchantName"
/>
</div>
<div
class=
"line-feed"
>
<div
class=
"label"
>
备注
</div>
<van-field
class=
"textarea"
v-model=
"approveForm.remark"
rows=
"8"
:autosize=
"
{ maxHeight: 220 }" label="" type="textarea" maxlength="200" placeholder="请输入备注" show-word-limit />
...
...
@@ -24,7 +25,8 @@
<div
class=
"explain"
v-if=
"staffType==3"
>
说明:订单审核后会自动流转至供应商进行确认并发货。
</div>
<div
class=
"explain"
v-if=
"staffType==5"
>
说明:订单审核后自动流转至商务进行复审。
</div>
</div>
<send-out-comp
:isVisible=
"sendOutVisible"
v-if=
"sendOutVisible"
@
cancel=
"handleSendCancel"
@
submit=
"handleSendSumit"
:sendOutMerchantId=
"approveForm.sendOutMerchantId"
></send-out-comp>
<!-- 先选仓库再选门店 -->
<send-out-comp
:isVisible=
"sendOutVisible"
:isYq=
"isYq"
v-if=
"sendOutVisible"
@
cancel=
"handleSendCancel"
@
submit=
"handleSendSumit"
:sendOutMerchantId=
"isYq == 1?approveForm.callOutMerchantId:approveForm.callOutYqMerchantId"
:yqMerchantId=
"approveForm.callOutYqMerchantId"
></send-out-comp>
</h-dialog>
</
template
>
...
...
@@ -32,11 +34,12 @@
import
{
Toast
}
from
'vant'
import
hDialog
from
'./dialog'
import
sendOutComp
from
'./sendOutComp'
import
purchaseApi
from
'@/api/purchas
e'
import
allocateApi
from
'@/api/allocat
e'
export
default
{
components
:
{
hDialog
,
sendOutComp
},
data
()
{
return
{
isYq
:
1
,
//1-门店 2-仓库
isSubmit
:
false
,
name
:
this
.
$route
.
query
.
name
,
staffType
:
this
.
$route
.
query
.
staffType
,
...
...
@@ -44,8 +47,10 @@ export default {
title
:
'通过'
,
approveForm
:
{
remark
:
''
,
sendOutMerchantId
:
''
,
sendOutMerchantName
:
''
callOutYqMerchantId
:
''
,
callOutYqMerchantName
:
''
,
callOutMerchantId
:
''
,
callOutMerchantName
:
''
,
}
}
},
...
...
@@ -74,23 +79,41 @@ export default {
this
.
sendOutVisible
=
false
},
handleSendSumit
(
data
)
{
this
.
approveForm
.
sendOutMerchantName
=
data
.
shippingEntity
this
.
approveForm
.
sendOutMerchantId
=
data
.
shippingEntityId
console
.
log
(
'handleSendSumit'
,
data
)
if
(
data
.
isYq
==
1
){
this
.
approveForm
.
callOutMerchantName
=
data
.
merchantName
this
.
approveForm
.
callOutMerchantId
=
data
.
merchantId
}
else
{
this
.
approveForm
.
callOutYqMerchantName
=
data
.
merchantName
this
.
approveForm
.
callOutYqMerchantId
=
data
.
merchantNo
}
console
.
log
(
this
.
approveForm
)
this
.
handleSendCancel
()
},
initData
(
val
)
{
this
.
approveForm
.
sendOutMerchantName
=
val
.
sendOutMerchantName
?
val
.
sendOutMerchantName
:
''
this
.
approveForm
.
sendOutMerchantId
=
val
.
sendOutMerchantId
this
.
approveForm
.
callOutYqMerchantName
=
val
.
callOutYqMerchantName
?
val
.
callOutYqMerchantName
:
''
this
.
approveForm
.
callOutYqMerchantId
=
val
.
callOutYqMerchantId
this
.
approveForm
.
callOutMerchantName
=
val
.
callOutMerchantName
?
val
.
callOutMerchantName
:
''
this
.
approveForm
.
callOutMerchantId
=
val
.
callOutMerchantId
},
handleSelect
()
{
handleSelect
(
val
)
{
console
.
log
(
'handleSelect'
)
// this.$emit('handleSelect')
this
.
isYq
=
val
if
(
this
.
isYq
==
2
&&!
this
.
approveForm
.
callOutYqMerchantId
){
Toast
(
'请先选择调出仓库'
)
return
}
this
.
sendOutVisible
=
true
},
validateRequiredFields
()
{
let
validators
=
{
sendOutMerchantId
:
()
=>
{
Toast
(
'请选择发货主体'
)
callOutYqMerchantId
:
()
=>
{
Toast
(
'请选择调出门店'
)
},
callOutMerchantId
:
()
=>
{
Toast
(
'请选择调出仓库'
)
}
}
for
(
let
key
in
validators
)
{
...
...
@@ -104,8 +127,7 @@ export default {
getMethodByStaffType
()
{
const
methodMap
=
{
2
:
'operatorAudit'
,
3
:
'businessAudit'
,
5
:
'directorAudit'
3
:
'businessAudit'
}
return
methodMap
[
this
.
staffType
]
},
...
...
@@ -122,17 +144,19 @@ export default {
this
.
$refs
.
myDialog
.
startLoading
()
const
params
=
{
orderCode
:
this
.
infoData
.
order
Code
,
operatorName
:
this
.
name
,
allocateCode
:
this
.
infoData
.
allocate
Code
,
updatedBy
:
this
.
name
,
...
this
.
approveForm
}
//运营审核有该字段,商户审核没有2-运营审核 3-商务审核
if
(
this
.
staffType
==
3
)
{
delete
params
.
sendOutMerchantName
delete
params
.
sendOutMerchantId
//运营审核没有该字段,商户审核有 2-运营审核 3-商务审核
if
(
this
.
staffType
==
2
)
{
delete
params
.
callOutYqMerchantName
delete
params
.
callOutYqMerchantId
delete
params
.
callOutMerchantName
delete
params
.
callOutMerchantId
}
const
result
=
await
purchas
eApi
[
methodName
](
params
)
const
result
=
await
allocat
eApi
[
methodName
](
params
)
if
(
result
.
code
==
0
)
{
Toast
.
success
(
'操作成功'
)
...
...
src/views/cannibalize/components/rejectComp.vue
View file @
50e3fe4
...
...
@@ -27,7 +27,7 @@
<
script
>
import
hDialog
from
'./dialog'
import
{
Toast
}
from
'vant'
import
purchaseApi
from
'@/api/purchas
e'
import
allocateApi
from
'@/api/allocat
e'
export
default
{
components
:
{
hDialog
},
data
()
{
...
...
@@ -70,8 +70,6 @@ export default {
return
baseOptions
.
slice
(
0
,
2
)
// 返回采购审核、运营审核
case
'4'
:
// 采购发货审核
return
baseOptions
// 返回全部
case
'5'
:
// 总监审核
return
baseOptions
.
slice
(
0
,
2
)
// 返回采购审核、运营审核
default
:
return
[]
// 默认无选项
}
...
...
@@ -99,8 +97,7 @@ export default {
const
methodMap
=
{
2
:
'operatorReject'
,
3
:
'businessReject'
,
4
:
'shipmentReject'
,
5
:
'directorReject'
4
:
'shipmentReject'
}
return
methodMap
[
this
.
staffType
]
},
...
...
@@ -121,7 +118,7 @@ export default {
...
this
.
rejectForm
}
const
result
=
await
purchas
eApi
[
methodName
](
params
)
const
result
=
await
allocat
eApi
[
methodName
](
params
)
if
(
result
.
code
==
0
)
{
Toast
.
success
(
'操作成功'
)
...
...
src/views/cannibalize/components/sendOutComp.vue
View file @
50e3fe4
...
...
@@ -8,7 +8,7 @@
<div
class=
"lists-wrap"
>
<template
v-for=
"(item, index) in shippingEntityList"
>
<div
:class=
"['list', item.checked ? 'active' : '']"
@
click=
"handleCheck(index)"
:key=
"index"
>
{{
item
.
shippingEntity
}}
{{
item
.
merchantName
}}
<img
v-if=
"item.checked"
src=
"@/assets/images/mark.png"
alt=
""
class=
"icon-mark"
/>
</div>
</
template
>
...
...
@@ -25,12 +25,12 @@
<
script
>
import
hDialog
from
'./dialog'
import
utils
from
'@/utils/util'
import
purchaseApi
from
'@/api/purchas
e'
import
allocateApi
from
'@/api/allocat
e'
export
default
{
components
:
{
hDialog
},
data
()
{
return
{
title
:
'
发货主体选择
'
,
title
:
'
调出门店仓库
'
,
keyword
:
''
,
originalShippingEntityList
:
[],
shippingEntityList
:
[],
...
...
@@ -45,10 +45,19 @@ export default {
sendOutMerchantId
:
{
type
:
String
,
default
:
''
},
isYq
:{
type
:
Number
,
default
:
1
},
yqMerchantId
:{
type
:
String
,
default
:
''
}
},
created
()
{
this
.
selectSendOutMerchantId
=
this
.
sendOutMerchantId
this
.
title
=
this
.
isYq
==
2
?
'调出仓库选择'
:
'调出门店仓库'
console
.
log
(
'created'
,
this
.
sendOutMerchantId
)
this
.
selectShippingEntityInfoAll
()
},
...
...
@@ -75,7 +84,7 @@ export default {
// 进行模糊搜索,匹配 shippingEntity 字段
const
filteredList
=
this
.
shippingEntityList
.
filter
(
item
=>
{
return
item
.
shippingEntity
.
toLowerCase
().
includes
(
val
.
toLowerCase
())
return
item
.
merchantName
.
toLowerCase
().
includes
(
val
.
toLowerCase
())
})
// 更新列表数据
...
...
@@ -85,8 +94,18 @@ export default {
this
.
handleFindIdAttribute
()
}
},
async
selectShippingEntityInfoAll
()
{
let
result
=
await
purchaseApi
.
selectShippingEntityInfoAll
()
getMethodsByYq
(){
const
methodMap
=
{
1
:
'selectServicemerchantList'
,
2
:
'selectYqMerchantList'
}
return
methodMap
[
this
.
isYq
]
},
async
selectShippingEntityInfoAll
()
{
let
methodName
=
this
.
getMethodsByYq
()
let
params
=
{}
if
(
this
.
isYq
==
2
)
params
.
yqMerchantId
=
this
.
yqMerchantId
let
result
=
await
allocateApi
[
methodName
](
params
)
console
.
log
(
result
)
if
(
result
.
code
==
0
)
{
result
.
data
.
forEach
(
item
=>
{
...
...
@@ -98,27 +117,31 @@ export default {
}
},
handleFindIdAttribute
()
{
let
key
=
this
.
isYq
==
1
?
'merchantId'
:
'merchantNo'
this
.
shippingEntityList
.
forEach
(
item
=>
{
item
.
checked
=
false
})
this
.
shippingEntityList
.
forEach
(
item
=>
{
console
.
log
(
item
.
shippingEntityId
==
this
.
selectSendOutMerchantId
,
item
.
shippingEntityId
,
this
.
selectSendOutMerchantId
)
if
(
item
.
shippingEntityId
==
this
.
selectSendOutMerchantId
)
{
if
(
item
[
key
]
==
this
.
selectSendOutMerchantId
)
{
item
.
checked
=
true
}
})
},
handleCheck
(
index
)
{
let
key
=
this
.
isYq
==
1
?
'merchantId'
:
'merchantNo'
this
.
shippingEntityList
.
forEach
(
item
=>
{
item
.
checked
=
false
})
this
.
shippingEntityList
[
index
].
checked
=
true
this
.
selectSendOutMerchantId
=
this
.
shippingEntityList
[
index
].
shippingEntityId
this
.
selectSendOutMerchantId
=
this
.
shippingEntityList
[
index
][
key
]
console
.
log
(
this
.
selectSendOutMerchantId
)
},
handleSubmit
()
{
let
data
=
this
.
originalShippingEntityList
.
find
(
item
=>
item
.
shippingEntityId
==
this
.
selectSendOutMerchantId
)
||
{}
this
.
$emit
(
'submit'
,
data
)
let
key
=
this
.
isYq
==
1
?
'merchantId'
:
'merchantNo'
let
data
=
this
.
originalShippingEntityList
.
find
(
item
=>
item
[
key
]
==
this
.
selectSendOutMerchantId
)
||
{}
this
.
$emit
(
'submit'
,
{...
data
,
isYq
:
this
.
isYq
})
// this.$refs.myDialog.stopLoading();
},
handleCancel
()
{
...
...
src/views/cannibalize/index.vue
View file @
50e3fe4
This diff is collapsed.
Click to expand it.
src/views/cannibalize/record.vue
View file @
50e3fe4
...
...
@@ -64,9 +64,7 @@ export default {
4
:
{
text
:
'运营审核'
,
status
:
'驳回'
},
5
:
{
text
:
'商务审核'
,
status
:
'通过'
},
6
:
{
text
:
'商务审核'
,
status
:
'驳回'
},
7
:
{
text
:
'采购驳回'
,
status
:
'驳回'
},
8
:
{
text
:
'总监审核'
,
status
:
'通过'
},
9
:
{
text
:
'总监审核'
,
status
:
'驳回'
}
7
:
{
text
:
'采购驳回'
,
status
:
'驳回'
}
},
examineStatusClass
:
{
2
:
'#35C376'
,
...
...
src/views/cannibalize/reviewStatus.vue
View file @
50e3fe4
...
...
@@ -33,8 +33,11 @@ export default {
}
},
watch
:
{
infoData
(
val
)
{
this
.
updateSatus
(
val
)
infoData
:{
handler
(
val
){
this
.
updateSatus
(
val
)
},
immediate
:
true
}
},
data
()
{
...
...
@@ -50,33 +53,30 @@ export default {
},
methods
:
{
updateSatus
(
val
)
{
console
.
log
(
'updateSatus'
,
val
)
this
.
statusList
.
forEach
(
item
=>
{
item
.
active
=
false
item
.
type
=
1
})
if
(
val
.
s
tatus
==
1
)
{
if
(
val
.
billS
tatus
==
1
)
{
this
.
statusList
[
0
].
active
=
true
this
.
statusList
[
0
].
type
=
1
if
(
this
.
staffType
==
2
)
{
this
.
statusList
[
0
].
active
=
true
}
}
else
if
(
val
.
s
tatus
==
2
)
{
}
else
if
(
val
.
billS
tatus
==
2
)
{
this
.
statusList
[
0
].
type
=
2
this
.
statusList
[
1
].
active
=
true
this
.
statusList
[
1
].
type
=
1
// if (this.staffType == 3) {
// this.statusList[1].active = true
// }
}
else
if
(
val
.
status
==
5
)
{
}
else
if
(
val
.
billStatus
==
5
)
{
this
.
statusList
.
forEach
(
item
=>
{
item
.
active
=
true
item
.
type
=
2
})
this
.
statusList
[
2
].
active
=
true
this
.
statusList
[
2
].
type
=
2
// if (this.staffType == 4) {
// this.statusList[2].active = true
// }
}
else
{
this
.
statusList
.
forEach
(
item
=>
{
item
.
active
=
false
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment