修复策略计算功能

dev
曾超新 5 years ago
parent 4893774b22
commit 0384880f4a
  1. 16
      frontend/controllers/FinanceController.php
  2. 2
      frontend/views/car/order-add.php
  3. 51
      frontend/views/finance/receipt.php
  4. 6
      frontend/views/insurer/original-mng-edit.php

@ -56,10 +56,15 @@ class FinanceController extends \frontend\controllers\UserBaseController
public $layout = 'blue-main'; public $layout = 'blue-main';
public function actionReceipt() { public function actionReceipt() {
return $this->render('receipt'); $insurer_company_items = InsurerCompanyT::find()->all();
return $this->render('receipt',[
'insurer_company_items' => $insurer_company_items
]);
} }
public function actionReceiptJson() public function actionReceiptJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$begin_date = $request->get('begin_date'); $begin_date = $request->get('begin_date');
$end_date = $request->get('end_date'); $end_date = $request->get('end_date');
@ -89,8 +94,6 @@ class FinanceController extends \frontend\controllers\UserBaseController
} }
} }
if ($page < 1) $page = 1;
$query = CaiwuT::find() $query = CaiwuT::find()
->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id"); ->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id");
@ -209,7 +212,12 @@ class FinanceController extends \frontend\controllers\UserBaseController
$data['rows'] = []; $data['rows'] = [];
foreach($items as $item) { foreach($items as $item) {
$row = $item->toArray(); $row = $item->toArray();
$row['user'] = $item->user?$item->user->getShowName():''; $row['group'] = $item->user->group->name;
$row['company_name'] = $item->order->company->name;
$row['username'] = $item->user->getShowName();
$row['submit_date'] = $item->order->submit_date;
$row['print_date'] = $item->order->print_date;
$row['total_real'] = round($item->total_clear_real + $item->total_tax_real,2);
$data['rows'][] = $row; $data['rows'][] = $row;
} }

@ -443,7 +443,7 @@ use common\models\PriceT;
var total_real = Number($('#total_real').val()); var total_real = Number($('#total_real').val());
var yuangong_money = Number($('#yuangong_money').val()); var yuangong_money = Number($('#yuangong_money').val());
total_all = total1 + total2 + total3; total_all = total1 + total2 + total3;
total1_real = total1_clear * ( 1 - fanxian_rate); total1_real = total1_clear * ( 1 - fanxian_rate) - yuangong_money;
total1_dis = total1_clear * fanxian_rate; total1_dis = total1_clear * fanxian_rate;
total_real = total_all - total1_dis - yuangong_money; total_real = total_all - total1_dis - yuangong_money;
total1_percent = parseFloat(total1_real/total1_clear); total1_percent = parseFloat(total1_real/total1_clear);

@ -21,7 +21,51 @@ use \common\libs\MyLib;
<div class="ibox-content"> <div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();"> <form role="form" 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">
<option value=0>全部</option>
<option value=1 selected>未匹配</option>
<option value=2 >已完成</option>
<option value=3 >匹配差额</option>
</select>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">保险类型</label>
<select name="insurer_type" class="form-control">
<option value=0>全部</option>
<option value=1 >商业</option>
<option value=2 >交强</option>
</select>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">保单号</label>
<input type="text" id="insurer_no" name="insurer_no" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">车牌</label>
<input type="text" id="car_no" name="car_no" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">出单日期</label>
<input type="text" id="name" name="name" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">回单日期</label>
<input type="text" id="name" name="name" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">保险公司</label>
<select name="company_id" id="company_id" class="form-control">
<option value="0">---请选择---</option>
<?php
foreach($insurer_company_items as $item) {
echo '<option value="'.$item->id.'">'.$item->name.'</option>';
}
?>
</select>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">级别</label>
<input type="text" id="name" name="name" class="form-control"> <input type="text" id="name" name="name" class="form-control">
</div> </div>
<button type="submit" class="btn btn-primary mb-8">搜索</button> <button type="submit" class="btn btn-primary mb-8">搜索</button>
@ -36,8 +80,7 @@ use \common\libs\MyLib;
<th data-field="id_man">被保险人</th> <th data-field="id_man">被保险人</th>
<th data-field="company_name">保险公司</th> <th data-field="company_name">保险公司</th>
<th data-field="username">工号</th> <th data-field="username">工号</th>
<th data-field="nams">级别</th> <th data-field="group">级别</th>
<th data-field="payer">付款人</th>
<th data-field="insurer_no">保单号</th> <th data-field="insurer_no">保单号</th>
<th data-field="submit_date">提单日期</th> <th data-field="submit_date">提单日期</th>
<th data-field="print_date">出单日期</th> <th data-field="print_date">出单日期</th>
@ -46,7 +89,7 @@ use \common\libs\MyLib;
<th data-field="total_rate">手续费比例</th> <th data-field="total_rate">手续费比例</th>
<th data-field="total_real">应得金额</th> <th data-field="total_real">应得金额</th>
<th data-field="total_clear_real">实得金额</th> <th data-field="total_clear_real">实得金额</th>
<th data-field="total_real_dis">税差</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="r_total_dis">回款差额</th>
<th data-field="r_date">回款日期</th> <th data-field="r_date">回款日期</th>

@ -254,7 +254,7 @@ use common\models\PriceT;
<th class="bg-warning text-danger">商业发票文件</th> <th class="bg-warning text-danger">商业发票文件</th>
<td> <td>
<div class="input-group"> <div class="input-group">
<input type="text" name="fapiao_src" id="fapiao_src" class="form-control" value="<?=$info->fapiao_src?>"> <input type="text" name="fapiao_src" id="fapiao_src" class="form-control" value="<?=$order_info->fapiao_src?>">
<a href="javascript:void(0);" class="input-group-addon" id="upload2"> <a href="javascript:void(0);" class="input-group-addon" id="upload2">
上传文件 上传文件
</a> </a>
@ -265,7 +265,7 @@ use common\models\PriceT;
<th class="bg-warning text-danger">交强保单文件</th> <th class="bg-warning text-danger">交强保单文件</th>
<td> <td>
<div class="input-group"> <div class="input-group">
<input type="text" name="jiaoqiang_src" id="jiaoqiang_src" class="form-control" value="<?=$info->jiaoqiang_src?>"> <input type="text" name="jiaoqiang_src" id="jiaoqiang_src" class="form-control" value="<?=$order_info->jiaoqiang_src?>">
<a href="javascript:void(0);" class="input-group-addon" id="upload3"> <a href="javascript:void(0);" class="input-group-addon" id="upload3">
上传文件 上传文件
</a> </a>
@ -274,7 +274,7 @@ use common\models\PriceT;
<th class="bg-warning text-danger">交强发票文件</th> <th class="bg-warning text-danger">交强发票文件</th>
<td> <td>
<div class="input-group"> <div class="input-group">
<input type="text" name="jq_fapiao_src" id="jq_fapiao_src" class="form-control" value="<?=$info->jq_fapiao_src?>"> <input type="text" name="jq_fapiao_src" id="jq_fapiao_src" class="form-control" value="<?=$order_info->jq_fapiao_src?>">
<a href="javascript:void(0);" class="input-group-addon" id="upload4"> <a href="javascript:void(0);" class="input-group-addon" id="upload4">
上传文件 上传文件
</a> </a>

Loading…
Cancel
Save