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
b6f3afae
Commit
b6f3afae
authored
Jun 22, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 工厂接单后取消的退款逻辑 #1005797
parent
2219553e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
src/api/factoryOrderNew.ts
+1
-1
src/views/order/factoryOrderNew/index.vue
+17
-17
No files found.
src/api/factoryOrderNew.ts
View file @
b6f3afae
...
@@ -655,7 +655,7 @@ export function interceptUpdateApi(ids: (string | number)[]) {
...
@@ -655,7 +655,7 @@ export function interceptUpdateApi(ids: (string | number)[]) {
}
}
export
function
interceptSuccessApi
(
export
function
interceptSuccessApi
(
data
:
{
factoryOrderNumber
:
string
;
suspendSuss
essType
:
number
}[],
data
:
{
factoryOrderNumber
:
string
;
blockSucc
essType
:
number
}[],
)
{
)
{
return
axios
.
post
<
never
,
BaseRespData
<
ResultInfoDataItem
[]
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
ResultInfoDataItem
[]
>>
(
'factory/podOrder/factoryOrderBlockSuccess'
,
'factory/podOrder/factoryOrderBlockSuccess'
,
...
...
src/views/order/factoryOrderNew/index.vue
View file @
b6f3afae
...
@@ -646,12 +646,12 @@
...
@@ -646,12 +646,12 @@
<
/span
>
<
/span
>
<
span
v
-
if
=
"suspendedSubTab === 1"
class
=
"item"
>
<
span
v
-
if
=
"suspendedSubTab === 1"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"() => handleInterceptionSuccess()"
<
ElButton
type
=
"success"
@
click
=
"() => handleInterceptionSuccess()"
>
拦截成功
<
/ElButto
n
>
处理拦截
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"suspendedSubTab === 1"
class
=
"item"
>
<
span
v
-
if
=
"suspendedSubTab === 1"
class
=
"item"
>
<
ElButton
type
=
"danger"
@
click
=
"() => handleInterceptionFail()"
<
ElButton
type
=
"danger"
@
click
=
"() => handleInterceptionFail()"
>
拦截失败
<
/ElButto
n
>
取消拦截
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
class
=
"item"
>
<
span
class
=
"item"
>
...
@@ -888,7 +888,7 @@
...
@@ -888,7 +888,7 @@
size
=
"small"
size
=
"small"
@
click
.
stop
=
"handleInterceptionSuccess(row)"
@
click
.
stop
=
"handleInterceptionSuccess(row)"
>
>
拦截成功
处理拦截
<
/ElButton
>
<
/ElButton
>
<
/span
>
<
/span
>
<
span
<
span
...
@@ -901,7 +901,7 @@
...
@@ -901,7 +901,7 @@
size
=
"small"
size
=
"small"
@
click
.
stop
=
"handleInterceptionFail(row)"
@
click
.
stop
=
"handleInterceptionFail(row)"
>
>
拦截失败
取消拦截
<
/ElButton
>
<
/ElButton
>
<
/span
>
<
/span
>
<
/div
>
<
/div
>
...
@@ -1107,24 +1107,24 @@
...
@@ -1107,24 +1107,24 @@
/>
/>
<
ElDialog
<
ElDialog
v
-
model
=
"interceptSuccessDialogVisible"
v
-
model
=
"interceptSuccessDialogVisible"
title
=
"
拦截成功
"
title
=
"
处理拦截
"
width
=
"480px"
width
=
"480px"
:
close
-
on
-
click
-
modal
=
"false"
:
close
-
on
-
click
-
modal
=
"false"
>
>
<
ElForm
ref
=
"interceptSuccessFormRef"
:
model
=
"interceptSuccessForm"
>
<
ElForm
ref
=
"interceptSuccessFormRef"
:
model
=
"interceptSuccessForm"
>
<
ElFormItem
<
ElFormItem
label
=
"
拦截成功
类型"
label
=
"
处理拦截
类型"
prop
=
"
suspendSuss
essType"
prop
=
"
blockSucc
essType"
:
rules
=
"[
:
rules
=
"[
{
{
required: true,
required: true,
message: '请选择
拦截成功
类型',
message: '请选择
处理拦截
类型',
trigger: 'change',
trigger: 'change',
}
,
}
,
]"
]"
>
>
<
ElSelect
<
ElSelect
v
-
model
=
"interceptSuccessForm.
suspendSuss
essType"
v
-
model
=
"interceptSuccessForm.
blockSucc
essType"
placeholder
=
"请选择"
placeholder
=
"请选择"
style
=
"width: 100%"
style
=
"width: 100%"
clearable
clearable
...
@@ -1299,8 +1299,8 @@ const interceptSuccessTypeOptions = [
...
@@ -1299,8 +1299,8 @@ const interceptSuccessTypeOptions = [
{
label
:
'生产拦截成功'
,
value
:
1
}
,
{
label
:
'生产拦截成功'
,
value
:
1
}
,
{
label
:
'发货拦截成功'
,
value
:
2
}
,
{
label
:
'发货拦截成功'
,
value
:
2
}
,
]
]
const
interceptSuccessForm
=
ref
<
{
suspendSuss
essType
:
number
|
undefined
}
>
({
const
interceptSuccessForm
=
ref
<
{
blockSucc
essType
:
number
|
undefined
}
>
({
suspendSuss
essType
:
undefined
,
blockSucc
essType
:
undefined
,
}
)
}
)
const
interceptSuccessRows
=
ref
<
FactoryOrderNewListData
[]
>
([])
const
interceptSuccessRows
=
ref
<
FactoryOrderNewListData
[]
>
([])
const
sizes
=
[
'FS'
,
'XS'
,
'S'
,
'M'
,
'L'
,
'XL'
,
'XXL'
,
'3XL'
,
'4XL'
,
'5XL'
]
const
sizes
=
[
'FS'
,
'XS'
,
'S'
,
'M'
,
'L'
,
'XL'
,
'XXL'
,
'3XL'
,
'4XL'
,
'5XL'
]
...
@@ -3102,7 +3102,7 @@ const handleInterceptionSuccess = (row?: FactoryOrderNewListData) => {
...
@@ -3102,7 +3102,7 @@ const handleInterceptionSuccess = (row?: FactoryOrderNewListData) => {
if
(
!
ensureSelection
())
return
if
(
!
ensureSelection
())
return
interceptSuccessRows
.
value
=
[...
selectedRows
.
value
]
interceptSuccessRows
.
value
=
[...
selectedRows
.
value
]
}
}
interceptSuccessForm
.
value
.
suspendSuss
essType
=
undefined
interceptSuccessForm
.
value
.
blockSucc
essType
=
undefined
interceptSuccessDialogVisible
.
value
=
true
interceptSuccessDialogVisible
.
value
=
true
nextTick
(()
=>
interceptSuccessFormRef
.
value
?.
clearValidate
())
nextTick
(()
=>
interceptSuccessFormRef
.
value
?.
clearValidate
())
}
}
...
@@ -3115,8 +3115,8 @@ const submitInterceptSuccess = async () => {
...
@@ -3115,8 +3115,8 @@ const submitInterceptSuccess = async () => {
}
catch
{
}
catch
{
return
return
}
}
const
suspendSussessType
=
interceptSuccessForm
.
value
.
suspendSuss
essType
const
blockSuccessType
=
interceptSuccessForm
.
value
.
blockSucc
essType
if
(
suspendSuss
essType
===
undefined
)
return
if
(
blockSucc
essType
===
undefined
)
return
const
loading
=
ElLoading
.
service
({
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
fullscreen
:
true
,
...
@@ -3127,9 +3127,9 @@ const submitInterceptSuccess = async () => {
...
@@ -3127,9 +3127,9 @@ const submitInterceptSuccess = async () => {
const
data
=
rows
.
map
((
item
:
FactoryOrderNewListData
)
=>
{
const
data
=
rows
.
map
((
item
:
FactoryOrderNewListData
)
=>
{
return
{
return
{
factoryOrderNumber
:
item
.
factoryOrderNumber
as
string
,
factoryOrderNumber
:
item
.
factoryOrderNumber
as
string
,
suspendSuss
essType
,
blockSucc
essType
,
}
}
}
)
as
{
factoryOrderNumber
:
string
;
suspendSuss
essType
:
number
}
[]
}
)
as
{
factoryOrderNumber
:
string
;
blockSucc
essType
:
number
}
[]
try
{
try
{
const
res
=
await
interceptSuccessApi
(
data
)
const
res
=
await
interceptSuccessApi
(
data
)
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
...
@@ -3155,7 +3155,7 @@ const handleInterceptionFail = async (row?: FactoryOrderNewListData) => {
...
@@ -3155,7 +3155,7 @@ const handleInterceptionFail = async (row?: FactoryOrderNewListData) => {
item
.
factoryOrderNumber
as
string
,
item
.
factoryOrderNumber
as
string
,
),
),
api
:
(
ids
)
=>
interceptUpdateApi
(
ids
as
string
[]),
api
:
(
ids
)
=>
interceptUpdateApi
(
ids
as
string
[]),
confirmText
:
'
拦截失败
,订单会恢复到拦截前的状态,确认是否拒绝拦截申请?'
,
confirmText
:
'
取消拦截
,订单会恢复到拦截前的状态,确认是否拒绝拦截申请?'
,
onSuccess
:
(
res
)
=>
{
onSuccess
:
(
res
)
=>
{
const
data
=
Array
.
isArray
(
res
.
data
)
const
data
=
Array
.
isArray
(
res
.
data
)
?
(
res
.
data
as
ResultInfoDataItem
[])
?
(
res
.
data
as
ResultInfoDataItem
[])
...
...
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