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 @@
...
@@ -489,6 +489,13 @@
:
closable
=
"false"
:
closable
=
"false"
show
-
icon
>
show
-
icon
>
<
/el-alert
>
<
/el-alert
>
<
el
-
alert
title
=
"2: 请您仔细填写并核对退款数据,一旦退款成功,数据不可修改!"
type
=
"error"
:
closable
=
"false"
show
-
icon
>
<
/el-alert
>
<
el
-
divider
><
/el-divider
>
<
el
-
divider
><
/el-divider
>
<
el
-
row
:
gutter
=
"20"
>
<
el
-
row
:
gutter
=
"20"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
...
@@ -529,7 +536,7 @@
...
@@ -529,7 +536,7 @@
<
/el-col
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"退款金额"
prop
=
"amount"
>
<
el
-
form
-
item
label
=
"退款金额"
prop
=
"amount"
>
<
el
-
input
v
-
model
=
"refundForm.amount"
type
=
"number"
/>
<
el
-
input
v
-
model
=
"refundForm.amount"
/>
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
...
@@ -588,6 +595,13 @@ export default {
...
@@ -588,6 +595,13 @@ export default {
name
:
"Order"
,
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'
],
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
()
{
data
()
{
const
equalToPayAmount
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
refundForm
.
payAmount
<
value
)
{
callback
(
new
Error
(
"退款金额不能大于实际支付金额"
));
}
else
{
callback
();
}
}
;
return
{
return
{
repealOpen
:
false
,
repealOpen
:
false
,
repealForm
:{
repealForm
:{
...
@@ -682,7 +696,15 @@ export default {
...
@@ -682,7 +696,15 @@ export default {
// 表单校验
// 表单校验
refundRules
:
{
refundRules
:
{
amount
:
[
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 {
...
@@ -823,8 +845,8 @@ export default {
couponAmount
:
null
,
couponAmount
:
null
,
payAmount
:
null
,
payAmount
:
null
,
amount
:
null
,
amount
:
null
,
refundCoupon
:
'0'
,
refundCoupon
:
null
,
isClean
:
'0'
,
isClean
:
null
,
refundReason
:
null
,
refundReason
:
null
,
orderStatus
:
null
orderStatus
:
null
}
}
...
@@ -919,8 +941,8 @@ export default {
...
@@ -919,8 +941,8 @@ export default {
}
}
this
.
refundForm
.
payAmount
=
row
.
payPrice
;
this
.
refundForm
.
payAmount
=
row
.
payPrice
;
this
.
refundForm
.
amount
=
row
.
payPrice
?
row
.
payPrice
:
0
;
this
.
refundForm
.
amount
=
row
.
payPrice
?
row
.
payPrice
:
0
;
this
.
refundForm
.
refundCoupon
=
'0'
;
//
this.refundForm.refundCoupon = '0';
this
.
refundForm
.
isClean
=
'0'
;
//
this.refundForm.isClean = '0';
}
,
}
,
// 字典翻译
// 字典翻译
orderStatusFormat
(
value
)
{
orderStatusFormat
(
value
)
{
...
@@ -928,13 +950,21 @@ export default {
...
@@ -928,13 +950,21 @@ export default {
}
,
}
,
/** 退款提交按钮操作 */
/** 退款提交按钮操作 */
submitRefundForm
()
{
submitRefundForm
()
{
let
that
=
this
;
this
.
$refs
[
"refundForm"
].
validate
(
valid
=>
{
this
.
$refs
[
"refundForm"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
refund
(
this
.
refundForm
).
then
(
response
=>
{
this
.
$modal
.
confirm
(
'请您仔细核对退款数据,一旦退款成功,数据不可修改!'
).
then
(
function
()
{
this
.
$modal
.
msgSuccess
(
"退款成功"
);
return
refund
(
that
.
refundForm
);
this
.
refundOpen
=
false
;
}
).
then
(()
=>
{
this
.
getList
();
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