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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
184 additions
and
141 deletions
+184
-141
application/admin/controller/Order.php
+56
-41
application/admin/view/order/index.html
+128
-100
No files found.
application/admin/controller/Order.php
View file @
4bc09007
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\admin\controller
;
namespace
app\admin\controller
;
use
app\admin\controller\AuthBase
;
use
app\admin\controller\AuthBase
;
use
app\common\model\Orders
;
use
app\common\model\Refund
;
use
app\common\model\Refund
;
use
app\common\utils\WXSendMessage
;
use
app\common\utils\WXSendMessage
;
use
think\Db
;
use
think\Db
;
...
@@ -26,12 +27,12 @@ class Order extends AuthBase
...
@@ -26,12 +27,12 @@ class Order extends AuthBase
public
function
index
()
public
function
index
()
{
{
//搜索筛选
//搜索筛选
$status
=
input
(
'get.status'
,
'-1'
);
$status
=
input
(
'get.status'
,
'-1'
);
$id
=
input
(
'get.id'
);
$id
=
input
(
'get.id'
);
$start_time
=
input
(
'get.start_time'
);
$start_time
=
input
(
'get.start_time'
);
$end_time
=
input
(
'get.end_time'
);
$end_time
=
input
(
'get.end_time'
);
$type
=
input
(
'get.type'
);
$type
=
input
(
'get.type'
);
$condition
=
[];
$condition
=
[];
//判断如果存在筛选字段,将其添加到筛选数组$condition中
//判断如果存在筛选字段,将其添加到筛选数组$condition中
if
(
$status
!=
'-1'
)
{
if
(
$status
!=
'-1'
)
{
...
@@ -52,16 +53,16 @@ class Order extends AuthBase
...
@@ -52,16 +53,16 @@ class Order extends AuthBase
$condition
[
'created_at'
]
=
[
'<'
,
$end_time
.
' 00:00:00'
];
$condition
[
'created_at'
]
=
[
'<'
,
$end_time
.
' 00:00:00'
];
}
}
}
}
if
(
input
(
'get.title'
))
{
if
(
input
(
'get.title'
))
{
$condition
[
'title'
]
=
[
'like'
,
'%'
.
input
(
'get.title'
)
.
'%'
];
$condition
[
'title'
]
=
[
'like'
,
'%'
.
input
(
'get.title'
)
.
'%'
];
}
}
//根据筛选条件查询
//根据筛选条件查询
$order_list
=
$this
->
order_model
->
with
([
'project'
=>
function
(
$query
)
{
$order_list
=
$this
->
order_model
->
with
([
'project'
=>
function
(
$query
)
{
}])
->
where
(
$condition
)
->
order
(
'created_at desc'
)
->
paginate
(
10
,
false
,
[
'query'
=>
[
'status'
=>
$status
,
'start_time'
=>
$start_time
,
'end_time'
=>
$end_time
,
'type'
=>
$type
]])
->
each
(
function
(
$item
)
{
}])
->
where
(
$condition
)
->
order
(
'created_at desc'
)
->
paginate
(
10
,
false
,
[
'query'
=>
[
'status'
=>
$status
,
'start_time'
=>
$start_time
,
'end_time'
=>
$end_time
,
'type'
=>
$type
]])
->
each
(
function
(
$item
)
{
$project
=
\app\common\model\Project
::
withTrashed
()
->
find
(
$item
[
'pid'
]);
$project
=
\app\common\model\Project
::
withTrashed
()
->
find
(
$item
[
'pid'
]);
$item
[
'project_poster'
]
=
$project
[
'poster'
];
$item
[
'project_poster'
]
=
$project
[
'poster'
];
$item
[
'project_title'
]
=
$project
[
'title'
];
$item
[
'project_title'
]
=
$project
[
'title'
];
});
});
$this
->
assign
(
"order_list"
,
$order_list
);
$this
->
assign
(
"order_list"
,
$order_list
);
$this
->
assign
(
"status"
,
$status
);
$this
->
assign
(
"status"
,
$status
);
...
@@ -72,11 +73,11 @@ class Order extends AuthBase
...
@@ -72,11 +73,11 @@ class Order extends AuthBase
public
function
orderOutput
()
public
function
orderOutput
()
{
{
//根据筛选条件查询数据
//根据筛选条件查询数据
$status
=
input
(
'get.status'
,
'-1'
);
$status
=
input
(
'get.status'
,
'-1'
);
$start_time
=
input
(
'get.start_time'
);
$start_time
=
input
(
'get.start_time'
);
$end_time
=
input
(
'get.end_time'
);
$end_time
=
input
(
'get.end_time'
);
$type
=
input
(
'get.type'
);
$type
=
input
(
'get.type'
);
$condition
=
[];
$condition
=
[];
if
(
$status
!=
'-1'
)
{
if
(
$status
!=
'-1'
)
{
$condition
[
'status'
]
=
$status
;
$condition
[
'status'
]
=
$status
;
}
}
...
@@ -95,11 +96,11 @@ class Order extends AuthBase
...
@@ -95,11 +96,11 @@ class Order extends AuthBase
$order_list
=
$this
->
order_model
->
where
(
$condition
)
->
order
(
'created_at desc'
)
->
select
();
$order_list
=
$this
->
order_model
->
where
(
$condition
)
->
order
(
'created_at desc'
)
->
select
();
//导出用户信息、活动信息、订单信息,如:姓名、手机号、活动名称、价格、家庭组数、大人数量、孩子数量、孩子年龄、备注等
//导出用户信息、活动信息、订单信息,如:姓名、手机号、活动名称、价格、家庭组数、大人数量、孩子数量、孩子年龄、备注等
//导出到excel之前数据处理
//导出到excel之前数据处理
$mulit_arr
=
[];
$mulit_arr
=
[];
$mulit_arr
[
'data'
]
=
[];
$mulit_arr
[
'data'
]
=
[];
$cont
=
[[
'订单标题'
,
'订单来源'
,
'用户名'
,
'电话'
,
'vip购买信息'
,
'活动名称'
,
'活动价格'
,
'家庭组数'
,
'大人数量'
,
'孩子数量'
,
'孩子年龄'
,
'订单总价'
,
'下单时间'
,
'订单状态'
]];
$cont
=
[[
'订单标题'
,
'订单来源'
,
'用户名'
,
'电话'
,
'vip购买信息'
,
'活动名称'
,
'活动价格'
,
'家庭组数'
,
'大人数量'
,
'孩子数量'
,
'孩子年龄'
,
'订单总价'
,
'下单时间'
,
'订单状态'
]];
foreach
(
$order_list
as
$vo
)
{
foreach
(
$order_list
as
$vo
)
{
$arr
=
[];
$arr
=
[];
$arr
[]
=
$vo
[
'title'
];
$arr
[]
=
$vo
[
'title'
];
$arr
[]
=
$vo
[
'type'
]
==
1
?
'活动报名'
:
'购买会员卡订单'
;
$arr
[]
=
$vo
[
'type'
]
==
1
?
'活动报名'
:
'购买会员卡订单'
;
$arr
[]
=
$vo
->
user_info
[
'nickname'
];
$arr
[]
=
$vo
->
user_info
[
'nickname'
];
...
@@ -118,14 +119,14 @@ class Order extends AuthBase
...
@@ -118,14 +119,14 @@ class Order extends AuthBase
$cont
[]
=
$arr
;
$cont
[]
=
$arr
;
}
}
$mulit_arr
[
'data'
][]
=
$cont
;
$mulit_arr
[
'data'
][]
=
$cont
;
$mulit_arr
[
'sheet'
]
=
[[
'title'
=>
'用户信息表'
]];
$mulit_arr
[
'sheet'
]
=
[[
'title'
=>
'用户信息表'
]];
$title
=
'订单表'
;
//这是标题
$title
=
'订单表'
;
//这是标题
$Subject
=
''
;
//这是备注
$Subject
=
''
;
//这是备注
$Description
=
'美行者订单导出'
;
//这是描述;
$Description
=
'美行者订单导出'
;
//这是描述;
$Keywords
=
''
;
//这是关键字
$Keywords
=
''
;
//这是关键字
$Category
=
''
;
//这是分类
$Category
=
''
;
//这是分类
$filename
=
'美行者订单导出'
;
//文件名
$filename
=
'美行者订单导出'
;
//文件名
$obj
=
new
OutputExcel
();
$obj
=
new
OutputExcel
();
/*调用excle导出类*/
/*调用excle导出类*/
$obj
->
export
(
$mulit_arr
,
$filename
,
$title
,
$Subject
,
$Description
,
$Keywords
,
$Category
);
$obj
->
export
(
$mulit_arr
,
$filename
,
$title
,
$Subject
,
$Description
,
$Keywords
,
$Category
);
}
}
...
@@ -133,8 +134,8 @@ class Order extends AuthBase
...
@@ -133,8 +134,8 @@ class Order extends AuthBase
//退款审核 未完成
//退款审核 未完成
public
function
refund
()
public
function
refund
()
{
{
$id
=
input
(
'get.id'
);
$id
=
input
(
'get.id'
);
$status
=
input
(
'get.status'
,
'-1'
);
$status
=
input
(
'get.status'
,
'-1'
);
$condition
=
[];
$condition
=
[];
if
(
$status
!=
'-1'
)
{
if
(
$status
!=
'-1'
)
{
$condition
[
'status'
]
=
$status
;
$condition
[
'status'
]
=
$status
;
...
@@ -151,8 +152,8 @@ class Order extends AuthBase
...
@@ -151,8 +152,8 @@ class Order extends AuthBase
//评论审核
//评论审核
public
function
comment
()
public
function
comment
()
{
{
$id
=
input
(
'get.id'
);
$id
=
input
(
'get.id'
);
$status
=
input
(
'get.status'
,
'-1'
);
$status
=
input
(
'get.status'
,
'-1'
);
$condition
=
[];
$condition
=
[];
if
(
$status
!=
'-1'
)
{
if
(
$status
!=
'-1'
)
{
$condition
[
'status'
]
=
$status
;
$condition
[
'status'
]
=
$status
;
...
@@ -169,7 +170,7 @@ class Order extends AuthBase
...
@@ -169,7 +170,7 @@ class Order extends AuthBase
public
function
commentStatus
(
$status
,
$id
)
public
function
commentStatus
(
$status
,
$id
)
{
{
$comment_model
=
model
(
'comment'
);
$comment_model
=
model
(
'comment'
);
$res
=
$comment_model
->
save
([
'status'
=>
$status
],
[
'id'
=>
$id
]);
$res
=
$comment_model
->
save
([
'status'
=>
$status
],
[
'id'
=>
$id
]);
if
(
$status
==
2
)
{
if
(
$status
==
2
)
{
$is_comment
=
3
;
$is_comment
=
3
;
}
elseif
(
$status
==
3
)
{
}
elseif
(
$status
==
3
)
{
...
@@ -182,9 +183,9 @@ class Order extends AuthBase
...
@@ -182,9 +183,9 @@ class Order extends AuthBase
if
(
$res
)
{
if
(
$res
)
{
$comment_info
=
$comment_model
->
get
(
$id
);
$comment_info
=
$comment_model
->
get
(
$id
);
if
(
$comment_info
)
{
if
(
$comment_info
)
{
$save_condition
=
[];
$save_condition
=
[];
$save_condition
[
'is_comment'
]
=
$is_comment
;
$save_condition
[
'is_comment'
]
=
$is_comment
;
$order_info
=
model
(
'order'
)
->
get
(
$comment_info
[
'order_id'
]);
$order_info
=
model
(
'order'
)
->
get
(
$comment_info
[
'order_id'
]);
if
(
$status
==
2
)
{
if
(
$status
==
2
)
{
//评论审核成功
//评论审核成功
//如果订单状态为待评价,则修改状态为已完成
//如果订单状态为待评价,则修改状态为已完成
...
@@ -210,7 +211,7 @@ class Order extends AuthBase
...
@@ -210,7 +211,7 @@ class Order extends AuthBase
public
function
refundStatus
(
$status
,
$id
)
public
function
refundStatus
(
$status
,
$id
)
{
{
$refund_model
=
model
(
'refund'
);
$refund_model
=
model
(
'refund'
);
$res
=
$refund_model
->
save
([
'status'
=>
$status
],
[
'id'
=>
$id
]);
$res
=
$refund_model
->
save
([
'status'
=>
$status
],
[
'id'
=>
$id
]);
if
(
$status
==
2
)
{
if
(
$status
==
2
)
{
$is_refund
=
3
;
$is_refund
=
3
;
}
elseif
(
$status
==
3
)
{
}
elseif
(
$status
==
3
)
{
...
@@ -247,10 +248,10 @@ class Order extends AuthBase
...
@@ -247,10 +248,10 @@ class Order extends AuthBase
Db
::
startTrans
();
Db
::
startTrans
();
try
{
try
{
//修改订单状态
//修改订单状态
$refund
->
status
=
2
;
$refund
->
status
=
2
;
$order
->
is_refund
=
3
;
$order
->
is_refund
=
3
;
$order
->
status
=
3
;
$order
->
status
=
3
;
$project
=
\app\common\model\Project
::
get
(
$order
->
pid
);
$project
=
\app\common\model\Project
::
get
(
$order
->
pid
);
$project
->
sign_num
=
$project
->
sign_num
-
$order
[
'extras'
][
'sign_limits'
];
$project
->
sign_num
=
$project
->
sign_num
-
$order
[
'extras'
][
'sign_limits'
];
$refund
->
save
();
//修改退款列表状态
$refund
->
save
();
//修改退款列表状态
$order
->
save
();
//修改订单状态
$order
->
save
();
//修改订单状态
...
@@ -270,11 +271,11 @@ class Order extends AuthBase
...
@@ -270,11 +271,11 @@ class Order extends AuthBase
Db
::
commit
();
Db
::
commit
();
//发送消息模板
//发送消息模板
$openId
=
\app\common\model\User
::
get
(
$order
->
uid
)[
'openid'
];
$openId
=
\app\common\model\User
::
get
(
$order
->
uid
)[
'openid'
];
$template_id
=
config
(
'wxapp.template_id_refund'
);
$template_id
=
config
(
'wxapp.template_id_refund'
);
$page
=
config
(
'wxapp.page'
);
$page
=
config
(
'wxapp.page'
);
$form_id
=
$order
->
prepay_id
;
$form_id
=
$order
->
prepay_id
;
$param
=
[
$param
=
[
$order
->
out_trade_no
,
$order
->
out_trade_no
,
$order
->
title
,
$order
->
title
,
$order
->
total_fee
,
$order
->
total_fee
,
...
@@ -305,9 +306,23 @@ class Order extends AuthBase
...
@@ -305,9 +306,23 @@ class Order extends AuthBase
}
}
$refund
->
status
=
3
;
$refund
->
status
=
3
;
$refund
->
save
();
$refund
->
save
();
$order
=
\app\common\model\Order
::
get
(
$refund
->
order_id
);
$order
=
\app\common\model\Order
::
get
(
$refund
->
order_id
);
$order
->
is_refund
=
2
;
$order
->
is_refund
=
2
;
$order
->
save
();
$order
->
save
();
return
[
'code'
=>
0
,
'msg'
=>
'驳回成功'
];
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,32 +7,42 @@
...
@@ -7,32 +7,42 @@
<div
class=
"row margin-bottom"
>
<div
class=
"row margin-bottom"
>
<div
class=
"col-md-12"
>
<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"
>
<div
class=
"form-group margin-right"
>
<input
class=
"form-control"
type=
"text"
name=
"title"
value=
"{:input('title')}"
placeholder=
"活动名称"
/>
<input
class=
"form-control"
type=
"text"
name=
"title"
value=
"{:input('title')}"
placeholder=
"活动名称"
/>
</div>
</div>
<div
class=
"form-group margin-right"
>
<div
class=
"form-group margin-right"
>
<select
name=
"status"
class=
"form-control"
id=
"status"
>
<select
name=
"status"
class=
"form-control"
id=
"status"
>
<option
value=
"-1"
{
if
condition=
"$status=='-1'"
}
selected
{/
if
}
>
全部订单状态
</option>
<option
value=
"-1"
{
if
condition=
"$status=='-1'"
}
selected
{
<option
value=
"0"
{
if
condition=
"$status=='0'"
}
selected
{/
if
}
>
未付款
</option>
/
if
}
>
全部订单状态
</option>
<option
value=
"1"
{
if
condition=
"$status=='1'"
}
selected
{/
if
}
>
进行中
</option>
<option
value=
"0"
{
if
condition=
"$status=='0'"
}
selected
{
<option
value=
"2"
{
if
condition=
"$status=='2'"
}
selected
{/
if
}
>
待评价
</option>
/
if
}
>
未付款
</option>
<option
value=
"3"
{
if
condition=
"$status=='3'"
}
selected
{/
if
}
>
已完成
</option>
<option
value=
"1"
{
if
condition=
"$status=='1'"
}
selected
{
</select>
/
if
}
>
进行中
</option>
</div>
<option
value=
"2"
{
if
condition=
"$status=='2'"
}
selected
{
<div
class=
"form-group margin-right"
>
/
if
}
>
待评价
</option>
<select
name=
"type"
class=
"form-control"
id=
"type"
>
<option
value=
"3"
{
if
condition=
"$status=='3'"
}
selected
{
<option
value=
""
>
全部订单类型
</option>
/
if
}
>
已完成
</option>
<option
value=
"1"
{
if
condition=
"input('type')=='1'"
}
selected
{/
if
}
>
活动报名订单
</option>
</select>
<option
value=
"2"
{
if
condition=
"input('type')=='2'"
}
selected
{/
if
}
>
购买会员卡订单
</option>
</div>
</select>
<div
class=
"form-group margin-right"
>
</div>
<select
name=
"type"
class=
"form-control"
id=
"type"
>
<div
class=
"form-group margin-right"
>
<option
value=
""
>
全部订单类型
</option>
<label
for=
""
>
下单时间:
</label>
<option
value=
"1"
{
if
condition=
"input('type')=='1'"
}
selected
{
<input
class=
"form-control"
type=
"date"
name=
"start_time"
id=
"start_time"
value=
"{:input('start_time')}"
placeholder=
"起始"
/>
/
if
}
>
活动报名订单
</option>
--
<option
value=
"2"
{
if
condition=
"input('type')=='2'"
}
selected
{
<input
class=
"form-control"
type=
"date"
name=
"end_time"
id=
"end_time"
value=
"{:input('end_time')}"
placeholder=
"结束"
/>
/
if
}
>
购买会员卡订单
</option>
</div>
</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=
"end_time"
id=
"end_time"
value=
"{:input('end_time')}"
placeholder=
"结束"
/>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
搜索
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
搜索
</button>
</form>
</form>
<button
class=
"btn btn-success margin-left"
id=
"output"
>
导出
</button>
<button
class=
"btn btn-success margin-left"
id=
"output"
>
导出
</button>
...
@@ -44,84 +54,92 @@
...
@@ -44,84 +54,92 @@
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-bordered table-striped"
>
<table
class=
"table table-bordered table-striped"
>
<thead>
<thead>
<tr>
<tr>
<th>
ID
</th>
<th>
ID
</th>
<th>
订单标题
</th>
<th>
订单标题
</th>
<th>
订单来源
</th>
<th>
订单来源
</th>
<th>
项目信息
</th>
<th>
项目信息
</th>
<th>
用户信息
</th>
<th>
用户信息
</th>
<th>
订单总价
</th>
<th>
订单总价
</th>
<th>
订单状态
</th>
<th>
订单状态
</th>
<th>
地址
</th>
<th>
地址
</th>
<th>
退款状态
</th>
<th>
退款状态
</th>
<th>
评论状态
</th>
<th>
评论状态
</th>
<th>
下单时间
</th>
<th>
下单时间
</th>
</tr>
<th>
操作
</th>
</tr>
</thead>
</thead>
<tbody>
<tbody>
{volist name="order_list" id="vo" key="k" empty="暂时没有数据"}
{volist name="order_list" id="vo" key="k" empty="暂时没有数据"}
<tr>
<tr>
<td>
{$vo.id}
</td>
<td>
{$vo.id}
</td>
<td>
{$vo.title}
</td>
<td>
{$vo.title}
</td>
<td>
<td>
{if condition="$vo.type == 1"}
{if condition="$vo.type == 1"}
活动报名
活动报名
{else/}
{else/}
购买会员卡
购买会员卡
{/if}
{/if}
</td>
</td>
<td>
<td>
{if condition="$vo.project_poster"}
{if condition="$vo.project_poster"}
<a
href=
"{$vo.project_poster}"
target=
"_blank"
data-fancybox=
"images"
>
<a
href=
"{$vo.project_poster}"
target=
"_blank"
data-fancybox=
"images"
>
<img
src=
"{$vo.project_poster}"
width=
'100'
>
<img
src=
"{$vo.project_poster}"
width=
'100'
>
</a>
</a>
<p
style=
"padding:0;margin:0;"
>
{$vo.project_title}
</p>
<p
style=
"padding:0;margin:0;"
>
{$vo.project_title}
</p>
{/if}
{/if}
</td>
</td>
<td>
<td>
<p
style=
"padding:0;margin:0;text-align:center"
>
{$vo.user_info.nickname}
</p>
<p
style=
"padding:0;margin:0;text-align:center"
>
{$vo.user_info.nickname}
</p>
<p
style=
"padding:0;margin:0;text-align:center"
>
{$vo.user_info.phone}
</p>
<p
style=
"padding:0;margin:0;text-align:center"
>
{$vo.user_info.phone}
</p>
<p
style=
"padding:0;margin:0;text-align:center;color:#f60"
>
<p
style=
"padding:0;margin:0;text-align:center;color:#f60"
>
{if condition="$vo.user_info.is_vip == 1"}
{if condition="$vo.user_info.is_vip == 1"}
{/if}
{/if}
</p>
</p>
</td>
</td>
<td>
{$vo.total_fee}
</td>
<td>
{$vo.total_fee}
</td>
<!--订单状态-->
<!--订单状态-->
<td>
<td>
<span
style=
"color:{$vo.status_name.color}"
>
{$vo.StatusAdminText}
</span>
<span
style=
"color:{$vo.status_name.color}"
>
{$vo.StatusAdminText}
</span>
</td>
</td>
<td>
<td>
{$vo.extras['address']??''}
{$vo.extras['address']??''}
</td>
</td>
<td>
<td>
{if condition="$vo.is_refund == 0"}
{if condition="$vo.is_refund == 0"}
无退款
无退款
{elseif condition="$vo.is_refund == 1"/}
{elseif condition="$vo.is_refund == 1"/}
<a
href=
"{:url('/admin/order/refund?id='.$vo.linkrefund.id)}"
>
退款申请中
</a>
<a
href=
"{:url('/admin/order/refund?id='.$vo.linkrefund.id)}"
>
退款申请中
</a>
{elseif condition="$vo.is_refund == 2"/}
{elseif condition="$vo.is_refund == 2"/}
<a
href=
"{:url('/admin/order/refund?id='.$vo.linkrefund.id)}"
>
退款失败
</a>
<a
href=
"{:url('/admin/order/refund?id='.$vo.linkrefund.id)}"
>
退款失败
</a>
{elseif condition="$vo.is_refund == 3"/}
{elseif condition="$vo.is_refund == 3"/}
<a
href=
"{:url('/admin/order/refund?id='.$vo.linkrefund.id)}"
>
退款成功
</a>
<a
href=
"{:url('/admin/order/refund?id='.$vo.linkrefund.id)}"
>
退款成功
</a>
{/if}
{/if}
<!--0-无退款申请,1-有退款申请,2-退款失败,3-退款成功-->
<!--0-无退款申请,1-有退款申请,2-退款失败,3-退款成功-->
</td>
</td>
<!--无退款、退款申请中、退款失败、退款成功;无评论、评论审核中、评论失败、评论成功。-->
<!--无退款、退款申请中、退款失败、退款成功;无评论、评论审核中、评论失败、评论成功。-->
<td>
<td>
{if condition="$vo.is_comment == 0"}
{if condition="$vo.is_comment == 0"}
无评论
无评论
{elseif condition="$vo.is_comment == 1"/}
{elseif condition="$vo.is_comment == 1"/}
<a
href=
"{:url('/admin/order/comment?id='.$vo.linkcomment.id)}"
>
评论审核中
</a>
<a
href=
"{:url('/admin/order/comment?id='.$vo.linkcomment.id)}"
>
评论审核中
</a>
{elseif condition="$vo.is_comment == 2"/}
{elseif condition="$vo.is_comment == 2"/}
<a
href=
"{:url('/admin/order/comment?id='.$vo.linkcomment.id)}"
>
评论失败
</a>
<a
href=
"{:url('/admin/order/comment?id='.$vo.linkcomment.id)}"
>
评论失败
</a>
{elseif condition="$vo.is_comment == 3"/}
{elseif condition="$vo.is_comment == 3"/}
<a
href=
"{:url('/admin/order/comment?id='.$vo.linkcomment.id)}"
>
评论成功
</a>
<a
href=
"{:url('/admin/order/comment?id='.$vo.linkcomment.id)}"
>
评论成功
</a>
<!--0-无评论,1-审核中,2-未通过审核,3-评论成功-->
<!--0-无评论,1-审核中,2-未通过审核,3-评论成功-->
{/if}
{/if}
</td>
</td>
<td>
{$vo.created_at}
</td>
<td>
{$vo.created_at}
</td>
</tr>
<td
align=
"center"
>
{/volist}
{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>
</tbody>
</table>
</table>
</div>
</div>
...
@@ -137,7 +155,7 @@
...
@@ -137,7 +155,7 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
// 文档加载完毕之后,会进入该方法
// 文档加载完毕之后,会进入该方法
$
(
function
()
{
$
(
function
()
{
// $(".btn-delete").click(function(){
// $(".btn-delete").click(function(){
// var _this = $(this);
// var _this = $(this);
// var url = "delete";
// var url = "delete";
...
@@ -158,7 +176,7 @@
...
@@ -158,7 +176,7 @@
// });
// });
$
(
"#output"
).
click
(
function
()
{
$
(
"#output"
).
click
(
function
()
{
$
(
this
).
attr
(
"disabled"
,
true
);
$
(
this
).
attr
(
"disabled"
,
true
);
// $nickname = input('get.nickname');
// $nickname = input('get.nickname');
// $is_vip = input('get.is_vip');
// $is_vip = input('get.is_vip');
// $start_time = input('get.start_time');
// $start_time = input('get.start_time');
...
@@ -167,8 +185,18 @@
...
@@ -167,8 +185,18 @@
var
type
=
$
(
"#type"
).
val
();
var
type
=
$
(
"#type"
).
val
();
var
start_time
=
$
(
"#start_time"
).
val
();
var
start_time
=
$
(
"#start_time"
).
val
();
var
end_time
=
$
(
"#end_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'
);
$
(
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>
</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