|
{layout name="layout" /}
<nav class="breadcrumb">
<span><a href="/">首页</a></span>
<span>></span>
<span><a href="javascript:void(0);">销售员管理</a></span>
</nav>
<div class="content">
<div class="row">
<div class="col-md-3 btn-top-box">
<!-- <a href="javascript:;" class="btn btn-danger radius" onClick="del_all()">批量删除</a> -->
<a href="/sale_seller/save/0" class="btn btn-success radius">新增</a>
</div>
</div>
<div class="col-md-10 mt-20">
<table class=" table table-hover table-bordered">
<thead>
<tr>
<th width="25">
<input type="checkbox" value="" name="">
</th>
<th class="text-center">序 号</th>
<th class="text-center">销售员</th>
<th class="text-center">所属部门</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
{foreach $list as $value}
<tr>
<td>
<input type="checkbox" value="{$value.id}" name="checkbox[]">
</td>
<td class="text-center">{$value.id}</td>
<td class="text-center">{$value.name}</td>
<td class="text-center">{$value.department_name}</td>
<td class="text-center td-manager">
<a href="/sale_seller/save/{$value['id']}">修改</a>
<a href="javascript:void(0);" class="ml-10" onClick="del({$value.id|intval}, this)">删除</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
function del(id, obj) {
$.post('/sale_seller/delete', {
'id': id
}, function (res) {
if (res.code == 2) {
$(obj).parents("tr").remove();
alert('删除成功!');
} else {
alert('删除失败, 请稍后重试.');
return false;
}
}, 'json');
}
</script>
<!--请在上方写此页面业务相关的脚本-->
|