Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_web
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_web
Commits
6d8a5dcd
Commit
6d8a5dcd
authored
Mar 05, 2024
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改退款操作:优化信息提示及弹框提示
parent
d3a317f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
11 deletions
+41
-11
index.vue
src/views/system/order/index.vue
+41
-11
No files found.
src/views/system/order/index.vue
View file @
6d8a5dcd
...
...
@@ -489,6 +489,13 @@
:
closable
=
"false"
show
-
icon
>
<
/el-alert
>
<
el
-
alert
title
=
"2: 请您仔细填写并核对退款数据,一旦退款成功,数据不可修改!"
type
=
"error"
:
closable
=
"false"
show
-
icon
>
<
/el-alert
>
<
el
-
divider
><
/el-divider
>
<
el
-
row
:
gutter
=
"20"
>
<
el
-
col
:
span
=
"12"
>
...
...
@@ -529,7 +536,7 @@
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"退款金额"
prop
=
"amount"
>
<
el
-
input
v
-
model
=
"refundForm.amount"
type
=
"number"
/>
<
el
-
input
v
-
model
=
"refundForm.amount"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -588,6 +595,13 @@ export default {
name
:
"Order"
,
dicts
:
[
'sys_normal_disable'
,
'store_order_type'
,
'store_coupon_type'
,
'store_is_use_coupon'
,
'store_order_status'
,
'store_pay_ways'
,
'order_pay_status'
,
'order_status_admin'
],
data
()
{
const
equalToPayAmount
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
refundForm
.
payAmount
<
value
)
{
callback
(
new
Error
(
"退款金额不能大于实际支付金额"
));
}
else
{
callback
();
}
}
;
return
{
repealOpen
:
false
,
repealForm
:{
...
...
@@ -682,7 +696,15 @@ export default {
// 表单校验
refundRules
:
{
amount
:
[
{
required
:
true
,
message
:
"退款金额不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"退款金额不能为空"
,
trigger
:
"blur"
}
,
{
required
:
true
,
validator
:
equalToPayAmount
,
trigger
:
"blur"
}
,
{
pattern
:
/^
[
0-9
]
+
(\.[
0-9
]
{0,2
}
)?
$/
,
message
:
"退款金额必须填写大于等于0的整数或两位以内的小数"
}
,
],
refundCoupon
:
[
{
required
:
true
,
message
:
"请选择是否退优惠券"
,
trigger
:
"change"
}
],
isClean
:
[
{
required
:
true
,
message
:
"请选择是否生成保洁任务"
,
trigger
:
"change"
}
]
}
,
}
;
...
...
@@ -823,8 +845,8 @@ export default {
couponAmount
:
null
,
payAmount
:
null
,
amount
:
null
,
refundCoupon
:
'0'
,
isClean
:
'0'
,
refundCoupon
:
null
,
isClean
:
null
,
refundReason
:
null
,
orderStatus
:
null
}
...
...
@@ -919,8 +941,8 @@ export default {
}
this
.
refundForm
.
payAmount
=
row
.
payPrice
;
this
.
refundForm
.
amount
=
row
.
payPrice
?
row
.
payPrice
:
0
;
this
.
refundForm
.
refundCoupon
=
'0'
;
this
.
refundForm
.
isClean
=
'0'
;
//
this.refundForm.refundCoupon = '0';
//
this.refundForm.isClean = '0';
}
,
// 字典翻译
orderStatusFormat
(
value
)
{
...
...
@@ -928,13 +950,21 @@ export default {
}
,
/** 退款提交按钮操作 */
submitRefundForm
()
{
let
that
=
this
;
this
.
$refs
[
"refundForm"
].
validate
(
valid
=>
{
if
(
valid
)
{
refund
(
this
.
refundForm
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"退款成功"
);
this
.
refundOpen
=
false
;
this
.
getList
();
}
);
this
.
$modal
.
confirm
(
'请您仔细核对退款数据,一旦退款成功,数据不可修改!'
).
then
(
function
()
{
return
refund
(
that
.
refundForm
);
}
).
then
(()
=>
{
that
.
refundOpen
=
false
;
that
.
getList
();
that
.
$modal
.
msgSuccess
(
"退款成功"
);
}
).
catch
(()
=>
{
}
);
// refund(this.refundForm).then(response =>
{
// this.$modal.msgSuccess("退款成功");
// this.refundOpen = false;
// this.getList();
//
}
);
}
}
)
}
...
...
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