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
b3d76d62
Commit
b3d76d62
authored
Dec 29, 2018
by
LiuJunYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员退款排序
parent
ea53db5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
1 deletions
+109
-1
application/admin/controller/Order.php
+3
-1
application/admin/view/order/cardorderlist.html
+106
-0
No files found.
application/admin/controller/Order.php
View file @
b3d76d62
...
...
@@ -345,7 +345,9 @@ class Order extends AuthBase
$query
->
where
(
'phone'
,
'like'
,
"%"
.
trim
(
input
(
'phone'
))
.
"%"
);
}
$query
->
where
(
'type'
,
2
)
->
where
(
'status'
,
1
);
})
->
paginate
(
15
,
false
,
[
})
->
order
(
'id'
,
'desc'
)
->
paginate
(
15
,
false
,
[
'query'
=>
$_GET
]);
return
$this
->
fetch
(
''
,
compact
(
'list'
));
...
...
application/admin/view/order/cardorderlist.html
0 → 100644
View file @
b3d76d62
{layout name="public/layout_main"}
<section
class=
"wrapper"
>
<h3><i
class=
"fa fa-angle-right"
></i>
订单管理
</h3>
<!-- 分割线 -->
<hr>
<div
class=
"row margin-bottom"
>
<div
class=
"col-md-12"
>
<form
class=
"form-inline pull-left"
method=
"GET"
action=
""
>
<div
class=
"form-group margin-right"
>
<input
class=
"form-control"
type=
"text"
name=
"phone"
value=
"{:input('phone')}"
placeholder=
"用户手机号"
/>
</div>
<div
class=
"form-group margin-right"
>
<label
for=
""
>
下单时间:
</label>
<input
class=
"form-control"
type=
"date"
name=
"start_time"
id=
"start_time"
value=
"{:input('start_time')}"
placeholder=
"起始"
/>
--
<input
class=
"form-control"
type=
"date"
name=
"end_time"
id=
"end_time"
value=
"{:input('end_time')}"
placeholder=
"结束"
/>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
搜索
</button>
</form>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<th>
UID
</th>
<th>
订单名称
</th>
<th>
订单号
</th>
<th>
昵称
</th>
<th>
微信号
</th>
<th>
手机号
</th>
<th>
购买时间(年)
</th>
<th>
总价
</th>
<th>
会员到期时间
</th>
<th>
退款金额
</th>
<th>
下单时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
{volist name="list" id="v" key="k" empty="暂时没有数据"}
<tr
data-id=
"{$v->id}"
>
<td>
{$v->id}
</td>
<td>
{$v->title}
</td>
<td>
{$v->out_trade_no}
</td>
<td>
<img
src=
"{$v['userinfo']['avatar']}"
onerror=
"this.src='/static/img/default_avatar.png'"
alt=
""
style=
"width:40px;margin-right: 5px"
>
{$v['userinfo']['nickname']}
</td>
<td>
{$v['userinfo']['wx_number']}
</td>
<td>
{$v['userinfo']['phone']}
</td>
<td>
{$v['extras']['year']}
</td>
<td>
{$v->total_fee}
</td>
<td>
{$v['userinfo']['vip_endtime']}
</td>
<td>
<input
type=
"number"
name=
"price"
value=
"{$v->total_fee}"
class=
"form-control"
style=
"width: 100px;"
>
</td>
<td>
{$v->created_at}
</td>
<td>
<button
class=
"btn btn-primary refund"
>
退款
</button>
</td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
{$list->render()}
</div>
</div>
</section>
<script
src=
"/static/layer/layer.js"
></script>
<script
type=
"text/javascript"
>
// 文档加载完毕之后,会进入该方法
$
(
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
();
}
});
});
});
</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