Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
5489caaa
Commit
5489caaa
authored
Aug 04, 2025
by
wusiyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wusiyi/intercept' into dev
parents
3a36ae3a
49d9dc29
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
270 additions
and
19 deletions
+270
-19
src/api/podUsOrder.ts
+19
-0
src/types/api/podUsOrder.ts
+12
-1
src/views/order/podUs/PodMakeOrder.vue
+1
-0
src/views/order/podUs/index.vue
+238
-18
No files found.
src/api/podUsOrder.ts
View file @
5489caaa
...
...
@@ -9,6 +9,7 @@ import {
WarehouseListData
,
LogisticsData
,
ExportParams
,
InterceptStateGroupData
,
}
from
'@/types/api/podUsOrder'
import
axios
from
'./axios'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
...
...
@@ -43,6 +44,13 @@ export function getOrderTabData() {
'/factory/podJomallOrderUs/findStateGroupList'
,
)
}
// 拦截状态数量
export
function
getgetInterceptStateGroupList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
InterceptStateGroupData
>>
(
'factory/podJomallOrderUs/findInterceptStateGroupList'
,
)
}
export
function
getOrderList
(
params
:
SearchForm
,
currentPage
:
number
,
...
...
@@ -505,6 +513,17 @@ export function updateToWaitShipmentApi(params: {
params
,
)
}
// 拦截状态改变
export
function
interceptUpdateApi
(
params
:
{
orderIds
:
(
string
|
number
)[]
interceptStatus
:
number
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/updateInterceptStatus`
,
params
,
)
}
// 驳回
export
function
rejectToApi
(
params
:
{
orderStatus
:
string
...
...
src/types/api/podUsOrder.ts
View file @
5489caaa
...
...
@@ -6,7 +6,7 @@ export interface Tab {
export
interface
ExportParams
extends
SearchForm
{
idList
?:
number
[]
exportAll
:
boolean
status
?:
string
status
?:
string
}
export
interface
SearchForm
{
...
...
@@ -34,6 +34,7 @@ export interface SearchForm {
batchArrangeNumber
?:
string
craftCode
?:
string
thirdStockSku
?:
string
interceptStatus
?:
number
|
string
}
export
interface
PodUsOrderListData
{
id
:
number
...
...
@@ -127,6 +128,7 @@ export interface ProductList {
supplierProductNo
?:
string
|
null
replenishmentSumNum
?:
number
|
null
batchArrangeNumber
?:
string
|
null
interceptStatus
?:
number
|
null
}
export
interface
cardImages
{
title
:
string
...
...
@@ -201,3 +203,12 @@ export interface CraftListData {
craftName
:
string
craftCode
:
string
}
export
interface
InterceptStateGroupData
{
shipment
:
{
[
key
:
string
]:
number
}
production
:
{
[
key
:
string
]:
number
}
}
src/views/order/podUs/PodMakeOrder.vue
View file @
5489caaa
...
...
@@ -422,6 +422,7 @@ const renderItemBox = (bool: boolean) => {
if
(
renderLock
)
return
renderLock
=
true
let
boxItem
=
podBoxList
.
value
.
find
((
item
)
=>
item
.
box
===
boxIndex
.
value
)
if
(
!
boxItem
)
boxItem
=
{
data
:
{
productList
:
[]
}
}
const
{
data
}
=
boxItem
data
?.
productList
?.
forEach
((
el
)
=>
{
...
...
src/views/order/podUs/index.vue
View file @
5489caaa
...
...
@@ -329,7 +329,11 @@
</ElButton>
</span> -->
<span
v-if=
"status === 'PICKING' || status === 'TO_BE_REPLENISHMENT'|| status === 'IN_PRODUCTION'"
v-if=
"
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
class=
"item"
>
<ElButton
type=
"primary"
@
click=
"printProductionOrder"
>
...
...
@@ -475,6 +479,29 @@
</span>
<span
v-if=
"
status === 'INTERCEPTED' &&
(interceptCurrent === 1 || interceptCurrent === 4)
"
class=
"item"
>
<ElButton
type=
"success"
@
click=
"interceptChange(true)"
>
拦截成功
</ElButton>
</span>
<span
v-if=
"
status === 'INTERCEPTED' &&
(interceptCurrent === 1 || interceptCurrent === 4)
"
class=
"item"
>
<ElButton
type=
"danger"
@
click=
"interceptChange(false)"
>
拦截失败
</ElButton>
</span>
<span
v-if=
"
status === 'TO_BE_CONFIRMED' ||
status === 'PICKING' ||
status === 'STOCK_OUT' ||
...
...
@@ -628,41 +655,78 @@
<span
class=
"sub-status-item-label"
>
待同步
</span>
</div>
</div>
<div
v-if=
"status === '
EXCEPTION_ORDER1
'"
class=
"sub-status mb-10"
>
<div
v-if=
"status === '
INTERCEPTED
'"
class=
"sub-status mb-10"
>
<div
class=
"sub-status-item"
:class=
"
exceptionStatus
=== 1 ? 'sub-active' : ''"
@
click=
"handle
ExceptionCommand(1
)"
:class=
"
interceptCurrent
=== 1 ? 'sub-active' : ''"
@
click=
"handle
InterceptionCommand(1, 0
)"
>
<span
class=
"sub-status-item-label"
>
生产拦截申请
</span>
<span
v-if=
"interceptionStatus.production['0']"
class=
"tabs-node_count blue"
>
{{ interceptionStatus.production['0'] }}
</span
>
</div>
<div
class=
"sub-status-item"
:class=
"
exceptionStatus
=== 2 ? 'sub-active' : ''"
@
click=
"handle
ExceptionCommand(2
)"
:class=
"
interceptCurrent
=== 2 ? 'sub-active' : ''"
@
click=
"handle
InterceptionCommand(2, 1
)"
>
<span
class=
"sub-status-item-label"
>
生产拦截成功
</span>
<span
v-if=
"interceptionStatus.production['1']"
class=
"tabs-node_count blue"
>
{{ interceptionStatus.production['1'] }}
</span
>
</div>
<div
class=
"sub-status-item"
:class=
"
exceptionStatus
=== 3 ? 'sub-active' : ''"
@
click=
"handle
ExceptionCommand(3
)"
:class=
"
interceptCurrent
=== 3 ? 'sub-active' : ''"
@
click=
"handle
InterceptionCommand(3, 2
)"
>
<span
class=
"sub-status-item-label"
>
生产拦截申请
</span>
<span
class=
"sub-status-item-label"
>
生产拦截失败
</span>
<span
v-if=
"interceptionStatus.production['2']"
class=
"tabs-node_count red"
>
{{ interceptionStatus.production['2'] }}
</span
>
</div>
<div
class=
"sub-status-item"
:class=
"
exceptionStatus === 3
? 'sub-active' : ''"
@
click=
"handle
ExceptionCommand(3
)"
:class=
"
interceptCurrent === 4
? 'sub-active' : ''"
@
click=
"handle
InterceptionCommand(4, 2
)"
>
<span
class=
"sub-status-item-label"
>
生产拦截成功
</span>
<span
class=
"sub-status-item-label"
>
发货拦截申请
</span>
<span
v-if=
"interceptionStatus.shipment['0']"
class=
"tabs-node_count blue"
>
{{ interceptionStatus.shipment['0'] }}
</span
>
</div>
<div
class=
"sub-status-item"
:class=
"
exceptionStatus === 3
? 'sub-active' : ''"
@
click=
"handle
ExceptionCommand(
3)"
:class=
"
interceptCurrent === 5
? 'sub-active' : ''"
@
click=
"handle
InterceptionCommand(5,
3)"
>
<span
class=
"sub-status-item-label"
>
生产拦截失败
</span>
<span
class=
"sub-status-item-label"
>
发货拦截成功
</span>
<span
v-if=
"interceptionStatus.shipment['1']"
class=
"tabs-node_count blue"
>
{{ interceptionStatus.shipment['1'] }}
</span
>
</div>
<div
class=
"sub-status-item"
:class=
"interceptCurrent === 6 ? 'sub-active' : ''"
@
click=
"handleInterceptionCommand(6, 4)"
>
<span
class=
"sub-status-item-label"
>
发货拦截失败
</span>
<span
v-if=
"interceptionStatus.shipment['2']"
class=
"tabs-node_count red"
>
{{ interceptionStatus.shipment['2'] }}
</span
>
</div>
</div>
<div
...
...
@@ -680,7 +744,6 @@
<TableView
ref=
"tableRef"
:columns=
"tableColumns"
:serial-numberable=
"true"
:selectionable=
"true"
:paginated-data=
"tableData"
:cell-style=
"onCellStyle"
...
...
@@ -688,6 +751,26 @@
:row-style=
"getRowStyle"
@
selection-change=
"handleSelectionChange"
>
<
template
#
serialNumber=
"{ row, index }"
>
<div>
<el-tooltip
v-if=
"
status !== 'INTERCEPTED' &&
(row.interceptStatus == 0 || row.interceptStatus == 2)
"
effect=
"light"
:content=
"
row.interceptStatus == 0
? '订单已提交至生产拦截申请'
: '订单已提交至发货拦截申请'
"
placement=
"bottom"
>
<el-icon
color=
"#E6A23C"
><InfoFilled
/></el-icon>
</el-tooltip>
<span
class=
"serial-number"
>
{{
index
+
1
}}
</span>
</div>
</
template
>
<
template
#
goods=
"{ row }"
>
<div
class=
"goods-info-box"
>
<div
class=
"goods-list"
>
...
...
@@ -1396,6 +1479,23 @@
:
image
-
field
=
"'variantImage'"
@
contextmenu
.
prevent
=
"(v: MouseEvent) => rightClick(v)"
>
<
template
#
top_left
>
<
el
-
tooltip
v
-
if
=
"
cardItem.interceptStatus == 0 ||
cardItem.interceptStatus == 2
"
effect
=
"light"
:
content
=
"
cardItem.interceptStatus == 0
? '订单已提交至生产拦截申请'
: '订单已提交至发货拦截申请'
"
placement
=
"bottom"
>
<
el
-
icon
color
=
"#E6A23C"
><
InfoFilled
/><
/el-icon
>
<
/el-tooltip
>
<
/template
>
<
template
#
top_right
v
-
if
=
"['ZPZY', 'CXZY', 'THZY'].includes(cardItem.craftCode as string)"
...
...
@@ -2069,6 +2169,7 @@
import
{
getUserMarkList
}
from
'@/api/common'
// import
{
AnyObject
}
from
'@/types/api/warehouse'
import
{
InfoFilled
,
ArrowDown
,
CaretBottom
,
CaretTop
,
...
...
@@ -2124,6 +2225,8 @@ import {
batchDownloadRecomposingApi
,
updateToWaitShipmentApi
,
exportPodUSInfo
,
getgetInterceptStateGroupList
,
interceptUpdateApi
,
rejectToApi
,
}
from
'@/api/podUsOrder'
import
{
BaseRespData
}
from
'@/types/api'
...
...
@@ -2151,7 +2254,7 @@ import {
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
DocumentCopy
,
EditPen
}
from
'@element-plus/icons-vue'
//
import
{
DocumentCopy
,
EditPen
}
from
'@element-plus/icons-vue'
import
{
Column
,
ElFormItem
}
from
'element-plus'
import
{
computed
,
onMounted
,
ref
,
nextTick
,
reactive
}
from
'vue'
import
FastProduction
from
'./FastProduction.vue'
...
...
@@ -2269,6 +2372,13 @@ const searchVisible = ref(false)
const
confirmSelectionData
=
ref
<
LogisticsData
[]
>
([])
const
confirmRowData
=
ref
<
ProductList
|
null
>
(
null
)
const
status
=
ref
(
localStorage
.
getItem
(
'podUsStatus'
)
||
'TO_BE_CONFIRMED'
)
const
interceptionStatus
=
ref
<
{
shipment
:
Record
<
string
,
number
>
production
:
Record
<
string
,
number
>
}
>
({
shipment
:
{
}
,
production
:
{
}
,
}
)
const
detailData
=
ref
({
}
)
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
SearchForm
>
({
...
...
@@ -2297,6 +2407,8 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({
thirdStockSku
:
''
,
}
)
const
exceptionStatus
=
ref
(
1
)
const
interceptCurrent
=
ref
(
1
)
const
interceptStatus
=
ref
(
0
)
const
userMarkList
=
ref
<
string
[]
>
([])
const
selection
=
ref
<
PodUsOrderListData
[]
>
([])
const
pickerOptions
=
{
...
...
@@ -2581,6 +2693,13 @@ const tableColumns = computed(() => {
}
return
[
{
label
:
'序号'
,
prop
:
'serialNumber'
,
slot
:
'serialNumber'
,
width
:
60
,
align
:
'center'
,
}
,
{
label
:
'商品'
,
prop
:
'goods'
,
slot
:
'goods'
,
...
...
@@ -2685,6 +2804,12 @@ const asyncOrderAddress = async () => {
const
changeTab
=
(
item
:
Tab
)
=>
{
status
.
value
=
item
.
status
||
''
localStorage
.
setItem
(
'podUsStatus'
,
item
.
status
as
string
)
// 如果切换到INTERCEPTED状态,设置默认的exceptionStatus
if
(
item
.
status
===
'INTERCEPTED'
&&
!
interceptCurrent
.
value
)
{
interceptCurrent
.
value
=
1
}
selection
.
value
=
[]
cardSelection
.
value
=
[]
stockOutSuccessIds
.
value
=
[]
...
...
@@ -2707,10 +2832,46 @@ const onCellClassName = ({ column }: { column: Column }) => {
return
'exception-reason'
}
}
// 获取Tab信息
const
loadTabData
=
async
()
=>
{
try
{
const
res
=
await
getOrderTabData
()
tabsNav
.
value
=
res
.
data
// 获取拦截数量
const
statusRes
=
await
getgetInterceptStateGroupList
()
interceptionStatus
.
value
=
statusRes
.
data
as
{
shipment
:
Record
<
string
,
number
>
production
:
Record
<
string
,
number
>
}
// 在 已完成 后面添加 拦截 标签页
const
completeIndex
=
tabsNav
.
value
.
findIndex
(
(
item
)
=>
item
.
status
===
'COMPLETE'
,
)
// 发货拦截数量
const
shipmentCount
=
(
statusRes
.
data
as
any
)?.
shipment
?
Object
.
values
((
statusRes
.
data
as
any
).
shipment
).
reduce
(
(
sum
:
number
,
value
:
any
)
=>
sum
+
(
Number
(
value
)
||
0
),
0
,
)
:
0
// 生产拦截数量
const
productionCount
=
(
statusRes
.
data
as
any
)?.
production
?
Object
.
values
((
statusRes
.
data
as
any
).
production
).
reduce
(
(
sum
:
number
,
value
:
any
)
=>
sum
+
(
Number
(
value
)
||
0
),
0
,
)
:
0
tabsNav
.
value
.
splice
(
completeIndex
+
1
,
0
,
{
status
:
'INTERCEPTED'
,
statusName
:
'拦截'
,
quantity
:
shipmentCount
+
productionCount
,
}
)
}
catch
(
error
)
{
// showError(error)
}
...
...
@@ -2758,11 +2919,13 @@ const {
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
timeRange
.
value
[
1
]
:
null
,
status
:
status
.
value
,
status
:
status
.
value
===
'INTERCEPTED'
?
''
:
status
.
value
,
exceptionHandling
:
status
.
value
===
'EXCEPTION_ORDER'
?
exceptionStatus
.
value
||
undefined
:
undefined
,
interceptStatus
:
status
.
value
===
'INTERCEPTED'
?
interceptStatus
.
value
:
''
,
}
,
page
,
pageSize
,
...
...
@@ -2780,6 +2943,7 @@ const {
?
timeRange
.
value
[
1
]
:
null
,
status
:
status
.
value
,
interceptStatus
:
''
,
}
,
page
,
pageSize
,
...
...
@@ -4306,6 +4470,14 @@ const handleExceptionCommand = (command: number) => {
exceptionStatus
.
value
=
command
search
()
}
// 拦截分页
const
handleInterceptionCommand
=
(
current
:
number
,
command
:
number
)
=>
{
interceptCurrent
.
value
=
current
interceptStatus
.
value
=
command
search
()
loadTabData
()
}
const
applyForReplenishment
=
async
(
row
:
ProductList
|
undefined
)
=>
{
if
(
!
row
)
{
if
(
cardSelection
.
value
.
length
===
0
)
{
...
...
@@ -4488,6 +4660,54 @@ const handleBeforeRouteLeave = (
next
()
}
// 拦截状态改变
const
interceptChange
=
async
(
status
:
boolean
)
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
try
{
await
ElMessageBox
.
confirm
(
`确定${status ? '拦截成功' : '拦截失败'
}
吗?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
,
)
}
catch
(
e
)
{
return
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
const
interceptStatus
=
status
?
interceptCurrent
.
value
===
1
?
1
:
3
:
interceptCurrent
.
value
===
1
?
2
:
4
try
{
const
res
=
await
interceptUpdateApi
({
orderIds
:
selection
.
value
.
map
((
item
)
=>
item
.
id
),
interceptStatus
,
}
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
search
()
loadTabData
()
}
catch
(
e
)
{
resultInfo
.
value
=
[]
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
useRouter
().
beforeEach
((
to
,
from
,
next
)
=>
{
handleBeforeRouteLeave
(
to
,
from
,
next
)
}
)
...
...
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