Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
backend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
backend
Commits
6e3716a1
Commit
6e3716a1
authored
Dec 29, 2018
by
LiuJunYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申请退款加弹窗,和修复金额大小BUG
parent
2b80549a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
application/admin/controller/Order.php
+1
-1
application/admin/view/order/cardorderlist.html
+13
-9
No files found.
application/admin/controller/Order.php
View file @
6e3716a1
...
...
@@ -362,7 +362,7 @@ class Order extends AuthBase
return
json
([
'code'
=>
1
,
'msg'
=>
'退款异常,请刷新页面重试!'
]);
}
//查看是否超过退款金额
if
(
$order
[
'total_fee'
]
>
input
(
'price'
))
{
if
(
$order
[
'total_fee'
]
<
input
(
'price'
))
{
return
json
([
'code'
=>
1
,
'msg'
=>
'超过退款金额'
]);
}
Db
::
startTrans
();
...
...
application/admin/view/order/cardorderlist.html
View file @
6e3716a1
...
...
@@ -90,17 +90,21 @@
// 文档加载完毕之后,会进入该方法
$
(
function
()
{
$
(
'.refund'
).
click
(
function
(){
layer
.
load
(
2
);
let
id
=
$
(
this
).
closest
(
'tr'
).
attr
(
'data-id'
)
let
price
=
$
(
this
).
closest
(
'tr'
).
find
(
'input'
).
val
()
let
that
=
this
$
.
post
(
"{:url('cardRefund')}"
,{
id
:
id
,
price
:
price
},
function
(
res
)
{
layer
.
closeAll
()
layer
.
msg
(
res
.
msg
)
if
(
res
.
code
===
0
){
$
(
that
).
closest
(
'tr'
).
remove
();
}
layer
.
confirm
(
'确认退款?'
,
function
(
index
){
layer
.
close
(
index
)
layer
.
load
(
2
);
let
id
=
$
(
that
).
closest
(
'tr'
).
attr
(
'data-id'
)
let
price
=
$
(
that
).
closest
(
'tr'
).
find
(
'input'
).
val
()
$
.
post
(
"{:url('cardRefund')}"
,{
id
:
id
,
price
:
price
},
function
(
res
)
{
layer
.
closeAll
()
layer
.
msg
(
res
.
msg
)
if
(
res
.
code
===
0
){
$
(
that
).
closest
(
'tr'
).
remove
();
}
});
});
});
});
</script>
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