diff --git a/frontend/controllers/AppointmentController.php b/frontend/controllers/AppointmentController.php
index fced2ae..6a34c15 100644
--- a/frontend/controllers/AppointmentController.php
+++ b/frontend/controllers/AppointmentController.php
@@ -312,7 +312,7 @@ class AppointmentController extends BaseController
$query->andWhere('car_t.car_man like "'.$car_man.'"');
}
if($phone != '') {
- $query->andWhere('car_t.phone like "'.$phone.'"');
+ $query->andWhere('car_t.car_man_phone like "'.$phone.'"');
}
if($car_no != '') {
$query->andWhere('car_t.car_no like "'.$car_no.'"');
diff --git a/frontend/controllers/CarController.php b/frontend/controllers/CarController.php
index c45d559..b5564d1 100644
--- a/frontend/controllers/CarController.php
+++ b/frontend/controllers/CarController.php
@@ -978,7 +978,14 @@ class CarController extends BaseController
}
public function actionInfoTrack() {
- return $this->render('info-track');
+ $request = Yii::$app->request;
+ $id = $request->get('id',0);
+ // 车辆信息
+ $car_info = CarT::findOne(['id'=>$id]);
+
+ return $this->render('info-track',[
+ 'car_info' => $car_info
+ ]);
}
public function actionInfoTrackJson()
@@ -2379,6 +2386,7 @@ class CarController extends BaseController
$car_info->seats = $seats;
$car_info->register_date = $register_date;
$car_info->car_man = $car_man;
+
$car_info->car_man_number = $car_man_number;
$car_info->car_use_id = $car_use_id;
$car_info->engine_no = $engine_no;
@@ -5040,7 +5048,7 @@ class CarController extends BaseController
$items = $query->all();
$data = [];
- $data['total'] = count($items);
+ $data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();
@@ -5051,6 +5059,36 @@ class CarController extends BaseController
return $data;
}
+ public function actionOrderHistoryJson()
+ {
+ Yii::$app->response->format = Response::FORMAT_JSON;
+ $request = Yii::$app->request;
+ $car_id = $request->get('car_id');
+ $offset = $request->get('offset', 0);
+ $limit = $request->get('limit', 10);
+
+ $query = OrderT::find()
+ ->where(['car_id'=>$car_id])
+ ->andWhere('status_id>1')
+ ->orderBy('id DESC');
+ $total = $query->count();
+
+ $query = $query->offset($offset)->limit($limit);
+ $items = $query->all();
+
+ $data = [];
+ $data['total'] = $total;
+ $data['rows'] = [];
+ foreach($items as $item) {
+ $row = $item->toArray();
+ $row['username'] = $row->user ? $row->user->getShowName():'';
+ $row['status'] = $row->status->name;
+ $data['rows'][] = $row;
+ }
+
+ return $data;
+ }
+
public function actionOrderAdd() {
$request = Yii::$app->request;
$car_id = $request->get('car_id');
diff --git a/frontend/controllers/DatabaseController.php b/frontend/controllers/DatabaseController.php
index ed2578d..5972fe1 100644
--- a/frontend/controllers/DatabaseController.php
+++ b/frontend/controllers/DatabaseController.php
@@ -79,7 +79,6 @@ class DatabaseController extends BaseController
$clean_right = $request->post('clean_right');
$biaozhu = $request->post('biaozhu');
} else {
-
$car_man = $request->get('car_man');
$phone = $request->get('phone');
$car_no = $request->get('car_no');
diff --git a/frontend/controllers/GiftController.php b/frontend/controllers/GiftController.php
index 06b88da..24f9d55 100644
--- a/frontend/controllers/GiftController.php
+++ b/frontend/controllers/GiftController.php
@@ -798,6 +798,7 @@ class GiftController extends \yii\web\Controller
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$code = $request->get('code');
+ $car_id = $request->get('car_id',0);
$car_no = $request->get('car_no');
$username = $request->get('username');
$s_begin_date = $request->get('s_begin_date');
@@ -819,19 +820,22 @@ class GiftController extends \yii\web\Controller
->where('gift_t.type_id=2')
->orderBy('id DESC');
if($code != '') {
- $query = $query->andWhere('gift_ticket_t_use.code="'.$code.'"');
+ $query->andWhere('gift_ticket_t_use.code="'.$code.'"');
+ }
+ if($car_id > 0) {
+ $query->andWhere('order_t.car_id='.$car_id);
}
if($car_no != '') {
- $query = $query->andWhere('gift_ticket_t_use.car_no like "'.$car_no.'"');
+ $query->andWhere('gift_ticket_t_use.car_no like "'.$car_no.'"');
}
if($username != ''){
$user = UserT::find()->where('username="'.$username.'"')->andWhere('is_delete=0')->one();
- $query = $query->andWhere('gift_ticket_t_use.op_id='.$user->id);
+ $query->andWhere('gift_ticket_t_use.op_id='.$user->id);
}
if($s_begin_date != ''){
- $query = $query->andWhere('order_t.submit_date>="'.$s_begin_date.'"');
+ $query->andWhere('order_t.submit_date>="'.$s_begin_date.'"');
}
if($s_end_date != ''){
$query = $query->andWhere('order_t.submit_date<="'.$s_begin_date.'"');
diff --git a/frontend/controllers/RenewalController.php b/frontend/controllers/RenewalController.php
index 909585a..a92521b 100644
--- a/frontend/controllers/RenewalController.php
+++ b/frontend/controllers/RenewalController.php
@@ -97,17 +97,15 @@ class RenewalController extends BaseController
$car_man = $request->get('car_man');
$phone = $request->get('phone');
$car_no = $request->get('car_no');
- $page = $request->get('page',1);
$username = $request->get('username');
$sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC');
- $user_id = $request->get('user_id');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
- ->where('appointment_t.is_first=1 and car_t.location=2');
+ ->where('appointment_t.is_first=1 and car_t.location=4');
if($username == '') {
$user_ids = $this->getChildrenUserIDs();
@@ -118,7 +116,7 @@ class RenewalController extends BaseController
$query->andWhere('car_t.car_man like "'.$car_man.'"');
}
if($phone != '') {
- $query->andWhere('car_t.phone like "'.$phone.'"');
+ $query->andWhere('car_t.car_man_phone like "'.$phone.'"');
}
if($car_no != '') {
$query->andWhere('car_t.car_no like "'.$car_no.'"');
@@ -137,12 +135,11 @@ class RenewalController extends BaseController
$query->orderBy($sort_key.' '.$sort_value.',appointment_t.id '.$sort_value);
}
$sql = $query->createCommand()->rawSql;
-// echo $query->createCommand()->rawSql;
$total = $query->count();
$session->remove('appointment_first');
$session->set('appointment_first',$sql);
- $query = $query->offset($offset)->limit($limit);
+ $query->offset($offset)->limit($limit);
$items = $query->all();
$data = [];
@@ -189,7 +186,7 @@ class RenewalController extends BaseController
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
- ->where('appointment_t.is_first=0 and car_t.location=2')
+ ->where('appointment_t.is_first=0 and car_t.location=4')
->andWhere('appointment_t.pdate<="'.date('Y-m-d').'"');
$user_ids = $this->getChildrenUserIDs();
@@ -199,7 +196,7 @@ class RenewalController extends BaseController
$query = $query->andWhere('car_t.car_man like "'.$car_man.'"');
}
if($phone != '') {
- $query = $query->andWhere('car_t.phone="'.$phone.'"');
+ $query = $query->andWhere('car_t.car_man_phone="'.$phone.'"');
}
if($ptype > 0) {
$query = $query->andWhere('appointment_t.ptype='.$ptype);
@@ -265,7 +262,7 @@ class RenewalController extends BaseController
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
- ->where('appointment_t.is_first=0 and car_t.location=2');
+ ->where('appointment_t.is_first=0 and car_t.location=4');
if($username == '') {
$user_ids = $this->getChildrenUserIDs();
@@ -276,7 +273,7 @@ class RenewalController extends BaseController
$query = $query->andWhere('car_t.car_man like "'.$car_man.'"');
}
if($phone != '') {
- $query = $query->andWhere('car_t.phone="'.$phone.'"');
+ $query = $query->andWhere('car_t.car_man_phone="'.$phone.'"');
}
if($ptype > 0) {
$query = $query->andWhere('appointment_t.ptype='.$ptype);
diff --git a/frontend/views/car/info-track.php b/frontend/views/car/info-track.php
index 2b061ea..24e9d99 100644
--- a/frontend/views/car/info-track.php
+++ b/frontend/views/car/info-track.php
@@ -16,498 +16,152 @@ use \common\libs\MyLib;
-
+
-
+
+
+ 车牌号 |
+ =$car_info->car_no?> |
+ 初登日期 |
+ =$car_info->register_date?> |
+ 座位数 |
+ =$car_info->seats?> |
+ 新车购置价 |
+ =$car_info->purchase_price?> |
+
+
+ 车型 |
+ =$car_info->factory_model?> |
+ 发动机号 |
+ =$car_info->engine_no?> |
+ 车架号 |
+ =$car_info->car_frame_no?> |
+ 车辆使用性质 |
+ =$car_info->carUse->name?> |
+
+
+ 车主 |
+ =$car_info->car_man?> |
+ 证件类型 |
+ =$car_info->car_man_type?> |
+ 证件号码 |
+ =$car_info->car_man_number?> |
+ 联系电话 |
+ =$car_info->phone?> |
+
+
+ 商业起保日期 |
+ =$car_info->insurer1_date?> |
+ 交强起保日期 |
+ =$car_info->insurer2_date?> |
+ 保险公司 |
+ =$car_info->company?> |
+ |
+ |
+
+
-
+
预约信息
-
-
-
-
-
- - 车牌号:
-
- - 厂牌型号:
-
- - 品牌:
-
-
-
-
-
- - 发动机号:
-
- - 车架号:
-
- - 初登日期:
-
-
-
-
-
- - 车辆类型:
-
- - 运营性质:
-
- - 座位数:
-
-
-
-
-
-
-
- - 车系:
-
- - 排量:
-
- - 年份:
-
-
-
-
-
- - 车主:
-
- - 车主证件号码:
-
- - 联系电话:
- -
-
-
-
-
-
-
-
-
-
-
- - 新保座席:
-
- - 客服代表:
-
- - 续保座席:
-
-
-
-
-
- - 区域:
-
- - 备注:
- - = $car_info->remark ?>
-
-
+
-
-
-
-
-
-
- ID |
- 预约日期 |
- 预约时间 |
- 预约类型 |
- 预约备注 |
- 业务员 |
- 业务分组 |
- 操作时间 |
-
-
-
-
-
+
+
+
+ 预约日期 |
+ 预约时间 |
+ 预约备注 |
+ 业务员 |
+ 操作时间 |
+
+
+
-
+
-
-
-
-
-
- ID |
- 被保险人 |
- 商业起保日期 |
- 交强起保日期 |
- 出单日期 |
- 共计签单 |
- 业务员 |
- 状态 |
- 操作 |
-
-
-
-
-
+
+
+
+ ID |
+ 被保险人 |
+ 商业起保日期 |
+ 交强起保日期 |
+ 出单日期 |
+ 共计签单 |
+ 业务员 |
+ 状态 |
+ 操作 |
+
+
+
-
-
礼品列表
+
-
-
-
-
-
- 礼品编号 |
- 礼品名称 |
- 操作时间 |
- 操作员 |
- 状态 |
-
-
-
-
-
-
-
-
- ID |
- 礼品名称 |
- 类型 |
- 描述 |
- 分类
- |
- 添加者 |
- 操作时间 |
- 状态 |
-
-
-
-
-
+
+
+
+ ID |
+ 礼券编号 |
+ 礼品 |
+ 车牌号 |
+ 车架号 |
+ 发放日期 |
+ 有效期日期 |
+ 提单人 |
+ 使用日期1 |
+ 状态 |
+ 操作员 |
+
+
+
-
+
-
-
-
-
-
- ID |
- 姓名 |
- 操作时间 |
- 意见 |
- 意见说明
- |
-
-
-
-
-
+
+
+
+ 操作者 |
+ 操作时间 |
+ 操作内容 |
+
+
+
@@ -517,378 +171,82 @@ use \common\libs\MyLib;
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..c997881 100644
--- a/frontend/views/car/search.php
+++ b/frontend/views/car/search.php
@@ -90,7 +90,7 @@ use \common\libs\MyLib;
}
function info(id) {
- layer_show('客户信息','/car/info-track?id=' + id);
+ window.open('/car/info-track?id=' + id);
}
function refreshList() {
diff --git a/frontend/views/gift/ticket-use.php b/frontend/views/gift/ticket-use.php
index 9220a59..8cc1824 100644
--- a/frontend/views/gift/ticket-use.php
+++ b/frontend/views/gift/ticket-use.php
@@ -93,7 +93,7 @@ use \common\libs\MyLib;
发放日期 |
有效期日期 |
提单人 |
-
使用日期1 |
+
使用日期 |
状态 |
操作员 |
操作 |
diff --git a/frontend/views/renewal/first.php b/frontend/views/renewal/first.php
index f0953a5..9015c01 100644
--- a/frontend/views/renewal/first.php
+++ b/frontend/views/renewal/first.php
@@ -17,17 +17,23 @@ use \common\libs\MyLib;