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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
237 additions
and
144 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
<!-- 采购发货 -->
<
template
>
<div
class=
"layout"
>
<div
class=
"
purchas
e"
:style=
"
{height:isHeight?'calc(100vh - 68px)' : '100%'}">
<div
class=
"
allocat
e"
:style=
"
{height:isHeight?'calc(100vh - 68px)' : '100%'}">
<!-- 订单基本信息 -->
<div
class=
"info-section"
>
<div
class=
"title"
>
订单基本信息
<div
class=
"status"
>
<span
:style=
"
{ color: getStepText('orderStatusOpts',
purchaseOrderInfo.status, 'color') }">
{{
getStepText
(
'orderStatusOpts'
,
purchas
eOrderInfo
.
status
,
'label'
)
}}
</span>
<span
:style=
"
{ color: getStepText('orderStatusOpts',
allocateOrderInfo.status, 'color') }">
{{
getStepText
(
'orderStatusOpts'
,
allocat
eOrderInfo
.
status
,
'label'
)
}}
</span>
|
<span
:style=
"
{ color: getStepText('deliveryStatusOpts',
purchas
eOrderInfo.deliveryStatus, 'color') }">
{{
getStepText
(
'deliveryStatusOpts'
,
purchas
eOrderInfo
.
deliveryStatus
,
'label'
)
}}
<span
:style=
"
{ color: getStepText('deliveryStatusOpts',
allocat
eOrderInfo.deliveryStatus, 'color') }">
{{
getStepText
(
'deliveryStatusOpts'
,
allocat
eOrderInfo
.
deliveryStatus
,
'label'
)
}}
</span>
</div>
</div>
<div
v-for=
"(item, index) in orderBasicInfoList"
:key=
"index"
class=
"info-item"
>
<span>
{{
item
.
label
}}
</span>
<span
class=
"value"
v-if=
"item.formatter"
>
{{
item
.
formatter
(
purchas
eOrderInfo
)
}}
</span>
<span
class=
"value"
v-else
>
{{
purchas
eOrderInfo
[
item
.
value
]
||
'--'
}}
</span>
<span
class=
"value"
v-if=
"item.formatter"
>
{{
item
.
formatter
(
allocat
eOrderInfo
)
}}
</span>
<span
class=
"value"
v-else
>
{{
allocat
eOrderInfo
[
item
.
value
]
||
'--'
}}
</span>
</div>
</div>
<!-- 订单基本信息 -->
...
...
@@ -25,7 +25,7 @@
<div
class=
"title"
>
商品信息
<span
class=
"title-tip"
>
点击商品名称可查看商品全部信息
</span>
</div>
<StickyTable
:columns=
"tableColumns"
:data=
"
purchaseOrderInfo.goodsList"
:height=
"purchaseOrderInfo.goods
List.length > 5 ? '216px' : 'auto'"
>
<StickyTable
:columns=
"tableColumns"
:data=
"
allocateOrderInfo.stockAllocateDetailList"
:height=
"allocateOrderInfo.stockAllocateDetail
List.length > 5 ? '216px' : 'auto'"
>
<template
#
upgradeGoodsName=
"
{ row }">
<span
style=
"color: #347bff; cursor: pointer;"
@
click=
"handleProductClick(row)"
>
{{
row
.
upgradeGoodsName
}}
</span>
</
template
>
...
...
@@ -36,36 +36,35 @@
<div
class=
"title"
>
其他信息
</div>
<div
class=
"info-item"
>
<span>
备注
</span>
<span>
数量有限数量有限数量有限数量有限数量有限数量有限
</span>
<span>
{{allocateOrderInfo.remark}}
</span>
</div>
</div>
<!-- 审核流程进度 -->
<div
class=
"info-section"
>
<div
class=
"title"
>
审核流程进度
</div>
<review-status
:infoData=
"
purchas
eOrderInfo"
></review-status>
<review-status
:infoData=
"
allocat
eOrderInfo"
></review-status>
</div>
<!-- 审核记录 -->
<div
class=
"info-section"
>
<div
class=
"title"
>
审核记录
</div>
<record
:recordList=
"
purchaseOrderInfo.auditDetail
List"
></record>
<record
:recordList=
"
allocateOrderInfo.auditDetai
List"
></record>
</div>
</div>
<div
class=
"footer"
>
<div
class=
"reject btn"
@
click=
"handleReject"
v-if=
"
(purchaseOrderInfo.status === 1 && staffType == 2) ||
(purchaseOrderInfo.status === 2 && staffType == 5) ||
(purchaseOrderInfo.status === 8 && staffType == 3) ||
(purchaseOrderInfo.deliveryStatus === 1 && staffType == 4 && purchaseOrderInfo.status == 5)
(allocateOrderInfo.billStatus === 1 && staffType == 2) ||
(allocateOrderInfo.billStatus === 2 && staffType == 3) ||
(allocateOrderInfo.deliveryStatus === 1 && staffType == 4 && allocateOrderInfo.billStatus == 5)
"
>
驳回
</div>
<div
class=
"approve btn"
@
click=
"handleApprove"
v-if=
"(
purchaseOrderInfo.s
tatus === 1 && staffType == 2)
|| (
purchaseOrderInfo.status === 2 && staffType == 5
)
|| (purchaseOrderInfo.status === 8 && staffType == 3)
"
>
通过
</div>
v-if=
"(
allocateOrderInfo.billS
tatus === 1 && staffType == 2)
|| (
allocateOrderInfo.billStatus === 2 && staffType == 3
)
"
>
通过
</div>
</div>
<reject-comp
:isVisible=
"rejectVisible"
v-if=
"rejectVisible"
:infoData=
"
purchas
eOrderInfo"
@
cancel=
"handleCancel"
@
success=
"handleSuccess"
></reject-comp>
<approve-comp
:isVisible=
"approveVisible"
v-if=
"approveVisible"
:infoData=
"
purchas
eOrderInfo"
@
cancel=
"handleApproveCancel"
@
success=
"handleApproveSuccess"
></approve-comp>
<reject-comp
:isVisible=
"rejectVisible"
v-if=
"rejectVisible"
:infoData=
"
allocat
eOrderInfo"
@
cancel=
"handleCancel"
@
success=
"handleSuccess"
></reject-comp>
<approve-comp
:isVisible=
"approveVisible"
v-if=
"approveVisible"
:infoData=
"
allocat
eOrderInfo"
@
cancel=
"handleApproveCancel"
@
success=
"handleApproveSuccess"
></approve-comp>
<detail-comp
:isVisible=
"detailVisible"
v-if=
"detailVisible"
:infoData=
"productInfo"
@
cancel=
"handleDetailCancel"
></detail-comp>
</div>
</template>
...
...
@@ -79,7 +78,7 @@ import record from './record.vue'
import
rejectComp
from
'./components/rejectComp.vue'
import
ApproveComp
from
'./components/approveComp.vue'
import
detailComp
from
'./components/detailComp.vue'
import
purchaseApi
from
'@/api/purchas
e'
import
allocateApi
from
'@/api/allocat
e'
import
StickyTable
from
'@/components/StickyTable.vue'
export
default
{
components
:
{
reviewStatus
,
record
,
rejectComp
,
ApproveComp
,
StickyTable
,
detailComp
},
...
...
@@ -88,86 +87,52 @@ export default {
return
{
staffType
:
this
.
$route
.
query
.
staffType
,
// (2-运营审核 3-商务审核 4-采购发货审核)
orderCode
:
this
.
$route
.
query
.
orderCode
,
purchas
eOrderInfo
:
{},
allocat
eOrderInfo
:
{},
productInfo
:
{},
approveVisible
:
false
,
rejectVisible
:
false
,
detailVisible
:
false
,
tableColumns
:
[
{
label
:
'商品名称'
,
prop
:
'
upgradeG
oodsName'
,
width
:
'120px'
},
{
label
:
'商品编码'
,
prop
:
'
typ
e'
,
width
:
'100px'
},
{
label
:
'商品名称'
,
prop
:
'
g
oodsName'
,
width
:
'120px'
},
{
label
:
'商品编码'
,
prop
:
'
productCod
e'
,
width
:
'100px'
},
{
label
:
'规格'
,
prop
:
'specificationData'
,
width
:
'90px'
},
{
label
:
'调拨数量'
,
prop
:
'goodsNumber'
,
width
:
'100px'
,
// formatter: (row) => {
// const unit = row.conversionValue ? '卷' : '件'
// return (row.goodsNumber || 0) + unit
// }
prop
:
'allocateNumber'
,
width
:
'100px'
},
{
label
:
'调入门店库存'
,
prop
:
'inventoryTotal'
,
width
:
'100px'
,
formatter
:
(
row
)
=>
{
const
total
=
(
row
.
goodsNumber
||
0
)
*
(
row
.
conversionValue
||
1
)
// 如果conversionValue为空,应该怎么算?题目说"库存数量 = goodsNumber * conversionValue 就是库存总量",但如果conversionValue为空,通常意味着是1或者就是goodsNumber。题目后半句说"如果conversionValue为空,单位就是件",暗示这种情况下库存总量可能就是goodsNumber。 这里假设 conversionValue 为空时按 1 计算,或者直接取 goodsNumber。
// 根据题目: "库存数量 = goodsNumber * conversionValue 就是库存总量。单位,如果conversionValue 为空,单位就是件,如果conversionValue 不为空,单位就是米。"
// 如果 conversionValue 为空/0/null,则总量 = goodsNumber (单位:件)
// 如果 conversionValue 有值,则总量 = goodsNumber * conversionValue (单位:米)
if
(
!
row
.
conversionValue
)
{
return
(
row
.
goodsNumber
||
0
)
+
'件'
}
else
{
// 乘法可能存在精度问题,简单处理
return
((
row
.
goodsNumber
||
0
)
*
row
.
conversionValue
).
toFixed
(
2
)
+
'米'
}
}
prop
:
'inStockQty'
,
width
:
'100px'
},
{
label
:
'调出门店库存'
,
prop
:
'purchaseNumber'
,
width
:
'100px'
,
formatter
:
(
row
)
=>
{
const
unit
=
row
.
conversionValue
?
'卷'
:
'件'
return
(
row
.
purchaseNumber
||
0
)
+
unit
}
label
:
'调出门店库存'
,
prop
:
'outStockQty'
,
width
:
'100px'
},
{
label
:
'膜卷号'
,
prop
:
'
upgradePurchasePrice
'
,
width
:
'90px'
label
:
'膜卷号'
,
prop
:
'
filmRollNo
'
,
width
:
'90px'
}
],
orderBasicInfoList
:
[
{
label
:
'调拨编号'
,
value
:
'
order
Code'
},
{
label
:
'调入门店'
,
value
:
'
m
erchantName'
},
{
label
:
'调出门店'
,
value
:
'
send
OutMerchantName'
},
{
label
:
'调拨编号'
,
value
:
'
allocate
Code'
},
{
label
:
'调入门店'
,
value
:
'
callInM
erchantName'
},
{
label
:
'调出门店'
,
value
:
'
call
OutMerchantName'
},
{
label
:
'调拨数量'
,
value
:
'total
Price
'
,
value
:
'total
AllocateNumber
'
,
formatter
:
cellValue
=>
{
return
cellValue
.
total
Price
||
cellValue
.
totalPrice
===
0
?
cellValue
.
totalPrice
:
'--'
return
cellValue
.
total
AllocateNumber
||
cellValue
.
totalAllocateNumber
===
0
?
cellValue
.
totalAllocateNumber
:
'--'
}
},
// {
// label: '采购模式',
// value: 'purchasingPattern',
// formatter: cellValue => {
// const statusItem = this.getStatusItem(this.baseData, 'purchasingPatternOptions', cellValue, 'purchasingPattern')
// return statusItem ? statusItem.confValue : '--'
// }
// },
{
label
:
'发起时间'
,
value
:
'orderTime'
},
{
label
:
'发起时间'
,
value
:
'submitTime'
},
{
label
:
'当前审核节点'
,
value
:
'商务审核'
,
formatter
:
cellValue
=>
{
return
cellValue
.
status
==
1
?
'运营审核'
:
cellValue
.
status
==
8
?
'商务审核'
:
cellValue
.
status
==
2
?
'总监
审核'
:
'--'
return
cellValue
.
billStatus
==
1
?
'运营审核'
:
cellValue
.
status
==
2
?
'商务
审核'
:
'--'
}
}
],
receiverInfoList
:
[
{
label
:
'收货人'
,
value
:
'contactName'
},
{
label
:
'收货人电话'
,
value
:
'contactPhone'
},
{
label
:
'收货地址'
,
value
:
'contactAddress'
}
],
deliveryStatusOpts
:
{
1
:
{
label
:
'未发货'
,
...
...
@@ -215,14 +180,6 @@ export default {
7
:
{
label
:
'已驳回'
,
color
:
'#F24724'
},
8
:
{
label
:
'待审核'
,
color
:
'#FF9D0A'
},
9
:
{
label
:
'已驳回'
,
color
:
'#F24724'
}
},
baseData
:
{
...
...
@@ -235,11 +192,11 @@ export default {
// 第二步: http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/cannibalize?orderCode=CG202407158682&staffType=4&name=glsadmin 采购发货审核
created
()
{
this
.
purchaseOrderDetailData
()
this
.
allocateOrderDetail
()
},
computed
:
{
isHeight
()
{
const
{
status
,
deliveryStatus
}
=
this
.
purchas
eOrderInfo
||
{}
const
{
status
,
deliveryStatus
}
=
this
.
allocat
eOrderInfo
||
{}
const
staffType
=
this
.
staffType
return
(
(
status
===
1
&&
staffType
==
2
)
||
...
...
@@ -259,11 +216,11 @@ export default {
},
handleSuccess
()
{
this
.
handleCancel
()
this
.
purchaseOrderDetailData
()
this
.
allocateOrderDetail
()
},
handleApproveSuccess
()
{
this
.
handleApproveCancel
()
this
.
purchaseOrderDetailData
()
this
.
allocateOrderDetail
()
},
getStepText
(
opts
,
status
,
key
)
{
const
mapping
=
this
[
opts
][
status
]
...
...
@@ -280,11 +237,11 @@ export default {
handleSelect
()
{
this
.
sendOutVisible
=
true
},
async
purchaseOrderDetailData
()
{
let
result
=
await
purchaseApi
.
purchaseOrderDetail
({
orderCode
:
this
.
orderCode
})
async
allocateOrderDetail
()
{
let
result
=
await
allocateApi
.
allocateOrderDetail
({
allocateCode
:
this
.
orderCode
})
console
.
log
(
result
,
'result'
)
if
(
result
.
code
==
0
)
{
result
.
data
.
goodsList
=
[...
result
.
data
.
goodsList
,...
result
.
data
.
goodsList
,...
result
.
data
.
goodsList
,...
result
.
data
.
goodsList
]
this
.
purchaseOrderInfo
=
result
.
data
this
.
allocateOrderInfo
=
result
.
data
}
},
handleDetailCancel
()
{
...
...
@@ -340,7 +297,7 @@ export default {
}
}
}
.
purchas
e
{
.
allocat
e
{
width
:
100vw
;
padding
:
12px
10px
;
box-sizing
:
border-box
;
...
...
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