You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/statistics/work-info.php

85 lines
3.3 KiB

5 years ago
<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
5 years ago
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="row">
<div class="col-sm-12">
<table id="listTable">
<thead>
<tr>
<th data-field="id">ID</th>
5 years ago
<th data-field="car_man">车主</th>
<th data-field="car_no">车牌号</th>
<th data-field="total1_clear">商业总净保费</th>
<th data-field="total1_real">折扣后商业净保费</th>
<th data-field="total1_dis">减免金额</th>
<th data-field="total1_percent">商业折扣率</th>
<th data-field="status_name">状态</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
5 years ago
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
5 years ago
<script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
if(row.op == 1) {
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.id + ')">');
opStr.push('<i class="fa fa-file-o" title="查看"></i>');
opStr.push('</a>');
}
5 years ago
return opStr.join(' ');
}
5 years ago
function view(id) {
window.open('/insurer/info?id=' + id);
}
5 years ago
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
5 years ago
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/statistics/work-info-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
o['user_id'] = '<?=$user_id?>';
5 years ago
o['date_begin'] = '<?=$date_begin?>';
o['date_end'] = '<?=$date_end?>';
o['date2_begin'] = '<?=$date2_begin?>';
o['date2_end'] = '<?=$date2_end?>';
o['username'] = '<?=$username?>';
5 years ago
o['offset'] = params['offset'];
o['limit'] = params['limit'];
return o;
}
});
5 years ago
return false;
}
5 years ago
$(function() {
search();
});
</script>
5 years ago
<?php $this->endBlock(); ?>