From 3366f57c9fd1065e593c5f40592301a255cd4684 Mon Sep 17 00:00:00 2001 From: zhaocheng <578322713@qq.com> Date: Wed, 16 Oct 2019 16:10:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=9F=A5=E8=AF=A2=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/controllers/InsurerController.php | 74 +- frontend/views/car/info-track.php | 901 ----------------- frontend/views/car/search.php | 3 - frontend/views/insurer/info.php | 1035 ++++++++++++-------- frontend/views/insurer/search.php | 296 +++--- 5 files changed, 816 insertions(+), 1493 deletions(-) delete mode 100644 frontend/views/car/info-track.php diff --git a/frontend/controllers/InsurerController.php b/frontend/controllers/InsurerController.php index 266a1d4..1e78c75 100644 --- a/frontend/controllers/InsurerController.php +++ b/frontend/controllers/InsurerController.php @@ -176,8 +176,14 @@ class InsurerController extends BaseController // 'nonitems' => $nonitems // ]); // } - public function actionInfo() + + public function actionInfo() { + return $this->render('info'); + } + + public function actionInfJson() { + Yii::$app->response->format = Response::FORMAT_JSON; $request = Yii::$app->request; $id = $request->get('id',0); $order_info = OrderT::findOne(['id'=>$id]); @@ -4095,14 +4101,18 @@ class InsurerController extends BaseController 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; $car_man = $request->get('car_man'); $id_man = $request->get('id_man'); $phone = $request->get('phone'); $car_no = $request->get('car_no'); - $page = $request->get('page',1); $date_begin = $request->get('date_begin'); $date_end = $request->get('date_end'); $date2_begin = $request->get('date2_begin'); @@ -4112,8 +4122,9 @@ class InsurerController extends BaseController $group_id = $request->get('group_id'); $company_id = $request->get('company_id'); $insurance_status= $request->get('insurance_status'); + $offset = $request->get('offset',0); + $limit = $request->get('limit', 10); - if($page < 1) $page = 1; $group_items = GroupT::getTree(); $group_ids[] = $group_id; @@ -4137,7 +4148,7 @@ class InsurerController extends BaseController $query = OrderT::find() ->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 != '') { $query = $query->andWhere(['like','id_man',$id_man]); } @@ -4175,12 +4186,9 @@ class InsurerController extends BaseController if($insurance_status != '') { $query = $query->andWhere('insurance_status ="'.$insurance_status.'"'); } - $total = $query->count(); - - $pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); - $pagination->setPage($page-1); - $query = $query->offset($pagination->offset)->limit($pagination->limit); + $total = $query->count(); + $query = $query->offset($offset)->limit($limit); $items = $query->all(); // echo $query->createCommand()->rawSql; @@ -4188,31 +4196,27 @@ class InsurerController extends BaseController $sum = $query->sum('total1_clear'); $sum1 = $query->sum('total2_clear'); // var_dump($sum1) ; - - $page_info = MyLib::getPageInfo($pagination); $company_items = InsurerCompanyT::find()->all(); - return $this->render('search',[ - 'items' => $items, - 'company_items' => $company_items, - 'insurance_status' => $insurance_status, - 'company_id' => $company_id, - 'car_man' => $car_man, - 'id_man' => $id_man, - 'phone' => $phone, - '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 - ]); + + $data = []; + $data['total'] = $total; + $data['rows'] = []; + $data['sum'] = $sum; + $data['sum1'] = $sum1; + $data['company_info'] = $company_items; + foreach($items as $item) { + $row = $item->toArray(); + $row['car_factory_model'] = $item->car?MyLib::substr_cut($item->car->factory_model,15):''; + $row['show_name'] = $item->user?$item->user->getShowName():''; + $row['status_txt'] = $item->status?$item->status->name:''; + $row['company_name'] = $item->company&&$item->company->name?$item->company->name:''; + $row['upload_status_txt'] = $item->shangye_src || $item->jiaoqiang_src?'保单已上传': '未上传'; + $row['lock_show_name'] = $item->lock?$item->lock->getShowName():''; + $data['rows'][] = $row; + } + return $data; } + public function actionSearch1() { $request = Yii::$app->request; @@ -4319,10 +4323,6 @@ class InsurerController extends BaseController $order_weizhi_info->num=1; $order_weizhi_info->save(); } - - - - } $sum = $query->sum('total1_clear'); diff --git a/frontend/views/car/info-track.php b/frontend/views/car/info-track.php deleted file mode 100644 index d0f8b82..0000000 --- a/frontend/views/car/info-track.php +++ /dev/null @@ -1,901 +0,0 @@ - -beginBlock('header_css'); ?> - - -endBlock(); ?> - -
-
- -
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
-
预约信息
-
-
-
-
-
-
车牌号:
-
-
厂牌型号:
-
-
品牌:
-
-
-
-
-
-
发动机号:
-
-
车架号:
-
-
初登日期:
-
-
-
-
-
-
车辆类型:
-
-
运营性质:
-
-
座位数:
-
-
-
-
-
-
-
-
车系:
-
-
排量:
-
-
年份:
-
-
-
-
-
-
车主:
-
-
车主证件号码:
-
-
联系电话:
-
- - -
-
-
-
-
-
-
商业止保日期:
-
-
交强止保日期:
-
-
保险公司:
-
-
-
- -
-
-
-
-
-
-
新保座席:
-
-
客服代表:
-
-
续保座席:
-
-
-
-
-
-
区域:
-
-
备注:
-
remark ?>
-
-
-
-
-
-
-
-
- -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- insurer1_date; - if ($insurer_date == '') { - $insurer_date = $car_info->insurer2_date; - } - $begin_zhi_date = date('Y-m-d', strtotime('-3 month', strtotime($insurer_date . ' 00:00:00'))); - $cur_date = date('Y-m-d'); - //echo '该提示放弃时间'.$begin_zhi_date.'当前'.$cur_date; - $d1 = strtotime($cur_date); - $d2 = strtotime($begin_zhi_date); - $Days = round(($d2 - $d1) / 3600 / 24); - $day = (int)$Days; - if ($day <= 0) { - echo ''; - } - //$cur_year = date('Y'); - //$cur_date = date('m-d'); - //$year_date = date('Y',strtotime($insurer_date.' 00:00:00')); - //$begin_date = date('m-d',strtotime('-3 month',strtotime($insurer_date.' 00:00:00'))); - //$end_date = date('m-d',strtotime($insurer_date.' 00:00:00')); - //echo '今年:'.$cur_year.'
结束年份:'.$year_date.'
今天日期'.$cur_date.'
到期前三个月日期'.$begin_date.'
最后真正到期日期'.$end_date.'
'; - //if((date('m') < 10) && ($cur_year >= $year_date && $cur_date >= $begin_date && $cur_date <= $end_date)){ - // echo ''; - //}else if((date('m') >= 10) && ($cur_date >= $begin_date)){ - // echo ''; - //} - ?> - - - -
-
- - - -
-
- - - - - - - - - - - - - -
ID预约日期预约时间预约类型预约备注业务员业务分组操作时间
-
-
-
-
-
-
-
保单信息
- -
-
-
-
- - - - - - - - - - - - - - -
ID被保险人商业起保日期交强起保日期出单日期共计签单业务员状态操作
-
-
-
-
-
-
-
礼品列表
- -
-
-
-
- - - - - - - - - - -
礼品编号礼品名称操作时间操作员状态
-
-
- - - - - - - - - - - - -
ID礼品名称类型描述分类 - 添加者操作时间状态
-
-
-
-
-
-
-
操作记录
- -
-
-
-
- - - - - - - - - -
ID姓名操作时间意见意见说明 -
-
-
-
-
-
- -beginBlock('footer_js'); ?> - - - - -endBlock('footer_js'); ?> \ No newline at end of file diff --git a/frontend/views/car/search.php b/frontend/views/car/search.php index 8b5fc6e..a877a74 100644 --- a/frontend/views/car/search.php +++ b/frontend/views/car/search.php @@ -1,6 +1,3 @@ - beginBlock('header_css'); ?> endBlock(); ?> diff --git a/frontend/views/insurer/info.php b/frontend/views/insurer/info.php index 28dc74a..7efd747 100644 --- a/frontend/views/insurer/info.php +++ b/frontend/views/insurer/info.php @@ -1,447 +1,630 @@ - - - -
- - -
- - - - - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车牌号car_no?>厂牌型号factory_model?>品牌brand?$car_info->brand->name:''?>车系series?$car_info->series->name:''?>
发动机号engine_no?>车架号car_frame_no?>初登日期register_date?>排量displacement?$car_info->displacement->name:''?>
车辆类型carType?$car_info->carType->name:''?>运营性质carUse?$car_info->carUse->name:''?>座位数seats?>年份car_year?>
车主car_man?>联系电话phone?>备注remark?>业务分组businessGroup ? $order_info->businessGroup->name : ''?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
被保险人id_man?>证件号码id_man_number?>联系人link_man?>联系电话link_man_phone?>
送单日期send_date?>保险公司company?$order_info->company->name:''?>付款方式 - shoufei_id?MyLib::zhifufs($order_info->shoufei_id).'-':''?>payType?$order_info->payType->name:''?> - 收款人 - payee_id?$order_info->payee->name:''?> -
商业起保日期insurer1_begin_date?>交强起保日期insurer2_begin_date?>付款人 - payer? MyLib::payers($order_info->payer):''?> - 缴费单号pay_no?>
商业保单号insurer1_no?>交强保单号insurer2_no?>收款方式 - payment_id?$order_info->payment->name:''?> -
送单地址 - 备注remark?>
正本送单地址 - receiver_province?> - receiver_province?> - receiver_city?> - receiver_county?> - receiver_address?> -
- - - - - - -
- - - - - - - id; - if(!$order_id) - $order_id = 0; - $tmp_row = PriceT::find() - ->where('order_id='.$order_id.' and type_id='.$item->id) - ->one(); - if(!$tmp_row) continue; - if($tmp_row->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue; - ?> - - - - - - -
险种内容不计免赔
name?>(code?>)val?>is_nopay==1) { - echo '是'; - } - ?> -
-
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
商业总净保费total1_clear?>商业含税总保费total1?>
交强总净保费total2_clear?>交强含税总保费total2?>
车船税total3?>共计签单total_all?>
折扣后商业净保费total1_real?>减免金额total1_dis?>
商业折扣率total1_percent?>应收total_real?>
备注price_remark?>
-
-
-
- - - +beginBlock('header_css'); ?> + + +endBlock(); ?> + +
+
+
+
保单信息
+ +
+
+
+
+
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+

+
+
+ - + + + + - +
ID险种内容不计免赔
- - - - - - - - - - - - - +beginBlock('footer_js'); ?> + + + + - - - - - - - - \ No newline at end of file + function orderInfoInit(data){ + $('.order-info:not(input)').each(function(key,item) { + $(item).html(data[$(item).data('name')]); + }); + $('.order-info:input').each(function(key,item) { + $(item).val(data[$(item).data('name')]); + }); + } + + function buttonInit(param) { + if(param){ + $('#appointment_btn').prepend(''); + } + } + +endBlock('footer_js'); ?> \ No newline at end of file diff --git a/frontend/views/insurer/search.php b/frontend/views/insurer/search.php index e905c87..a7704ba 100644 --- a/frontend/views/insurer/search.php +++ b/frontend/views/insurer/search.php @@ -1,136 +1,180 @@ - - - - - + + + -
- - - - - - - +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+

+ + +
+ + +
+
+
+ + +
+
+ + + + + + +
+
+
礼品信息
+
+
+
+
+

免费礼品

+
上传商业保单文件: - - -
+ + + + + + + +
ID组名礼品名
+ +
+

自费礼品

+ + + + + + + + +
ID组名礼品名
+
+ + + +
+
+
财务信息
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
操作记录
+
+
+
+
+
+
+ + + + + + + + + + +
ID操作者操作时间操作内容
+
+
+
+
+ + -
上传交强保单文件: - - - -
保单文件打印: - shangye_src):?> - 查看商业保单并打印 - - - jiaoqiang_src):?> - 查看交强保单并打印 - -
- - - - - - -
- 车主: - 被保险人: - 电话: - 车牌: - 提单日期:从截止 - 正本日期:从截止 - 起保日期:从截止 - - 保险公司: - 险种类型: -
- - - - - - - - - - - - - - - - - - - $item) { - $start_index = ($page - 1) * 20 + $index; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - -
序号车主被保险人提单日期送单日期车牌号品牌共计签单应收状态业务员保险公司上传状态当前操作操作
car_man,15)?>id_man,15)?>submit_date?>send_date?>car_no?>car?MyLib::substr_cut($item->car->factory_model,15):''?>total_all?>total_real?> status->name?>user?$item->user->getShowName():''?> - company):?> - company->name?$item->company->name:''?> - - - shangye_src || $item->jiaoqiang_src):?> - 保单已上传 - - 未上传 - - lock?$item->lock->getShowName():''?> - insurance_status==1 || $item->insurance_status==3):?> - [详情] - insurance_status==2):?> - [非车险详情] - -
净保费总和
+endBlock(); ?>