From c36cbec507d08a9e723073e2c46f0c5062a7dcb1 Mon Sep 17 00:00:00 2001 From: zengchaoxin Date: Mon, 14 Oct 2019 15:05:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BF=9D=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/controllers/InsurerController.php | 156 +---- frontend/views/car/info-track.php | 2 +- frontend/views/insurer/info.php | 745 +++++++++------------ frontend/views/insurer/office-mng-edit.php | 2 +- frontend/views/insurer/search.php | 248 ++++--- 5 files changed, 476 insertions(+), 677 deletions(-) diff --git a/frontend/controllers/InsurerController.php b/frontend/controllers/InsurerController.php index 785f473..16dcdc6 100644 --- a/frontend/controllers/InsurerController.php +++ b/frontend/controllers/InsurerController.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() { $request = Yii::$app->request; @@ -4027,8 +3967,12 @@ 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'); @@ -4044,8 +3988,8 @@ class InsurerController extends BaseController $group_id = $request->get('group_id'); $company_id = $request->get('company_id'); $insurance_status= $request->get('insurance_status'); - - if($page < 1) $page = 1; + $offset = $request->get('offset',0); + $limit = $request->get('limit', 10); $group_items = GroupT::getTree(); $group_ids[] = $group_id; @@ -4055,95 +3999,67 @@ class InsurerController extends BaseController $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() ->where('status_id>1') -// ->orderBy('submit_date DESC, id DESC'); ->orderBy('car_no desc,submit_date asc'); if($id_man != '') { - $query = $query->andWhere(['like','id_man',$id_man]); + $query->andWhere(['like','id_man',$id_man]); } if($car_man != '') { - $query = $query->andWhere(['like','car_man',$car_man]); + $query->andWhere(['like','car_man',$car_man]); } if($phone != '') { - $query = $query->andWhere(['like','link_phone',$phone]); + $query->andWhere(['like','link_phone',$phone]); } if($car_no != '') { - $query = $query->andWhere(['like','car_no',$car_no]); + $query->andWhere(['like','car_no',$car_no]); } if($date_begin != '') { - $query = $query->andWhere('submit_date>="'.$date_begin.'"'); + $query->andWhere('submit_date>="'.$date_begin.'"'); } if($date_end != '') { - $query = $query->andWhere('submit_date<="'.$date_end.'"'); + $query->andWhere('submit_date<="'.$date_end.'"'); } if($date2_begin != '') { - $query = $query->andWhere('print_date>="'.$date2_begin.'"'); + $query->andWhere('print_date>="'.$date2_begin.'"'); } if($date2_end != '') { - $query = $query->andWhere('print_date<="'.$date2_end.'"'); + $query->andWhere('print_date<="'.$date2_end.'"'); } if($date3_begin != '') { - $query = $query->andWhere('insurer1_begin_date>="'.$date3_begin.'"'); + $query->andWhere('insurer1_begin_date>="'.$date3_begin.'"'); } if($date3_end != '') { - $query = $query->andWhere('insurer1_begin_date<="'.$date3_end.'"'); + $query->andWhere('insurer1_begin_date<="'.$date3_end.'"'); } if($company_id != '') { - $query = $query->andWhere('company_id ="'.$company_id.'"'); + $query->andWhere('company_id ="'.$company_id.'"'); } if($insurance_status != '') { - $query = $query->andWhere('insurance_status ="'.$insurance_status.'"'); + $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); + $query->offset($offset)->limit($limit); $items = $query->all(); -// echo $query->createCommand()->rawSql; - - $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'] = []; + foreach($items as $item) { + $row = $item->toArray(); + $row['lock_name'] = $item->lock?$item->lock->getShowName():''; + $row['status'] = $item->status->name; + $row['username'] = $item->user->getShowName(); + $row['company_name'] = $item->company->name; + $row['file_status'] = '未上传'; + if($item->shangye_src || $item->jiaoqiang_src) { + $row['file_status'] = '保单已上传'; + } + $data['rows'][] = $row; + } + return $data; } public function actionSearch1() { diff --git a/frontend/views/car/info-track.php b/frontend/views/car/info-track.php index 24e9d99..780ee24 100644 --- a/frontend/views/car/info-track.php +++ b/frontend/views/car/info-track.php @@ -105,7 +105,7 @@ use \common\libs\MyLib; 商业起保日期 交强起保日期 出单日期 - 共计签单 + 共计签单 业务员 状态 操作 diff --git a/frontend/views/insurer/info.php b/frontend/views/insurer/info.php index 28dc74a..972036d 100644 --- a/frontend/views/insurer/info.php +++ b/frontend/views/insurer/info.php @@ -1,447 +1,334 @@ - - - - - - - - -
- - - - -
- - - - - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车牌号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?>
-
-
-
- - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - +use common\models\PriceT; +?> +beginBlock('header_css'); ?> + +endBlock(); ?> - - - -
上传商业保单文件: - - - 上传交强保单文件: - - - -
保单文件打印: - shangye_src):?> - 查看商业保单并打印 - - - jiaoqiang_src):?> - 查看交强保单并打印 - -
-
- - - - - - - - -
- - - - -
-

免费礼品

- - '; - $sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null; - echo ''; - echo ''; - echo ''; - } - ?> -
'.$item->name.''; - if($sel_gift) echo $sel_gift->name; - echo '
-

自费礼品

- - '; - $sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null; - echo ''; - echo ''; - echo ''; - } - ?> -
'.$item->name.''; - if($sel_gift) echo $sel_gift->name; - echo '
-
- - - - - - - -
- - - - -
- - - - - - - - - -
领款人开户行品牌
-
- - - - - - - -
- - - - -
-
-
- +
+
+ + + + +
+
+
保单信息
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
车牌号car_no?>初登日期register_date?>座位数seats?>电子邮件email?>
车型factory_model?>发动机号engine_no?>车架号car_frame_no?>新车购置价purchase_price?>
车主car_man?>证件类型car_man_type?>证件号码car_man_number?>联系电话car_man_phone?>
被投保人id_man?>证件类型id_man_type?>证件号码id_man_number?>联系电话id_man_phone?>
投保人link_man?>证件类型link_man_type?>证件号码link_man_number?>联系电话link_man_phone?>
商业起保日期insurer1_begin_date?>交强起保日期insurer2_begin_date?>保险公司company->name?>车辆使用性质car->carUse->name?>
商业保单号insurer1_no?>商业PDF文件 + shangye_src != '') { ?> + 保单 + + fapiao_src != '') { ?> + 发票 + + 交强保单号insurer2_no?>交强PDF文件 + jiaoqiang_src != '') { ?> + 保单 + + jq_fapiao_src != '') { ?> + 发票 + +
+
+
+
+
+
险种
+
+
+ + + 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 || $tmp_row->val == '' || $tmp_row->val == '否') continue; + ?> + + + + '; + echo ''; + } + $index++; + } + ?> + +
+ name?>(code?>) + val?>is_nopay == 1)?'不计免赔':''?>
+
+
+
+
+
保费信息
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
商业总净保费total1_clear?>商业含税总保费total1?>车船税total3?>
交强总净保费total2_clear?>交强含税总保费total2?>业务自付金额yuangong_money?>
折扣后商业净保费total1_real?>减免金额total1_dis?>商业折扣率total1_percent?>
共计签单total_all?>应收total_real?>支付方式payType ? $order_info->payType->name : ''?>
备注price_remark?>
+
+
+
+
+
其他信息
+
+
+ + + + + + + + + + + + + + + + + +
领款人money_man?>开户行money_bank?>银行账号money_no?>
送单地址 + sendCity->name?> + sendDistrict->name?> + send_address?> +
备注remark?>
+
+
+
+
+
操作记录
+ +
+
+ + + + + + + + +
操作者操作时间操作内容
+
+
-
-
+ + - - - - -
- - - - - - - - - + + + \ No newline at end of file + +endBlock(); ?> diff --git a/frontend/views/insurer/office-mng-edit.php b/frontend/views/insurer/office-mng-edit.php index 632b742..d1a63fe 100644 --- a/frontend/views/insurer/office-mng-edit.php +++ b/frontend/views/insurer/office-mng-edit.php @@ -75,7 +75,7 @@ use common\models\PriceT; 交强起保日期 insurer2_begin_date?> 保险公司 - company2->name?> + company->name?> 车辆使用性质 car->carUse->name?> diff --git a/frontend/views/insurer/search.php b/frontend/views/insurer/search.php index e905c87..0d69d7a 100644 --- a/frontend/views/insurer/search.php +++ b/frontend/views/insurer/search.php @@ -1,136 +1,132 @@ - - - - - + + + - - - - - - - -
- 车主: - 被保险人: - 电话: - 车牌: - 提单日期:从截止 - 正本日期:从截止 - 起保日期:从截止 - - 保险公司: - 险种类型: -
- - - - - - - - - - - - - - - - - - - $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(); ?>