parent
6264d23980
commit
dd7172af88
@ -1,289 +1,162 @@ |
|||||||
<?php |
<?php |
||||||
use \common\libs\MyLib; |
use \common\libs\MyLib; |
||||||
?> |
?> |
||||||
<script src="/Myfile/lib/layui/layui.js"></script> |
<?php $this->beginBlock('header_css'); ?> |
||||||
|
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||||
<link rel="stylesheet" href="/js/fileupload/css/jquery.fileupload.css"> |
<?php $this->endBlock(); ?> |
||||||
<table lay-size="sm" class="layui-table "> |
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight"> |
||||||
<form id="searchForm"> |
<div class="ibox float-e-margins"> |
||||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
<div class="ibox-title"> |
||||||
<tr> |
<h5>利润统计</h5> |
||||||
<td class="td_bg"> |
<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> 刷新 |
||||||
<select name="insurer_type" class="insurer_type"> |
</a> |
||||||
<option value=0>全部</option> |
</div> |
||||||
<option value=1 <?= $insurer_type==1?'selected':'' ?>>商业</option>
|
</div> |
||||||
<option value=2 <?= $insurer_type==2?'selected':'' ?>>交强</option>
|
<div class="ibox-content"> |
||||||
</select> |
<form role="form" id="searchFrm" class="form-inline" onsubmit="return search();"> |
||||||
保单号:<input name="insurer_no" type="text" value="<?=$insurer_no?>">
|
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
<label for="car_no">保险类型</label> |
||||||
工号:<input name="username" type="text" value="<?=$username?>">
|
<select name="insurer_type" class="form-control"> |
||||||
<!--日期--> |
<option value=0>全部</option> |
||||||
出单日期: |
<option value=1>商业</option> |
||||||
<input type="Text" class="Wdate" name="begin_date" onclick="WdatePicker()" value="<?= $begin_date ?>" />
|
<option value=2>交强</option> |
||||||
-- |
</select> |
||||||
<input type="Text" class="Wdate" name="end_date" onclick="WdatePicker()" value="<?= $end_date ?>" />
|
</div> |
||||||
<br> |
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
<br> |
<label for="engine_no">保单号</label> |
||||||
回单日期: |
<input type="text" id="insurer_no" name="insurer_no" class="form-control"> |
||||||
<input type="Text" class="Wdate" name="r_begin_date" onclick="WdatePicker()" value="<?= $r_begin_date ?>" />
|
</div> |
||||||
-- |
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
<input type="Text" class="Wdate" name="r_end_date" onclick="WdatePicker()" value="<?= $r_end_date ?>" />
|
<label for="engine_no">车牌</label> |
||||||
<br>保险公司:<select name="company_id"> |
<input type="text" id="car_no" name="car_no" class="form-control"> |
||||||
<option value="0">所有模型</option> |
</div> |
||||||
<?php |
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
foreach($company_items as $item) { |
<label for="engine_no">工号</label> |
||||||
echo '<option value="'.$item->id.'"'; |
<input type="text" id="username" name="username" class="form-control"> |
||||||
if($item->id == $company_id) |
</div> |
||||||
echo ' selected '; |
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
echo '>'.$item->name.'</option>'; |
<label for="datepicker1">出单日期</label> |
||||||
} |
<div class="input-group input-daterange" id="datepicker1"> |
||||||
?> |
<input type="text" class="input-sm form-control" id="begin_date" name="begin_date" value="" autocomplete="off" /> |
||||||
</select> |
<span class="input-group-addon">到</span> |
||||||
级别:<select name="group_id"> |
<input type="text" class="input-sm form-control" id="end_date" name="end_date" value="" autocomplete="off" /> |
||||||
<option value="0">全部</option> |
</div> |
||||||
<?php |
</div> |
||||||
foreach($group_items as $item) { |
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
echo '<option value="'.$item->id.'"'; |
<label for="datepicker1">回单日期</label> |
||||||
if($item->id == $group_id) |
<div class="input-group input-daterange" id="datepicker1"> |
||||||
echo ' selected '; |
<input type="text" class="input-sm form-control" id="r_begin_date" name="r_begin_date" value="" autocomplete="off" /> |
||||||
echo '>'.$item->name.'</option>'; |
<span class="input-group-addon">到</span> |
||||||
} |
<input type="text" class="input-sm form-control" id="r_end_date" name="r_end_date" value="" autocomplete="off" /> |
||||||
?> |
</div> |
||||||
</select> |
</div> |
||||||
排序: |
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
<select name="sort_key"> |
<label for="engine_no">联系电话</label> |
||||||
<option value="0">请选择</option> |
<input type="text" id="phone" name="phone" class="form-control"> |
||||||
<option value="print_date" <?= $sort_key == 'print_date' ? 'selected' : ''?>>出单日期</option>
|
</div> |
||||||
<option value="total" <?= $sort_key == 'total' ? 'selected' : ''?>>商业总保费</option>
|
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
<option value="total_clear" <?= $sort_key == 'total_clear' ? 'selected' : ''?>>商业净保费</option>
|
<label for="engine_no">保险公司</label> |
||||||
<option value="total_rate" <?= $sort_key == 'total_rate' ? 'selected' : ''?>>手续费比例</option>
|
<select name="company_id" class="form-control"> |
||||||
</select> |
<option value="0">全部</option> |
||||||
<select name="sort_value"> |
<?php |
||||||
<option value="0">请选择</option> |
foreach($company_items as $item) { |
||||||
<option value="ASC" <?= $sort_value == 'ASC' ? 'selected' : ''?>>正序</option>
|
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||||
<option value="DESC" <?= $sort_value == 'DESC' ? 'selected' : ''?>>倒序</option>
|
} |
||||||
</select> |
?> |
||||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
</select> |
||||||
<!-- <input type="button" class="act_btn" id="output-btn" name="output-btn" value="导出">--> |
</div> |
||||||
</td> |
<div class="form-group" style="margin-bottom: 8px;"> |
||||||
</tr> |
<label for="engine_no">级别</label> |
||||||
</form> |
<select name="group_id"> |
||||||
</table> |
<option value="0">全部</option> |
||||||
|
<?php |
||||||
<table width="100%" class="layui-elip layui-table" lay-filter="demo"> |
foreach($group_items as $item) { |
||||||
<thead> |
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||||
<tr> |
} |
||||||
<th width="24" align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username1',width:30}">序号</th> |
?> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username2'}">车牌号</th> |
</select> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username4'}">保险公司</th> |
</div> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username5'}">工号</th> |
<button type="submit" class="btn btn-primary mb-8">搜索</button> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username6'}">级别</th> |
</form> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username10',width:110}">保单号</th> |
<div class="row"> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username11'}">提单日期</th> |
<div class="col-md-12"> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username12'}">出单日期</th> |
<table id="listTable"> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username13'}">保险类型</th> |
<thead> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username14'}">商业总保费</th> |
<tr> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username15'}">商业净保费</th> |
<th data-field="state" data-checkbox="true"></th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username16'}">手续费比例</th> |
<th width="50" data-field="id">ID</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username17'}">补点比例</th> |
<th data-field="car_no">车牌</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username18'}">应得金额</th> |
<th data-field="company_name">保险公司</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username19'}">实得金额</th> |
<th data-field="username">工号</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username20'}">回款金额</th> |
<th data-field="group_name">级别</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username22'}">补点金额</th> |
<th data-field="insurer_no">保单号</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username23'}">回款补点</th> |
<th data-field="submit_date">提单日期</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username24'}">减免金额</th> |
<th data-field="print_date">出单日期</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username25'}">礼品礼券</th> |
<th data-field="insurer_type">保险类型</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username26'}">工资</th> |
<th data-field="total">商业总保费</th> |
||||||
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username28'}">利润</th> |
<th data-field="total_clear">商业净保费</th> |
||||||
</tr> |
<th data-field="total_rate">手续费比例</th> |
||||||
</thead> |
<th data-field="budian_rate">补点比例</th> |
||||||
<tbody> |
<th data-field="total_real">应得金额</th> |
||||||
|
<th data-field="total_clear_real">实得金额</th> |
||||||
<?php |
<th data-field="r_total">回款金额</th> |
||||||
foreach($items as $index => $item) { |
<th data-field="bu_dian">补点金额</th> |
||||||
$start_index = ($page-1)*20+$index; |
<th data-field="r_bu_dian">回款补点</th> |
||||||
$order = $item->order; |
<th data-field="total1_dis">减免金额</th> |
||||||
$users=$item->user->group; |
<th data-field="liwu">礼品礼券</th> |
||||||
$username=$item->user; |
<th data-field="gongzi">工资</th> |
||||||
$uname=$username['name']; |
<th data-field="lirun">利润</th> |
||||||
$nams=$users['name']; |
</tr> |
||||||
|
</thead> |
||||||
$total_real = $item->total * $item->total_rate/100; |
</table> |
||||||
$total_clear_real = $item->total_clear * $item->total_rate/100; |
</div> |
||||||
$total_dis = round($total_clear_real - $item->r_total,2); |
</div> |
||||||
|
</div> |
||||||
$order_info = $item->order; |
</div> |
||||||
|
</div> |
||||||
$total1_dis = $item->insurer_type == 1?($order_info->total1_dis + $order_info->yuangong_money):0; |
|
||||||
|
|
||||||
$gongzi = $item->insurer_type == 1?$item->getPayOrderUser()->sum('real_pay'):0; |
<?php $this->beginBlock('footer_js'); ?> |
||||||
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||||
$ticket = $item->insurer_type == 1?$order_info->getGiftPrice(1,1):0; |
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||||
$gift = $item->insurer_type == 1?$order_info->getGiftPrice(1,2):0; |
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||||
|
<script> |
||||||
// $bu_dian = $item->insurer_type == 1?($item->b1_total+$item->b2_total+$item->b3_total):0; |
var o = {}; |
||||||
$bu_dian = $item->budian_rate?$item->budian_rate * $item->total_clear / 100:0; |
function refreshList() { |
||||||
|
$('#listTable').bootstrapTable('refresh'); |
||||||
$r_bu_dian = $item->insurer_type == 1?($item->b1_total+$item->b2_total+$item->b3_total):0; |
|
||||||
|
|
||||||
$liwu = $ticket + $gift; |
|
||||||
|
|
||||||
$lirun = $total_clear_real + $bu_dian - $total1_dis - $gongzi - $liwu; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?> |
|
||||||
<tr style="height:24px;" onMouseOver="overColor(this)" onMouseOut="outColor(this)"> |
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$start_index+1?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->car_no?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$order && $order->company ? $order->company->name:''?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->user->username?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$uname?>-<?=$nams?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->insurer_no?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$order ? $order->submit_date : ''?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$order ? $order->print_date : ''?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->insurer_type==1?'商业':'交强'?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->total?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->total_clear?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->total_rate?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->budian_rate?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$total_real)?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$total_clear_real)?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->r_total?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$bu_dian)?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$r_bu_dian)?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$total1_dis?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$liwu?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$gongzi?></td>
|
|
||||||
<td align="center" class="td_bg" style="font-size:12px;" ><?=$lirun?></td>
|
|
||||||
|
|
||||||
</tr> |
|
||||||
<?php |
|
||||||
} |
|
||||||
?> |
|
||||||
<tr> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($sum_total,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($sum_total_clear,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap></td> |
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($sum_r_total,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($bu_dian_all,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($r_bu_dian_all,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($total1_dis_all,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($liwu_all,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($gongzi_all,2)?></td>
|
|
||||||
<td align="center" class="td_bg" nowrap><?=number_format($lirun_all,2)?></td>
|
|
||||||
</tr> |
|
||||||
|
|
||||||
</tbody> |
|
||||||
|
|
||||||
</table> |
|
||||||
<table> |
|
||||||
<tbody> |
|
||||||
|
|
||||||
<tr> |
|
||||||
<td height="25" colspan="20" align="center" class="td_bg"><?=$page_info?></td>
|
|
||||||
</tr> |
|
||||||
</tbody> |
|
||||||
</table> |
|
||||||
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> |
|
||||||
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script> |
|
||||||
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script> |
|
||||||
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script> |
|
||||||
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.js"></script> |
|
||||||
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611"> |
|
||||||
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605"> |
|
||||||
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605"> |
|
||||||
|
|
||||||
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script> |
|
||||||
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script> |
|
||||||
<script type="text/javascript" language="javascript" src="/js/ajax.js?v=2019"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script> |
|
||||||
<script type="text/javascript" language="javascript"> |
|
||||||
//编辑 |
|
||||||
function edit(id) { |
|
||||||
var params = $('#searchForm').serialize(); |
|
||||||
window.location.href = '/finance/receipt-info?id=' + id + '&back_params=' + encodeURIComponent(params); |
|
||||||
} |
} |
||||||
|
|
||||||
$(function () { |
function search() { |
||||||
|
o = {}; |
||||||
|
var params = $("#searchFrm").serializeArray(); |
||||||
//提交按钮 |
$.each(params, function(index) { |
||||||
$("#submit-btn").click(function(){ |
o[this['name']] = this['value']; |
||||||
if(confirm('是否确认提交?')) { |
|
||||||
var urlfile = $("#urlfile").val(); |
|
||||||
var import_type = $(".import_type").val(); |
|
||||||
|
|
||||||
if(urlfile == ''){ |
|
||||||
alert('请先选择文件!'); |
|
||||||
return false; |
|
||||||
} |
|
||||||
var last_url = '/finance/receipt-process'; |
|
||||||
var params = $("#theFrm").serialize(); |
|
||||||
|
|
||||||
$.post(last_url,params,function(obj){ |
|
||||||
alert(obj.msg); |
|
||||||
if(obj.success){ |
|
||||||
$('#theFrm')[0].reset(); |
|
||||||
window.location.reload(); |
|
||||||
} |
|
||||||
},'json'); |
|
||||||
} |
|
||||||
}); |
}); |
||||||
//搜索 |
$('#listTable').bootstrapTable('destroy'); |
||||||
$("#search-btn").click(function(){ |
$('#listTable').bootstrapTable({ |
||||||
$('#page').val(0); |
url: "/finance/receipt-lirun-json", |
||||||
var params = $('#searchForm').serialize(); |
pagination: true, |
||||||
window.location.href = "/finance/receipt-lirun?" + params; |
sidePagination: 'server', |
||||||
|
multipleSelectRow: true, |
||||||
|
queryParams: function(params) { |
||||||
|
o['offset'] = params['offset']; |
||||||
|
o['limit'] = params['limit']; |
||||||
|
return o; |
||||||
|
} |
||||||
}); |
}); |
||||||
//导出 |
return false; |
||||||
$("#output-btn").click(function(){ |
} |
||||||
$('#page').val(0); |
|
||||||
var params = $('#searchForm').serialize(); |
|
||||||
//window.location.href = "/finance/receipt-output?" + params; |
|
||||||
var url = "/finance/receipt-output"; |
|
||||||
|
|
||||||
$.get(url,params,function(obj){ |
|
||||||
alert(obj.msg); |
|
||||||
if(obj.success) { |
|
||||||
window.location.href = obj.files[0].src; |
|
||||||
} |
|
||||||
},'json'); |
|
||||||
|
|
||||||
|
$(function() { |
||||||
|
search(); |
||||||
|
$('.input-daterange').datepicker({ |
||||||
|
keyboardNavigation: false, |
||||||
|
forceParse: false, |
||||||
|
autoclose: true |
||||||
}); |
}); |
||||||
}) |
}); |
||||||
</script> |
</script> |
||||||
<style> |
<?php $this->endBlock(); ?> |
||||||
input[type="text"] { |
|
||||||
width: 134px; |
|
||||||
} |
|
||||||
|
|
||||||
</style> |
|
||||||
<script> |
|
||||||
console.log(layui) |
|
||||||
layui.use('table',function(){ |
|
||||||
var table = layui.table; |
|
||||||
var $ = layui.$; |
|
||||||
//转换静态表格 |
|
||||||
table.init('demo', { |
|
||||||
limit: 100 |
|
||||||
}); |
|
||||||
$('.layui-table-cell').css('padding','0') |
|
||||||
$('td').css('padding','0') |
|
||||||
}) |
|
||||||
</script> |
|
||||||
|
Loading…
Reference in new issue