完成回单匹配功能开发

dev
曾超新 5 years ago
parent 4786519a10
commit 4dc1925d69
  1. 6
      frontend/controllers/FinanceController.php
  2. 2
      frontend/controllers/InsurerController.php
  3. 158
      frontend/views/finance/receipt-info.php
  4. 16
      frontend/views/finance/receipt.php

@ -213,7 +213,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
foreach($items as $item) { foreach($items as $item) {
$row = $item->toArray(); $row = $item->toArray();
$row['group'] = $item->user->group->name; $row['group'] = $item->user->group->name;
$row['company_name'] = $item->order->company->name; $row['company_name'] = $item->order->company2->name;
$row['username'] = $item->user->getShowName(); $row['username'] = $item->user->getShowName();
$row['submit_date'] = $item->order->submit_date; $row['submit_date'] = $item->order->submit_date;
$row['print_date'] = $item->order->print_date; $row['print_date'] = $item->order->print_date;
@ -3607,8 +3607,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
return $this->render('receipt-info', [ return $this->render('receipt-info', [
'caiwu_info' => $caiwu_info, 'caiwu_info' => $caiwu_info
'back_params' => $back_params,
]); ]);
} }
public function actionEmsReceiptInfo() public function actionEmsReceiptInfo()
@ -6417,7 +6416,6 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info = CarT::findOne(['car_frame_no' => $car_frame_no]); $car_info = CarT::findOne(['car_frame_no' => $car_frame_no]);
if ($car_info) { if ($car_info) {
if($car_no != ''){ if($car_no != ''){
$car_info->car_no = $car_no; $car_info->car_no = $car_no;
} }

@ -1253,6 +1253,7 @@ class InsurerController extends BaseController
$row->car_no = $order_info->car_no; $row->car_no = $order_info->car_no;
$row->factory_model = $order_info->car->factory_model; $row->factory_model = $order_info->car->factory_model;
$row->id_man = $order_info->id_man; $row->id_man = $order_info->id_man;
$row->company = $order_info->company2->name();
$row->total = sprintf("%.2f",$order_info->total1); $row->total = sprintf("%.2f",$order_info->total1);
$row->total_clear = sprintf("%.2f",$order_info->total1_clear); $row->total_clear = sprintf("%.2f",$order_info->total1_clear);
$row->total_clear_real = sprintf("%.2f",($order_info->total1_clear * $order_info->total1_rate/100)); $row->total_clear_real = sprintf("%.2f",($order_info->total1_clear * $order_info->total1_rate/100));
@ -1277,6 +1278,7 @@ class InsurerController extends BaseController
$row->insurer_no = $order_info->insurer2_no; $row->insurer_no = $order_info->insurer2_no;
$row->car_no = $order_info->car_no; $row->car_no = $order_info->car_no;
$row->factory_model = $order_info->car->factory_model; $row->factory_model = $order_info->car->factory_model;
$row->company = $order_info->company2->name();
$row->id_man = $order_info->id_man; $row->id_man = $order_info->id_man;
$row->total = sprintf("%.2f",$order_info->total2); $row->total = sprintf("%.2f",$order_info->total2);
$row->total_clear = sprintf("%.2f",$order_info->total2_clear); $row->total_clear = sprintf("%.2f",$order_info->total2_clear);

@ -1,79 +1,105 @@
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php
<form id="theFrm"> use \common\libs\MyLib;
<input type="hidden" name="id" value="<?=$caiwu_info->id?>"> ?>
<tr> <?php $this->beginBlock('header_css'); ?>
<td width="100" height="25" class="td_bg">车牌号</td> <link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
<td colspan="3" height="25" class="td_bg"> <?php $this->endBlock(); ?>
<?=$caiwu_info->car_no?>
</td> <div class="wrapper wrapper-content animated fadeInRight">
</tr> <div class="ibox float-e-margins">
<tr> <div class="ibox-content">
<td width="100" height="25" class="td_bg">保险公司</td> <div class="row">
<td height="25" class="td_bg"> <div class="col-sm-12">
<?=$caiwu_info->company?> <form role="form" class="form-horizontal data-from" id="theFrm">
</td> <input type="hidden" name="id" value="<?=intval($caiwu_info->id)?>">
<td width="100" height="25" class="td_bg">保单号</td> <div class="form-group">
<td height="25" class="td_bg"> <label class="col-sm-2 control-label">无效理由</label>
<input name="insurer_no" type="text" id="insurer_no" value="<?=$caiwu_info->insurer_no?>" style="width:300px;"/> <div class="col-sm-3">
</td> <p class="form-control-static"><?=$caiwu_info->car_no?></p>
</tr> </div>
<tr> </div>
<td width="100" height="25" class="td_bg">总保费</td> <div class="form-group">
<td height="25" class="td_bg"> <label class="col-sm-2 control-label">保险公司</label>
<?=$caiwu_info->total?> <div class="col-sm-3">
</td> <p class="form-control-static"><?=$caiwu_info->order->company2->name?></p>
<td width="100" height="25" class="td_bg">净保费</td> </div>
<td height="25" class="td_bg"> <label class="col-sm-2 control-label">保单号</label>
<?=$caiwu_info->total_clear?> <div class="col-sm-3">
</td> <input type="text" name="insurer_no" value="<?=$caiwu_info->insurer_no?>" class="form-control">
</tr> </div>
<tr> </div>
<td width="100" height="25" class="td_bg">手续费比例</td> <div class="form-group">
<td colspan="3" height="25" class="td_bg"> <label class="col-sm-2 control-label">总保费</label>
<input name="total_rate" type="text" id="total_rate" value="<?=$caiwu_info->total_rate?>" style="width:100px;"/>% <div class="col-sm-3">
</td> <p class="form-control-static"><?=$caiwu_info->total?></p>
</tr> </div>
<tr> <label class="col-sm-2 control-label">净保费</label>
<td width="100" height="25" class="td_bg">回款金额</td> <div class="col-sm-3">
<td height="25" class="td_bg"> <p class="form-control-static"><?=$caiwu_info->total_clear?></p>
<input name="r_total" type="text" id="r_total" value="<?=$caiwu_info->r_total?>" style="width:100px;"/> </div>
</td> </div>
<td width="100" height="25" class="td_bg">回款日期</td> <div class="form-group">
<td height="25" class="td_bg"> <label class="col-sm-2 control-label">手续费比例</label>
<input name="r_date" type="text" id="r_date" class="Wdate" value="<?=$caiwu_info->r_date?>" style="width:100px;" onclick="WdatePicker()"/> <div class="col-sm-3">
</td> <div class="input-group">
</tr> <input type="text" name="total_rate" value="<?=$caiwu_info->total_rate?>" class="form-control">
<div class="input-group-addon">%</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">回款金额</label>
<div class="col-sm-3">
<input type="text" name="r_total" value="<?=$caiwu_info->r_total?>" class="form-control">
</div>
<label class="col-sm-2 control-label">回款日期</label>
<div class="col-sm-3">
<input type="text" name="r_date" id="r_date" value="<?=$caiwu_info->r_date?>" class="form-control" autocomplete="off">
</div>
</div>
<div>
<div class="row">
<div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong>提 交</strong>
</button>
</div>
</div>
</div>
</form> </form>
<tr> </div>
<td height="22" colspan="4" align="center" class="td_bg"> </div>
<input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/> </div>
&nbsp;&nbsp; </div>
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 "> </div>
</td>
</tr> <?php $this->beginBlock('footer_js'); ?>
</table> <script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<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/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
$(function () { $(function () {
laydate({
elem:'#r_date',
format: 'YYYY-MM-DD'
});
//提交按钮 //提交按钮
$("#submit-btn").click(function(){ $(".btn-save").click(function(){
if(confirm('是否确认提交?')) { parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize(); var params = $("#theFrm").serialize();
$.post('/finance/receipt-save',params,function(obj){ $.post('/finance/receipt-save',params,function(obj){
alert(obj.msg); parent.layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
$('#back-btn').click(); parent.refreshList();
layer_close();
} }
},'json'); },'json');
} }, function(){
//
}); });
//返回按钮
$('#back-btn').click(function(){
window.location.href='/finance/receipt?<?=$back_params?>';
}); });
}) })
</script> </script>
<?php $this->endBlock('footer_js'); ?>

@ -19,7 +19,7 @@ use \common\libs\MyLib;
</div> </div>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();"> <form role="form" id="searchFrm" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;"> <div class="form-group" style="margin-bottom: 8px;">
<label for="name">匹配程度</label> <label for="name">匹配程度</label>
<select name="status" class="form-control"> <select name="status" class="form-control">
@ -91,7 +91,7 @@ use \common\libs\MyLib;
<th data-field="total_clear_real">实得金额</th> <th data-field="total_clear_real">实得金额</th>
<th data-field="total_tax_real">税差</th> <th data-field="total_tax_real">税差</th>
<th data-field="r_total">回款金额</th> <th data-field="r_total">回款金额</th>
<th data-field="r_total_dis">回款差额</th> <th data-field="total_dis">回款差额</th>
<th data-field="r_date">回款日期</th> <th data-field="r_date">回款日期</th>
<th data-formatter="opFormatter">操作</th> <th data-formatter="opFormatter">操作</th>
</tr> </tr>
@ -109,6 +109,7 @@ use \common\libs\MyLib;
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.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 src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script> <script>
var o = {};
function opFormatter(value, row, index) { function opFormatter(value, row, index) {
var opStr = []; var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">');
@ -130,15 +131,20 @@ use \common\libs\MyLib;
} }
function search() { function search() {
o = {};
var params = $("#searchFrm").serializeArray();
$.each(params, function(index) {
o[this['name']] = this['value'];
});
$('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({ $('#listTable').bootstrapTable({
url: "/finance/receipt-json", url: "/finance/receipt-json",
pagination: true, pagination: true,
sidePagination: 'server', sidePagination: 'server',
queryParams: function(params) { queryParams: function(params) {
params.type_id = $('#type_id').val(); o['offset'] = params['offset'];
params.name = $('#name').val(); o['limit'] = params['limit'];
return params; return o;
} }
}); });
return false; return false;

Loading…
Cancel
Save