From 37ff8062f2b821b1c329f3cb63259df8e87be434 Mon Sep 17 00:00:00 2001
From: zhaocheng <578322713@qq.com>
Date: Thu, 10 Oct 2019 19:15:54 +0800
Subject: [PATCH] =?UTF-8?q?my-list-finish,my-search,step1-list-finish,step?=
=?UTF-8?q?1-lit=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/controllers/FixCarController.php | 62 +++++--
frontend/views/fix-car/my-list-finish.php | 168 +++++++++++--------
frontend/views/fix-car/my-search.php | 115 +++++++------
frontend/views/fix-car/step1-list-finish.php | 141 +++++++++-------
frontend/views/fix-car/step1-list.php | 145 +++++++++-------
5 files changed, 381 insertions(+), 250 deletions(-)
diff --git a/frontend/controllers/FixCarController.php b/frontend/controllers/FixCarController.php
index 5d00601..c85330f 100644
--- a/frontend/controllers/FixCarController.php
+++ b/frontend/controllers/FixCarController.php
@@ -110,8 +110,14 @@ class FixCarController extends BaseController
return $data;
}
- public function actionMyListFinish()
+ public function actionMyListFinish() {
+ return $this->render('my-list-finish');
+ }
+
+
+ public function actionMyListFinishJson()
{
+ Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$car_no = $request->get('car_no');
@@ -123,13 +129,20 @@ class FixCarController extends BaseController
if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]);
}
+
+ $total = $query->count();
+
$query = $query->orderBy('status ASC');
$items = $query->all();
- return $this->render('my-list-finish',[
- 'items' => $items,
- 'car_no' => $car_no
- ]);
+ $data = [];
+ $data['total'] = $total;
+ $data['rows'] = [];
+ foreach($items as $item) {
+ $row = $item->toArray();
+ $data['rows'][] = $row;
+ }
+ return $data;
}
public function actionMyListDelete()
@@ -568,6 +581,12 @@ class FixCarController extends BaseController
public function actionStep1List()
{
+ return $this->render('step1-list');
+ }
+
+ public function actionStep1ListJson()
+ {
+ Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$car_no = $request->get('car_no');
@@ -576,17 +595,29 @@ class FixCarController extends BaseController
if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]);
}
+ $total = $query->count();
$query = $query->orderBy('status ASC,receive_date ASC');
$items = $query->all();
- return $this->render('step1-list',[
- 'items' => $items,
- 'car_no' => $car_no
- ]);
+ $data = [];
+ $data['total'] = $total;
+ $data['rows'] = [];
+ foreach($items as $item) {
+ $row = $item->toArray();
+ $data['rows'][] = $row;
+ }
+ return $data;
}
+
public function actionStep1ListFinish()
{
+ return $this->render('step1-list');
+ }
+
+ public function actionStep1ListFinishJson()
+ {
+ Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$car_no = $request->get('car_no');
@@ -595,13 +626,18 @@ class FixCarController extends BaseController
if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]);
}
+ $total = $query->count();
$query = $query->orderBy('status ASC,updated_at DESC');
$items = $query->all();
- return $this->render('step1-list-finish',[
- 'items' => $items,
- 'car_no' => $car_no
- ]);
+ $data = [];
+ $data['total'] = $total;
+ $data['rows'] = [];
+ foreach($items as $item) {
+ $row = $item->toArray();
+ $data['rows'][] = $row;
+ }
+ return $data;
}
public function actionPrintReceive()
diff --git a/frontend/views/fix-car/my-list-finish.php b/frontend/views/fix-car/my-list-finish.php
index f5c987e..1f30732 100644
--- a/frontend/views/fix-car/my-list-finish.php
+++ b/frontend/views/fix-car/my-list-finish.php
@@ -1,82 +1,110 @@
-
-
-
+beginBlock('header_css'); ?>
+
+endBlock(); ?>
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ 车牌号
+ 被保险人
+ 联系人
+ 电话
+ 提单日期
+ 提单者
+ 状态
+ 操作
+
+
+
+
+
+
+
+
+
+beginBlock('footer_js'); ?>
+
+
+
-
-
-
- 排序
- 车牌号
- 被保险人
- 联系人
- 电话
- 提单日期
- 提单者
- 状态
- 操作
-
- $item) {
- ?>
-
- =$index+1?>
- =$item->car_no?>
- =$item->id_man?>
- =$item->link_man?>
- =$item->link_phone?>
- =$item->submit_date?>
- =$item->user->getShowName()?>
- =$item->getStatus()?>
-
- status == 0) {
- ?>
- [修改 ]
- [删除 ]
-
-
-
-
-
+endBlock(); ?>
\ No newline at end of file
diff --git a/frontend/views/fix-car/my-search.php b/frontend/views/fix-car/my-search.php
index 585f20b..141b845 100644
--- a/frontend/views/fix-car/my-search.php
+++ b/frontend/views/fix-car/my-search.php
@@ -1,49 +1,70 @@
-
-
-
-
-
+
+beginBlock('header_css'); ?>
+endBlock(); ?>
+
+
+
+beginBlock('footer_js'); ?>
+endBlock('footer_js'); ?>
\ No newline at end of file
diff --git a/frontend/views/fix-car/step1-list-finish.php b/frontend/views/fix-car/step1-list-finish.php
index 8fa257d..4e00d7e 100644
--- a/frontend/views/fix-car/step1-list-finish.php
+++ b/frontend/views/fix-car/step1-list-finish.php
@@ -1,67 +1,92 @@
-
-
-
+beginBlock('header_css'); ?>
+
+endBlock(); ?>
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ 联系人
+ 车牌号
+ 品牌
+ 车型
+ 地址
+ 代步车
+ 接车日期
+ 事故类型
+ 责任
+ 提单者
+ 状态
+ 操作
+
+
+
+
+
+
+
+
+
+beginBlock('footer_js'); ?>
+
+
+
-
-
-
- 排序
- 联系人
- 车牌号
- 品牌
- 车型
- 地址
- 代步车
- 事故类型
- 责任
- 提单者
- 状态
- 操作时间
-
- $item) {
- ?>
-
- =$index+1?>
- =$item->link_man?>
- =$item->car_no?>
- =$item->brand?$item->brand->name:''?>
- =$item->series?$item->series->name:''?>
- =$item->address?>
-
- =$item->accident_type?>
- =$item->responsibility?>
- =$item->user->getShowName()?>
- =$item->getStatus()?>
- =$item->updated_at?>
-
-
-
+endBlock(); ?>
\ No newline at end of file
diff --git a/frontend/views/fix-car/step1-list.php b/frontend/views/fix-car/step1-list.php
index fe665e6..66eb465 100644
--- a/frontend/views/fix-car/step1-list.php
+++ b/frontend/views/fix-car/step1-list.php
@@ -1,71 +1,92 @@
-
-
-
+beginBlock('header_css'); ?>
+
+endBlock(); ?>
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ 联系人
+ 车牌号
+ 品牌
+ 车型
+ 地址
+ 代步车
+ 接车日期
+ 事故类型
+ 责任
+ 提单者
+ 状态
+ 操作
+
+
+
+
+
+
+
+
+
+beginBlock('footer_js'); ?>
+
+
+
-
-
-
- 排序
- 联系人
- 车牌号
- 品牌
- 车型
- 地址
- 代步车
- 接车日期
- 事故类型
- 责任
- 提单者
- 状态
- 操作
-
- $item) {
- ?>
-
- =$index+1?>
- =$item->link_man?>
- =$item->car_no?>
- =$item->brand?$item->brand->name:''?>
- =$item->series?$item->series->name:''?>
- =$item->address?>
-
- =$item->receive_date?>
- =$item->accident_type?>
- =$item->responsibility?>
- =$item->user->getShowName()?>
- =$item->getStatus()?>
-
- [详情 ]
-
-
-
-
+endBlock(); ?>
\ No newline at end of file