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
d5ac8e57
Commit
d5ac8e57
authored
Feb 06, 2026
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单的loading放在点击原因弹窗后
parent
166291a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
43 deletions
+41
-43
src/views/order/podCN/index.vue
+21
-21
src/views/order/podUs/index.vue
+20
-22
No files found.
src/views/order/podCN/index.vue
View file @
d5ac8e57
...
...
@@ -3619,38 +3619,40 @@ const interceptChange = async (status: boolean) => {
}
}
const
rejectOrder
=
async
(
type
:
string
)
=>
{
if
(
selection
.
value
.
length
===
0
&&
cardSelection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
const
targets
=
selection
.
value
.
length
?
selection
.
value
.
flatMap
((
v
:
PodCnOrderListData
)
=>
v
.
productList
||
[])
:
cardSelection
.
value
if
(
!
targets
.
length
)
return
ElMessage
.
warning
(
'请选择数据'
)
let
reason
=
''
try
{
const
{
value
}
=
await
ElMessageBox
.
prompt
(
'驳回确认'
,
{
const
{
value
}
=
await
ElMessageBox
.
prompt
<
string
>
(
'驳回确认'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputPlaceholder
:
'驳回原因'
,
inputPattern
:
/
\S
+/
,
// 非空验证,至少一个非空白字符
inputPattern
:
/
\S
+/
,
inputErrorMessage
:
'内容不能为空'
,
}
)
reason
=
value
.
trim
()
}
catch
{
return
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
rejectToApi
({
orderStatus
:
type
,
productList
:
selection
.
value
.
length
?
selection
.
value
.
flatMap
(
(
item
:
PodCnOrderListData
)
=>
item
.
productList
||
[],
)
:
cardSelection
.
value
,
reasonStr
:
value
,
productList
:
targets
,
reasonStr
:
reason
,
}
)
if
(
res
.
code
!==
200
)
return
resultInfo
.
value
=
res
.
data
resultInfo
.
value
=
resultInfo
.
value
.
filter
((
item
)
=>
!
item
.
status
)
if
(
res
.
code
!==
200
)
return
resultInfo
.
value
=
(
res
.
data
||
[])
.
filter
((
item
)
=>
!
item
.
status
)
if
(
!
resultInfo
.
value
.
length
)
{
ElMessage
.
success
(
'操作成功'
)
search
()
...
...
@@ -3658,8 +3660,6 @@ const rejectOrder = async (type: string) => {
}
else
{
resultRefs
.
value
?.
showDialog
()
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
finally
{
loading
.
close
()
}
...
...
src/views/order/podUs/index.vue
View file @
d5ac8e57
...
...
@@ -5594,38 +5594,38 @@ const getOrderByIdApi = async (type: string) => {
// 驳回
const
rejectOrder
=
async
(
type
:
string
)
=>
{
if
(
selection
.
value
.
length
===
0
&&
cardSelection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
const
targets
=
selection
.
value
.
length
?
selection
.
value
.
flatMap
((
v
:
PodUsOrderListData
)
=>
v
.
productList
||
[])
:
cardSelection
.
value
if
(
!
targets
.
length
)
return
ElMessage
.
warning
(
'请选择数据'
)
let
reason
=
''
try
{
const
{
value
}
=
await
ElMessageBox
.
prompt
(
'驳回确认'
,
{
const
{
value
}
=
await
ElMessageBox
.
prompt
<
string
>
(
'驳回确认'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputPlaceholder
:
'驳回原因'
,
inputPattern
:
/
\S
+/
,
// 非空验证,至少一个非空白字符
inputPattern
:
/
\S
+/
,
inputErrorMessage
:
'内容不能为空'
,
}
)
reason
=
value
.
trim
()
}
catch
{
return
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
rejectToApi
({
orderStatus
:
type
,
productList
:
selection
.
value
.
length
?
selection
.
value
.
flatMap
(
(
item
:
PodUsOrderListData
)
=>
item
.
productList
||
[],
)
:
cardSelection
.
value
,
reasonStr
:
value
,
productList
:
targets
,
reasonStr
:
reason
,
}
)
if
(
res
.
code
!==
200
)
return
resultInfo
.
value
=
res
.
data
resultInfo
.
value
=
resultInfo
.
value
.
filter
((
item
)
=>
!
item
.
status
)
resultInfo
.
value
=
(
res
.
data
||
[]).
filter
((
item
)
=>
!
item
.
status
)
if
(
!
resultInfo
.
value
.
length
)
{
ElMessage
.
success
(
'操作成功'
)
search
()
...
...
@@ -5633,8 +5633,6 @@ const rejectOrder = async (type: string) => {
}
else
{
resultRefs
.
value
?.
showDialog
()
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
finally
{
loading
.
close
()
}
...
...
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