|
{layout name="layout" /}
<nav class="breadcrumb">
<span><a href="/">首页</a></span>
<span>></span>
<span><a href="/commission/{$year}/{$month}">提成汇总</a></span>
<span>></span>
<span>{$year} 年度</span>
<span>{$month} 月份</span>
</nav>
<div class="content">
<div class="row mt-10">
<div class="col-md-2 col-xs-3 text-center">
<!-- <a href="/commission/save/{$year}/0" class="btn btn-success radius">新增</a> -->
<a href="javascript:window.history.back();" class="btn btn-default radius">返回</a>
</div>
<div class="col-md-6">
<div class="col-md-4">
<input type="text" class="form-control" name="key" id="key" value="{$key}"
placeholder="请输入公司名称">
</div>
<div class="col-md-3" style="text-align:left;">
<div class="btn-group ">
<button type="submit" class="btn btn-success">搜索</button>
</div>
<div class="btn-group ">
<a href="/order/lists/{$year}" class="btn btn-danger ml-10">清除</a>
</div>
</div>
</form>
</div>
</div>
<div class="col-md-10 mt-10">
<table class="table table-hover table-bordered table-condensed">
<thead>
<tr>
<th>序号</th>
<th>公司名称</th>
<th>合同号</th>
<th>计提日期</th>
<th>一般提成</th>
<th>特别提成</th>
<th>销售员</th>
<th>备注</th>
<th style="width: 180px;">操作</th>
</tr>
</thead>
<tbody>
{foreach $list as $val}
<tr>
<td>{$val.no}</td>
<td>{$val.company_name}</td>
<td>{$val.contract_no}</td>
<td>{$val.time}</td>
<td>{$val.general_money|format_money}</td>
<td>{$val.special_money|format_money}</td>
<td>{$val.seller_name}</td>
<td>{$val.remark}</td>
<td class="td-manager">
<a href="/order_item/{$val.order_id}">合同明细</a>
<!-- <a href="/commission/save/{$val.id}">修改</a> -->
<a href="javascript:void(0);" onclick="del('{$val.id}', this)">删除</a>
</td>
</tr>
{/foreach}
<tr>
<td>合计</td>
<td class="text-left" colspan="3">{$list|count}</td>
<td>{$total_special_money}</td>
<td>{$total_special_money}</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<script>
function del(id, obj) {
$.ajax({
url: "/commission/delete",
type: "POST",
data: {
"id": id
},
dataType: 'json',
success: function (data) {
// console.log(data.code);
if (data.code == 0) {
$(obj).parents("tr").remove();
} else {
alert(data.msg);
}
return false;
}
});
}
</script>
|