classify_list.html
1.7 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
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="#">分类管理</a></li>
<li ><a href="{:url('Label/lab_list')}">标签管理</a></li>
</ul>
<a href="{:url('Label/classify_add')}"><button type="button" class="btn btn-default" style="margin-top: 10px;">添加分类</button></a>
<table class="table table-hover table-bordered table-list">
<caption>分类管理列表</caption>
<thead>
<tr>
<th>分类名称</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody class="tb">
<volist name="data" id="vo">
<tr class="tr{$vo.id}">
<td>{$vo.name}</td>
<td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
<td>
<a href="{:url('Label/classify_edit',array('id'=>$vo.id))}"><button type="button" class="btn btn-default">编辑</button></a>
<button type="button" class="btn btn-default" onclick="del({$vo.id})">删除</button>
</td>
</tr>
</volist>
</tbody>
</table>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script>
//删除
function del(id){
ccc = window.confirm('这条分类下的所有商品也会删除,是否删除这条分类?');
if(ccc){
$.post("{:url('Label/classify_del')}",{id:id},function(data){
if(data){
$('.tr'+id).remove();
}else{
alert('删除失败');
}
});
}
}
</script>
</body>
</html>