完善保单查询功能

dev
曾超新 5 years ago
parent 49ed13a465
commit c36cbec507
  1. 156
      frontend/controllers/InsurerController.php
  2. 2
      frontend/views/car/info-track.php
  3. 629
      frontend/views/insurer/info.php
  4. 2
      frontend/views/insurer/office-mng-edit.php
  5. 248
      frontend/views/insurer/search.php

@ -120,66 +120,6 @@ class InsurerController extends BaseController
]); ]);
} }
// public function actionInfo()
// {
// $request = Yii::$app->request;
// $id = $request->get('id',0);
// $order_info = OrderT::findOne(['id'=>$id]);
// $car_info = $order_info->car;
// $nonitems=null;
// if($order_info->non_id){
// $nonitems=NonAutoInsurance::findOne(['id'=>$order_info->non_id]);
// }
//
// //快递
// $ems_items = EmsT::find()
// ->where(['car_id'=>$car_info->id,'order_id'=>$order_info->id])
// ->orderBy('id ASC')
// ->all();
// //礼品
// $gift_free_group_items = GiftGroupT::find()
// ->where('is_free=1')
// ->all();
// $gift_group_items = GiftGroupT::find()
// ->where('is_free=0')
// ->all();
// //获取礼品数据
// $sel_gifts = array();
// $tmp_items = OrderGiftT::find()
// ->where('order_id='.$order_info->id)
// ->all();
// foreach($tmp_items as $item) {
// $sel_gifts[$item->group_id] = $item;
// }
//
// $insurer_type_items = InsurerTypeT::find()
// ->all();
// //登陆用户ID
// $uid = $this->my->id;
// $order_caiwu = OrderCaiwuT::findOne(['order_id'=>$order_info->id]);
// $money_man='';
// $money_no='';
// $money_bank='';
// if($order_caiwu){
// $money_man=$order_caiwu->money_man;
// $money_no= $order_caiwu->money_no;
// $money_bank=$order_caiwu->money_bank;
// }
// return $this->render('info',[
// 'order_info'=>$order_info,
// 'car_info'=>$car_info,
// 'ems_items' => $ems_items,
// 'money_man' => $money_man,
// 'money_no' => $money_no,
// 'money_bank' => $money_bank,
// 'gift_free_group_items' => $gift_free_group_items,
// 'gift_group_items' => $gift_group_items,
// 'sel_gifts' => $sel_gifts,
// 'uid' => $uid,
// 'insurer_type_items' => $insurer_type_items,
// 'nonitems' => $nonitems
// ]);
// }
public function actionInfo() public function actionInfo()
{ {
$request = Yii::$app->request; $request = Yii::$app->request;
@ -4027,8 +3967,12 @@ class InsurerController extends BaseController
return $this->render('original-ems-edit1',[]); return $this->render('original-ems-edit1',[]);
} }
public function actionSearch() public function actionSearch() {
return $this->render('search');
}
public function actionSearchJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_man = $request->get('car_man'); $car_man = $request->get('car_man');
$id_man = $request->get('id_man'); $id_man = $request->get('id_man');
@ -4044,8 +3988,8 @@ class InsurerController extends BaseController
$group_id = $request->get('group_id'); $group_id = $request->get('group_id');
$company_id = $request->get('company_id'); $company_id = $request->get('company_id');
$insurance_status= $request->get('insurance_status'); $insurance_status= $request->get('insurance_status');
$offset = $request->get('offset',0);
if($page < 1) $page = 1; $limit = $request->get('limit', 10);
$group_items = GroupT::getTree(); $group_items = GroupT::getTree();
$group_ids[] = $group_id; $group_ids[] = $group_id;
@ -4055,95 +3999,67 @@ class InsurerController extends BaseController
$group_ids[] = $group_info->id; $group_ids[] = $group_info->id;
} }
} }
// $submit_date='2018-10-14';
// $near_info= OrderT::find()->where(['car_no'=>$car_no])
// ->orderBy('created_at desc')->select('car_man,created_at,user_id')->one();
// $near_info= OrderT::find()->where(['car_no'=>$car_no])
// ->asArray()->select('created_at,submit_date,id,car_man')
// ->andWhere(['status_id'=>10])
// ->andWhere(['<', 'submit_date', $submit_date])
// ->orderBy('created_at desc')->one();
//
// $car_info->op_user1 = $near_info->user->getShowName();
// dd($near_info);
$query = OrderT::find() $query = OrderT::find()
->where('status_id>1') ->where('status_id>1')
// ->orderBy('submit_date DESC, id DESC');
->orderBy('car_no desc,submit_date asc'); ->orderBy('car_no desc,submit_date asc');
if($id_man != '') { if($id_man != '') {
$query = $query->andWhere(['like','id_man',$id_man]); $query->andWhere(['like','id_man',$id_man]);
} }
if($car_man != '') { if($car_man != '') {
$query = $query->andWhere(['like','car_man',$car_man]); $query->andWhere(['like','car_man',$car_man]);
} }
if($phone != '') { if($phone != '') {
$query = $query->andWhere(['like','link_phone',$phone]); $query->andWhere(['like','link_phone',$phone]);
} }
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]); $query->andWhere(['like','car_no',$car_no]);
} }
if($date_begin != '') { if($date_begin != '') {
$query = $query->andWhere('submit_date>="'.$date_begin.'"'); $query->andWhere('submit_date>="'.$date_begin.'"');
} }
if($date_end != '') { if($date_end != '') {
$query = $query->andWhere('submit_date<="'.$date_end.'"'); $query->andWhere('submit_date<="'.$date_end.'"');
} }
if($date2_begin != '') { if($date2_begin != '') {
$query = $query->andWhere('print_date>="'.$date2_begin.'"'); $query->andWhere('print_date>="'.$date2_begin.'"');
} }
if($date2_end != '') { if($date2_end != '') {
$query = $query->andWhere('print_date<="'.$date2_end.'"'); $query->andWhere('print_date<="'.$date2_end.'"');
} }
if($date3_begin != '') { if($date3_begin != '') {
$query = $query->andWhere('insurer1_begin_date>="'.$date3_begin.'"'); $query->andWhere('insurer1_begin_date>="'.$date3_begin.'"');
} }
if($date3_end != '') { if($date3_end != '') {
$query = $query->andWhere('insurer1_begin_date<="'.$date3_end.'"'); $query->andWhere('insurer1_begin_date<="'.$date3_end.'"');
} }
if($company_id != '') { if($company_id != '') {
$query = $query->andWhere('company_id ="'.$company_id.'"'); $query->andWhere('company_id ="'.$company_id.'"');
} }
if($insurance_status != '') { if($insurance_status != '') {
$query = $query->andWhere('insurance_status ="'.$insurance_status.'"'); $query->andWhere('insurance_status ="'.$insurance_status.'"');
} }
$total = $query->count(); $total = $query->count();
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
// echo $query->createCommand()->rawSql; $data = [];
$data['total'] = $total;
$sum = $query->sum('total1_clear'); $data['rows'] = [];
$sum1 = $query->sum('total2_clear'); foreach($items as $item) {
// var_dump($sum1) ; $row = $item->toArray();
$row['lock_name'] = $item->lock?$item->lock->getShowName():'';
$page_info = MyLib::getPageInfo($pagination); $row['status'] = $item->status->name;
$company_items = InsurerCompanyT::find()->all(); $row['username'] = $item->user->getShowName();
return $this->render('search',[ $row['company_name'] = $item->company->name;
'items' => $items, $row['file_status'] = '未上传';
'company_items' => $company_items, if($item->shangye_src || $item->jiaoqiang_src) {
'insurance_status' => $insurance_status, $row['file_status'] = '保单已上传';
'company_id' => $company_id, }
'car_man' => $car_man, $data['rows'][] = $row;
'id_man' => $id_man, }
'phone' => $phone, return $data;
'car_no' => $car_no,
'date_begin' => $date_begin,
'date_end' => $date_end,
'date2_begin' => $date2_begin,
'date2_end' => $date2_end,
'date3_begin' => $date3_begin,
'date3_end' => $date3_end,
'page' => $page,
'page_info' => $page_info,
'group_items'=>$group_items,
'group_id'=>$group_id,
'sum' => $sum
]);
} }
public function actionSearch1() public function actionSearch1()
{ {

@ -105,7 +105,7 @@ use \common\libs\MyLib;
<th data-field="insurer1_begin_date">商业起保日期</th> <th data-field="insurer1_begin_date">商业起保日期</th>
<th data-field="insurer2_begin_date">交强起保日期</th> <th data-field="insurer2_begin_date">交强起保日期</th>
<th data-field="print_date">出单日期</th> <th data-field="print_date">出单日期</th>
<th data-field="total">共计签单</th> <th data-field="total_all">共计签单</th>
<th data-field="username">业务员</th> <th data-field="username">业务员</th>
<th data-field="status">状态</th> <th data-field="status">状态</th>
<th data-formatter="orderFormatter">操作</th> <th data-formatter="orderFormatter">操作</th>

@ -1,148 +1,121 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
use \common\models\PriceT; use common\models\PriceT;
?> ?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css"> <?php $this->beginBlock('header_css'); ?>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<tr> <?php $this->endBlock(); ?>
<td height="22" colspan="2" class="td_bg">
<table width="100%" align="center" height="120" border="0" cellpadding="0" cellspacing="0" id="mainTable"> <div class="wrapper wrapper-content animated fadeInRight">
<tr> <form class="form-horizontal" id="orderFrm">
<td height="120" valign="top" class="td_bg"> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<!--保单信息--> <input type="hidden" name="order_id" value="<?=$order_info->id?>">
<table> <input type="hidden" name="celuo_id" value="<?=$order_info->celuo_id?>">
<tbody> <input type="hidden" name="fanxian_id" value="<?=$order_info->fanxian_id?>">
<tr> <div class="ibox float-e-margins">
<TD height="30" align="center" class=tab-on id=navcell onclick=open_up(1) name="navcell">▼保单信息</TD> <div class="ibox-title">
</tr> <h5>保单信息</h5>
</tbody> </div>
</table> <div class="ibox-content">
<TABLE id=tb1 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb"> <table class="table table-bordered">
<TR>
<TD vAlign=top>
<form id="orderFrm">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<input type="hidden" name="car_id" value="<?=$car_info->id?>">
<tr>
<td width="100" height="25" class="bg_tr">车牌号</td>
<td height="25" class="td_bg"><?=$car_info->car_no?></td>
<td width="100" height="25" class="bg_tr">厂牌型号</td>
<td height="25" class="td_bg"><?=$car_info->factory_model?></td>
<td width="60" height="25" class="bg_tr">品牌</td>
<td width="120" height="25" class="td_bg"><?=$car_info->brand?$car_info->brand->name:''?></td>
<td width="60" height="25" class="bg_tr">车系</td>
<td height="25" class="td_bg"><?=$car_info->series?$car_info->series->name:''?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">发动机号</td>
<td height="25" class="td_bg"><?=$car_info->engine_no?></td>
<td width="100" height="25" class="bg_tr">车架号</td>
<td height="25" class="td_bg"><?=$car_info->car_frame_no?></td>
<td width="60" height="25" class="bg_tr">初登日期</td>
<td height="25" class="td_bg"><?=$car_info->register_date?></td>
<td width="60" height="25" class="bg_tr">排量</td>
<td height="25" class="td_bg"><?=$car_info->displacement?$car_info->displacement->name:''?></td>
</tr>
<tr> <tr>
<td width="100" height="25" class="bg_tr">车辆类型</td> <th class="bg-warning">车牌号</th>
<td height="25" class="td_bg"><?=$car_info->carType?$car_info->carType->name:''?></td> <td><?=$order_info->car_no?></td>
<td width="100" height="25" class="bg_tr">运营性质</td> <th class="bg-warning" nowrap>初登日期</th>
<td height="25" class="td_bg"><?=$car_info->carUse?$car_info->carUse->name:''?></td> <td><?=$car_info->register_date?></td>
<td width="60" height="25" class="bg_tr">座位数</td> <th class="bg-warning" nowrap>座位数</th>
<td height="25" class="td_bg"><?=$car_info->seats?></td> <td><?=$order_info->seats?></td>
<td width="60" height="25" class="bg_tr">年份</td> <th class="bg-warning" nowrap>电子邮件</th>
<td height="25" class="td_bg"><?=$car_info->car_year?></td> <td><?=$order_info->email?></td>
</tr> </tr>
<tr> <tr>
<td width="100" height="25" class="bg_tr">车主</td> <th class="bg-warning">车型</th>
<td height="25" class="td_bg"><?=$car_info->car_man?></td> <td><?=$order_info->factory_model?></td>
<td width="100" height="25" class="bg_tr">联系电话</td> <th class="bg-warning" nowrap>发动机号</th>
<td height="25" class="td_bg"><?=$car_info->phone?></td> <td><?=$order_info->engine_no?></td>
<td width="60" height="25" class="bg_tr">备注</td> <th class="bg-warning" nowrap>车架号</th>
<td height="25" class="td_bg"><?=$car_info->remark?></td> <td><?=$order_info->car_frame_no?></td>
<td width="60" height="25" class="bg_tr">业务分组</td> <th class="bg-warning" nowrap>新车购置价</th>
<td height="25" class="td_bg"><?=$order_info->businessGroup ? $order_info->businessGroup->name : ''?></td> <td><?=$order_info->purchase_price?></td>
</tr> </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
<tr> <tr>
<td class="bg_tr">被保险人</td> <th class="bg-warning">车主</th>
<td class="td_bg"><?=$order_info->id_man?></td> <td><?=$order_info->car_man?></td>
<td class="bg_tr">证件号码</td> <th class="bg-warning">证件类型</th>
<td class="td_bg"><?=$order_info->id_man_number?></td> <td><?=$order_info->car_man_type?></td>
<td width="60" class="bg_tr">联系人</td> <th class="bg-warning">证件号码</th>
<td class="td_bg"><?=$order_info->link_man?></td> <td><?=$order_info->car_man_number?></td>
<td width="60" class="bg_tr">联系电话</td> <th class="bg-warning">联系电话</th>
<td class="td_bg"><?=$order_info->link_man_phone?></td> <td><?=$order_info->car_man_phone?></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">送单日期</td> <th class="bg-warning">被投保人</th>
<td class="td_bg"><?=$order_info->send_date?></td> <td><?=$order_info->id_man?></td>
<td class="bg_tr">保险公司</td> <th class="bg-warning">证件类型</th>
<td class="td_bg"><?=$order_info->company?$order_info->company->name:''?></td> <td><?=$order_info->id_man_type?></td>
<td class="bg_tr">付款方式</td> <th class="bg-warning">证件号码</th>
<td class="td_bg"> <td><?=$order_info->id_man_number?></td>
<?=$order_info->shoufei_id?MyLib::zhifufs($order_info->shoufei_id).'-':''?><?=$order_info->payType?$order_info->payType->name:''?> <th class="bg-warning">联系电话</th>
</td> <td><?=$order_info->id_man_phone?></td>
<td class="bg_tr">收款人</td>
<td class="td_bg">
<?=$order_info->payee_id?$order_info->payee->name:''?>
</td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">商业起保日期</td> <th class="bg-warning">投保人</th>
<td class="td_bg"><?=$order_info->insurer1_begin_date?></td> <td><?=$order_info->link_man?></td>
<td class="bg_tr">交强起保日期</td> <th class="bg-warning">证件类型</th>
<td class="td_bg"><?=$order_info->insurer2_begin_date?></td> <td><?=$order_info->link_man_type?></td>
<td class="bg_tr">付款人</td> <th class="bg-warning">证件号码</th>
<td class="td_bg"> <td><?=$order_info->link_man_number?></td>
<?=$order_info->payer? MyLib::payers($order_info->payer):''?> <th class="bg-warning">联系电话</th>
</td> <td><?=$order_info->link_man_phone?></td>
<td class="bg_tr">缴费单号</td>
<td class="td_bg"><?=$order_info->pay_no?></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">商业保单号</td> <th class="bg-warning" nowrap>商业起保日期</th>
<td class="td_bg"><?=$order_info->insurer1_no?></td> <td><?=$order_info->insurer1_begin_date?></td>
<td class="bg_tr">交强保单号</td> <th class="bg-warning" nowrap>交强起保日期</th>
<td class="td_bg"><?=$order_info->insurer2_no?></td> <td><?=$order_info->insurer2_begin_date?></td>
<td class="bg_tr">收款方式</td> <th class="bg-warning">保险公司</th>
<td class="td_bg"> <td><?=$order_info->company->name?></td>
<?=$order_info->payment_id?$order_info->payment->name:''?> <th class="bg-warning">车辆使用性质</th>
</td> <td><?=$order_info->car->carUse->name?></td>
<td class="bg_tr"></td>
<td class="td_bg"></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">送单地址</td> <th class="bg-warning" nowrap>商业保单号</th>
<td colspan="3" class="td_bg"> <td><?=$order_info->insurer1_no?></td>
<th class="bg-warning" nowrap>商业PDF文件</th>
<td>
<?php if($order_info->shangye_src != '') { ?>
<a href="<?=$order_info->shangye_src?>"><i class="fa fa-image">保单</i></a>
<?php } ?>
<?php if($order_info->fapiao_src != '') { ?>
<a href="<?=$order_info->fapiao_src?>"><i class="fa fa-file-pdf-o">发票</i></a>
<?php } ?>
</td> </td>
<td rowspan="2" class="bg_tr" valign="center">备注</td> <th class="bg-warning">交强保单号</th>
<td colspan="3" rowspan="3" valign="top" class="td_bg"><?=$order_info->remark?></td> <td><?=$order_info->insurer2_no?></td>
</tr> <th class="bg-warning">交强PDF文件</th>
<tr> <td>
<td class="bg_tr">正本送单地址</td> <?php if($order_info->jiaoqiang_src != '') { ?>
<td colspan="3" class="td_bg"> <a href="<?=$order_info->jiaoqiang_src?>"><i class="fa fa-image">保单</i></a>
<?=$order_info->receiver_province?> <?php } ?>
<?=$order_info->receiver_province?> <?php if($order_info->jq_fapiao_src != '') { ?>
<?=$order_info->receiver_city?> <a href="<?=$order_info->jq_fapiao_src?>"><i class="fa fa-file-pdf-o">发票</i></a>
<?=$order_info->receiver_county?> <?php } ?>
<?=$order_info->receiver_address?>
</td> </td>
</tr> </tr>
</table> </table>
<table width="98%" border="0" align="center" cellspacing="0" cellpadding="0" style="table-layout: fixed;"> </div>
<tr> </div>
<td width="40%" valign="top"> <div class="ibox float-e-margins">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <div class="ibox-title">
<h5>险种</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr> <tr>
<td align="center" class="bg_tr">险种</td>
<td align="center" class="bg_tr">内容</td>
<td align="center" class="bg_tr" nowrap>不计免赔</td>
</tr>
<?php <?php
$len = count($insurer_type_items); $len = count($insurer_type_items);
$index = 0;
for($i = 0; $i < $len; $i++) { for($i = 0; $i < $len; $i++) {
$item = $insurer_type_items[$i]; $item = $insurer_type_items[$i];
$order_id = $order_info->id; $order_id = $order_info->id;
@ -151,297 +124,211 @@ use \common\models\PriceT;
$tmp_row = PriceT::find() $tmp_row = PriceT::find()
->where('order_id='.$order_id.' and type_id='.$item->id) ->where('order_id='.$order_id.' and type_id='.$item->id)
->one(); ->one();
if(!$tmp_row) continue; if(!$tmp_row || $tmp_row->val == '' || $tmp_row->val == '否') continue;
if($tmp_row->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue;
?> ?>
<tr> <th class="bg-warning">
<td class="bg_tr" nowrap><?=$item->name?>(<?=$item->code?>)</td> <?=$item->name?>(<?=$item->code?>)
<td class="td_bg"><?=$tmp_row->val?></td> </th>
<td align="center" class="td_bg"><?php <td><?=$tmp_row->val?></td>
if($tmp_row->is_nopay==1) { <td><?=($tmp_row->is_nopay == 1)?'不计免赔':''?></td>
echo '是';
}
?>
</td>
</tr>
<?php <?php
if(($index+1)%3==0) {
echo '</tr>';
echo '<tr>';
}
$index++;
} }
?> ?>
</table>
</td>
<td width="10px;">&nbsp;</td>
<td width="60%" valign="top">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td class="bg_tr">商业总净保费</td>
<td class="td_bg"><?=$order_info->total1_clear?></td>
<td class="bg_tr">商业含税总保费</td>
<td class="td_bg"><?=$order_info->total1?></td>
</tr> </tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>保费信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr> <tr>
<td class="bg_tr">交强总净保费</td> <th class="bg-warning">商业总净保费</th>
<td class="td_bg"><?=$order_info->total2_clear?></td> <td><?=$order_info->total1_clear?></td>
<td class="bg_tr">交强含税总保费</td> <th class="bg-warning">商业含税总保费</th>
<td class="td_bg"><?=$order_info->total2?></td> <td><?=$order_info->total1?></td>
<th class="bg-warning">车船税</th>
<td><?=$order_info->total3?></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">车船税</td> <th class="bg-warning">交强总净保费</th>
<td class="td_bg"><?=$order_info->total3?></td> <td><?=$order_info->total2_clear?></td>
<td class="bg_tr">共计签单</td> <th class="bg-warning">交强含税总保费</th>
<td class="td_bg"><?=$order_info->total_all?></td> <td><?=$order_info->total2?></td>
<th class="bg-warning">业务自付金额</th>
<td><?=$order_info->yuangong_money?></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">折扣后商业净保费</td> <th class="bg-warning">折扣后商业净保费</th>
<td class="td_bg"><?=$order_info->total1_real?></td> <td><?=$order_info->total1_real?></td>
<td class="bg_tr">减免金额</td> <th class="bg-warning">减免金额</th>
<td class="td_bg"><?=$order_info->total1_dis?></td> <td><?=$order_info->total1_dis?></td>
<th class="bg-warning">商业折扣率</th>
<td><?=$order_info->total1_percent?></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">商业折扣率</td> <th class="bg-warning">共计签单</th>
<td class="td_bg"><?=$order_info->total1_percent?></td> <td><?=$order_info->total_all?></td>
<td class="bg_tr">应收</td> <th class="bg-warning">应收</th>
<td class="td_bg"><?=$order_info->total_real?></td> <td><?=$order_info->total_real?></td>
<th class="bg-warning">支付方式</th>
<td><?=$order_info->payType ? $order_info->payType->name : ''?></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">备注</td> <th class="bg-warning">备注</th>
<td colspan="3" class="td_bg"><?=$order_info->price_remark?></td> <td colspan="5"><?=$order_info->price_remark?></td>
</tr>
</table>
</td>
</tr> </tr>
</table> </table>
</form> </div>
</TD> </div>
</TR> <div class="ibox float-e-margins">
</TABLE> <div class="ibox-title">
<!--保单打印信息--> <h5>其他信息</h5>
<table> </div>
<tbody> <div class="ibox-content">
<table class="table table-bordered">
<tr> <tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(11) name="navcell">▲保单打印信息</TD> <th class="bg-warning">领款人</th>
<td><?=$order_info->money_man?></td>
<th class="bg-warning">开户行</th>
<td><?=$order_info->money_bank?></td>
<th class="bg-warning">银行账号</th>
<td><?=$order_info->money_no?></td>
</tr> </tr>
</tbody>
</table>
<TABLE id=tb11 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table" style="table-layout: fixed;">
<form id="pdfForm">
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
<tr> <tr>
<td width="110" align="left" class="bg_tr">上传商业保单文件:</td> <th class="bg-warning">送单地址</th>
<td class="td_bg"> <td colspan="5" class="form-inline">
<input type="text" name="urlfile" id="urlfile" style="width: 200px;" value="<?=$order_info->shangye_src?>"> <?=$order_info->sendCity->name?>
<input id="fileupload" type="file" name="file"> <?=$order_info->sendDistrict->name?>
<?=$order_info->send_address?>
</td> </td>
<td width="110" align="left" class="bg_tr">上传交强保单文件:</td>
<td class="td_bg">
<input type="text" name="urlfile1" id="urlfile1" style="width: 200px;" value="<?=$order_info->jiaoqiang_src?>">
<input id="fileupload1" type="file" name="file1">
</td>
</tr> </tr>
<tr> <td class="td_bg" align="center" colspan="4"><input id="pdf-save-btn" type=button class="ACT_btn" name=Submit1 value=" 保存 "/></td></tr>
</form>
<tr> <tr>
<td width="110" align="left" class="bg_tr">保单文件打印:</td> <th class="bg-warning">备注</th>
<td class="td_bg" colspan="3"> <td colspan="5"><?=$order_info->remark?></td>
<?php if($order_info->shangye_src):?>
<a href="/upload/files<?=$order_info->shangye_src?>" target="_blank">查看商业保单并打印</a>
<?php endif;?>
<?php if($order_info->jiaoqiang_src):?>
<a href="/upload/files<?=$order_info->jiaoqiang_src?>" target="_blank">查看交强保单并打印</a>
<?php endif;?>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<!--礼品信息-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲礼品信息</TD>
</tr>
</tbody>
</table>
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<p>免费礼品</p>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<?php
$index = 0;
foreach($gift_free_group_items as $item) {
$index++;
echo '<tr>';
$sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null;
echo '<td width="85" class="bg_tr">'.$item->name.'</td>';
echo '<td class="td_bg">';
if($sel_gift) echo $sel_gift->name;
echo '</td>';
echo '</tr>';
}
?>
</table>
<p>自费礼品</p>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<?php
$index = 0;
foreach($gift_group_items as $item) {
$index++;
echo '<tr>';
$sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null;
echo '<td width="85" class="bg_tr">'.$item->name.'</td>';
echo '<td class="td_bg">';
if($sel_gift) echo $sel_gift->name;
echo '</td>';
echo '</tr>';
}
?>
</table>
</TD>
</TR>
</TABLE>
<!--操作记录-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(5) name="navcell">▲财务信息</TD>
</tr>
</tbody>
</table>
<TABLE id=tb5 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<tr>
<td width="100" height="25" class="bg_tr">领款人</td>
<td height="25" class="td_bg"><?=$money_man?></td>
<td width="100" height="25" class="bg_tr">开户行</td>
<td height="25" class="td_bg"><?=$money_bank?></td>
<td width="60" height="25" class="bg_tr">品牌</td>
<td height="25" class="td_bg"><?=$money_no?></td>
</tr> </tr>
</table> </table>
</TD> </div>
</TR> </div>
</TABLE> <div class="ibox float-e-margins">
<!--操作记录--> <div class="ibox-title">
<table> <h5>操作记录</h5>
<tbody> <div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#logTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<table id="logTable">
<thead>
<tr> <tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(4) name="navcell">▲操作记录</TD> <th data-field="op_man">操作者</th>
<th data-field="op_time">操作时间</th>
<th data-field="remark">操作内容</th>
</tr> </tr>
</tbody> </thead>
</table> </table>
<TABLE id=tb4 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table"> </div>
<TR> </div>
<TD vAlign=top>
<div id="car_history_list"></div>
</TD>
</TR>
</TABLE>
</form>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<!-- --><?php //if($uid == 1 || $uid == 2 ){ ?>
<input id="tui-save-btn" type="button" class="ACT_btn" name="Submit3" value="退单">
<!-- --><?php //} ?>
<input id="close-btn" type=button class="ACT_btn" name=Submit1 value=" 关闭 "/>
</td>
</tr>
</table>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('footer_js'); ?>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script> <script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" language="javascript" src="/js/common2.js"></script> <script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script> var o = {};
<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> function isNull(data){
<script type="text/javascript" language="javascript"> if(data == "" || data == undefined || data == null){
function infos(id,oid) { return true;
window.open('/non-auto-insurance/bd-info-search?id=' + id +'&oid=' + oid); }else{
// window.location.href = ; return false;
} }
$(function(){ }
//操作历史 //保存订单
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1','car_history_list'); function saveOrder(status_id) {
//保存 var params = $('#orderFrm').serialize();
$('#close-btn').click(function(){ params = params + '&status_id=' + status_id;
window.close(); $.post('/insurer/office-mng-save',params,function(obj){
}); parent.layer.msg(obj.msg);
//礼品修改 if(obj.success && status_id>2) {
$('#tui-save-btn').click(function(){ $('.btn-back').click();
if(confirm('请核对好出单日期,确认退回到正本?')) {
// var param = $('#giftEditFrom').serialize();
$.post('/insurer/tuidan-save',{id:<?=$order_info->id?>},function(obj){
// alert(obj.msg);
if(obj.success) {
alert('退单成功');
} }
},'json'); },'json');
} }
//操作记录
function searchOps() {
$('#logTable').bootstrapTable('destroy');
$('#logTable').bootstrapTable({
url: "/car/history-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['car_id'] = '<?=$order_info->car_id?>';
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
}); });
$('#pdf-save-btn').click(function(){ }
var param = $('#pdfForm').serialize(); $(function() {
$.post('/insurer/pdf-save',param,function(obj){ searchOps();
// alert(obj.msg); $('.btn-return').click(function(){
var remark = $('#return_remark').val();
if(remark === '') {
parent.layer.msg('请输入退回理由');
return;
}
$.post('/insurer/return-op',{
order_id:<?=$order_info->id?>,
return_remark:remark,
return_status_id:<?=$order_info->status_id?>
},function(obj){
parent.layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
alert('保单上传成功'); $('.btn-back').click();
window.location.reload();
} }
},'json'); },'json');
}); });
$('.btn-cancel').click(function(){
//上传 parent.layer.confirm('是否确认放弃处理?', {
$('#fileupload').fileupload({ btn: ['确认','取消'], //按钮
url: '/finance/upload-pdf', shade: false //不显示遮罩
dataType: 'json', }, function(){
done: function (e, data) { var params = $("#theFrm").serialize();
if(!data.result.success){ $.post('/insurer/order-cancel-save',{order_id:<?=$order_info->id?>},function(obj){
alert(data.result.files[0]['error']) parent.layer.msg(obj.msg);
} if(obj.success) {
var file_info = data.result.files[0]; $('.btn-back').click();
$('#urlfile').val(file_info.src);
// $result['files'][0]['error'] = '上传格式文件不是pdf文件';
} }
},'json');
}, function(){
//
}); });
$('#fileupload1').fileupload({
url: '/finance/upload-pdf1',
dataType: 'json',
done: function (e, data) {
if(!data.result.success){
alert(data.result.files[0]['error'])
}
var file_info = data.result.files[0];
$('#urlfile1').val(file_info.src);
// $result['files'][0]['error'] = '上传格式文件不是pdf文件';
}
}); });
$('.btn-save').click(function(){
saveOrder(2);
});
$('.btn-submit').click(function(){
saveOrder(5);
});
$('.btn-back').click(function() {
window.location.href = '/insurer/office-mng';
});
}); });
</script> </script>
<?php $this->endBlock(); ?>

@ -75,7 +75,7 @@ use common\models\PriceT;
<th class="bg-warning" nowrap>交强起保日期</th> <th class="bg-warning" nowrap>交强起保日期</th>
<td><?=$order_info->insurer2_begin_date?></td> <td><?=$order_info->insurer2_begin_date?></td>
<th class="bg-warning">保险公司</th> <th class="bg-warning">保险公司</th>
<td><?=$order_info->company2->name?></td> <td><?=$order_info->company->name?></td>
<th class="bg-warning">车辆使用性质</th> <th class="bg-warning">车辆使用性质</th>
<td><?=$order_info->car->carUse->name?></td> <td><?=$order_info->car->carUse->name?></td>
</tr> </tr>

@ -1,136 +1,132 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript"> <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="refreshList();">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" id="search" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label for="username">车主</label>
<input type="text" id="car_man" name="car_man" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="id_man">被保险人</label>
<input type="text" id="id_man" name="id_man" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="phone">电话</label>
<input type="text" id="phone" name="phone" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="car_no">车牌</label>
<input type="text" id="car_no" name="car_no" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker1">初登日期</label>
<div class="input-group" id="datepicker1">
<input type="text" class="form-control" id="date_begin" name="date_begin" autocomplete="off" />
<div class="input-group-addon">-</div>
<input type="text" class="form-control" id="date_end" name="date_end" autocomplete="off" />
</div>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker3">正本日期</label>
<div class="input-group" id="datepicker3">
<input type="text" class="form-control" id="date2_begin" name="date2_begin" autocomplete="off" />
<div class="input-group-addon">-</div>
<input type="text" class="form-control" id="date2_end" name="date2_end" autocomplete="off" />
</div>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker2">起保日期</label>
<div class="input-group" id="datepicker2">
<input type="text" class="form-control" id="date3_begin" name="date3_begin" autocomplete="off" />
<div class="input-group-addon">-</div>
<input type="text" class="form-control" id="date3_end" name="date3_end" autocomplete="off" />
</div>
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="car_man">车主</th>
<th data-field="id_man">被保险人</th>
<th data-field="submit_date">提单日期</th>
<th data-field="car_no">车牌号</th>
<th data-field="factory_model">厂牌型号</th>
<th data-field="total_all">共计签单</th>
<th data-field="total_real">应收</th>
<th data-field="status">状态</th>
<th data-field="username">业务员</th>
<th data-field="company_name">保险公司</th>
<th data-field="file_status">上传状态</th>
<th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?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>
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="info(' + row.id + ')">');
opStr.push('<i class="fa fa-plus" title="详情">&nbsp;详情</i>');
opStr.push('</a>');
return opStr.join(' ');
}
function info(id) { function info(id) {
window.open('/insurer/info?id=' + id); window.open('/insurer/info?id=' + id);
} }
function infos(id,oid) {
window.open('/non-auto-insurance/bd-info-search?id=' + id +'&oid=' + oid); function refreshList() {
// window.location.href = ; $('#listTable').bootstrapTable('refresh');
} }
$(function(){
$("#search-btn").click(function(){ function search() {
$('#page').val(0); $('#listTable').bootstrapTable('destroy');
var params = $('#searchForm').serialize(); $('#listTable').bootstrapTable({
window.location.href = "/insurer/search?" + params; url: "/insurer/search-json",
}); pagination: true,
sidePagination: 'server',
queryParams: function(params) {
$('#search').find(':input:not(input[type=button],input[type=submit],button)').each(function(index,item){
params[$(item).attr('name')] = $(item).val();
}); });
</script> return params;
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
车主:<input name="car_man" type="text" value="<?=$car_man?>">
被保险人:<input name="id_man" type="text" value="<?=$id_man?>">
电话:<input name="phone" type="text" value="<?=$phone?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
提单日期:从<input name="date_begin" type="text" value="<?=$date_begin?>" style="width:100px;" onclick="WdatePicker()"><input name="date_end" type="text" value="<?=$date_end?>" style="width:100px;" onclick="WdatePicker()">截止
正本日期:从<input name="date2_begin" type="text" value="<?=$date2_begin?>" style="width:100px;" onclick="WdatePicker()"><input name="date2_end" type="text" value="<?=$date2_end?>" style="width:100px;" onclick="WdatePicker()">截止
起保日期:从<input name="date3_begin" type="text" value="<?=$date3_begin?>" style="width:100px;" onclick="WdatePicker()"><input name="date3_end" type="text" value="<?=$date3_end?>" style="width:100px;" onclick="WdatePicker()">截止
<!--
级别:<select name="group_id">
<option value="0">全部</option>
<?php
foreach($group_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $group_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
//-->
保险公司:<select name="company_id">
<option value="">全部</option>
<?php
foreach($company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
} }
?> });
</select> return false;
险种类型:<select name="insurance_status">
<option value="">全部</option>
<option value="1" <?php if($insurance_status==1) echo ' selected ';?>>车险</option>
<option value="2" <?php if($insurance_status==2) echo ' selected ';?>>非车险</option>
<option value="3" <?php if($insurance_status==3) echo ' selected ';?>>车险和非车险</option>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> </td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="30" align="center" class="bg_tr" nowrap>序号</td>
<td width="50" align="center" class="bg_tr" nowrap>车主</td>
<td width="50" align="center" class="bg_tr" nowrap>被保险人</td>
<td width="60" align="center" class="bg_tr" nowrap>提单日期</td>
<td width="60" align="center" class="bg_tr" nowrap>送单日期</td>
<td width="60" align="center" class="bg_tr" nowrap>车牌号</td>
<td width="60" align="center" class="bg_tr" nowrap>品牌</td>
<td width="60" align="center" class="bg_tr" nowrap>共计签单</td>
<td width="60" align="center" class="bg_tr" nowrap>应收</td>
<td width="60" align="center" class="bg_tr" nowrap>状态</td>
<td width="60" align="center" class="bg_tr" nowrap>业务员</td>
<td width="60" align="center" class="bg_tr" nowrap>保险公司</td>
<td width="60" align="center" class="bg_tr" nowrap>上传状态</td>
<td width="60" align="center" class="bg_tr" nowrap>当前操作</td>
<td width="30" align="center" class="bg_tr" nowrap>操作</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page - 1) * 20 + $index;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
<td class="td_bg" nowrap><?=MyLib::substr_cut($item->car_man,15)?></td>
<td class="td_bg" nowrap><?=MyLib::substr_cut($item->id_man,15)?></td>
<td class="td_bg" nowrap><?=$item->submit_date?></td>
<td class="td_bg" nowrap><?=$item->send_date?></td>
<td class="td_bg" nowrap><?=$item->car_no?></td>
<td class="td_bg" nowrap><?=$item->car?MyLib::substr_cut($item->car->factory_model,15):''?></td>
<td class="td_bg" nowrap><?=$item->total_all?></td>
<td class="td_bg" ><?=$item->total_real?>&nbsp;</td>
<td class="td_bg" ><?=$item->status->name?></td>
<td class="td_bg" ><?=$item->user?$item->user->getShowName():''?></td>
<td class="td_bg" >
<?php if($item->company):?>
<?=$item->company->name?$item->company->name:''?>
<?php endif;?>
</td>
<td class="td_bg" >
<?php if($item->shangye_src || $item->jiaoqiang_src):?>
保单已上传
<?php else:?>
未上传
<?php endif;?>
</td>
<td class="td_bg" ><?=$item->lock?$item->lock->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
<?php if($item->insurance_status==1 || $item->insurance_status==3):?>
[<a href="javascript:void(0);" onclick="info(<?=$item->id?>)">详情</a>]
<?php elseif($item->insurance_status==2):?>
[<a href="javascript:void(0);" onclick="infos(<?=$item->non_id?>,<?= $item->id ?>)">非车险详情</a>]
<?php endif;?>
</td>
</tr>
<?php
} }
?>
<tr> $(function() {
<td class="td_bg" align="right" colspan="7">净保费总和</td> search();
<td class="td_bg" align="left" colspan="7"><?=$sum?></td> });
</tr> </script>
<tr > <?php $this->endBlock(); ?>
<td height="25" colspan="15" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

Loading…
Cancel
Save