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
4bc09007
Commit
4bc09007
authored
Dec 18, 2018
by
LiuJunYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单修改状态
parent
dca5bec1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
15 deletions
+58
-15
application/admin/controller/Order.php
+17
-2
application/admin/view/order/index.html
+41
-13
No files found.
application/admin/controller/Order.php
View file @
4bc09007
...
...
@@ -3,6 +3,7 @@
namespace
app\admin\controller
;
use
app\admin\controller\AuthBase
;
use
app\common\model\Orders
;
use
app\common\model\Refund
;
use
app\common\utils\WXSendMessage
;
use
think\Db
;
...
...
@@ -52,8 +53,8 @@ class Order extends AuthBase
$condition
[
'created_at'
]
=
[
'<'
,
$end_time
.
' 00:00:00'
];
}
}
if
(
input
(
'get.title'
))
{
$condition
[
'title'
]
=
[
'like'
,
'%'
.
input
(
'get.title'
)
.
'%'
];
if
(
input
(
'get.title'
))
{
$condition
[
'title'
]
=
[
'like'
,
'%'
.
input
(
'get.title'
)
.
'%'
];
}
//根据筛选条件查询
$order_list
=
$this
->
order_model
->
with
([
'project'
=>
function
(
$query
)
{
...
...
@@ -310,4 +311,18 @@ class Order extends AuthBase
$order
->
save
();
return
[
'code'
=>
0
,
'msg'
=>
'驳回成功'
];
}
//修改带评论状态
public
function
modiflyComment
()
{
try
{
Orders
::
update
([
'id'
=>
input
(
'id'
),
'status'
=>
2
]);
return
[
'code'
=>
0
,
'msg'
=>
'操作成功'
];
}
catch
(
Exception
$e
)
{
return
[
'code'
=>
1
,
'msg'
=>
'操作失败'
];
}
}
}
application/admin/view/order/index.html
View file @
4bc09007
...
...
@@ -7,31 +7,41 @@
<div
class=
"row margin-bottom"
>
<div
class=
"col-md-12"
>
<form
class=
"form-inline pull-left"
method=
"GET"
id=
"order-search"
action=
"<?php echo url('@admin/order/index')?>"
>
<form
class=
"form-inline pull-left"
method=
"GET"
id=
"order-search"
action=
"<?php echo url('@admin/order/index')?>"
>
<div
class=
"form-group margin-right"
>
<input
class=
"form-control"
type=
"text"
name=
"title"
value=
"{:input('title')}"
placeholder=
"活动名称"
/>
</div>
<div
class=
"form-group margin-right"
>
<select
name=
"status"
class=
"form-control"
id=
"status"
>
<option
value=
"-1"
{
if
condition=
"$status=='-1'"
}
selected
{/
if
}
>
全部订单状态
</option>
<option
value=
"0"
{
if
condition=
"$status=='0'"
}
selected
{/
if
}
>
未付款
</option>
<option
value=
"1"
{
if
condition=
"$status=='1'"
}
selected
{/
if
}
>
进行中
</option>
<option
value=
"2"
{
if
condition=
"$status=='2'"
}
selected
{/
if
}
>
待评价
</option>
<option
value=
"3"
{
if
condition=
"$status=='3'"
}
selected
{/
if
}
>
已完成
</option>
<option
value=
"-1"
{
if
condition=
"$status=='-1'"
}
selected
{
/
if
}
>
全部订单状态
</option>
<option
value=
"0"
{
if
condition=
"$status=='0'"
}
selected
{
/
if
}
>
未付款
</option>
<option
value=
"1"
{
if
condition=
"$status=='1'"
}
selected
{
/
if
}
>
进行中
</option>
<option
value=
"2"
{
if
condition=
"$status=='2'"
}
selected
{
/
if
}
>
待评价
</option>
<option
value=
"3"
{
if
condition=
"$status=='3'"
}
selected
{
/
if
}
>
已完成
</option>
</select>
</div>
<div
class=
"form-group margin-right"
>
<select
name=
"type"
class=
"form-control"
id=
"type"
>
<option
value=
""
>
全部订单类型
</option>
<option
value=
"1"
{
if
condition=
"input('type')=='1'"
}
selected
{/
if
}
>
活动报名订单
</option>
<option
value=
"2"
{
if
condition=
"input('type')=='2'"
}
selected
{/
if
}
>
购买会员卡订单
</option>
<option
value=
"1"
{
if
condition=
"input('type')=='1'"
}
selected
{
/
if
}
>
活动报名订单
</option>
<option
value=
"2"
{
if
condition=
"input('type')=='2'"
}
selected
{
/
if
}
>
购买会员卡订单
</option>
</select>
</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=
"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=
"结束"
/>
<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>
...
...
@@ -56,6 +66,7 @@
<th>
退款状态
</th>
<th>
评论状态
</th>
<th>
下单时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
...
...
@@ -120,6 +131,13 @@
{/if}
</td>
<td>
{$vo.created_at}
</td>
<td
align=
"center"
>
{if $vo.status ==1}
<button
class=
"btn btn-primary comment"
data-id=
"{$vo.id}"
>
待评价
</button>
{else /}
<button
class=
"btn btn-primary"
disabled=
"disabled"
>
待评价
</button>
{/if}
</td>
</tr>
{/volist}
</tbody>
...
...
@@ -137,7 +155,7 @@
<script
type=
"text/javascript"
>
// 文档加载完毕之后,会进入该方法
$
(
function
()
{
$
(
function
()
{
// $(".btn-delete").click(function(){
// var _this = $(this);
// var url = "delete";
...
...
@@ -158,7 +176,7 @@
// });
$
(
"#output"
).
click
(
function
()
{
$
(
this
).
attr
(
"disabled"
,
true
);
$
(
this
).
attr
(
"disabled"
,
true
);
// $nickname = input('get.nickname');
// $is_vip = input('get.is_vip');
// $start_time = input('get.start_time');
...
...
@@ -167,8 +185,18 @@
var
type
=
$
(
"#type"
).
val
();
var
start_time
=
$
(
"#start_time"
).
val
();
var
end_time
=
$
(
"#end_time"
).
val
();
window
.
location
.
href
=
"{:url('admin/order/orderOutput')}"
+
'?status='
+
status
+
'&type='
+
type
+
'&start_time='
+
start_time
+
'&end_time='
+
end_time
;
window
.
location
.
href
=
"{:url('admin/order/orderOutput')}"
+
'?status='
+
status
+
'&type='
+
type
+
'&start_time='
+
start_time
+
'&end_time='
+
end_time
;
$
(
this
).
removeAttr
(
'disabled'
);
});
$
(
'.comment'
).
click
(
function
()
{
const
id
=
$
(
this
).
attr
(
'data-id'
);
$
.
post
(
"{:url('modiflyComment')}"
,
{
id
:
id
},
function
(
res
)
{
layer
.
msg
(
res
.
msg
);
if
(
res
.
code
===
0
)
{
location
.
reload
();
}
});
});
});
</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