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_no?>初登日期register_date?>座位数seats?>新车购置价purchase_price?>
车型factory_model?>发动机号engine_no?>车架号car_frame_no?>车辆使用性质carUse->name?>
车主car_man?>证件类型car_man_type?>证件号码car_man_number?>联系电话phone?>
商业起保日期insurer1_date?>交强起保日期insurer2_date?>保险公司company?>
-
+
预约信息
-
-
-
-
-
-
车牌号:
-
-
厂牌型号:
-
-
品牌:
-
-
-
-
-
-
发动机号:
-
-
车架号:
-
-
初登日期:
-
-
-
-
-
-
车辆类型:
-
-
运营性质:
-
-
座位数:
-
-
-
-
-
-
-
-
车系:
-
-
排量:
-
-
年份:
-
-
-
-
-
-
车主:
-
-
车主证件号码:
-
-
联系电话:
-
- - -
-
-
-
-
-
-
商业止保日期:
-
-
交强止保日期:
-
-
保险公司:
-
-
-
- -
-
-
-
-
-
-
新保座席:
-
-
客服代表:
-
-
续保座席:
-
-
-
-
-
-
区域:
-
-
备注:
-
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礼品名称类型描述分类 - 添加者操作时间状态
-
-
+ + + + + + + + + + + + + + + + +
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;
-
- +
+ - +
+
+ - +
+
+ - - -
+
+ + +
+
diff --git a/frontend/web/assets/js/content.js b/frontend/web/assets/js/content.js index 4611cda..058e090 100644 --- a/frontend/web/assets/js/content.js +++ b/frontend/web/assets/js/content.js @@ -44,8 +44,8 @@ $('.close-link').click(function () { //判断当前页面是否在iframe中 if (top == this) { - var gohome = '
'; - $('body').append(gohome); + // var gohome = '
'; + // $('body').append(gohome); } //animation.css