完成回单匹配功能开发

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) {
$row = $item->toArray();
$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['submit_date'] = $item->order->submit_date;
$row['print_date'] = $item->order->print_date;
@ -3607,8 +3607,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
return $this->render('receipt-info', [
'caiwu_info' => $caiwu_info,
'back_params' => $back_params,
'caiwu_info' => $caiwu_info
]);
}
public function actionEmsReceiptInfo()
@ -6417,7 +6416,6 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info = CarT::findOne(['car_frame_no' => $car_frame_no]);
if ($car_info) {
if($car_no != ''){
$car_info->car_no = $car_no;
}

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

@ -19,7 +19,7 @@ use \common\libs\MyLib;
</div>
</div>
<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;">
<label for="name">匹配程度</label>
<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_tax_real">税差</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-formatter="opFormatter">操作</th>
</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/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">');
@ -130,15 +131,20 @@ use \common\libs\MyLib;
}
function search() {
o = {};
var params = $("#searchFrm").serializeArray();
$.each(params, function(index) {
o[this['name']] = this['value'];
});
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/finance/receipt-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
params.type_id = $('#type_id').val();
params.name = $('#name').val();
return params;
o['offset'] = params['offset'];
o['limit'] = params['limit'];
return o;
}
});
return false;

Loading…
Cancel
Save