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/insurer/finance-mng.php

149 lines
6.1 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(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>返现管理</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
5 years ago
<form role="form" id="searchFrm" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label for="car_man">车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
5 years ago
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="phone">电话</label>
<input type="text" name="phone" id="phone" class="form-control">
5 years ago
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="car_no">车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
5 years ago
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="id_man">被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
</div>
5 years ago
<button type="submit" class="btn btn-primary mb-8">搜索</button>
</form>
<div class="row">
5 years ago
<div class="col-sm-12">
<table id="listTable">
<thead>
<tr>
<th data-width="50" data-field="id">ID</th>
<th data-field="id_man">被保险人</th>
<th data-field="id_man_phone">联系电话</th>
<th data-field="company_name">保险公司</th>
<th data-field="car_no">车牌号</th>
<th data-field="print_date">正本日期</th>
<th data-field="path">级别</th>
<th data-field="user_name">销售座席</th>
<th data-field="total1_clear">商业净保费</th>
<th data-field="total1_dis">公司返金额</th>
<th data-field="yuangong_money">业务自付</th>
<th data-field="total_user_real">实返现金额</th>
<th data-field="transfer_date">转账时间</th>
<th data-field="caiwu_status_name">转账状态</th>
<th data-field="status_name">状态</th>
<th data-field="lock_man">当前操作</th>
<th data-formatter="opFormatter" data-width="150">操作</th>
5 years ago
</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>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
if(row.lock_man != '') {
opStr.push('<a href="javascript:void(0);" onclick="unlock(' + row.id + ')">');
opStr.push('<i class="fa fa-unlock" title="解锁"></i>');
opStr.push('</a>');
}
5 years ago
opStr.push('<a href="javascript:void(0);" onclick="info(' + row.id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
5 years ago
function info(id) {
title = '详情';
layer_show(title, '/insurer/finance-mng-edit?id='+id);
5 years ago
}
function unlock(id) {
parent.layer.confirm('是否确认解锁?', {
btn: ['解锁','取消'], //按钮
5 years ago
shade: false //不显示遮罩
}, function(){
$.post('/insurer/unlocked',{id:id},function(data) {
5 years ago
parent.layer.msg(data.msg);
refreshList();
}, 'json');
}, function(){
//
});
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
5 years ago
}
function search() {
5 years ago
o = {};
var params = $("#searchFrm").serializeArray();
$.each(params, function(index) {
o[this['name']] = this['value'];
});
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/insurer/finance-mng-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
},
responseHandler: function (res) {
var totals = res.rows.pop();
var html = '<tfoot><tr><td colspan="18" class="text-center">';
$.each(totals,function (i,d) {
html += '<div class="layui-show-md-inline-block m-r-lg m-l-lg">' +
'<span>'+ d[0] +':</span>' +
'<span class="font-bold">'+ d[1] +'</span>' +
'</div>'
});
html += '</td></tr></tfoot>';
$('#listTable').append(html);
return res;
}
5 years ago
});
return false;
}
$(function() {
search();
5 years ago
});
</script>
<?php $this->endBlock(); ?>