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(); ?>
-
-
-
-
-
-
预约信息
-
-
-
-
-
- - 车牌号:
-
- - 厂牌型号:
-
- - 品牌:
-
-
-
-
-
- - 发动机号:
-
- - 车架号:
-
- - 初登日期:
-
-
-
-
-
- - 车辆类型:
-
- - 运营性质:
-
- - 座位数:
-
-
-
-
-
-
-
- - 车系:
-
- - 排量:
-
- - 年份:
-
-
-
-
-
- - 车主:
-
- - 车主证件号码:
-
- - 联系电话:
- -
-
-
-
-
-
-
-
-
-
-
- - 新保座席:
-
- - 客服代表:
-
- - 续保座席:
-
-
-
-
-
- - 区域:
-
- - 备注:
- - = $car_info->remark ?>
-
-
-
-
-
-
-
-
-
-
-
- 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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
+beginBlock('header_css'); ?>
+
+
+endBlock(); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- ▲保单打印信息 |
+ ID |
+ 险种 |
+ 内容 |
+ 不计免赔 |
-
+
-
-
-
-
-
-
- 保单文件打印: |
-
- shangye_src):?>
- 查看商业保单并打印
-
-
- jiaoqiang_src):?>
- 查看交强保单并打印
-
- |
+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 @@
-
-
-
-
-
+
+
+
-
-
-
- 序号 |
- 车主 |
- 被保险人 |
- 提单日期 |
- 送单日期 |
- 车牌号 |
- 品牌 |
- 共计签单 |
- 应收 |
- 状态 |
- 业务员 |
- 保险公司 |
- 上传状态 |
- 当前操作 |
- 操作 |
-
- $item) {
- $start_index = ($page - 1) * 20 + $index;
- ?>
-
- =$start_index + 1?> |
- =MyLib::substr_cut($item->car_man,15)?> |
- =MyLib::substr_cut($item->id_man,15)?> |
- =$item->submit_date?> |
- =$item->send_date?> |
- =$item->car_no?> |
- =$item->car?MyLib::substr_cut($item->car->factory_model,15):''?> |
- =$item->total_all?> |
- =$item->total_real?> |
- =$item->status->name?> |
- =$item->user?$item->user->getShowName():''?> |
-
- company):?>
- =$item->company->name?$item->company->name:''?>
-
- |
-
- shangye_src || $item->jiaoqiang_src):?>
- 保单已上传
-
- 未上传
-
- |
- =$item->lock?$item->lock->getShowName():''?> |
-
- insurance_status==1 || $item->insurance_status==3):?>
- [详情]
- insurance_status==2):?>
- [非车险详情]
-
- |
-
-
-
- 净保费总和 |
- =$sum?> |
-
-
- =$page_info?> |
-
-
+endBlock(); ?>
| | |