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
f7c077d8
Commit
f7c077d8
authored
Aug 04, 2025
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!66
parents
1f5933e3
5489caaa
Show 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 @
f7c077d8
...
@@ -9,6 +9,7 @@ import {
...
@@ -9,6 +9,7 @@ import {
WarehouseListData
,
WarehouseListData
,
LogisticsData
,
LogisticsData
,
ExportParams
,
ExportParams
,
InterceptStateGroupData
,
}
from
'@/types/api/podUsOrder'
}
from
'@/types/api/podUsOrder'
import
axios
from
'./axios'
import
axios
from
'./axios'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
...
@@ -43,6 +44,13 @@ export function getOrderTabData() {
...
@@ -43,6 +44,13 @@ export function getOrderTabData() {
'/factory/podJomallOrderUs/findStateGroupList'
,
'/factory/podJomallOrderUs/findStateGroupList'
,
)
)
}
}
// 拦截状态数量
export
function
getgetInterceptStateGroupList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
InterceptStateGroupData
>>
(
'factory/podJomallOrderUs/findInterceptStateGroupList'
,
)
}
export
function
getOrderList
(
export
function
getOrderList
(
params
:
SearchForm
,
params
:
SearchForm
,
currentPage
:
number
,
currentPage
:
number
,
...
@@ -505,6 +513,17 @@ export function updateToWaitShipmentApi(params: {
...
@@ -505,6 +513,17 @@ export function updateToWaitShipmentApi(params: {
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
:
{
export
function
rejectToApi
(
params
:
{
orderStatus
:
string
orderStatus
:
string
...
...
src/types/api/podUsOrder.ts
View file @
f7c077d8
...
@@ -6,7 +6,7 @@ export interface Tab {
...
@@ -6,7 +6,7 @@ export interface Tab {
export
interface
ExportParams
extends
SearchForm
{
export
interface
ExportParams
extends
SearchForm
{
idList
?:
number
[]
idList
?:
number
[]
exportAll
:
boolean
exportAll
:
boolean
status
?:
string
status
?:
string
}
}
export
interface
SearchForm
{
export
interface
SearchForm
{
...
@@ -34,6 +34,7 @@ export interface SearchForm {
...
@@ -34,6 +34,7 @@ export interface SearchForm {
batchArrangeNumber
?:
string
batchArrangeNumber
?:
string
craftCode
?:
string
craftCode
?:
string
thirdStockSku
?:
string
thirdStockSku
?:
string
interceptStatus
?:
number
|
string
}
}
export
interface
PodUsOrderListData
{
export
interface
PodUsOrderListData
{
id
:
number
id
:
number
...
@@ -127,6 +128,7 @@ export interface ProductList {
...
@@ -127,6 +128,7 @@ export interface ProductList {
supplierProductNo
?:
string
|
null
supplierProductNo
?:
string
|
null
replenishmentSumNum
?:
number
|
null
replenishmentSumNum
?:
number
|
null
batchArrangeNumber
?:
string
|
null
batchArrangeNumber
?:
string
|
null
interceptStatus
?:
number
|
null
}
}
export
interface
cardImages
{
export
interface
cardImages
{
title
:
string
title
:
string
...
@@ -201,3 +203,12 @@ export interface CraftListData {
...
@@ -201,3 +203,12 @@ export interface CraftListData {
craftName
:
string
craftName
:
string
craftCode
:
string
craftCode
:
string
}
}
export
interface
InterceptStateGroupData
{
shipment
:
{
[
key
:
string
]:
number
}
production
:
{
[
key
:
string
]:
number
}
}
src/views/order/podUs/PodMakeOrder.vue
View file @
f7c077d8
...
@@ -422,6 +422,7 @@ const renderItemBox = (bool: boolean) => {
...
@@ -422,6 +422,7 @@ const renderItemBox = (bool: boolean) => {
if
(
renderLock
)
return
if
(
renderLock
)
return
renderLock
=
true
renderLock
=
true
let
boxItem
=
podBoxList
.
value
.
find
((
item
)
=>
item
.
box
===
boxIndex
.
value
)
let
boxItem
=
podBoxList
.
value
.
find
((
item
)
=>
item
.
box
===
boxIndex
.
value
)
if
(
!
boxItem
)
boxItem
=
{
data
:
{
productList
:
[]
}
}
if
(
!
boxItem
)
boxItem
=
{
data
:
{
productList
:
[]
}
}
const
{
data
}
=
boxItem
const
{
data
}
=
boxItem
data
?.
productList
?.
forEach
((
el
)
=>
{
data
?.
productList
?.
forEach
((
el
)
=>
{
...
...
src/views/order/podUs/index.vue
View file @
f7c077d8
...
@@ -329,7 +329,11 @@
...
@@ -329,7 +329,11 @@
</ElButton>
</ElButton>
</span> -->
</span> -->
<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"
class=
"item"
>
>
<ElButton
type=
"primary"
@
click=
"printProductionOrder"
>
<ElButton
type=
"primary"
@
click=
"printProductionOrder"
>
...
@@ -475,6 +479,29 @@
...
@@ -475,6 +479,29 @@
</span>
</span>
<span
<span
v-if=
"
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 === 'TO_BE_CONFIRMED' ||
status === 'PICKING' ||
status === 'PICKING' ||
status === 'STOCK_OUT' ||
status === 'STOCK_OUT' ||
...
@@ -628,41 +655,78 @@
...
@@ -628,41 +655,78 @@
<span
class=
"sub-status-item-label"
>
待同步
</span>
<span
class=
"sub-status-item-label"
>
待同步
</span>
</div>
</div>
</div>
</div>
<div
v-if=
"status === '
EXCEPTION_ORDER1
'"
class=
"sub-status mb-10"
>
<div
v-if=
"status === '
INTERCEPTED
'"
class=
"sub-status mb-10"
>
<div
<div
class=
"sub-status-item"
class=
"sub-status-item"
:class=
"
exceptionStatus
=== 1 ? 'sub-active' : ''"
:class=
"
interceptCurrent
=== 1 ? 'sub-active' : ''"
@
click=
"handle
ExceptionCommand(1
)"
@
click=
"handle
InterceptionCommand(1, 0
)"
>
>
<span
class=
"sub-status-item-label"
>
生产拦截申请
</span>
<span
class=
"sub-status-item-label"
>
生产拦截申请
</span>
<span
v-if=
"interceptionStatus.production['0']"
class=
"tabs-node_count blue"
>
{{ interceptionStatus.production['0'] }}
</span
>
</div>
</div>
<div
<div
class=
"sub-status-item"
class=
"sub-status-item"
:class=
"
exceptionStatus
=== 2 ? 'sub-active' : ''"
:class=
"
interceptCurrent
=== 2 ? 'sub-active' : ''"
@
click=
"handle
ExceptionCommand(2
)"
@
click=
"handle
InterceptionCommand(2, 1
)"
>
>
<span
class=
"sub-status-item-label"
>
生产拦截成功
</span>
<span
class=
"sub-status-item-label"
>
生产拦截成功
</span>
<span
v-if=
"interceptionStatus.production['1']"
class=
"tabs-node_count blue"
>
{{ interceptionStatus.production['1'] }}
</span
>
</div>
</div>
<div
<div
class=
"sub-status-item"
class=
"sub-status-item"
:class=
"exceptionStatus === 3 ? 'sub-active' : ''"
:class=
"interceptCurrent === 3 ? 'sub-active' : ''"
@
click=
"handleExceptionCommand(3)"
@
click=
"handleInterceptionCommand(3, 2)"
>
<span
class=
"sub-status-item-label"
>
生产拦截失败
</span>
<span
v-if=
"interceptionStatus.production['2']"
class=
"tabs-node_count red"
>
{{ interceptionStatus.production['2'] }}
</span
>
>
<span
class=
"sub-status-item-label"
>
生产拦截申请
</span>
</div>
</div>
<div
<div
class=
"sub-status-item"
class=
"sub-status-item"
:class=
"exceptionStatus === 3 ? 'sub-active' : ''"
:class=
"interceptCurrent === 4 ? 'sub-active' : ''"
@
click=
"handleExceptionCommand(3)"
@
click=
"handleInterceptionCommand(4, 2)"
>
<span
class=
"sub-status-item-label"
>
发货拦截申请
</span>
<span
v-if=
"interceptionStatus.shipment['0']"
class=
"tabs-node_count blue"
>
{{ interceptionStatus.shipment['0'] }}
</span
>
>
<span
class=
"sub-status-item-label"
>
生产拦截成功
</span>
</div>
</div>
<div
<div
class=
"sub-status-item"
class=
"sub-status-item"
:class=
"exceptionStatus === 3 ? 'sub-active' : ''"
:class=
"interceptCurrent === 5 ? 'sub-active' : ''"
@
click=
"handleExceptionCommand(3)"
@
click=
"handleInterceptionCommand(5, 3)"
>
<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
>
>
<span
class=
"sub-status-item-label"
>
生产拦截失败
</span>
</div>
</div>
</div>
</div>
<div
<div
...
@@ -680,7 +744,6 @@
...
@@ -680,7 +744,6 @@
<TableView
<TableView
ref=
"tableRef"
ref=
"tableRef"
:columns=
"tableColumns"
:columns=
"tableColumns"
:serial-numberable=
"true"
:selectionable=
"true"
:selectionable=
"true"
:paginated-data=
"tableData"
:paginated-data=
"tableData"
:cell-style=
"onCellStyle"
:cell-style=
"onCellStyle"
...
@@ -688,6 +751,26 @@
...
@@ -688,6 +751,26 @@
:row-style=
"getRowStyle"
:row-style=
"getRowStyle"
@
selection-change=
"handleSelectionChange"
@
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 }"
>
<
template
#
goods=
"{ row }"
>
<div
class=
"goods-info-box"
>
<div
class=
"goods-info-box"
>
<div
class=
"goods-list"
>
<div
class=
"goods-list"
>
...
@@ -1396,6 +1479,23 @@
...
@@ -1396,6 +1479,23 @@
:
image
-
field
=
"'variantImage'"
:
image
-
field
=
"'variantImage'"
@
contextmenu
.
prevent
=
"(v: MouseEvent) => rightClick(v)"
@
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
<
template
#
top_right
#
top_right
v
-
if
=
"['ZPZY', 'CXZY', 'THZY'].includes(cardItem.craftCode as string)"
v
-
if
=
"['ZPZY', 'CXZY', 'THZY'].includes(cardItem.craftCode as string)"
...
@@ -2069,6 +2169,7 @@
...
@@ -2069,6 +2169,7 @@
import
{
getUserMarkList
}
from
'@/api/common'
import
{
getUserMarkList
}
from
'@/api/common'
// import
{
AnyObject
}
from
'@/types/api/warehouse'
// import
{
AnyObject
}
from
'@/types/api/warehouse'
import
{
import
{
InfoFilled
,
ArrowDown
,
ArrowDown
,
CaretBottom
,
CaretBottom
,
CaretTop
,
CaretTop
,
...
@@ -2124,6 +2225,8 @@ import {
...
@@ -2124,6 +2225,8 @@ import {
batchDownloadRecomposingApi
,
batchDownloadRecomposingApi
,
updateToWaitShipmentApi
,
updateToWaitShipmentApi
,
exportPodUSInfo
,
exportPodUSInfo
,
getgetInterceptStateGroupList
,
interceptUpdateApi
,
rejectToApi
,
rejectToApi
,
}
from
'@/api/podUsOrder'
}
from
'@/api/podUsOrder'
import
{
BaseRespData
}
from
'@/types/api'
import
{
BaseRespData
}
from
'@/types/api'
...
@@ -2151,7 +2254,7 @@ import {
...
@@ -2151,7 +2254,7 @@ import {
import
usePageList
from
'@/utils/hooks/usePageList'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
showConfirm
}
from
'@/utils/ui'
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
{
Column
,
ElFormItem
}
from
'element-plus'
import
{
computed
,
onMounted
,
ref
,
nextTick
,
reactive
}
from
'vue'
import
{
computed
,
onMounted
,
ref
,
nextTick
,
reactive
}
from
'vue'
import
FastProduction
from
'./FastProduction.vue'
import
FastProduction
from
'./FastProduction.vue'
...
@@ -2269,6 +2372,13 @@ const searchVisible = ref(false)
...
@@ -2269,6 +2372,13 @@ const searchVisible = ref(false)
const
confirmSelectionData
=
ref
<
LogisticsData
[]
>
([])
const
confirmSelectionData
=
ref
<
LogisticsData
[]
>
([])
const
confirmRowData
=
ref
<
ProductList
|
null
>
(
null
)
const
confirmRowData
=
ref
<
ProductList
|
null
>
(
null
)
const
status
=
ref
(
localStorage
.
getItem
(
'podUsStatus'
)
||
'TO_BE_CONFIRMED'
)
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
detailData
=
ref
({
}
)
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
SearchForm
>
({
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
SearchForm
>
({
...
@@ -2297,6 +2407,8 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({
...
@@ -2297,6 +2407,8 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({
thirdStockSku
:
''
,
thirdStockSku
:
''
,
}
)
}
)
const
exceptionStatus
=
ref
(
1
)
const
exceptionStatus
=
ref
(
1
)
const
interceptCurrent
=
ref
(
1
)
const
interceptStatus
=
ref
(
0
)
const
userMarkList
=
ref
<
string
[]
>
([])
const
userMarkList
=
ref
<
string
[]
>
([])
const
selection
=
ref
<
PodUsOrderListData
[]
>
([])
const
selection
=
ref
<
PodUsOrderListData
[]
>
([])
const
pickerOptions
=
{
const
pickerOptions
=
{
...
@@ -2581,6 +2693,13 @@ const tableColumns = computed(() => {
...
@@ -2581,6 +2693,13 @@ const tableColumns = computed(() => {
}
}
return
[
return
[
{
{
label
:
'序号'
,
prop
:
'serialNumber'
,
slot
:
'serialNumber'
,
width
:
60
,
align
:
'center'
,
}
,
{
label
:
'商品'
,
label
:
'商品'
,
prop
:
'goods'
,
prop
:
'goods'
,
slot
:
'goods'
,
slot
:
'goods'
,
...
@@ -2685,6 +2804,12 @@ const asyncOrderAddress = async () => {
...
@@ -2685,6 +2804,12 @@ const asyncOrderAddress = async () => {
const
changeTab
=
(
item
:
Tab
)
=>
{
const
changeTab
=
(
item
:
Tab
)
=>
{
status
.
value
=
item
.
status
||
''
status
.
value
=
item
.
status
||
''
localStorage
.
setItem
(
'podUsStatus'
,
item
.
status
as
string
)
localStorage
.
setItem
(
'podUsStatus'
,
item
.
status
as
string
)
// 如果切换到INTERCEPTED状态,设置默认的exceptionStatus
if
(
item
.
status
===
'INTERCEPTED'
&&
!
interceptCurrent
.
value
)
{
interceptCurrent
.
value
=
1
}
selection
.
value
=
[]
selection
.
value
=
[]
cardSelection
.
value
=
[]
cardSelection
.
value
=
[]
stockOutSuccessIds
.
value
=
[]
stockOutSuccessIds
.
value
=
[]
...
@@ -2707,10 +2832,46 @@ const onCellClassName = ({ column }: { column: Column }) => {
...
@@ -2707,10 +2832,46 @@ const onCellClassName = ({ column }: { column: Column }) => {
return
'exception-reason'
return
'exception-reason'
}
}
}
}
// 获取Tab信息
const
loadTabData
=
async
()
=>
{
const
loadTabData
=
async
()
=>
{
try
{
try
{
const
res
=
await
getOrderTabData
()
const
res
=
await
getOrderTabData
()
tabsNav
.
value
=
res
.
data
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
)
{
}
catch
(
error
)
{
// showError(error)
// showError(error)
}
}
...
@@ -2758,11 +2919,13 @@ const {
...
@@ -2758,11 +2919,13 @@ const {
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
timeRange
.
value
[
1
]
?
timeRange
.
value
[
1
]
:
null
,
:
null
,
status
:
status
.
value
,
status
:
status
.
value
===
'INTERCEPTED'
?
''
:
status
.
value
,
exceptionHandling
:
exceptionHandling
:
status
.
value
===
'EXCEPTION_ORDER'
status
.
value
===
'EXCEPTION_ORDER'
?
exceptionStatus
.
value
||
undefined
?
exceptionStatus
.
value
||
undefined
:
undefined
,
:
undefined
,
interceptStatus
:
status
.
value
===
'INTERCEPTED'
?
interceptStatus
.
value
:
''
,
}
,
}
,
page
,
page
,
pageSize
,
pageSize
,
...
@@ -2780,6 +2943,7 @@ const {
...
@@ -2780,6 +2943,7 @@ const {
?
timeRange
.
value
[
1
]
?
timeRange
.
value
[
1
]
:
null
,
:
null
,
status
:
status
.
value
,
status
:
status
.
value
,
interceptStatus
:
''
,
}
,
}
,
page
,
page
,
pageSize
,
pageSize
,
...
@@ -4306,6 +4470,14 @@ const handleExceptionCommand = (command: number) => {
...
@@ -4306,6 +4470,14 @@ const handleExceptionCommand = (command: number) => {
exceptionStatus
.
value
=
command
exceptionStatus
.
value
=
command
search
()
search
()
}
}
// 拦截分页
const
handleInterceptionCommand
=
(
current
:
number
,
command
:
number
)
=>
{
interceptCurrent
.
value
=
current
interceptStatus
.
value
=
command
search
()
loadTabData
()
}
const
applyForReplenishment
=
async
(
row
:
ProductList
|
undefined
)
=>
{
const
applyForReplenishment
=
async
(
row
:
ProductList
|
undefined
)
=>
{
if
(
!
row
)
{
if
(
!
row
)
{
if
(
cardSelection
.
value
.
length
===
0
)
{
if
(
cardSelection
.
value
.
length
===
0
)
{
...
@@ -4488,6 +4660,54 @@ const handleBeforeRouteLeave = (
...
@@ -4488,6 +4660,54 @@ const handleBeforeRouteLeave = (
next
()
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
)
=>
{
useRouter
().
beforeEach
((
to
,
from
,
next
)
=>
{
handleBeforeRouteLeave
(
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