index.html
5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a>评论管理</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('zj_comment/index')}">
服务分类:
<select class="form-control" name="ser_type" id="classo" onchange="teacherChange(this.options[this.selectedIndex].value)">
<option value>选择服务类别</option>
<option value="0">简历服务</option>
<option value="1">职业规划</option>
<option value="2">面试辅导</option>
</select>
服务名称:
<select class="form-control" id="classobj" name="name">
<option value>选择服务名称</option>
<foreach name="allservice" item="val">
<option value="{$val.id}">{$val.name}</option>
</foreach>
</select>
评论星级:
<select class="form-control" name="level">
<option value>选择星级</option>
<option value="1">1星</option>
<option value="2">2星</option>
<option value="3">3星</option>
<option value="4">4星</option>
<option value="5">5星</option>
</select>
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:url('zj_comment/index')}">清空</a>
</form>
<form action="" method="post" class="form-horizontal js-ajax-form margin-top-20">
<div class="table-actions">
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('zj_comment/comstate',array('yes'=>'1'))}" data-subcheck="true">
显示
</button>
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('zj_comment/comstate',array('yes'=>'0'))}" data-subcheck="true">
隐藏
</button>
<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
data-action="{:url('zj_comment/delete')}" data-subcheck="true" data-msg="您确定删除吗?">
删除
</button>
</div>
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="15">
<label>
<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
</label>
</th>
<th>评论用户</th>
<th>所购服务</th>
<th>评论星级</th>
<th>评论时间</th>
<th>评论内容</th>
<th>评论状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<foreach name="allcom" item="vo">
<tr>
<td>
<input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
value="{$vo.id}" title="ID:{$vo.id}">
</td>
<td>{$vo['uname']}</td>
<td>{$vo['ser_name']}</td>
<td>{$vo['level']}星</td>
<td>{:date('Y-m-d H-i-s',$vo['create_time'])}</td>
<td>{$vo['content']}</td>
<td>
<if condition="$vo['is_sta'] eq 0">
未显示
<else>
已显示
</if>
</td>
<td>
<a href="{:url('zj_order/one',array('id'=>$vo['order_id']))}">关联订单详情</a>
<a class="js-ajax-delete" href="{:url('zj_comment/delete',array('ids'=>$vo['id']))}">删除评论</a>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$allcom->render()}</div>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
var ar1={:json_encode($allservice)};//后台传入服务名称
//当选择指向类时改变目标的下拉菜单
function teacherChange(area){
var tobj=document.getElementById('classobj');
removeAllOptions(tobj);
var option = document.createElement("option");
option.text = "选择服务名称";
option.value = "";
tobj.add(option);
for(m=0;m<ar1.length;m++){
if (ar1[m]['ser_type']==area&&area!=''){
var option = document.createElement("option");
option.text = ar1[m]['name'];
option.value = ar1[m]['id'];
tobj.add(option);
}else if(area==''){
var option = document.createElement("option");
option.text = ar1[m]['name'];
option.value = ar1[m]['id'];
tobj.add(option);
}
}
}
//移除option 当中所有元素
function removeAllOptions(selectbox)
{
var i;
for(i=selectbox.options.length-1;i>=0;i--)
{
selectbox.remove(i);
}
}
</script>
</body>
</html>