完善业务流程,优化部分页面

dev
曾超新 5 years ago
parent 1fdd48ee27
commit 9dc612c31f
  1. 38
      common/models/OrderT.php
  2. 114
      frontend/controllers/AppointmentController.php
  3. 1036
      frontend/controllers/CarController.php
  4. 1303
      frontend/controllers/InsurerController.php
  5. 186
      frontend/controllers/RenewalController.php
  6. 250
      frontend/views/appointment/all.php
  7. 185
      frontend/views/appointment/today.php
  8. 2
      frontend/views/car/info.php
  9. 457
      frontend/views/car/order-add.php
  10. 222
      frontend/views/insurer/finance-mng.php
  11. 704
      frontend/views/insurer/my-list-info.php
  12. 4
      frontend/views/insurer/my-list.php
  13. 718
      frontend/views/insurer/office-mng-edit.php
  14. 165
      frontend/views/insurer/office-mng.php
  15. 807
      frontend/views/insurer/original-mng-edit.php
  16. 192
      frontend/views/insurer/original-mng.php
  17. 250
      frontend/views/renewal/all.php
  18. 250
      frontend/views/renewal/first.php
  19. 185
      frontend/views/renewal/today.php

@ -14,21 +14,28 @@ use Yii;
* @property string $engine_no * @property string $engine_no
* @property string $car_frame_no * @property string $car_frame_no
* @property string $car_man * @property string $car_man
* @property string $car_man_type
* @property string $car_man_phone
* @property string $car_man_number
* @property string $gift_other * @property string $gift_other
* @property integer $company_id * @property integer $company_id
* @property integer $company2_id * @property integer $company2_id
* @property integer $status_id * @property integer $status_id
* @property string $submit_date * @property string $submit_date
* @property string $id_man * @property string $id_man
* @property string $id_number * @property string $id_man_number
* @property string $id_man_phone
* @property string $id_man_type
* @property string $link_man * @property string $link_man
* @property string $link_phone * @property string $link_man_phone
* @property string $link_man_type
* @property string $link_man_number
* @property string $insurer1_begin_date * @property string $insurer1_begin_date
* @property string $insurer1_end_date * @property string $insurer1_end_date
* @property string $insurer2_begin_date * @property string $insurer2_begin_date
* @property string $insurer2_end_date * @property string $insurer2_end_date
* @property string $send_date * @property string $send_date
* @property string $direction1_id * @property string $direction_id
* @property string $range1_id * @property string $range1_id
* @property string $city1_id * @property string $city1_id
* @property string $district1_id * @property string $district1_id
@ -103,10 +110,10 @@ class OrderT extends \common\models\Base
public function rules() public function rules()
{ {
return [ return [
[['car_id', 'user_id', 'company_id', 'company2_id', 'status_id', 'pay_type_id','lock_id','direction1_id','range1_id','city1_id','district1_id','direction2_id','range2_id','city2_id','district2_id','success_id','return_status_id','return_time','first_send','send_times','check_gift','gift_type1_id','gift_type8_id','gift_type2_id','gift_type3_id','gift_type4_id','gift_type5_id','gift_type6_id','gift_type7_id','business_group_id','op1_id','op2_id','shoufei_id','payer','payee_id','hk_status','payment_id','account_status','insurance_status','el_insurance','ord_scheme_id','non_num','addr_id'], 'integer'], [['car_id', 'user_id', 'company_id', 'company2_id', 'status_id', 'pay_type_id','lock_id','range1_id','send_city_id','send_district_id','direction2_id','range2_id','city2_id','district2_id','success_id','return_status_id','return_time','first_send','send_times','check_gift','gift_type1_id','gift_type8_id','gift_type2_id','gift_type3_id','gift_type4_id','gift_type5_id','gift_type6_id','gift_type7_id','business_group_id','op1_id','op2_id','shoufei_id','payer','payee_id','hk_status','payment_id','account_status','insurance_status','el_insurance','ord_scheme_id','non_num','addr_id'], 'integer'],
[['submit_date', 'insurer1_begin_date', 'insurer1_end_date', 'insurer2_begin_date', 'insurer2_end_date', 'send_date','print_date','zhifu_date', 'created_at', 'updated_at','insurer_date_start','insurer_date_end'], 'safe'], [['submit_date', 'insurer1_begin_date', 'insurer1_end_date', 'insurer2_begin_date', 'insurer2_end_date', 'send_date','print_date','zhifu_date', 'created_at', 'updated_at','insurer_date_start','insurer_date_end'], 'safe'],
[['gift_other', 'id_man', 'id_number', 'link_man', 'send_address1','send_address2','car_frame_no','car_man','total1','total1_clear','total1_real','total1_dis','total1_percent','total1_rate','total2','total2_clear','total2_rate','total3','total_all','total_real','price_remark','money_no','money_bank','email','return_remark','piao_header','photo_back','photo_face','tijiang'], 'string', 'max' => 100], [['gift_other', 'id_man', 'id_man_number', 'id_man_type', 'id_man_phone', 'link_man', 'link_man_phone', 'link_man_type', 'link_man_number', 'send_address','send_address2','car_frame_no','car_man','total1','total1_clear','total1_real','total1_dis','total1_percent','total1_rate','total2','total2_clear','total2_rate','total3','total_all','total_real','price_remark','money_no','money_bank','email','return_remark','piao_header','photo_back','photo_face','tijiang'], 'string', 'max' => 100],
[['link_phone','car_no','engine_no','pay_no','insurer1_no','insurer2_no','identifying_code','money_man','insurer_non_no'], 'string', 'max' => 50], [['car_no','engine_no','pay_no','insurer1_no','insurer2_no','identifying_code','money_man','insurer_non_no'], 'string', 'max' => 50],
[['remark'], 'string', 'max' => 200], [['remark'], 'string', 'max' => 200],
]; ];
} }
@ -138,7 +145,7 @@ class OrderT extends \common\models\Base
'insurer2_begin_date' => 'Insurer2 Begin Date', 'insurer2_begin_date' => 'Insurer2 Begin Date',
'insurer2_end_date' => 'Insurer2 End Date', 'insurer2_end_date' => 'Insurer2 End Date',
'send_date' => 'Send Date', 'send_date' => 'Send Date',
'direction1_id' => 'Direction 1 ID', 'direction_id' => 'Direction 1 ID',
'range1_id' => 'Range 1 ID', 'range1_id' => 'Range 1 ID',
'city1_id' => 'City 1 ID', 'city1_id' => 'City 1 ID',
'district1_id' => 'District 1 ID', 'district1_id' => 'District 1 ID',
@ -221,6 +228,10 @@ class OrderT extends \common\models\Base
return $this->hasOne(UserT::className(),['id'=>'lock_id']); return $this->hasOne(UserT::className(),['id'=>'lock_id']);
} }
public function getSuccess()
{
return $this->hasOne(InvalidT::className(),['id'=>'success_id']);
}
public function getPayType() public function getPayType()
{ {
return $this->hasOne(PayTypeT::className(),['id'=>'pay_type_id']); return $this->hasOne(PayTypeT::className(),['id'=>'pay_type_id']);
@ -256,19 +267,14 @@ class OrderT extends \common\models\Base
return $this->hasOne(RangeT::className(),['id'=>'range1_id']); return $this->hasOne(RangeT::className(),['id'=>'range1_id']);
} }
public function getDirection1() public function getSendCity()
{
return $this->hasOne(DirectionT::className(),['id'=>'direction1_id']);
}
public function getCity1()
{ {
return $this->hasOne(CityT::className(),['id'=>'city1_id']); return $this->hasOne(CityT::className(),['id'=>'send_city_id']);
} }
public function getDistrict1() public function getSendDistrict()
{ {
return $this->hasOne(DistrictT::className(),['id'=>'district1_id']); return $this->hasOne(DistrictT::className(),['id'=>'send_district_id']);
} }
public function getRange2() public function getRange2()

@ -108,7 +108,7 @@ class AppointmentController extends BaseController
$items = $query->all(); $items = $query->all();
$data = []; $data = [];
$data['total'] = count($items); $data['total'] = $total;
$data['rows'] = []; $data['rows'] = [];
foreach($items as $item) { foreach($items as $item) {
$row = $item->toArray(); $row = $item->toArray();
@ -358,17 +358,28 @@ class AppointmentController extends BaseController
} }
//今日预约 //今日预约
public function actionToday() public function actionToday() {
$invalid_items = InvalidT::getTree();
$user_items = $this->my->getChildren();
return $this->render('today',[
'invalid_items' => $invalid_items,
'user_items' => $user_items
]);
}
public function actionTodayJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session; $session = Yii::$app->session;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_man = $request->get('car_man'); $car_man = $request->get('car_man');
$phone = $request->get('phone'); $phone = $request->get('phone');
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
$page = $request->get('page',1);
$sort_key = $request->get('sort_key','appointment_t.pdate'); $sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC'); $sort_value = $request->get('sort_value','ASC');
$ptype = $request->get('ptype'); $ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
@ -399,46 +410,52 @@ class AppointmentController extends BaseController
$session->remove('appointment_today'); $session->remove('appointment_today');
$session->set('appointment_today',$sql); $session->set('appointment_today',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$car_info = $item->car;
$row = $item->toArray();
$row['car_id'] = $car_info->id;
$row['car_no'] = $car_info->car_no;
$row['car_man'] = $car_info->car_man;
$row['register_date'] = $car_info->register_date;
$row['insurer1_date'] = $car_info->insurer1_date;
$row['insurer2_date'] = $car_info->insurer2_date;
$row['user_name'] = $item->user ? $item->user->getShowName():'';
$data['rows'][] = $row;
}
return $data;
}
$list = MeetT::getAllData(1); //全部预约
public function actionAll() {
$invalid_items = InvalidT::getTree();
$user_items = $this->my->getChildren();
return $this->render('today',[ return $this->render('all',[
'items' => $items, 'invalid_items' => $invalid_items,
'page_info' => $page_info, 'user_items' => $user_items
'car_man' => $car_man,
'phone' => $phone,
'car_no' => $car_no,
'ptype' => $ptype,
'list' => $list,
'page' => $page,
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'type' => 2
]); ]);
} }
public function actionAllJson()
//全部预约
public function actionAll()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session; $session = Yii::$app->session;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_man = $request->get('car_man'); $car_man = $request->get('car_man');
$phone = $request->get('phone'); $phone = $request->get('phone');
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
$page = $request->get('page',1);
$username = $request->get('username'); $username = $request->get('username');
$sort_key = $request->get('sort_key','appointment_t.pdate'); $sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC'); $sort_value = $request->get('sort_value','ASC');
$user_id = $request->get('user_id'); $user_id = $request->get('user_id');
$ptype = $request->get('ptype'); $ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
@ -483,36 +500,25 @@ class AppointmentController extends BaseController
$session->remove('appointment_all'); $session->remove('appointment_all');
$session->set('appointment_all',$sql); $session->set('appointment_all',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$invalid_items = InvalidT::getTree(); $data['rows'] = [];
$user_items = $this->my->getChildren(); foreach($items as $item) {
$car_info = $item->car;
$list = MeetT::getAllData(1); $row = $item->toArray();
$row['car_id'] = $car_info->id;
return $this->render('all',[ $row['car_no'] = $car_info->car_no;
'items' => $items, $row['car_man'] = $car_info->car_man;
'page_info' => $page_info, $row['register_date'] = $car_info->register_date;
'car_man' => $car_man, $row['insurer1_date'] = $car_info->insurer1_date;
'phone' => $phone, $row['insurer2_date'] = $car_info->insurer2_date;
'ptype' => $ptype, $row['user_name'] = $item->user ? $item->user->getShowName():'';
'list' => $list, $data['rows'][] = $row;
'car_no' => $car_no, }
'page' => $page, return $data;
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'type' => 3,
'invalid_items' => $invalid_items,
'username' => $username,
'user_items' => $user_items,
'user_id' => $user_id
]);
} }
public function actionCount() public function actionCount()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -80,8 +80,18 @@ class RenewalController extends BaseController
} }
//首拨 //首拨
public function actionFirst() public function actionFirst() {
$invalid_items = InvalidT::getTree();
$user_items = $this->my->getChildren();
return $this->render('first',[
'invalid_items' => $invalid_items,
'user_items' => $user_items
]);
}
public function actionFirstJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session; $session = Yii::$app->session;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_man = $request->get('car_man'); $car_man = $request->get('car_man');
@ -92,25 +102,26 @@ class RenewalController extends BaseController
$sort_key = $request->get('sort_key','appointment_t.pdate'); $sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC'); $sort_value = $request->get('sort_value','ASC');
$user_id = $request->get('user_id'); $user_id = $request->get('user_id');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=1 and car_t.location=4'); ->where('appointment_t.is_first=1 and car_t.location=2');
$user_ids = array();
if($username == '') { if($username == '') {
$user_ids = $this->getChildrenUserIDs(); $user_ids = $this->getChildrenUserIDs();
$query = $query->andWhere(['in','appointment_t.user_id',$user_ids]); $query->andWhere(['in','appointment_t.user_id',$user_ids]);
} }
if($car_man != '') { if($car_man != '') {
$query = $query->andWhere('car_t.car_man like "'.$car_man.'"'); $query->andWhere('car_t.car_man like "'.$car_man.'"');
} }
if($phone != '') { if($phone != '') {
$query = $query->andWhere('car_t.phone like "'.$phone.'"'); $query->andWhere('car_t.phone like "'.$phone.'"');
} }
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere('car_t.car_no like "'.$car_no.'"'); $query->andWhere('car_t.car_no like "'.$car_no.'"');
} }
if($username != '') { if($username != '') {
$user_query = UserT::find() $user_query = UserT::find()
@ -120,10 +131,10 @@ class RenewalController extends BaseController
$user_ids[] = $user_info->id; $user_ids[] = $user_info->id;
} }
if(count($user_ids) > 0) if(count($user_ids) > 0)
$query = $query->andWhere(['in','appointment_t.user_id',$user_ids]); $query->andWhere(['in','appointment_t.user_id',$user_ids]);
} }
if($sort_key != '') { if($sort_key != '') {
$query = $query->orderBy($sort_key.' '.$sort_value.',appointment_t.id '.$sort_value); $query->orderBy($sort_key.' '.$sort_value.',appointment_t.id '.$sort_value);
} }
$sql = $query->createCommand()->rawSql; $sql = $query->createCommand()->rawSql;
// echo $query->createCommand()->rawSql; // echo $query->createCommand()->rawSql;
@ -131,52 +142,54 @@ class RenewalController extends BaseController
$session->remove('appointment_first'); $session->remove('appointment_first');
$session->set('appointment_first',$sql); $session->set('appointment_first',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$current_index = $pagination->offset;
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$car_info = $item->car;
$row = $item->toArray();
$row['car_id'] = $car_info->id;
$row['car_no'] = $car_info->car_no;
$row['car_man'] = $car_info->car_man;
$row['register_date'] = $car_info->register_date;
$row['insurer1_date'] = $car_info->insurer1_date;
$row['insurer2_date'] = $car_info->insurer2_date;
$row['user_name'] = $item->user ? $item->user->getShowName():'';
$data['rows'][] = $row;
}
return $data;
}
//今日预约
public function actionToday() {
$invalid_items = InvalidT::getTree(); $invalid_items = InvalidT::getTree();
$user_items = $this->my->getChildren(); $user_items = $this->my->getChildren();
return $this->render('first',[ return $this->render('today',[
'items' => $items,
'page_info' => $page_info,
'car_man' => $car_man,
'phone' => $phone,
'car_no' => $car_no,
'page' => $page,
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'type' => 1,
'invalid_items' => $invalid_items, 'invalid_items' => $invalid_items,
'username' => $username, 'user_items' => $user_items
'user_items' => $user_items,
'user_id' => $user_id
]); ]);
} }
public function actionTodayJson()
//今日预约
public function actionToday()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session; $session = Yii::$app->session;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_man = $request->get('car_man'); $car_man = $request->get('car_man');
$phone = $request->get('phone'); $phone = $request->get('phone');
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
$page = $request->get('page',1);
$sort_key = $request->get('sort_key','appointment_t.pdate'); $sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC'); $sort_value = $request->get('sort_value','ASC');
$ptype = $request->get('ptype'); $ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=0 and car_t.location=4') ->where('appointment_t.is_first=0 and car_t.location=2')
->andWhere('appointment_t.pdate<="'.date('Y-m-d').'"'); ->andWhere('appointment_t.pdate<="'.date('Y-m-d').'"');
$user_ids = $this->getChildrenUserIDs(); $user_ids = $this->getChildrenUserIDs();
@ -189,7 +202,7 @@ class RenewalController extends BaseController
$query = $query->andWhere('car_t.phone="'.$phone.'"'); $query = $query->andWhere('car_t.phone="'.$phone.'"');
} }
if($ptype > 0) { if($ptype > 0) {
$query = $query->andWhere('appointment_t.ptype="'.$ptype.'"'); $query = $query->andWhere('appointment_t.ptype='.$ptype);
} }
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere('car_t.car_no like "'.$car_no.'"'); $query = $query->andWhere('car_t.car_no like "'.$car_no.'"');
@ -203,50 +216,56 @@ class RenewalController extends BaseController
$session->remove('appointment_today'); $session->remove('appointment_today');
$session->set('appointment_today',$sql); $session->set('appointment_today',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$car_info = $item->car;
$row = $item->toArray();
$row['car_id'] = $car_info->id;
$row['car_no'] = $car_info->car_no;
$row['car_man'] = $car_info->car_man;
$row['register_date'] = $car_info->register_date;
$row['insurer1_date'] = $car_info->insurer1_date;
$row['insurer2_date'] = $car_info->insurer2_date;
$row['user_name'] = $item->user ? $item->user->getShowName():'';
$data['rows'][] = $row;
}
return $data;
}
$list = MeetT::getAllData(1); //全部预约
public function actionAll() {
$invalid_items = InvalidT::getTree();
$user_items = $this->my->getChildren();
return $this->render('today',[ return $this->render('all',[
'items' => $items, 'invalid_items' => $invalid_items,
'list' => $list, 'user_items' => $user_items
'page_info' => $page_info,
'car_man' => $car_man,
'phone' => $phone,
'ptype' => $ptype,
'car_no' => $car_no,
'page' => $page,
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'type' => 2
]); ]);
} }
public function actionAllJson()
//全部预约
public function actionAll()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session; $session = Yii::$app->session;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_man = $request->get('car_man'); $car_man = $request->get('car_man');
$phone = $request->get('phone'); $phone = $request->get('phone');
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
$page = $request->get('page',1);
$username = $request->get('username'); $username = $request->get('username');
$sort_key = $request->get('sort_key','appointment_t.pdate'); $sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC'); $sort_value = $request->get('sort_value','ASC');
$user_id = $request->get('user_id'); $user_id = $request->get('user_id');
$ptype = $request->get('ptype'); $ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=0 and car_t.location=4'); ->where('appointment_t.is_first=0 and car_t.location=2');
if($username == '') { if($username == '') {
$user_ids = $this->getChildrenUserIDs(); $user_ids = $this->getChildrenUserIDs();
@ -259,11 +278,9 @@ class RenewalController extends BaseController
if($phone != '') { if($phone != '') {
$query = $query->andWhere('car_t.phone="'.$phone.'"'); $query = $query->andWhere('car_t.phone="'.$phone.'"');
} }
if($ptype > 0) { if($ptype > 0) {
$query = $query->andWhere('appointment_t.ptype="'.$ptype.'"'); $query = $query->andWhere('appointment_t.ptype='.$ptype);
} }
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere('car_t.car_no like "'.$car_no.'"'); $query = $query->andWhere('car_t.car_no like "'.$car_no.'"');
} }
@ -289,36 +306,25 @@ class RenewalController extends BaseController
$session->remove('appointment_all'); $session->remove('appointment_all');
$session->set('appointment_all',$sql); $session->set('appointment_all',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$invalid_items = InvalidT::getTree(); $data['rows'] = [];
$user_items = $this->my->getChildren(); foreach($items as $item) {
$car_info = $item->car;
$list = MeetT::getAllData(1); $row = $item->toArray();
$row['car_id'] = $car_info->id;
return $this->render('all',[ $row['car_no'] = $car_info->car_no;
'items' => $items, $row['car_man'] = $car_info->car_man;
'page_info' => $page_info, $row['register_date'] = $car_info->register_date;
'car_man' => $car_man, $row['insurer1_date'] = $car_info->insurer1_date;
'phone' => $phone, $row['insurer2_date'] = $car_info->insurer2_date;
'list' => $list, $row['user_name'] = $item->user ? $item->user->getShowName():'';
'ptype' => $ptype, $data['rows'][] = $row;
'car_no' => $car_no, }
'page' => $page, return $data;
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'type' => 3,
'invalid_items' => $invalid_items,
'username' => $username,
'user_items' => $user_items,
'user_id' => $user_id
]);
} }
public function actionMyList() public function actionMyList()

@ -1,161 +1,107 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//详情 <div class="wrapper wrapper-content animated fadeInRight">
function info(id,index) { <div class="ibox float-e-margins">
var params = $('#searchForm').serialize(); <div class="ibox-title">
window.location.href = '/car/info?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params); <h5>全部预约</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group">
<label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th width="50" data-field="car_id">ID</th>
<th data-field="pdate">预约日期</th>
<th data-field="ptime">预约时间</th>
<th data-field="car_no">车牌号</th>
<th data-field="car_man">车主</th>
<th data-field="register_date">初登日期</th>
<th data-field="insurer1_date">商业起保日期</th>
<th data-field="insurer2_date">交强起保日期</th>
<th data-field="remark">预约备注</th>
<th data-field="user_name">业务员</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.car_id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
} }
$(function(){ function view(car_id) {
$("#search-btn").click(function(){ location.href = '/car/info?id=' + car_id;
$('#page').val(1); }
var params = $('#searchForm').serialize();
window.location.href = "/appointment/all?" + params; function refreshList() {
}); $('#listTable').bootstrapTable('refresh');
$('.invalid-btn').click(function(){ }
if(confirm('是否确认收回?')) {
var params = $('#listForm').serialize(); function search() {
$.post('/appointment/invalid-a',params,function(obj){ $('#listTable').bootstrapTable('destroy');
alert(obj.msg); $('#listTable').bootstrapTable({
if(obj.success) { url: "/appointment/all-json",
window.location.reload(); pagination: true,
} sidePagination: 'server',
},'json'); multipleSelectRow: true,
} queryParams: function(params) {
}); o['car_man'] = $('#car_man').val();
$('#assign-other-btn').click(function () { o['phone'] = $('#phone').val();
if(confirm('是否确认平移?')) { o['car_no'] = $('#car_no').val();
var params = $('#listForm').serialize(); o['id_man'] = $('#id_man').val();
var user_id = $('#user_id').val(); o['limit'] = params['limit'];
params = params + '&user_id=' + user_id; o['offset'] = params['offset'];
$.post('/appointment/assign-other',params,function(obj){ return o;
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
},'json');
}
})
$('#all').click(function(){
if($(this).prop('checked')==true) {
$('input:checkbox').each(function() {
$(this).prop('checked', true);
});
} else {
$('input:checkbox').each(function () {
$(this).prop('checked',false);
});
} }
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
车主:<input name="car_man" type="text" value="<?=$car_man?>" style="width: 100px;">
电话:<input name="phone" type="text" value="<?=$phone?>" style="width: 100px;">
车牌:<input name="car_no" type="text" value="<?=$car_no?>" style="width: 100px;">
工号:<input name="username" type="text" value="<?=$username?>" style="width: 100px;">
排序:<select name="sort_key">
<option value="appointment_t.pdate" <?=$sort_key=='appointment_t.pdate'?'selected':''?>>按预约时间</option>
<option value="car_t.register_date" <?=$sort_key=='car_t.register_date'?'selected':''?>>按初登时间</option>
<option value="car_t.insurer1_date" <?=$sort_key=='car_t.insurer1_date'?'selected':''?>>按保险时间</option>
</select>
<select name="sort_value">
<option value="ASC" <?=$sort_value=='ASC'?'selected':''?>>顺序</option>
<option value="DESC" <?=$sort_value=='DESC'?'selected':''?>>倒序</option>
</select>
预约类型:<select name="ptype">
<option value="0">全部类型</option>
<?php foreach($list as $k=>$v){ ?>
<option value='<?= $v->code; ?>' <?php if($ptype == $v->code){ echo 'selected'; } ?> ><?= $v->name; ?></option>
<?php } ?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
</td>
</tr>
<tr>
<td class="td_bg">
<?php
if($this->context->my->role_id != 5) {
?>
<input type=button class="ACT_btn invalid-btn" name="invalid-btn" value=" 回收数据 "/>
<input type="button" class="act_btn" id="assign-other-btn" name="assign-other-btn" value="批量平移到">
业务员:<select name="user_id" id="user_id">
<option value="0">请选择</option>
<?php
foreach($user_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $user_id)
echo ' selected ';
echo '>'.$item->getShowName().'</option>';
}
?>
</select>
<?php
}
?>
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr"><?php
if($this->context->my->role_id==5)
echo '序号';
else
echo '<input type="checkbox" id="all">';
?></td>
<td width="50" align="center" class="bg_tr">预约日期</td>
<td width="50" align="center" class="bg_tr">预约时间</td>
<td width="70" align="center" class="bg_tr">车牌号</td>
<td width="120" align="center" class="bg_tr">车主</td>
<td width="70" align="center" class="bg_tr">初登日期</td>
<td width="100" align="center" class="bg_tr" nowrap>商业起保日期</td>
<td width="100" align="center" class="bg_tr" nowrap>交强起保日期</td>
<td width="200" align="center" class="bg_tr">预约备注</td>
<td width="30" align="center" class="bg_tr">业务员</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<form id="listForm">
<?php
foreach($items as $index => $item) {
$start_index = ($page-1) * 20 + $index;
$car_info = $item->car;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?php
if($this->context->my->role_id == 5)
echo $start_index + 1;
else
echo '<input type="checkbox" name="ids[]" value="'.$item->car_id.'">';
?></td>
<td align="center" class="td_bg" nowrap><?=$item->pdate?></td>
<td align="center" class="td_bg" nowrap><?=$item->ptime?></td>
<td class="td_bg" nowrap><?=$car_info->car_no?></td>
<td class="td_bg" nowrap><?=$car_info->car_man?></td>
<td class="td_bg" nowrap><?=$car_info->register_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer1_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer2_date?></td>
<td class="td_bg" ><?=MyLib::substr_cut($item->remark,40)?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->car_id?>,<?=$start_index?>)">详情</a>]
</td>
</tr>
<?php
}
?>
</form>
<tr>
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -1,94 +1,107 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//详情 <div class="wrapper wrapper-content animated fadeInRight">
function info(id,index) { <div class="ibox float-e-margins">
var params = $('#searchForm').serialize(); <div class="ibox-title">
window.location.href = '/car/info?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params); <h5>今日预约</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group">
<label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th width="50" data-field="car_id">ID</th>
<th data-field="pdate">预约日期</th>
<th data-field="ptime">预约时间</th>
<th data-field="car_no">车牌号</th>
<th data-field="car_man">车主</th>
<th data-field="register_date">初登日期</th>
<th data-field="insurer1_date">商业起保日期</th>
<th data-field="insurer2_date">交强起保日期</th>
<th data-field="remark">预约备注</th>
<th data-field="user_name">业务员</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.car_id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function view(car_id) {
location.href = '/car/info?id=' + car_id;
} }
$(function(){ function refreshList() {
$("#search-btn").click(function(){ $('#listTable').bootstrapTable('refresh');
$('#page').val(1); }
var params = $('#searchForm').serialize();
window.location.href = "/appointment/today?" + params; function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/appointment/today-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['car_man'] = $('#car_man').val();
o['phone'] = $('#phone').val();
o['car_no'] = $('#car_no').val();
o['id_man'] = $('#id_man').val();
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
车主:<input name="car_man" type="text" value="<?=$car_man?>">
电话:<input name="phone" type="text" value="<?=$phone?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
预约类型:<select name="ptype">
<option value="0">全部类型</option>
<?php foreach($list as $k=>$v){ ?>
<option value='<?= $v->code; ?>' <?php if($ptype == $v->code){ echo 'selected'; } ?> ><?= $v->name; ?></option>
<?php } ?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> </td>
</tr>
<tr>
<td class="td_bg">
排序:<select name="sort_key">
<option value="appointment_t.pdate" <?=$sort_key=='appointment_t.pdate'?'selected':''?>>按预约时间</option>
<option value="car_t.register_date" <?=$sort_key=='car_t.register_date'?'selected':''?>>按初登时间</option>
<option value="car_t.insurer1_date" <?=$sort_key=='car_t.insurer1_date'?'selected':''?>>按商业保险时间</option>
<option value="car_t.insurer2_date" <?=$sort_key=='car_t.insurer2_date'?'selected':''?>>按商业保险时间</option>
</select>
<select name="sort_value">
<option value="ASC" <?=$sort_value=='ASC'?'selected':''?>>顺序</option>
<option value="DESC" <?=$sort_value=='DESC'?'selected':''?>>倒序</option>
</select>
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr">序号</td>
<td width="50" align="center" class="bg_tr">预约日期</td>
<td width="50" align="center" class="bg_tr">预约时间</td>
<td width="70" align="center" class="bg_tr">车牌号</td>
<td width="120" align="center" class="bg_tr">车主</td>
<td width="70" align="center" class="bg_tr">初登日期</td>
<td width="100" align="center" class="bg_tr" nowrap>商业起保日期</td>
<td width="100" align="center" class="bg_tr" nowrap>交强起保日期</td>
<td width="200" align="center" class="bg_tr">预约备注</td>
<td width="30" align="center" class="bg_tr">业务员</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page-1) * 20 + $index;
$car_info = $item->car;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?=$start_index+1?></td>
<td align="center" class="td_bg" nowrap><?=$item->pdate?></td>
<td align="center" class="td_bg" nowrap><?=$item->ptime?></td>
<td class="td_bg" nowrap><?=$car_info->car_no?></td>
<td class="td_bg" nowrap><?=$car_info->car_man?></td>
<td class="td_bg" nowrap><?=$car_info->register_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer1_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer2_date?></td>
<td class="td_bg" ><?=MyLib::substr_cut($item->remark,40)?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->car_id?>,<?=$start_index?>)">详情</a>]
</td>
</tr>
<?php
}
?>
<tr>
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -187,7 +187,7 @@ use \common\libs\MyLib;
var o = {}; var o = {};
function insurerDlg() { function insurerDlg() {
title = '投保'; title = '投保';
layer_show(title, '/car/order-add?car_id=<?=$car_info->id?>'); layer_show_full(title, '/car/order-add?car_id=<?=$car_info->id?>');
} }
function appointmentDlg() { function appointmentDlg() {
title = '添加预约'; title = '添加预约';

@ -0,0 +1,457 @@
<?php
use \common\libs\MyLib;
use common\models\PriceT;
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<form class="form-horizontal" id="orderFrm">
<input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<input type="hidden" name="id" value="<?=$order_info->id?>">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>险种</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<?php
$len = count($insurer_type_items);
for($i = 0; $i < $len; $i++) {
$item = $insurer_type_items[$i];
$order_id = $order_info->id;
if(!$order_id)
$order_id = 0;
$tmp_row = PriceT::find()
->where('order_id='.$order_id.' and type_id='.$item->id)
->one();
?>
<th class="bg-warning">
<?=$item->name?>(<?=$item->code?>)
</th>
<td>
<?php
if($item->content != '') {
$tmp_items = explode(',',$item->content);
echo '<select name="types['.$item->id.']" class="form-control">';
$tmp_items = explode(',',$item->content);
foreach($tmp_items as $tmp_item) {
echo '<option';
if(!empty($tmp_row) && $tmp_row->val == $tmp_item)
echo ' selected ';
echo '>'.$tmp_item.'</option>';
}
echo '</select>';
} else {
echo '<input name="types['.$item->id.']" class="form-control" style="width:100px;" type="text"';
if(!empty($tmp_row))
echo ' value="'.$tmp_row->val.'" ';
echo '>';
}
?>
</td>
<td>
<div class="checkbox checkbox-inline">
<input type="checkbox" name="nopays[<?=$item->id?>]" id="nopays_<?=$item->id?>" value="1" <?=(!empty($tmp_row) && $tmp_row->is_nopay == 1)?'checked':''?>>
<label for="nopays_<?=$item->id?>"> 不计免赔 </label>
</div>
</td>
<?php
if(($i+1)%3==0) {
echo '</tr>';
echo '<tr>';
}
}
?>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>保费信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning">商业总净保费</th>
<td><input name="total1_clear" id="total1_clear" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total1_clear?>"></td>
<th class="bg-warning">商业含税总保费</th>
<td><input name="total1" id="total1" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total1?>"></td>
<th class="bg-warning">车船税</th>
<td><input name="total3" id="total3" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total3?>"></td>
</tr>
<tr>
<th class="bg-warning">交强总净保费</th>
<td><input name="total2_clear" id="total2_clear" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total2_clear?>"></td>
<th class="bg-warning">交强含税总保费</th>
<td><input name="total2" id="total2" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total2?>"></td>
<th class="bg-warning">&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th class="bg-warning">折扣后商业净保费</th>
<td><input name="total1_real" id="total1_real" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total1_real?>"></td>
<th class="bg-warning">减免金额</th>
<td><input name="total1_dis" id="total1_dis" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total1_dis?>"></td>
<th class="bg-warning">商业折扣率</th>
<td><input name="total1_percent" id="total1_percent" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total1_percent?>"></td>
</tr>
<tr>
<th class="bg-warning">共计签单</th>
<td><input name="total_all" id="total_all" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total_all?>"></td>
<th class="bg-warning">应收</th>
<td><input name="total_real" id="total_real" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total_real?>"></td>
<th class="bg-warning">&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th class="bg-warning">备注</th>
<td colspan="5"><input name="price_remark" id="price_remark" class="form-control" style="width:100%;" type="text" value="<?=$order_info->price_remark?>"></td>
</tr>
<tr>
<th class="bg-warning">短信</th>
<td colspan="5">
<div class="row">
<div class="col-sm-12">
<textarea name="sms-msg" id="sms-msg" class="form-control"></textarea>
</div>
</div>
<div class="row" style="margin-top: 8px;">
<div class="col-sm-12 form-inline">
<label>手机号码</label>
<input type="text" name="sms-tel" id="sms-tel" class="form-control">
<button type="button" class="btn btn-primary sms-make-btn">生成短信</button>
<button type="button" class="btn btn-danger sms-send-btn">发送短信</button>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>订单信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning">车牌号</th>
<td><input name="car_no" class="form-control" style="width:100%;" type="text" value="<?=$order_info->car_no!='' ? $order_info->car_no:$car_info->car_no?>"></td>
<th class="bg-warning" nowrap>初登日期</th>
<td><input name="register_date" class="form-control" style="width:100%;" type="text" value="<?=$car_info->register_date?>"></td>
<th class="bg-warning" nowrap>座位数</th>
<td><input name="seats" class="form-control" style="width:100%;" type="text" value="<?=$order_info->seats ? $order_info->seats:$car_info->seats?>"></td>
<th class="bg-warning" nowrap>电子邮件</th>
<td><input name="email" class="form-control" style="width:100%;" type="text" value="<?=$order_info->email?>"></td>
</tr>
<tr>
<th class="bg-warning">车主</th>
<td><input name="car_man" class="form-control" style="width:100%;" type="text" value="<?=$order_info->car_man!='' ? $order_info->car_man:$car_info->car_man?>"></td>
<th class="bg-warning">证件类型</th>
<td>
<select name="car_man_type" class="form-control">
<option value="身份证">身份证</option>
<option value="营业执照">营业执照</option>
</select>
</td>
<th class="bg-warning" nowrap>证件号码</th>
<td><input name="car_man_number" class="form-control" style="width:100%;" type="text" value="<?=$order_info->car_man_number!='' ? $order_info->car_man_number:$car_info->car_man_number?>"></td>
<th class="bg-warning">联系电话</th>
<td><input name="car_man_phone" class="form-control" style="width:100%;" type="text" value="<?=$order_info->car_man_phone!='' ? $order_info->car_man_phone:$car_info->phone?>"></td>
</tr>
<tr>
<th class="bg-warning">被保险人</th>
<td><input name="id_man" class="form-control" style="width:100%;" type="text" value="<?=$order_info->id_man!='' ? $order_info->id_man:$car_info->id_man?>"></td>
<th class="bg-warning">证件类型</th>
<td>
<select name="id_man_type" class="form-control">
<option value="身份证">身份证</option>
<option value="营业执照">营业执照</option>
</select>
</td>
<th class="bg-warning">证件号码</th>
<td><input name="id_man_number" class="form-control" style="width:100%;" type="text" value="<?=$order_info->id_man_number!='' ? $order_info->id_man_number:$car_info->id_number?>"></td>
<th class="bg-warning">联系电话</th>
<td><input name="id_man_phone" class="form-control" style="width:100%;" type="text" value="<?=$order_info->id_man_phone!='' ? $order_info->id_man_phone:$car_info->id_phone?>"></td>
</tr>
<tr>
<th class="bg-warning">投保人</th>
<td><input name="link_man" class="form-control" style="width:100%;" type="text" value="<?=$order_info->link_man!='' ? $order_info->link_man:''?>"></td>
<th class="bg-warning">证件类型</th>
<td>
<select name="link_man_type" class="form-control">
<option value="身份证">身份证</option>
<option value="营业执照">营业执照</option>
</select>
</td>
<th class="bg-warning">证件号码</th>
<td><input name="link_man_number" class="form-control" style="width:100%;" type="text" value="<?=$order_info->link_man_number!='' ? $order_info->link_man_number:''?>"></td>
<th class="bg-warning">联系电话</th>
<td><input name="link_man_phone" class="form-control" style="width:100%;" type="text" value="<?=$order_info->link_man_phone!='' ? $order_info->link_man_phone:''?>"></td>
</tr>
<tr>
<th class="bg-warning" nowrap>商业起保日期</th>
<td>
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" name="insurer1_begin_date" class="form-control" value="<?=$order_info->insurer1_begin_date?>">
</div>
</td>
<th class="bg-warning" nowrap>交强起保日期</th>
<td>
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" name="insurer2_begin_date" class="form-control" value="<?=$order_info->insurer2_begin_date?>">
</div>
</td>
<th class="bg-warning">保险公司</th>
<td>
<select name="company2_id" id="company2_id" class="form-control">
<option value="0">---请选择---</option>
<?php
foreach($insurer_company2_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->company2_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<th class="bg-warning">付款方式</th>
<td class="form-inline" nowrap>
<select name="shoufei_id" id="shoufei_id" class="form-control">
<option value="">收费方式</option>
<option value="1">上门收费</option>
<option value="2">在线支付</option>
<option value="3">客户自上门</option>
</select>
<select name="pay_type_id" id="pay_type_id" class="form-control">
<option value="">请选择</option>
<?php
foreach($pay_type_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->pay_type_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<th class="bg-warning">领款人</th>
<td><input name="money_man" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_man?>"></td>
<th class="bg-warning">开户行</th>
<td><input name="money_bank" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_bank?>"></td>
<th class="bg-warning">银行账号</th>
<td><input name="money_no" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_no?>"></td>
<th class="bg-warning" nowrap>成功理由</th>
<td>
<select name="success_id" id="success_id" class="form-control">
<option value="0">---请选择---</option>
<?php
foreach($success_items as $item) {
echo '<option value="'.$item->id.'"';
if($order_info->success_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<th class="bg-warning" nowrap>送单日期</th>
<td>
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" name="send_date" class="form-control" value="<?=$order_info->send_date?>">
</div>
</td>
<th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline">
<select name="send_city_id" class="form-control">
<option value="0">选择城市</option>
<?php
foreach($city_items as $item) {
echo '<option value="'.$item->id.'"';
if($order_info->send_city_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
<select name="send_district_id" class="form-control">
<option value="0">选择区县</option>
<?php
foreach($district_items as $item) {
echo '<option value="'.$item->id.'"';
if($order_info->send_district_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
<input type="text" name="send_address" class="form-control" style="width:70%;" value="<?=$order_info->send_address?>">
</td>
</tr>
<tr>
<th class="bg-warning">备注</th>
<td colspan="7"><input name="order_remark" class="form-control" style="width:100%;" type="text" value="<?=$order_info->remark?>"></td>
</tr>
</table>
<div>
<div class="row">
<div class="col-md-5 col-md-offset-5">
<button type="button" class="btn btn-primary btn-save" type="button">
<strong>保 存</strong>
</button>
<button type="button" class="btn btn-primary btn-submit" type="button">
<strong>提 交</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script>
var o = {};
//判断是否填写了选项
function isNull(data){
if(data == "" || data == undefined || data == null){
return true;
}else{
return false;
}
}
//报价计算
function calc() {
var total1_clear = Number($('#total1_clear').val());
var total1 = Number($('#total1').val());
var total2_clear = Number($('#total2_clear').val());
var total2 = Number($('#total2').val());
var total3 = Number($('#total3').val());
var total1_real = Number($('#total1_real').val());
var total1_dis = Number($('#total1_dis').val());
var total1_percent = Number($('#total1_percent').val());
var total_all = Number($('#total_all').val());
var total_real = Number($('#total_real').val());
total1 = 1.06 * total1_clear;
total2 = 1.06 * total2_clear;
total_all = total1 + total2 + total3;
total1_dis = total1_clear - total1_real;
total_real = total_all - total1_dis;
total1_percent = parseFloat(total1_real/total1_clear);
$('#total1').val(total1.toFixed(2));
$('#total2').val(total2.toFixed(2));
$('#total1_dis').val(total1_dis.toFixed(2));
$('#total1_percent').val(total1_percent.toFixed(2));
$('#total_all').val(total_all.toFixed(2));
$('#total_real').val(total_real.toFixed(2));
}
//保存订单
function saveOrder(status_id) {
var params = $('#orderFrm').serialize();
params = params + '&status_id=' + status_id;
$.post('/car/order-save',params,function(obj){
parent.layer.msg(obj.msg);
if(obj.success && status_id>1) {
layer_close();
}
},'json');
}
$(function() {
$('#total1_clear').blur(function(){
calc();
refreshCompanyGift();
});
$('#total2_clear').blur(function(){
calc();
});
$('#total3').blur(function(){
calc();
});
$('#total1_dis').blur(function(){
calc();
});
$('#total1_real').blur(function(){
calc();
});
$('.date').datepicker({
todayBtn: "linked",
keyboardNavigation: false,
forceParse: false,
calendarWeeks: true,
autoclose: true
});
//生成短信内容
$('.sms-make-btn').click(function(){
var params = $('#orderFrm').serialize();
var baoxiangs=$('#company2_id').val();
var smstel=$('#sms-tel').val();
if(isNull(smstel)){
parent.layer.msg('请填写电话号码');
return ;
}
if(baoxiangs==0){
parent.layer.msg('请选择保险公司');
return ;
}
$.post('/car/sms-make',params,function(obj){
if(obj.success) {
$('#sms-msg').val(obj.msg);
} else {
parent.layer.msg(obj.msg);
}
},'json');
});
//发送短信内容
$('.sms-send-btn').click(function(){
var tel = $('#sms-tel').val();
var msg = $('#sms-msg').val();
var baoxiangs=$('#company2_id').val();
var smstel=$('#sms-tel').val();
var smsmsg=$('#sms-msg').val();
if(smsmsg==''){
parent.layer.msg('短信内容不能为空,请生成短信');
return ;
}
if(isNull(smstel)){
parent.layer.msg('请填写电话号码');
return ;
}
if(baoxiangs==0){
parent.layer.msg('请选择保险公司');
return ;
}
// return;
$.post('/car/sms-send',{tel:tel,msg:msg,company2_id:baoxiangs},function(obj){
parent.layer.msg(obj.msg);
},'json');
});
$('.btn-save').click(function(){
saveOrder(1);
});
$('.btn-submit').click(function(){
saveOrder(2);
});
});
</script>
<?php $this->endBlock(); ?>

@ -1,136 +1,104 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" language="javascript"> <div class="wrapper wrapper-content animated fadeInRight">
//详情 <div class="ibox float-e-margins">
function info(id) { <div class="ibox-title">
var params = $('#searchForm').serialize(); <h5>我的提单</h5>
window.location.href = '/insurer/finance-mng-edit?id=' + id + '&back_params=' + encodeURIComponent(params); <div class="ibox-tools">
} <a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
function unlock(id) { <i class="fa fa-refresh"></i> 刷新
$.post('/insurer/unlocked',{id:id},function(obj){ </a>
if(obj.success) { </div>
alert(obj.msg); </div>
window.location.reload(); <div class="ibox-content">
} else { <form role="form" class="form-inline" onsubmit="return search();">
alert(obj.msg); <div class="form-group">
} <label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th width="50" data-field="id">ID</th>
<th data-field="id_man">被保险人</th>
<th data-field="link_man_phone">联系电话</th>
<th data-field="company_name">保险公司</th>
<th data-field="car_no">车牌号</th>
<th data-field="print_date">正本日期</th>
<th data-field="insurer1_no">商业保单号</th>
<th data-field="insurer2_no">交强保单号</th>
<th data-field="total_all">共计签单</th>
<th data-field="$nams">级别</th>
<th data-field="user_name">销售座席</th>
<th data-field="status_name">状态</th>
<th data-field="caiwu_status">转账状态</th>
<th data-field="pay_type">支付方式</th>
<th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
},'json');
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function view(id) {
window.location.href = '/insurer/office-mng-edit?id=' + id;
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
} }
$(function(){
$("#search-btn").click(function(){ function search() {
$('#page').val(0); $('#listTable').bootstrapTable('destroy');
var params = $('#searchForm').serialize(); $('#listTable').bootstrapTable({
window.location.href = "/insurer/finance-mng?" + params; url: "/insurer/office-mng-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
<!--新增搜索项-->
<!--完成程度-->
<select name="status" class="status">
<option value=0>全部</option>
<option value=1 <?= $status==1?'selected':'' ?>>未完成</option>
<option value=2 <?= $status==2?'selected':'' ?>>完成</option>
</select>
被保险人:<input name="car_man" type="text" value="<?=$car_man?>">
电话:<input name="phone" type="text" value="<?=$phone?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
级别:<select name="group_id">
<option value="0">全部</option>
<?php
foreach($group_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $group_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
<!--日期-->
正本日期:
<input type="Text" class="Wdate" name="begin_date" onclick="WdatePicker()" value="<?= $begin_date ?>" />
--
<input type="Text" class="Wdate" name="end_date" onclick="WdatePicker()" value="<?= $end_date ?>" />
转账状态:
<select name="caiwu_status_id" class="caiwu_status_id">
<option value=0>全部</option>
<?php
foreach($caiwu_status as $index => $item){
echo '<option value="'.$item->id.'"';
echo $caiwu_status_id == $item->id ? 'selected' : '';
echo '>'.$item->name.'</option>';
}
?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> </td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr">序号</td>
<td width="50" align="center" class="bg_tr">被保险人</td>
<td width="60" align="center" class="bg_tr">联系电话</td>
<td width="60" align="center" class="bg_tr">保险公司</td>
<td width="60" align="center" class="bg_tr">车牌号</td>
<td width="60" align="center" class="bg_tr">正本日期</td>
<td width="60" align="center" class="bg_tr">商业保单号</td>
<td width="80" align="center" class="bg_tr">交强保单号</td>
<td width="60" align="center" class="bg_tr">共计签单</td>
<td width="60" align="center" class="bg_tr">级别</td>
<td width="60" align="center" class="bg_tr">销售座席</td>
<td width="60" align="center" class="bg_tr">状态</td>
<td width="60" align="center" class="bg_tr">转账状态</td>
<td width="60" align="center" class="bg_tr">支付方式</td>
<td width="60" align="center" class="bg_tr">当前操作</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page - 1) * 20 + $index;
$caiwu = $item->caiwu;
$users=$item->user->group;
$username=$item->user;
$nams=$users['name'];
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?=$start_index+1?></td>
<td class="td_bg" nowrap><?=MyLib::substr_cut($item->id_man,20)?></td>
<td class="td_bg" nowrap><?=$item->link_phone?></td>
<td class="td_bg" nowrap><?=$item->company?$item->company->name:''?></td>
<td class="td_bg" nowrap><?=$item->car_no?></td>
<td class="td_bg" nowrap><?=$item->print_date?></td>
<td class="td_bg" nowrap><?=$item->insurer1_no?></td>
<td class="td_bg" nowrap><?=$item->insurer2_no?></td>
<td class="td_bg" nowrap><?=$item->total_all?></td>
<td align="center" class="td_bg" nowrap><?=$nams?></td>
<td class="td_bg" ><?=$item->user?$item->user->getShowName():''?>&nbsp;</td>
<td class="td_bg" ><?=$caiwu->status->name?></td>
<td class="td_bg" ><?=$caiwu->caiwuStatus ? $caiwu->caiwuStatus->name : ''?></td>
<td class="td_bg" align="center" nowrap><?=$item->shoufei_id?MyLib::zhifufs($item->shoufei_id).'-':''?><?=$item->payType?$item->payType->name:''?></td>
<td class="td_bg" ><?=$caiwu->lock?$caiwu->lock->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
<?php if($caiwu->status_id == 12){ ?>
[<a href="javascript:void(0);" onclick="unlock(<?=$item->id?>)">解锁</a>]
[<a href="javascript:void(0);" onclick="info(<?=$item->id?>)">详情</a>]
<?php } ?>
</td>
</tr>
<?php
}
?>
<tr >
<td height="25" colspan="16" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -1,481 +1,237 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
use \common\models\PriceT; use common\models\PriceT;
?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td height="22" colspan="2" class="td_bg">
<table width="100%" align="center" height="120" border="0" cellpadding="0" cellspacing="0" id="mainTable">
<tr>
<td height="120" valign="top" class="td_bg">
<!--保单信息-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-on id=navcell onclick=open_up(1) name="navcell">▼保单信息</TD>
</tr>
</tbody>
</table>
<TABLE id=tb1 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
<TR>
<TD vAlign=top>
<form id="orderFrm">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<input type="hidden" name="car_id" value="<?=$car_info->id?>">
<tr>
<td width="100" height="25" class="bg_tr">车牌号</td>
<td height="25" class="td_bg"><?=$car_info->car_no?></td>
<td width="100" height="25" class="bg_tr">厂牌型号</td>
<td height="25" class="td_bg"><?=$car_info->factory_model?></td>
<td width="60" height="25" class="bg_tr">品牌</td>
<td width="120" height="25" class="td_bg"><?=$car_info->brand?$car_info->brand->name:''?></td>
<td width="60" height="25" class="bg_tr">车系</td>
<td height="25" class="td_bg"><?=$car_info->series?$car_info->series->name:''?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">发动机号</td>
<td height="25" class="td_bg"><?=$car_info->engine_no?></td>
<td width="100" height="25" class="bg_tr">车架号</td>
<td height="25" class="td_bg"><?=$car_info->car_frame_no?></td>
<td width="60" height="25" class="bg_tr">初登日期</td>
<td height="25" class="td_bg"><?=$car_info->register_date?></td>
<td width="60" height="25" class="bg_tr">排量</td>
<td height="25" class="td_bg"><?=$car_info->displacement?$car_info->displacement->name:''?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">车辆类型</td>
<td height="25" class="td_bg"><?=$car_info->carType?$car_info->carType->name:''?></td>
<td width="100" height="25" class="bg_tr">运营性质</td>
<td height="25" class="td_bg"><?=$car_info->carUse?$car_info->carUse->name:''?></td>
<td width="60" height="25" class="bg_tr">座位数</td>
<td height="25" class="td_bg"><?=$car_info->seats?></td>
<td width="60" height="25" class="bg_tr">年份</td>
<td height="25" class="td_bg"><?=$car_info->car_year?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">车主</td>
<td height="25" class="td_bg"><?=$car_info->car_man?></td>
<td width="100" height="25" class="bg_tr">联系电话</td>
<td height="25" class="td_bg"><?=$car_info->phone?></td>
<td width="60" height="25" class="bg_tr">证件号码</td>
<td height="25" class="td_bg"><?=$car_info->car_man_number?></td>
<td width="60" height="25" class="bg_tr">微信号</td>
<td height="25" class="td_bg"><?=$car_info->weixin?></td>
</tr>
<tr>
<td width="60" height="25" class="bg_tr">备注</td>
<td colspan="7" height="25" class="td_bg"><?=$car_info->remark?></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
<tr>
<td class="bg_tr">被保险人</td>
<td class="td_bg"><?=$order_info->id_man?></td>
<td class="bg_tr">证件号码</td>
<td class="td_bg"><?=$order_info->id_number?></td>
<td width="60" class="bg_tr">联系人</td>
<td class="td_bg"><?=$order_info->link_man?></td>
<td width="60" class="bg_tr">联系电话</td>
<td class="td_bg"><?=$order_info->link_phone?></td>
</tr>
<tr>
<td class="bg_tr">送单日期</td>
<td class="td_bg"><?=$order_info->send_date?></td>
<td class="bg_tr">保险公司</td>
<td class="td_bg"><?=$order_info->company?$order_info->company->name:''?></td>
<td class="bg_tr">付款方式</td>
<td class="td_bg"><?=$order_info->shoufei_id?MyLib::zhifufs($order_info->shoufei_id).'-':''?><?=$order_info->payType?$order_info->payType->name:''?></td>
<td class="bg_tr">电子邮件</td>
<td class="td_bg"><?=$order_info->email?></td>
</tr>
<tr>
<td class="bg_tr">商业起保日期</td>
<td class="td_bg"><?=$order_info->insurer1_begin_date?></td>
<td class="bg_tr">交强起保日期</td>
<td class="td_bg"><?=$order_info->insurer2_begin_date?></td>
<td class="bg_tr">缴费单号</td>
<td colspan="3" class="td_bg"><?=$order_info->pay_no?></td>
</tr>
<tr>
<td class="bg_tr">商业保单号</td>
<td class="td_bg"><?=$order_info->insurer1_no?></td>
<td class="bg_tr">交强保单号</td>
<td class="td_bg"><?=$order_info->insurer2_no?></td>
<td rowspan="3" class="bg_tr" valign="center">备注</td>
<td colspan="3" rowspan="3" valign="top" class="td_bg"><?=$order_info->remark?></td>
</tr>
<tr>
<td class="bg_tr">送单地址</td>
<td colspan="3" class="td_bg">
<?=$order_info->direction1?$order_info->direction1->name:''?>
<?=$order_info->range1?$order_info->range1->name:''?>
<?=$order_info->city1?$order_info->city1->name:''?>
<?=$order_info->district1?$order_info->district1->name:''?>
<?=$order_info->send_address1?>
</td>
</tr>
<tr>
<td class="bg_tr">正本送单地址</td>
<td colspan="3" class="td_bg">
<?php if($order_info->send_address2):?>
<?=$order_info->direction2?$order_info->direction2->name:''?>
<?=$order_info->range2?$order_info->range2->name:''?>
<?=$order_info->city2?$order_info->city2->name:''?>
<?=$order_info->district2?$order_info->district2->name:''?>
<?=$order_info->send_address2?>
<?php elseif($order_info->receiver_province):?>
<?=$order_info->receiver_province?>
<?=$order_info->receiver_city?>
<?=$order_info->receiver_county?>
<?=$order_info->receiver_address?>
<?php else:?>
<?php if($order_info->addr_id):?>
<?=$order_info->addr->regionP->name?>
<?=$order_info->addr->regionC->name?>
<?=$order_info->addr->regionD->name?>
<?php if(is_string($order_info->addr->regionT)):?>
<?=$order_info->addr->regionT?>
<?php else:?>
<?=$order_info->addr->regionT->name?>
<?php endif;?>
<?=$order_info->addr->address?>
<?php endif;?>
<?php endif;?>
</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
<td width="40%" valign="top">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" class="bg_tr">险种</td>
<td align="center" class="bg_tr">内容</td>
<td align="center" class="bg_tr" nowrap>不计免赔</td>
</tr>
<?php
$len = count($insurer_type_items);
for($i = 0; $i < $len; $i++) {
$item = $insurer_type_items[$i];
$order_id = $order_info->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->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue;
?>
<tr>
<td class="bg_tr" nowrap><?=$item->name?>(<?=$item->code?>)</td>
<td class="td_bg"><?=$tmp_row->val?></td>
<td align="center" class="td_bg"><?php
if($tmp_row->is_nopay == 1) {
echo '是';
}
?>
</td>
</tr>
<?php
}
?>
</table>
</td>
<td width="10px;">&nbsp;</td>
<td width="60%" valign="top">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td class="bg_tr">商业总净保费</td>
<td class="td_bg"><?=$order_info->total1_clear?></td>
<td class="bg_tr">商业含税总保费</td>
<td class="td_bg"><?=$order_info->total1?></td>
</tr>
<tr>
<td class="bg_tr">交强总净保费</td>
<td class="td_bg"><?=$order_info->total2_clear?></td>
<td class="bg_tr">交强含税总保费</td>
<td class="td_bg"><?=$order_info->total2?></td>
</tr>
<tr>
<td class="bg_tr">车船税</td>
<td class="td_bg"><?=$order_info->total3?></td>
<td class="bg_tr">共计签单</td>
<td class="td_bg"><?=$order_info->total_all?></td>
</tr>
<tr>
<td class="bg_tr">折扣后商业净保费</td>
<td class="td_bg"><?=$order_info->total1_real?></td>
<td class="bg_tr">减免金额</td>
<td class="td_bg"><?=$order_info->total1_dis?></td>
</tr>
<tr>
<td class="bg_tr">商业折扣率</td>
<td class="td_bg"><?=$order_info->total1_percent?></td>
<td class="bg_tr">应收</td>
<td class="td_bg"><?=$order_info->total_real?></td>
</tr>
<tr>
<td class="bg_tr">备注</td>
<td colspan="3" class="td_bg"><?=$order_info->price_remark?></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td width="100" class="bg_tr">领款人</td>
<td class="td_bg"><?=$order_info->caiwu?$order_info->caiwu->money_man:''?></td>
</tr>
<tr>
<td class="bg_tr">银行账号</td>
<td class="td_bg"><?=$order_info->caiwu?$order_info->caiwu->money_no:''?></td>
</tr>
<tr>
<td class="bg_tr">开户行</td>
<td class="td_bg"><?=$order_info->caiwu?$order_info->caiwu->money_bank:''?></td>
</tr>
<tr>
<td class="bg_tr">转账状态</td>
<?php if($order_info->caiwu):?>
<td class="td_bg">
<?php if($order_info->caiwu->caiwu_status_id==0):?> ?>
无操作 <?php $this->beginBlock('header_css'); ?>
<?php else:?> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?=$caiwu_status[$order_info->caiwu->caiwu_status_id]?> <?php $this->endBlock(); ?>
<?php endif;?>
</td> <div class="wrapper wrapper-content animated fadeInRight">
<?php else:?> <form class="form-horizontal" id="orderFrm">
<td class="td_bg"> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
</td> <div class="ibox float-e-margins">
<?php endif;?> <div class="ibox-title">
<h5>险种</h5>
</tr> </div>
<div class="ibox-content">
</table> <table class="table table-bordered">
</td> <tr>
</tr> <?php
</table> $len = count($insurer_type_items);
</form> $index = 0;
</TD> for($i = 0; $i < $len; $i++) {
</TR> $item = $insurer_type_items[$i];
<tr> $order_id = $order_info->id;
<td height="22" colspan="2" align="center" class="td_bg"> if(!$order_id)
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 "> $order_id = 0;
</td> $tmp_row = PriceT::find()
</tr> ->where('order_id='.$order_id.' and type_id='.$item->id)
</TABLE> ->one();
<!--快递信息--> if($tmp_row->val == '') continue;
<table> ?>
<tbody> <th class="bg-warning">
<tr> <?=$item->name?>(<?=$item->code?>)
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(2) name="navcell">▲快递信息</TD> </th>
</tr> <td><label><?=$tmp_row->val?></label></td>
</tbody> <td><label><?=(!empty($tmp_row) && $tmp_row->is_nopay == 1)?'不计免赔':''?></label></td>
</table> <?php
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table"> if(($index+1)%3==0) {
<TR> echo '</tr>';
<TD vAlign=top> echo '<tr>';
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table" style="table-layout: fixed;"> }
<?php if($ems_items):?> $index++;
<tr> }
<td width="50" align="center" class="bg_tr" nowrap>序号</td> ?>
<td width="80" align="center" class="bg_tr" nowrap>快递公司</td> </tr>
<td width="80" align="center" class="bg_tr" nowrap>快递单号</td> </table>
<td width="80" align="center" class="bg_tr" nowrap>配送员电话</td> </div>
<td width="50%" align="center" class="bg_tr" nowrap>描述</td> </div>
<td width="130" align="center" class="bg_tr" nowrap>送单时间</td> <div class="ibox float-e-margins">
<td width="80" align="center" class="bg_tr" nowrap>操作员</td> <div class="ibox-title">
</tr> <h5>保费信息</h5>
<?php </div>
foreach($ems_items as $index => $item) { <div class="ibox-content">
?> <table class="table table-bordered">
<tr> <tr>
<td align="center" class="td_bg"nowrap ><?=$index+1?></td> <th class="bg-warning">商业总净保费</th>
<td class="td_bg" nowrap><?=$item->ems_company?></td> <td><label><?=$order_info->total1_clear?></label></td>
<td align="center" class="td_bg" nowrap><?=$item->ems_no?></td> <th class="bg-warning">商业含税总保费</th>
<td class="td_bg" nowrap><?=$item->ems_phone?></td> <td><label><?=$order_info->total1?></label></td>
<td class="td_bg" nowrap><?=$item->ems_remark?></td> <th class="bg-warning">车船税</th>
<td align="center" class="td_bg" nowrap><?=$item->updated_at?></td> <td><label><?=$order_info->total3?></label></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td> </tr>
</tr> <tr>
<?php <th class="bg-warning">交强总净保费</th>
} <td><label><?=$order_info->total2_clear?></label></td>
?> <th class="bg-warning">交强含税总保费</th>
<?php elseif($ems_items1):?> <td><label><?=$order_info->total2?></label></td>
<tr> <th class="bg-warning">&nbsp;</th>
<td width="50" align="center" class="bg_tr" nowrap>序号</td> <td>&nbsp;</td>
<td width="80" align="center" class="bg_tr" nowrap>快递公司</td> </tr>
<td width="80" align="center" class="bg_tr" nowrap>快递单号</td> <tr>
<td width="80" align="center" class="bg_tr" nowrap>体检卡号</td> <th class="bg-warning">折扣后商业净保费</th>
<td width="80" align="center" class="bg_tr" nowrap>收件人姓名</td> <td><label><?=$order_info->total1_real?></label></td>
<td width="80" align="center" class="bg_tr" nowrap>收件人电话</td> <th class="bg-warning">减免金额</th>
<td width="130" align="center" class="bg_tr" nowrap>出单时间</td> <td><label><?=$order_info->total1_dis?></label></td>
<td width="80" align="center" class="bg_tr" nowrap>操作员</td> <th class="bg-warning">商业折扣率</th>
</tr> <td><label><?=$order_info->total1_percent?></label></td>
<?php </tr>
foreach($ems_items1 as $index => $item) { <tr>
?> <th class="bg-warning">共计签单</th>
<tr> <td><label><?=$order_info->total_all?></label></td>
<td align="center" class="td_bg"nowrap ><?=$index+1?></td> <th class="bg-warning">应收</th>
<td class="td_bg" nowrap> <td><label><?=$order_info->total_real?></label></td>
<?php if($item->ems_company==1):?> <th class="bg-warning">&nbsp;</th>
德邦 <td>&nbsp;</td>
<?php else:?> </tr>
<tr>
<?php endif;?> <th class="bg-warning">备注</th>
</td> <td colspan="5"><label><?=$order_info->price_remark?></label></td>
<td align="center" class="td_bg" nowrap><?=$item->ems_no?></td> </tr>
<td align="center" class="td_bg" nowrap><?=$item->physical_no?></td> </table>
<td class="td_bg" nowrap><?=$item->link_name?></td> </div>
<td class="td_bg" nowrap><?=$item->link_tel?></td> </div>
<td align="center" class="td_bg" nowrap><?=$item->send_date?></td> <div class="ibox float-e-margins">
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td> <div class="ibox-title">
</tr> <h5>订单信息</h5>
<?php </div>
} <div class="ibox-content">
?> <table class="table table-bordered">
<tr>
<?php endif;?> <th class="bg-warning">车牌号</th>
</table> <td><label><?=$order_info->car_no?></label></td>
</TD> <th class="bg-warning" nowrap>初登日期</th>
</TR> <td><label><?=$car_info->register_date?></label></td>
<tr> <th class="bg-warning" nowrap>座位数</th>
<td height="22" colspan="2" align="center" class="td_bg"> <td><label><?=$order_info->seats?></label></td>
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 "> <th class="bg-warning" nowrap>电子邮件</th>
</td> <td><label><?=$order_info->email?></label></td>
</tr> </tr>
</TABLE> <tr>
<!--礼品信息--> <th class="bg-warning">车型</th>
<table> <td><label><?=$car_info->factory_model?></label></td>
<tbody> <th class="bg-warning" nowrap>发动机号</th>
<tr> <td><label><?=$order_info->engine_no?></label></td>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲礼品信息</TD> <th class="bg-warning" nowrap>车架号</th>
</tr> <td><label><?=$order_info->car_frame_no?></label></td>
</tbody> <th class="bg-warning" nowrap>&nbsp;</th>
</table> <td>&nbsp;</td>
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table"> </tr>
<TR> <tr>
<TD vAlign=top> <th class="bg-warning">车主</th>
<div id="my_list_info"> <td><label><?=$order_info->car_man?></label></td>
<form id="giftEditFrom"> <th class="bg-warning">证件类型</th>
<input type="hidden" name="order_id" value="<?php echo $order_info->id; ?>"> <td><label><?=$order_info->car_man_type?></label>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="x`table"> </td>
<tr> <th class="bg-warning">证件号码</th>
<?php <td><label><?=$order_info->car_man_number?></label></td>
$index = 0; <th class="bg-warning">联系电话</th>
foreach($gift_group_items as $item) { <td><label><?=$order_info->car_man_phone?></label></td>
if($index > 0 && $index%4==0) { </tr>
echo '</tr><tr>'; <tr>
} <th class="bg-warning">被投保人</th>
$index++; <td><label><?=$order_info->id_man?></label></td>
$sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null; <th class="bg-warning">证件类型</th>
echo '<td width="85" class="bg_tr">'.$item->name.'</td>'; <td><label><?=$order_info->id_man_type?></label>
echo '<td class="td_bg">'; </td>
echo '<select class="gifts" min="'.$item->min_money.'" max="'.$item->max_money.'" name="gifts[]" is_damage="'.$item->is_damage.'" style="width:132px;"'; <th class="bg-warning">证件号码</th>
if($order_info->total1_clear == 0 && $item->min_money > 0) { <td><label><?=$order_info->id_man_number?></label></td>
echo ' disabled '; <th class="bg-warning">联系电话</th>
}elseif($item->min_money > 0 && $item->max_money == 0 && $order_info->total1_clear > 0 && ($order_info->total1_clear < $item->min_money)){ <td><label><?=$order_info->id_man_phone?></label></td>
echo ' disabled '; </tr>
}elseif($item->min_money == 0 && $item->max_money > 0 && $order_info->total1_clear > 0 && $order_info->total1_clear >= $item->max_money){ <tr>
echo ' disabled '; <th class="bg-warning">投保人</th>
} <td><label><?=$order_info->link_man?></label></td>
if($sel_gift != null) <th class="bg-warning">证件类型</th>
echo ' disabled '; <td><label><?=$order_info->link_man_type?></label>
echo '>'; </td>
echo '<option value="0"></option>'; <th class="bg-warning">证件号码</th>
foreach($item->gifts as $gift) { <td><label><?=$order_info->link_man_number?></label></td>
echo '<option value="'.$item->id.'_'.$gift->id.'"'; <th class="bg-warning">联系电话</th>
if($sel_gift != null && $sel_gift->id == $gift->id) { <td><label><?=$order_info->link_man_phone?></label></td>
echo ' selected '; </tr>
} <tr>
echo '>'.$gift->name.'</option>'; <th class="bg-warning" nowrap>商业起保日期</th>
} <td>
echo '</select>'; <label><?=$order_info->insurer1_begin_date?></label>
echo '</td>'; </td>
} <th class="bg-warning" nowrap>交强起保日期</th>
while($index%4!=0) { <td>
echo '<td width="85" class="bg_tr"></td>'; <label><?=$order_info->insurer2_begin_date?></label>
echo '<td class="td_bg"></td>'; </td>
$index++; <th class="bg-warning">保险公司</th>
} <td>
?> <label><?=$order_info->company->name?></label>
</tr> </td>
</table> <th class="bg-warning">付款方式</th>
</form> <td class="form-inline" nowrap>
</div> <label><?=MyLib::zhifufs($order_info->shoufei_id)?></label>
</TD> <label><?=$order_info->payType->name?></label>
</TR> </td>
<tr> </tr>
<td height="22" colspan="2" align="center" class="td_bg"> <tr>
<!--如果用户ID小于5,说明是有权限的--> <th class="bg-warning">领款人</th>
<?php if($uid <= 2){ ?> <td><label><?=$order_info->money_man?></label></td>
<input id="save-btn" type="button" class="ACT_btn" name="Submit3" value=" 保存 "> <th class="bg-warning">开户行</th>
<?php } ?> <td><label><?=$order_info->money_bank?></label></td>
<!--如果用户ID小于5,说明是有权限的--> <th class="bg-warning">银行账号</th>
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 "> <td><label><?=$order_info->money_no?></label></td>
</td> <th class="bg-warning" nowrap>成功理由</th>
</tr> <td>
</TABLE> <label><?=$order_info->success->name?></label>
<!--操作记录--> </td>
<table> </tr>
<tbody> <tr>
<tr> <th class="bg-warning" nowrap>送单日期</th>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(4) name="navcell">▲操作记录</TD> <td>
</tr> <label><?=$order_info->send_date?></label>
</tbody> </td>
</table> <th class="bg-warning">送单地址</th>
<TABLE id=tb4 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table"> <td colspan="5" class="form-inline">
<TR> <label><?=$order_info->sendCity->name?></label>
<TD vAlign=top> <label><?=$order_info->sendDistrict->name?></label>
<div id="car_history_list"></div> <label><?=$order_info->send_address?></label>
</TD> </td>
</TR> </tr>
<tr> <tr>
<td height="22" colspan="2" align="center" class="td_bg"> <th class="bg-warning">备注</th>
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 "> <td colspan="7"><label><?=$order_info->remark?></label></td>
</td> </tr>
</tr> </table>
</TABLE> <div>
</td> <div class="row">
</tr> <div class="col-md-5 col-md-offset-4">
</table> <button type="button" class="btn btn-primary btn-back" type="button">
</td> <strong>返 回</strong>
</tr> </button>
</table> </div>
</div>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> </div>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> </div>
<script type="text/javascript" language="javascript" src="/js/func.js"></script> </div>
<script type="text/javascript" language="javascript" src="/js/common2.js"></script> </form>
<script type="text/javascript" language="javascript"> </div>
$(function(){
//操作历史
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1&t='+Math.random(),'car_history_list'); <?php $this->beginBlock('footer_js'); ?>
//返回 <script>
$('.js-back-btn').click(function(){ var o = {};
//判断是否填写了选项
function isNull(data){
if(data == "" || data == undefined || data == null){
return true;
}else{
return false;
}
}
$(function() {
$('.btn-back').click(function() {
window.location.href = '/insurer/my-list'; window.location.href = '/insurer/my-list';
}); });
//礼品修改
$('#save-btn').click(function(){
if(confirm('是否确认修改礼品?')) {
var param = $('#giftEditFrom').serialize();
$.post('/insurer/gift-edit-save',param,function(obj){
alert(obj.msg);
if(obj.success) {
gotoPage('/insurer/ajax-gift-info?id=<?=$order_info->id?>&t='+Math.random(),'my_list_info');
}
},'json');
}
});
}); });
</script> </script>
<?php $this->endBlock(); ?>

@ -44,8 +44,8 @@ use \common\libs\MyLib;
<th data-field="total_real">应收</th> <th data-field="total_real">应收</th>
<th data-field="status_name">状态</th> <th data-field="status_name">状态</th>
<th>礼品状态</th> <th>礼品状态</th>
<th data-field="user">业务员</th> <th data-field="user_name">业务员</th>
<th data-field="lock">当前操作</th> <th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th> <th data-formatter="opFormatter">操作</th>
</tr> </tr>
</thead> </thead>

@ -1,378 +1,268 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
use \common\models\PriceT; use common\models\PriceT;
?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td height="22" colspan="2" class="td_bg">
<table width="100%" align="center" height="120" border="0" cellpadding="0" cellspacing="0" id="mainTable">
<tr>
<td height="120" valign="top" class="td_bg">
<!--保单信息-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-on id=navcell onclick=open_up(1) name="navcell">▼保单信息</TD>
</tr>
</tbody>
</table>
<TABLE id=tb1 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
<TR>
<TD vAlign=top>
<form id="orderFrm">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<input type="hidden" name="car_id" value="<?=$car_info->id?>">
<tr>
<td width="100" height="25" class="bg_tr">车牌号</td>
<td height="25" class="td_bg"><?=$car_info->car_no?></td>
<td width="100" height="25" class="bg_tr">厂牌型号</td>
<td height="25" class="td_bg"><?=$car_info->factory_model?></td>
<td width="60" height="25" class="bg_tr">品牌</td>
<td width="120" height="25" class="td_bg"><?=$car_info->brand?$car_info->brand->name:''?></td>
<td width="60" height="25" class="bg_tr">车系</td>
<td height="25" class="td_bg"><?=$car_info->series?$car_info->series->name:''?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">发动机号</td>
<td height="25" class="td_bg"><?=$car_info->engine_no?></td>
<td width="100" height="25" class="bg_tr">车架号</td>
<td height="25" class="td_bg"><?=$car_info->car_frame_no?></td>
<td width="60" height="25" class="bg_tr">初登日期</td>
<td height="25" class="td_bg"><?=$car_info->register_date?></td>
<td width="60" height="25" class="bg_tr">排量</td>
<td height="25" class="td_bg"><?=$car_info->displacement?$car_info->displacement->name:''?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">车辆类型</td>
<td height="25" class="td_bg"><?=$car_info->carType?$car_info->carType->name:''?></td>
<td width="100" height="25" class="bg_tr">运营性质</td>
<td height="25" class="td_bg"><?=$car_info->carUse?$car_info->carUse->name:''?></td>
<td width="60" height="25" class="bg_tr">座位数</td>
<td height="25" class="td_bg"><?=$car_info->seats?></td>
<td width="60" height="25" class="bg_tr">年份</td>
<td height="25" class="td_bg"><?=$car_info->car_year?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">车主</td>
<td height="25" class="td_bg"><?=$car_info->car_man?></td>
<td width="100" height="25" class="bg_tr">联系电话</td>
<td height="25" class="td_bg"><?=$car_info->phone?></td>
<td width="60" height="25" class="bg_tr">证件号码</td>
<td colspan="3" height="25" class="td_bg"><?=$car_info->car_man_number?></td>
</tr>
<tr>
<td width="60" height="25" class="bg_tr">备注</td>
<td height="25" class="td_bg"><?=$car_info->remark?></td>
<td width="60" height="25" class="bg_tr">业务分组</td>
<td height="25" class="td_bg"><?=$order_info->businessGroup ? $order_info->businessGroup->name : ''?></td>
<td width="100" height="25" class="bg_tr">业务员</td>
<td height="25" class="td_bg"><?=$order_info->user?$order_info->user->getShowName():''?></td>
<td width="60" height="25" class="bg_tr">联系电话</td>
<td height="25" class="td_bg"><?=$order_info->user?$order_info->user->phone:''?></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
<tr>
<td class="bg_tr">被保险人</td>
<td class="td_bg"><?=$order_info->id_man?></td>
<td class="bg_tr">证件号码</td>
<td class="td_bg"><?=$order_info->id_number?></td>
<td width="60" class="bg_tr">联系人</td>
<td class="td_bg"><?=$order_info->link_man?></td>
<td width="60" class="bg_tr">联系电话</td>
<td class="td_bg"><?=$order_info->link_phone?></td>
</tr>
<tr>
<td class="bg_tr">送单日期</td>
<td class="td_bg"><?=$order_info->send_date?></td>
<td class="bg_tr">业务保险公司</td>
<td class="td_bg"><?=$order_info->company2?$order_info->company2->name:''?></td>
<td class="bg_tr" nowrap><span style="color:#ff0000">*</span>内勤保险公司</td>
<td class="td_bg">
<select name="company_id" id="company_id" style="width:100px;">
<option value="0">---请选择---</option>
<?php
foreach($insurer_company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<td class="bg_tr">付款方式</td>
<td class="td_bg"><?=$order_info->shoufei_id?MyLib::zhifufs($order_info->shoufei_id).'-':''?><?=$order_info->payType?$order_info->payType->name:''?></td>
</tr>
<tr>
<td class="bg_tr">商业起保日期</td>
<td class="td_bg"><?=$order_info->insurer1_begin_date?></td>
<td class="bg_tr">交强起保日期</td>
<td class="td_bg"><?=$order_info->insurer2_begin_date?></td>
<td class="bg_tr"><span style="color:#ff0000">*</span>缴费单号</td>
<td class="td_bg"><input name="pay_no" id="pay_no" type="text" value="<?=$order_info->pay_no?>" style="width:200px;"></td>
<td class="bg_tr"><span style="color:#ff0000">*</span>收款人</td>
<td class="td_bg">
<select name="payee_id" id="payee_id" style="width:100px;">
<option value="">---请选择---</option>
<?php
foreach($payee_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->payee_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td class="bg_tr">送单地址</td>
<td class="td_bg">
<?=$order_info->direction1?$order_info->direction1->name:''?>
<?=$order_info->range1?$order_info->range1->name:''?>
<?=$order_info->city1?$order_info->city1->name:''?>
<?=$order_info->district1?$order_info->district1->name:''?>
<?=$order_info->send_address1?>
</td>
<td class="bg_tr">正本送单地址</td>
<td class="td_bg">
<?=$order_info->receiver_province?>
<?=$order_info->receiver_province?>
<?=$order_info->receiver_city?>
<?=$order_info->receiver_county?>
<?=$order_info->receiver_address?>
</td> ?>
<td class="bg_tr">备注</td> <?php $this->beginBlock('header_css'); ?>
<td class="td_bg"><?=$order_info->remark?></td> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<td class="bg_tr"><span style="color:#ff0000">*</span>收款方式</td> <?php $this->endBlock(); ?>
<td class="td_bg">
<select name="payment_id" id="payment_id" style="width:100px;">
<option value="">---请选择---</option>
<?php
foreach($payment_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->payment_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
</tr> <div class="wrapper wrapper-content animated fadeInRight">
</table> <form class="form-horizontal" id="orderFrm">
<table width="98%" border="0" align="center" cellspacing="0" cellpadding="0" style="table-layout: fixed;"> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<tr> <input type="hidden" name="order_id" value="<?=$order_info->id?>">
<td width="40%" valign="top"> <div class="ibox float-e-margins">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <div class="ibox-title">
<tr> <h5>险种</h5>
<td align="center" class="bg_tr">险种</td> </div>
<td align="center" class="bg_tr">内容</td> <div class="ibox-content">
<td align="center" class="bg_tr" nowrap>不计免赔</td> <table class="table table-bordered">
</tr> <tr>
<?php <?php
$len = count($insurer_type_items); $len = count($insurer_type_items);
for($i = 0; $i < $len; $i++) { $index = 0;
$item = $insurer_type_items[$i]; for($i = 0; $i < $len; $i++) {
$order_id = $order_info->id; $item = $insurer_type_items[$i];
if(!$order_id) $order_id = $order_info->id;
$order_id = 0; if(!$order_id)
$tmp_row = PriceT::find() $order_id = 0;
->where('order_id='.$order_id.' and type_id='.$item->id) $tmp_row = PriceT::find()
->one(); ->where('order_id='.$order_id.' and type_id='.$item->id)
if($tmp_row->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue; ->one();
?> if($tmp_row->val == '') continue;
<tr> ?>
<td class="bg_tr" nowrap><?=$item->name?>(<?=$item->code?>)</td> <th class="bg-warning">
<td class="td_bg"><?=$tmp_row->val?></td> <?=$item->name?>(<?=$item->code?>)
<td align="center" class="td_bg"><?php </th>
if($tmp_row->is_nopay==1) { <td><label><?=$tmp_row->val?></label></td>
echo '是'; <td><label><?=(!empty($tmp_row) && $tmp_row->is_nopay == 1)?'不计免赔':''?></label></td>
} <?php
?> if(($index+1)%3==0) {
</td> echo '</tr>';
</tr> echo '<tr>';
<?php }
} $index++;
?> }
</table> ?>
</td> </tr>
<td width="10px;">&nbsp;</td> </table>
<td width="60%" valign="top"> </div>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> </div>
<tr> <div class="ibox float-e-margins">
<td class="bg_tr">商业总净保费</td> <div class="ibox-title">
<td class="td_bg"><?=$order_info->total1_clear?></td> <h5>保费信息</h5>
<td class="bg_tr">商业含税总保费</td> </div>
<td class="td_bg"><?=$order_info->total1?></td> <div class="ibox-content">
</tr> <table class="table table-bordered">
<tr> <tr>
<td class="bg_tr">交强总净保费</td> <th class="bg-warning">商业总净保费</th>
<td class="td_bg"><?=$order_info->total2_clear?></td> <td><label><?=$order_info->total1_clear?></label></td>
<td class="bg_tr">交强含税总保费</td> <th class="bg-warning">商业含税总保费</th>
<td class="td_bg"><?=$order_info->total2?></td> <td><label><?=$order_info->total1?></label></td>
</tr> <th class="bg-warning">车船税</th>
<tr> <td><label><?=$order_info->total3?></label></td>
<td class="bg_tr">车船税</td> </tr>
<td class="td_bg"><?=$order_info->total3?></td> <tr>
<td class="bg_tr">共计签单</td> <th class="bg-warning">交强总净保费</th>
<td class="td_bg"><?=$order_info->total_all?></td> <td><label><?=$order_info->total2_clear?></label></td>
</tr> <th class="bg-warning">交强含税总保费</th>
<tr> <td><label><?=$order_info->total2?></label></td>
<td class="bg_tr">折扣后商业净保费</td> <th class="bg-warning">&nbsp;</th>
<td class="td_bg"><?=$order_info->total1_real?></td> <td>&nbsp;</td>
<td class="bg_tr">减免金额</td> </tr>
<td class="td_bg"><?=$order_info->total1_dis?></td> <tr>
</tr> <th class="bg-warning">折扣后商业净保费</th>
<tr> <td><label><?=$order_info->total1_real?></label></td>
<td class="bg_tr">商业折扣率</td> <th class="bg-warning">减免金额</th>
<td class="td_bg"><?=$order_info->total1_percent?></td> <td><label><?=$order_info->total1_dis?></label></td>
<td class="bg_tr">应收</td> <th class="bg-warning">商业折扣率</th>
<td class="td_bg"><?=$order_info->total_real?></td> <td><label><?=$order_info->total1_percent?></label></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">商业手续费</td> <th class="bg-warning">共计签单</th>
<td class="td_bg"><input name="total1_rate" id="total1_rate" type="text" value="<?=$order_info->total1_rate?>" style="width:100px;"></td> <td><label><?=$order_info->total_all?></label></td>
<td class="bg_tr">交强手续费</td> <th class="bg-warning">应收</th>
<td class="td_bg"><input name="total2_rate" id="total2_rate" type="text" value="<?=$order_info->total2_rate?>" style="width:100px;"></td> <td><label><?=$order_info->total_real?></label></td>
</tr> <th class="bg-warning">&nbsp;</th>
<tr> <td>&nbsp;</td>
<td class="bg_tr">备注</td> </tr>
<td colspan="3" class="td_bg"><?=$order_info->price_remark?></td> <tr>
</tr> <th class="bg-warning">备注</th>
</table> <td colspan="5"><label><?=$order_info->price_remark?></label></td>
</td> </tr>
</tr> </table>
</table> </div>
<p>礼券</p> </div>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <div class="ibox float-e-margins">
<tr> <div class="ibox-title">
<?php <h5>订单信息</h5>
$index = 0; </div>
foreach($gift_free_group_items as $item) { <div class="ibox-content">
if($index > 0 && $index%2==0) { <table class="table table-bordered">
echo '</tr><tr>'; <tr>
} <th class="bg-warning">车牌号</th>
$index++; <td><label><?=$order_info->car_no?></label></td>
echo '<td width="85" class="bg_tr">'.$index.'</td>'; <th class="bg-warning" nowrap>初登日期</th>
echo '<td width="40%" class="td_bg">'; <td><label><?=$car_info->register_date?></label></td>
echo $item->name; <th class="bg-warning" nowrap>座位数</th>
echo '</td>'; <td><label><?=$order_info->seats?></label></td>
} <th class="bg-warning" nowrap>电子邮件</th>
while($index%2!=0) { <td><label><?=$order_info->email?></label></td>
echo '<td width="85" class="bg_tr">&nbsp;</td>'; </tr>
echo '<td width="40%" class="td_bg">&nbsp;</td>'; <tr>
$index++; <th class="bg-warning">车型</th>
} <td><label><?=$car_info->factory_model?></label></td>
?> <th class="bg-warning" nowrap>发动机号</th>
</tr> <td><label><?=$order_info->engine_no?></label></td>
</table> <th class="bg-warning" nowrap>车架号</th>
<p>实物礼品</p> <td><label><?=$order_info->car_frame_no?></label></td>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <th class="bg-warning" nowrap>&nbsp;</th>
<tr> <td>&nbsp;</td>
<?php </tr>
$index = 0; <tr>
foreach($gift_group_items as $item) { <th class="bg-warning">车主</th>
if($index > 0 && $index%2==0) { <td><label><?=$order_info->car_man?></label></td>
echo '</tr><tr>'; <th class="bg-warning">证件类型</th>
} <td><label><?=$order_info->car_man_type?></label>
$index++; </td>
echo '<td width="85" class="bg_tr">'.$index.'</td>'; <th class="bg-warning">证件号码</th>
echo '<td width="40%" class="td_bg">'; <td><label><?=$order_info->car_man_number?></label></td>
echo $item->name; <th class="bg-warning">联系电话</th>
echo '</td>'; <td><label><?=$order_info->car_man_phone?></label></td>
} </tr>
while($index%2!=0) { <tr>
echo '<td width="85" class="bg_tr">&nbsp;</td>'; <th class="bg-warning">被投保人</th>
echo '<td width="40%" class="td_bg">&nbsp;</td>'; <td><label><?=$order_info->id_man?></label></td>
$index++; <th class="bg-warning">证件类型</th>
} <td><label><?=$order_info->id_man_type?></label>
?> </td>
</tr> <th class="bg-warning">证件号码</th>
</table> <td><label><?=$order_info->id_man_number?></label></td>
</form> <th class="bg-warning">联系电话</th>
</TD> <td><label><?=$order_info->id_man_phone?></label></td>
</TR> </tr>
</TABLE> <tr>
<!--操作记录--> <th class="bg-warning">投保人</th>
<table> <td><label><?=$order_info->link_man?></label></td>
<tbody> <th class="bg-warning">证件类型</th>
<tr> <td><label><?=$order_info->link_man_type?></label>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(2) name="navcell">▲操作记录</TD> </td>
</tr> <th class="bg-warning">证件号码</th>
</tbody> <td><label><?=$order_info->link_man_number?></label></td>
</table> <th class="bg-warning">联系电话</th>
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table"> <td><label><?=$order_info->link_man_phone?></label></td>
<TR> </tr>
<TD vAlign=top> <tr>
<div id="car_history_list"></div> <th class="bg-warning" nowrap>商业起保日期</th>
</TD> <td>
</TR> <label><?=$order_info->insurer1_begin_date?></label>
</TABLE> </td>
</td> <th class="bg-warning" nowrap>交强起保日期</th>
</tr> <td>
</table> <label><?=$order_info->insurer2_begin_date?></label>
</td> </td>
</tr> <th class="bg-warning">保险公司</th>
<tr> <td>
<td height="22" colspan="2" align="center" class="td_bg"> <label><?=$order_info->company->name?></label>
<input id="return-btn" type=button class="ACT_btn" name=Submit5 value=" 退回 "/> </td>
&nbsp;&nbsp; <th class="bg-warning">付款方式</th>
<input id="cancel-btn" type=button class="ACT_btn" name=Submit4 value=" 放弃处理 "/> <td class="form-inline" nowrap>
&nbsp;&nbsp; <label><?=MyLib::zhifufs($order_info->shoufei_id)?></label>
<!-- <input id="print-btn" type=button class="ACT_btn" name=Submit6 value=" 送单表打印 "/>--> <label><?=$order_info->payType->name?></label>
&nbsp;&nbsp; </td>
<input id="save-btn" type=button class="ACT_btn" name=Submit1 value=" 保存 "/> </tr>
&nbsp;&nbsp; <tr>
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 提交 "/> <th class="bg-warning">领款人</th>
&nbsp;&nbsp; <td><label><?=$order_info->money_man?></label></td>
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 "> <th class="bg-warning">开户行</th>
</td> <td><label><?=$order_info->money_bank?></label></td>
</tr> <th class="bg-warning">银行账号</th>
</table> <td><label><?=$order_info->money_no?></label></td>
<th class="bg-warning" nowrap>成功理由</th>
<td>
<label><?=$order_info->success->name?></label>
</td>
</tr>
<tr>
<th class="bg-warning" nowrap>送单日期</th>
<td>
<label><?=$order_info->send_date?></label>
</td>
<th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline">
<label><?=$order_info->sendCity->name?></label>
<label><?=$order_info->sendDistrict->name?></label>
<label><?=$order_info->send_address?></label>
</td>
</tr>
<tr>
<th class="bg-warning">备注</th>
<td colspan="7"><label><?=$order_info->remark?></label></td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>核保信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning text-danger">商业手续费</th>
<td><input name="total1_rate" id="total1_rate" class="form-control" type="text" value="<?=$order_info->total1_rate?>"></td>
<th class="bg-warning text-danger">交强手续费</th>
<td><input name="total2_rate" id="total2_rate" class="form-control" type="text" value="<?=$order_info->total2_rate?>"></td>
</tr>
<tr>
<th class="bg-warning text-danger">内勤保险公司</th>
<td>
<select name="company_id" id="company_id" class="form-control">
<option value="0">---请选择---</option>
<?php
foreach($insurer_company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<th class="bg-warning text-danger">缴费单号</th>
<td><input name="pay_no" id="pay_no" class="form-control" type="text" value="<?=$order_info->pay_no?>"></td>
</tr>
</table>
<div>
<div class="row">
<div class="col-md-5 col-md-offset-4">
<button type="button" class="btn btn-primary btn-return" type="button">
<strong>退 回</strong>
</button>
<button type="button" class="btn btn-primary btn-cancel" type="button">
<strong>放弃处理</strong>
</button>
<button type="button" class="btn btn-primary btn-save" type="button">
<strong>保 存</strong>
</button>
<button type="button" class="btn btn-primary btn-submit" type="button">
<strong>提 交</strong>
</button>
<button type="button" class="btn btn-primary btn-back" type="button">
<strong>返 回</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript" src="/js/common2.js"></script>
<script type="text/javascript" language="javascript">
//保单处理
function SaveOrder(status_id) {
var param = $('#orderFrm').serialize();
param = param + '&status_id=' + status_id;
var payeeid=$('#payee_id').val();
var paymentid=$('#payment_id').val();
if(status_id>2){
if(isNull(payeeid)){
alert('收款人必填项!');
return false;
}
if(isNull(paymentid)){
alert('收款方式必填项!');
return false;
}
}
$.post('/insurer/office-mng-save',param,function(obj){ <?php $this->beginBlock('footer_js'); ?>
if(obj.success) { <script>
if(status_id == 5) var o = {};
$('#back-btn').click();
else
alert(obj.msg);
} else {
alert(obj.msg);
}
},'json');
}
//判断是否填写了选项 //判断是否填写了选项
function isNull(data){ function isNull(data){
@ -382,75 +272,45 @@ use \common\models\PriceT;
return false; return false;
} }
} }
$(function(){ //保存订单
//操作历史 function saveOrder(status_id) {
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1','car_history_list'); var params = $('#orderFrm').serialize();
//退回处理 params = params + '&status_id=' + status_id;
$('#return-btn').click(function(){ $.post('/insurer/office-mng-save',params,function(obj){
var r = prompt('退回原因', ''); parent.layer.msg(obj.msg);
if(r != null && r != '') { if(obj.success && status_id>2) {
$.post('/insurer/return-op',{ $('.btn-back')
order_id:<?=$order_info->id?>,
return_remark:r,
return_status_id:<?=$order_info->status_id?>
},function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
} else {
alert('不填写原因,无法退回');
} }
}); },'json');
//放弃处理 }
$('#cancel-btn').click(function(){
if(confirm('是否确认放弃处理?')) { $(function() {
$('.btn-cancel').click(function(){
parent.layer.confirm('是否确认放弃处理?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/insurer/order-cancel-save',{order_id:<?=$order_info->id?>},function(obj){ $.post('/insurer/order-cancel-save',{order_id:<?=$order_info->id?>},function(obj){
parent.layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
$('#back-btn').click(); $('.btn-back').click();
} else { } else {
alert(obj.msg);
} }
},'json'); },'json');
} }, function(){
//
});
}); });
//保存 $('.btn-save').click(function(){
$('#save-btn').click(function(){ saveOrder(2);
var total1_percent = "<?= (1 - $order_info->total1_percent) * 100 ?>";
var total1_rate = $('#total1_rate').val();
if(total1_percent > total1_rate){
if(!confirm('商业折扣大于手续费,是否确认提交?')){
return;
}
}
SaveOrder(2);
}); });
//提交 $('.btn-submit').click(function(){
$('#submit-btn').click(function(){ saveOrder(5);
var total1_percent = "<?= (1 - $order_info->total1_percent) * 100 ?>";
var total1_rate = $('#total1_rate').val();
if(total1_percent > total1_rate){
if(!confirm('商业折扣大于手续费,是否确认提交?')){
return;
}
}
if(confirm('是否提交此保单?')) {
SaveOrder(5);
}
}); });
$('.btn-back').click(function() {
//返回 window.location.href = '/insurer/office-mng';
$('#back-btn').click(function(){
window.location.href = '/insurer/office-mng?<?=$back_params?>';
});
//送单表打印
$('#print-btn').click(function(){
window.open('/print/send-mng-edit?id=<?=$order_info->id?>');
}); });
}); });
</script> </script>
<?php $this->endBlock(); ?>

@ -1,79 +1,102 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//详情 <div class="wrapper wrapper-content animated fadeInRight">
function info(id) { <div class="ibox float-e-margins">
var params = $('#searchForm').serialize(); <div class="ibox-title">
window.location.href = '/insurer/office-mng-edit?id=' + id + '&back_params=' + encodeURIComponent(params); <h5>内勤核保</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group">
<label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th width="50" data-field="id">ID</th>
<th data-field="id_man">被保险人</th>
<th data-field="link_man_phone">联系电话</th>
<th data-field="company_name">保险公司</th>
<th data-field="car_no">车牌号</th>
<th data-field="factory_model">车型</th>
<th data-field="submit_date">提单日期</th>
<th data-field="send_date">送单日期</th>
<th data-field="total_all">共计签单</th>
<th data-field="user_name">销售座席</th>
<th data-field="status_name">状态</th>
<th data-field="pay_type">支付方式</th>
<th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function view(id) {
window.location.href = '/insurer/office-mng-edit?id=' + id;
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
} }
$(function(){ function search() {
$("#search-btn").click(function(){ $('#listTable').bootstrapTable('destroy');
$('#page').val(0); $('#listTable').bootstrapTable({
var params = $('#searchForm').serialize(); url: "/insurer/office-mng-json",
window.location.href = "/insurer/office-mng?" + params; pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
车主:<input name="car_man" type="text" value="<?=$car_man?>">
电话:<input name="phone" type="text" value="<?=$phone?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> </td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr">序号</td>
<td width="50" align="center" class="bg_tr">被保险人</td>
<td width="60" align="center" class="bg_tr">联系电话</td>
<td width="60" align="center" class="bg_tr">保险公司</td>
<td width="60" align="center" class="bg_tr">车牌号</td>
<td width="60" align="center" class="bg_tr">车型</td>
<td width="60" align="center" class="bg_tr">提单日期</td>
<td width="80" align="center" class="bg_tr">送单日期</td>
<td width="60" align="center" class="bg_tr">共计签单</td>
<td width="60" align="center" class="bg_tr">销售座席</td>
<td width="60" align="center" class="bg_tr">状态</td>
<td width="60" align="center" class="bg_tr">支付方式</td>
<td width="60" align="center" class="bg_tr">当前操作</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page-1) * 20 + $index;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?=$start_index+1?></td>
<td class="td_bg" nowrap><?=MyLib::substr_cut($item->id_man,30)?></td>
<td class="td_bg" nowrap><?=$item->link_phone?></td>
<td class="td_bg" nowrap><?=$item->company2?$item->company2->name:''?></td>
<td class="td_bg" nowrap><?=$item->car_no?></td>
<td class="td_bg" nowrap><?=$item->car?$item->car->factory_model:''?></td>
<td class="td_bg" align="center" nowrap><?=$item->submit_date?></td>
<td class="td_bg" align="center" nowrap><?=$item->send_date?></td>
<td class="td_bg" align="center" nowrap><?=$item->total_all?></td>
<td class="td_bg" align="center" nowrap><?=$item->user?$item->user->getShowName():''?>&nbsp;</td>
<td class="td_bg" align="center" nowrap><?=$item->status->name?></td>
<td class="td_bg" align="center" nowrap><?=$item->shoufei_id?MyLib::zhifufs($item->shoufei_id).'-':''?><?=$item->payType?$item->payType->name:''?></td>
<td class="td_bg" align="center" nowrap><?=$item->lock?$item->lock->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->id?>)">详情</a>]
</td>
</tr>
<?php
}
?>
<tr >
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -1,416 +1,284 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
use \common\models\PriceT; use common\models\PriceT;
?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td height="22" colspan="2" class="td_bg">
<table width="100%" align="center" height="120" border="0" cellpadding="0" cellspacing="0" id="mainTable">
<tr>
<td height="120" valign="top" class="td_bg">
<!--保单信息-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-on id=navcell onclick=open_up(1) name="navcell">▼保单信息</TD>
</tr>
</tbody>
</table>
<TABLE id=tb1 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
<TR>
<TD vAlign=top>
<form id="orderFrm">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<input type="hidden" name="car_id" value="<?=$car_info->id?>">
<tr>
<td width="100" height="25" class="bg_tr">车牌号</td>
<td height="25" class="td_bg"><?=$car_info->car_no?></td>
<td width="100" height="25" class="bg_tr">厂牌型号</td>
<td height="25" class="td_bg"><?=$car_info->factory_model?></td>
<td width="60" height="25" class="bg_tr">品牌</td>
<td width="120" height="25" class="td_bg"><?=$car_info->brand?$car_info->brand->name:''?></td>
<td width="60" height="25" class="bg_tr">车系</td>
<td height="25" class="td_bg"><?=$car_info->series?$car_info->series->name:''?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">发动机号</td>
<td height="25" class="td_bg"><?=$car_info->engine_no?></td>
<td width="100" height="25" class="bg_tr">车架号</td>
<td height="25" class="td_bg"><?=$car_info->car_frame_no?></td>
<td width="60" height="25" class="bg_tr">初登日期</td>
<td height="25" class="td_bg"><?=$car_info->register_date?></td>
<td width="60" height="25" class="bg_tr">排量</td>
<td height="25" class="td_bg"><?=$car_info->displacement?$car_info->displacement->name:''?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">车辆类型</td>
<td height="25" class="td_bg"><?=$car_info->carType?$car_info->carType->name:''?></td>
<td width="100" height="25" class="bg_tr">运营性质</td>
<td height="25" class="td_bg"><?=$car_info->carUse?$car_info->carUse->name:''?></td>
<td width="60" height="25" class="bg_tr">座位数</td>
<td height="25" class="td_bg"><?=$car_info->seats?></td>
<td width="60" height="25" class="bg_tr">年份</td>
<td height="25" class="td_bg"><?=$car_info->car_year?></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">车主</td>
<td height="25" class="td_bg"><?=$car_info->car_man?></td>
<td width="100" height="25" class="bg_tr">联系电话</td>
<td height="25" class="td_bg"><?=$car_info->phone?></td>
<td width="60" height="25" class="bg_tr">证件号码</td>
<td colspan="3" height="25" class="td_bg"><?=$car_info->car_man_number?></td>
</tr>
<tr>
<td width="60" height="25" class="bg_tr">备注</td>
<td height="25" class="td_bg"><?=$car_info->remark?></td>
<td width="60" height="25" class="bg_tr">业务分组</td>
<td height="25" class="td_bg"><?=$order_info->businessGroup ? $order_info->businessGroup->name : ''?></td>
<td width="100" height="25" class="bg_tr">业务员</td>
<td height="25" class="td_bg"><?=$order_info->user?$order_info->user->getShowName():''?></td>
<td width="60" height="25" class="bg_tr">联系电话</td>
<td height="25" class="td_bg"><?=$order_info->user?$order_info->user->phone:''?></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
<tr>
<td class="bg_tr">被保险人</td>
<td class="td_bg"><?=$order_info->id_man?></td>
<td class="bg_tr">证件号码</td>
<td class="td_bg"><?=$order_info->id_number?></td>
<td width="60" class="bg_tr">联系人</td>
<td class="td_bg"><?=$order_info->link_man?></td>
<td width="60" class="bg_tr">联系电话</td>
<td class="td_bg"><?=$order_info->link_phone?></td>
</tr>
<tr>
<td class="bg_tr">送单日期</td>
<td class="td_bg"><?=$order_info->send_date?></td>
<td class="bg_tr">保险公司</td>
<td class="td_bg"><?=$order_info->company?$order_info->company->name:''?></td>
<td class="bg_tr">付款方式</td>
<td class="td_bg"><?=$order_info->shoufei_id?MyLib::zhifufs($order_info->shoufei_id).'-':''?><?=$order_info->payType?$order_info->payType->name:''?></td>
<td class="bg_tr">付款人</td>
<td class="td_bg">
<select name="payer" id="payer">
<option value="">---请选择---</option>
<option value="1" <?php if($order_info->payer ==1) echo ' selected '; ?>>---公司支付---</option>
<option value="2" <?php if($order_info->payer ==2) echo ' selected '; ?>>---客户支付---</option>
<option value="3" <?php if($order_info->payer ==3) echo ' selected '; ?>>---合作方支付---</option>
</select>
</td>
</tr>
<tr>
<td class="bg_tr">商业起保日期</td>
<td class="td_bg"><?=$order_info->insurer1_begin_date?></td>
<td class="bg_tr">交强起保日期</td>
<td class="td_bg"><?=$order_info->insurer2_begin_date?></td>
<td class="bg_tr">缴费单号</td>
<td class="td_bg"><?=$order_info->pay_no?></td>
<td class="bg_tr">收款人</td>
<td class="td_bg">
<select name="payee_id" id="payee_id" style="width:100px;">
<option value="">---请选择---</option>
<?php
foreach($payee_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->payee_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td class="bg_tr">商业保单号</td>
<td class="td_bg"><input name="insurer1_no" id="insurer1_no" type="text" value="<?=$order_info->insurer1_no?>" style="width:100px;"></td>
<td class="bg_tr">交强保单号</td>
<td class="td_bg"><input name="insurer2_no" id="insurer2_no" type="text" value="<?=$order_info->insurer2_no?>" style="width:100px;"></td>
<td class="bg_tr">验证码</td>
<td class="td_bg"><?=$order_info->sms_code?></td>
<td class="bg_tr">收款方式</td>
<td class="td_bg">
<select name="payment_id" id="payment_id" style="width:100px;">
<option value="">---请选择---</option>
<?php
foreach($payment_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->payment_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td class="bg_tr">送单地址</td>
<td colspan="5" class="td_bg">
<?=$order_info->direction1?$order_info->direction1->name:''?>
<?=$order_info->range1?$order_info->range1->name:''?>
<?=$order_info->city1?$order_info->city1->name:''?>
<?=$order_info->district1?$order_info->district1->name:''?>
<?=$order_info->send_address1?>
</td>
<td rowspan="2" class="bg_tr" valign="center">备注</td>
<td rowspan="2" valign="top" class="td_bg"><?=$order_info->remark?></td>
</tr>
<tr>
<td class="bg_tr">正本送单地址</td>
<td colspan="5" class="td_bg">
<?=$order_info->receiver_province?>
<?=$order_info->receiver_province?>
<?=$order_info->receiver_city?>
<?=$order_info->receiver_county?>
<?=$order_info->receiver_address?>
</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
<tr>
<td width="40%" valign="top">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" class="bg_tr">险种</td>
<td align="center" class="bg_tr">内容</td>
<td align="center" class="bg_tr" nowrap>不计免赔</td>
</tr>
<?php
$len = count($insurer_type_items);
for($i = 0; $i < $len; $i++) {
$item = $insurer_type_items[$i];
$order_id = $order_info->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->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue;
?>
<tr>
<td class="bg_tr" nowrap><?=$item->name?>(<?=$item->code?>)</td>
<td class="td_bg"><?=$tmp_row->val?></td>
<td align="center" class="td_bg"><?php
if($tmp_row->is_nopay==1) {
echo '是';
}
?>
</td>
</tr>
<?php
}
?>
</table>
</td>
<td width="10px;">&nbsp;</td>
<td width="60%" valign="top">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td class="bg_tr">商业总净保费</td>
<td class="td_bg"><?=$order_info->total1_clear?></td>
<td class="bg_tr">商业含税总保费</td>
<td class="td_bg"><?=$order_info->total1?></td>
</tr>
<tr>
<td class="bg_tr">交强总净保费</td>
<td class="td_bg"><?=$order_info->total2_clear?></td>
<td class="bg_tr">交强含税总保费</td>
<td class="td_bg"><?=$order_info->total2?></td>
</tr>
<tr>
<td class="bg_tr">车船税</td>
<td class="td_bg"><?=$order_info->total3?></td>
<td class="bg_tr">共计签单</td>
<td class="td_bg"><?=$order_info->total_all?></td>
</tr>
<tr>
<td class="bg_tr">折扣后商业净保费</td>
<td class="td_bg"><?=$order_info->total1_real?></td>
<td class="bg_tr">减免金额</td>
<td class="td_bg"><?=$order_info->total1_dis?></td>
</tr>
<tr>
<td class="bg_tr">商业折扣率</td>
<td class="td_bg"><?=$order_info->total1_percent?></td>
<td class="bg_tr">应收</td>
<td class="td_bg"><?=$order_info->total_real?></td>
</tr>
<tr>
<td class="bg_tr">备注</td>
<td colspan="3" class="td_bg"><?=$order_info->price_remark?></td>
</tr>
</table>
</td>
</tr>
</table>
<p>礼券</p>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<?php
$index = 0;
foreach($gift_free_group_items as $item) {
if($index > 0 && $index%2==0) {
echo '</tr><tr>';
}
$index++;
echo '<td width="85" class="bg_tr">'.$index.'</td>';
echo '<td width="40%" class="td_bg">';
echo $item->name;
echo '</td>';
}
while($index%2!=0) {
echo '<td width="85" class="bg_tr">&nbsp;</td>';
echo '<td width="40%" class="td_bg">&nbsp;</td>';
$index++;
}
?>
</tr>
</table>
<p>实物礼品</p>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<?php
$index = 0;
foreach($gift_group_items as $item) {
if($index > 0 && $index%2==0) {
echo '</tr><tr>';
}
$index++;
echo '<td width="85" class="bg_tr">'.$index.'</td>';
echo '<td width="40%" class="td_bg">';
echo $item->name;
echo '</td>';
}
while($index%2!=0) {
echo '<td width="85" class="bg_tr">&nbsp;</td>';
echo '<td width="40%" class="td_bg">&nbsp;</td>';
$index++;
}
?>
</tr>
</table>
</form>
</TD>
</TR>
</TABLE>
<!--保单上传-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-on id=navcell onclick=open_up(4) name="navcell">▼保单上传</TD>
</tr>
</tbody>
</table>
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
<TR>
<TD vAlign=top>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
<tr>
<td width="110" align="left" class="bg_tr">上传商业保单文件:</td>
<td class="td_bg">
<input type="text" name="urlfile" id="urlfile" style="width: 200px;" value="<?=$order_info->shangye_src?>">
<input id="fileupload" type="file" name="file">
</td>
<td width="110" align="left" class="bg_tr">上传交强保单文件:</td>
<td class="td_bg">
<input type="text" name="urlfile1" id="urlfile1" style="width: 200px;" value="<?=$order_info->jiaoqiang_src?>">
<input id="fileupload1" type="file" name="file1">
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<!--操作记录--> <div class="wrapper wrapper-content animated fadeInRight">
<table> <form class="form-horizontal" id="orderFrm">
<tbody> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<tr> <input type="hidden" name="order_id" value="<?=$order_info->id?>">
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲操作记录</TD> <div class="ibox float-e-margins">
</tr> <div class="ibox-title">
</tbody> <h5>险种</h5>
</table> </div>
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table"> <div class="ibox-content">
<TR> <table class="table table-bordered">
<TD vAlign=top> <tr>
<div id="car_history_list"></div> <?php
</TD> $len = count($insurer_type_items);
</TR> $index = 0;
</TABLE> for($i = 0; $i < $len; $i++) {
</td> $item = $insurer_type_items[$i];
</tr> $order_id = $order_info->id;
</table> if(!$order_id)
</td> $order_id = 0;
</tr> $tmp_row = PriceT::find()
<tr> ->where('order_id='.$order_id.' and type_id='.$item->id)
<td height="22" colspan="2" align="center" class="td_bg"> ->one();
<input id="return-btn" type=button class="ACT_btn" name=Submit5 value=" 退回 "/> if($tmp_row->val == '') continue;
&nbsp;&nbsp; ?>
<input id="cancel-btn" type=button class="ACT_btn" name=Submit4 value=" 放弃处理 "/> <th class="bg-warning">
&nbsp;&nbsp; <?=$item->name?>(<?=$item->code?>)
<!-- </th>
<input id="gift-btn" type=button class="ACT_btn" name=Submit7 value=" 礼品出库 "/> <td><label><?=$tmp_row->val?></label></td>
&nbsp;&nbsp; <td><label><?=(!empty($tmp_row) && $tmp_row->is_nopay == 1)?'不计免赔':''?></label></td>
//--> <?php
<!-- <input id="ems-btn" type=button class="ACT_btn" name=Submit6 value=" EMS打印 "/>--> if(($index+1)%3==0) {
<!-- &nbsp;&nbsp;--> echo '</tr>';
<input id="save-btn" type=button class="ACT_btn" name=Submit1 value=" 保存 "/> echo '<tr>';
&nbsp;&nbsp; }
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 流程结束 "/> $index++;
&nbsp;&nbsp; }
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 "> ?>
</td> </tr>
</tr> </table>
</table> </div>
</div>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <div class="ibox float-e-margins">
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script> <div class="ibox-title">
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <h5>保费信息</h5>
<script type="text/javascript" language="javascript" src="/js/func.js"></script> </div>
<script type="text/javascript" language="javascript" src="/js/common2.js"></script> <div class="ibox-content">
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script> <table class="table table-bordered">
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script> <tr>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.js"></script> <th class="bg-warning">商业总净保费</th>
<script type="text/javascript" language="javascript"> <td><label><?=$order_info->total1_clear?></label></td>
//保单处理 <th class="bg-warning">商业含税总保费</th>
function SaveOrder(status_id) { <td><label><?=$order_info->total1?></label></td>
var param = $('#orderFrm').serialize(); <th class="bg-warning">车船税</th>
var payer = $("#payer").val(); <td><label><?=$order_info->total3?></label></td>
var urlfile=$('#urlfile').val(); </tr>
var urlfile1=$('#urlfile1').val(); <tr>
<th class="bg-warning">交强总净保费</th>
<td><label><?=$order_info->total2_clear?></label></td>
<th class="bg-warning">交强含税总保费</th>
<td><label><?=$order_info->total2?></label></td>
<th class="bg-warning">&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th class="bg-warning">折扣后商业净保费</th>
<td><label><?=$order_info->total1_real?></label></td>
<th class="bg-warning">减免金额</th>
<td><label><?=$order_info->total1_dis?></label></td>
<th class="bg-warning">商业折扣率</th>
<td><label><?=$order_info->total1_percent?></label></td>
</tr>
<tr>
<th class="bg-warning">共计签单</th>
<td><label><?=$order_info->total_all?></label></td>
<th class="bg-warning">应收</th>
<td><label><?=$order_info->total_real?></label></td>
<th class="bg-warning">&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th class="bg-warning">备注</th>
<td colspan="5"><label><?=$order_info->price_remark?></label></td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>订单信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning">车牌号</th>
<td><label><?=$order_info->car_no?></label></td>
<th class="bg-warning" nowrap>初登日期</th>
<td><label><?=$car_info->register_date?></label></td>
<th class="bg-warning" nowrap>座位数</th>
<td><label><?=$order_info->seats?></label></td>
<th class="bg-warning" nowrap>电子邮件</th>
<td><label><?=$order_info->email?></label></td>
</tr>
<tr>
<th class="bg-warning">车型</th>
<td><label><?=$car_info->factory_model?></label></td>
<th class="bg-warning" nowrap>发动机号</th>
<td><label><?=$order_info->engine_no?></label></td>
<th class="bg-warning" nowrap>车架号</th>
<td><label><?=$order_info->car_frame_no?></label></td>
<th class="bg-warning" nowrap>&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th class="bg-warning">车主</th>
<td><label><?=$order_info->car_man?></label></td>
<th class="bg-warning">证件类型</th>
<td><label><?=$order_info->car_man_type?></label>
</td>
<th class="bg-warning">证件号码</th>
<td><label><?=$order_info->car_man_number?></label></td>
<th class="bg-warning">联系电话</th>
<td><label><?=$order_info->car_man_phone?></label></td>
</tr>
<tr>
<th class="bg-warning">被投保人</th>
<td><label><?=$order_info->id_man?></label></td>
<th class="bg-warning">证件类型</th>
<td><label><?=$order_info->id_man_type?></label>
</td>
<th class="bg-warning">证件号码</th>
<td><label><?=$order_info->id_man_number?></label></td>
<th class="bg-warning">联系电话</th>
<td><label><?=$order_info->id_man_phone?></label></td>
</tr>
<tr>
<th class="bg-warning">投保人</th>
<td><label><?=$order_info->link_man?></label></td>
<th class="bg-warning">证件类型</th>
<td><label><?=$order_info->link_man_type?></label>
</td>
<th class="bg-warning">证件号码</th>
<td><label><?=$order_info->link_man_number?></label></td>
<th class="bg-warning">联系电话</th>
<td><label><?=$order_info->link_man_phone?></label></td>
</tr>
<tr>
<th class="bg-warning" nowrap>商业起保日期</th>
<td>
<label><?=$order_info->insurer1_begin_date?></label>
</td>
<th class="bg-warning" nowrap>交强起保日期</th>
<td>
<label><?=$order_info->insurer2_begin_date?></label>
</td>
<th class="bg-warning">保险公司</th>
<td>
<label><?=$order_info->company->name?></label>
</td>
<th class="bg-warning">付款方式</th>
<td class="form-inline" nowrap>
<label><?=MyLib::zhifufs($order_info->shoufei_id)?></label>
<label><?=$order_info->payType->name?></label>
</td>
</tr>
<tr>
<th class="bg-warning">领款人</th>
<td><label><?=$order_info->money_man?></label></td>
<th class="bg-warning">开户行</th>
<td><label><?=$order_info->money_bank?></label></td>
<th class="bg-warning">银行账号</th>
<td><label><?=$order_info->money_no?></label></td>
<th class="bg-warning" nowrap>成功理由</th>
<td>
<label><?=$order_info->success->name?></label>
</td>
</tr>
<tr>
<th class="bg-warning" nowrap>送单日期</th>
<td>
<label><?=$order_info->send_date?></label>
</td>
<th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline">
<label><?=$order_info->sendCity->name?></label>
<label><?=$order_info->sendDistrict->name?></label>
<label><?=$order_info->send_address?></label>
</td>
</tr>
<tr>
<th class="bg-warning">备注</th>
<td colspan="7"><label><?=$order_info->remark?></label></td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>核保信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning">商业手续费</th>
<td><label><?=$order_info->total1_rate?></label></td>
<th class="bg-warning">交强手续费</th>
<td><label><?=$order_info->total2_rate?></label></td>
</tr>
<tr>
<th class="bg-warning">内勤保险公司</th>
<td><label><?=$order_info->company->name?></label>
</td>
<th class="bg-warning">缴费单号</th>
<td><label><?=$order_info->pay_no?></label></td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>正本信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning text-danger">商业保单号</th>
<td><input name="insurer1_no" id="insurer1_no" class="form-control" type="text" value="<?=$order_info->insurer1_no?>"></td>
<th class="bg-warning text-danger">交强保单号</th>
<td><input name="insurer2_no" id="insurer2_no" class="form-control" type="text" value="<?=$order_info->insurer2_no?>"></td>
</tr>
<tr>
<th class="bg-warning text-danger">商业保单文件</th>
<td></td>
<th class="bg-warning text-danger">商业发票文件</th>
<td></td>
</tr>
<tr>
<th class="bg-warning text-danger">交强保单文件</th>
<td></td>
<th class="bg-warning text-danger">交强发票文件</th>
<td></td>
</tr>
</table>
<div>
<div class="row">
<div class="col-md-5 col-md-offset-4">
<button type="button" class="btn btn-primary btn-return" type="button">
<strong>退 回</strong>
</button>
<button type="button" class="btn btn-primary btn-cancel" type="button">
<strong>放弃处理</strong>
</button>
<button type="button" class="btn btn-primary btn-save" type="button">
<strong>保 存</strong>
</button>
<button type="button" class="btn btn-primary btn-submit" type="button">
<strong>提 交</strong>
</button>
<button type="button" class="btn btn-primary btn-back" type="button">
<strong>返 回</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
param = param + '&status_id=' + status_id;
if(status_id>5){
if(isNull(payer)){ <?php $this->beginBlock('footer_js'); ?>
alert('付款人必填项!'); <script>
return false; var o = {};
}
}
param=param+'&urlfile='+urlfile+'&urlfile1='+urlfile1
$.post('/insurer/original-mng-save',param,function(obj){
if(obj.success) {
if(status_id == 10)
$('#back-btn').click();
else
alert(obj.msg);
} else {
alert(obj.msg);
}
},'json');
}
//判断是否填写了选项 //判断是否填写了选项
function isNull(data){ function isNull(data){
@ -420,110 +288,45 @@ use \common\models\PriceT;
return false; return false;
} }
} }
$(function(){ //保存订单
function saveOrder(status_id) {
//操作历史 var params = $('#orderFrm').serialize();
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1','car_history_list'); params = params + '&status_id=' + status_id;
//退回处理 $.post('/insurer/original-mng-save',params,function(obj){
$('#return-btn').click(function(){ parent.layer.msg(obj.msg);
var r = prompt('退回原因', ''); if(obj.success && status_id>5) {
if(r != null && r != '') { $('.btn-back')
$.post('/insurer/return-op',{
order_id:<?=$order_info->id?>,
return_remark:r,
return_status_id:<?=$order_info->status_id?>
},function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
} else {
alert('不填写原因,无法退回');
} }
}); },'json');
//放弃处理 }
$('#cancel-btn').click(function(){
if(confirm('是否确认放弃处理?')) { $(function() {
$('.btn-cancel').click(function(){
parent.layer.confirm('是否确认放弃处理?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/insurer/order-cancel-save',{order_id:<?=$order_info->id?>},function(obj){ $.post('/insurer/order-cancel-save',{order_id:<?=$order_info->id?>},function(obj){
parent.layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
$('#back-btn').click(); $('.btn-back').click();
} else { } else {
alert(obj.msg);
} }
},'json'); },'json');
} }, function(){
}); //
//添加EMS });
$('#ems-save-btn').click(function(){
var params = $('#emsFrm').serialize();
$.post('/ems/save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#emsFrm')[0].reset();
gotoPage('/ems/ajax-car-index?car_id=<?=$car_info->id?>&order_id=<?=$order_info->id?>&t='+Math.random(),'ems_list');
}
},'json');
});
gotoPage('/ems/ajax-car-index?car_id=<?=$car_info->id?>&order_id=<?=$order_info->id?>&t='+Math.random(),'ems_list');
//保存
$('#save-btn').click(function(){
SaveOrder(5);
}); });
//提交 $('.btn-save').click(function(){
$('#submit-btn').click(function(){ saveOrder(5);
if(confirm('是否提交此保单?')) {
if(confirm('付款人是否正确?')) {
SaveOrder(10);
}
}
}); });
$('.btn-submit').click(function(){
//返回 saveOrder(10);
$('#back-btn').click(function(){
window.location.href = '/insurer/original-mng?<?=$back_params?>';
}); });
$('.btn-back').click(function() {
//EMS打印 window.location.href = '/insurer/original-mng';
// $('#ems-btn').click(function(){
// window.open('/insurer/original-ems-edit?id=<?//=$order_info->id?>//');
// });
//礼品出库
$('#gift-btn').click(function(){
var param = $('#orderFrm').serialize();
$.post('/insurer/office-mng-gift-save',param,function(obj){
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
},'json');
});
//上传
$('#fileupload').fileupload({
url: '/finance/upload-pdf',
dataType: 'json',
done: function (e, data) {
if(!data.result.success){
alert(data.result.files[0]['error'])
}
var file_info = data.result.files[0];
$('#urlfile').val(file_info.src);
// $result['files'][0]['error'] = '上传格式文件不是pdf文件';
}
});
$('#fileupload1').fileupload({
url: '/finance/upload-pdf1',
dataType: 'json',
done: function (e, data) {
if(!data.result.success){
alert(data.result.files[0]['error'])
}
var file_info = data.result.files[0];
$('#urlfile1').val(file_info.src);
// $result['files'][0]['error'] = '上传格式文件不是pdf文件';
}
}); });
}); });
</script> </script>
<?php $this->endBlock(); ?>

@ -1,105 +1,101 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//详情 <div class="wrapper wrapper-content animated fadeInRight">
function info(id) { <div class="ibox float-e-margins">
var params = $('#searchForm').serialize(); <div class="ibox-title">
window.location.href = '/insurer/original-mng-edit?id=' + id + '&back_params=' + encodeURIComponent(params); <h5>正本管理</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group">
<label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th width="50" data-field="id">ID</th>
<th data-field="id_man">被保险人</th>
<th data-field="link_man_phone">联系电话</th>
<th data-field="car_no">车牌号</th>
<th data-field="insurer1_no">商业保单号</th>
<th data-field="insurer2_no">交强保单号</th>
<th data-field="company_name">保险公司</th>
<th data-field="sms_code">验证码</th>
<th data-field="user_name">销售座席</th>
<th data-field="status_name">状态</th>
<th data-field="pay_type">支付方式</th>
<th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function view(id) {
window.location.href = '/insurer/original-mng-edit?id=' + id;
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
} }
$(function(){
$("#search-btn").click(function(){ function search() {
$('#page').val(0); $('#listTable').bootstrapTable('destroy');
var params = $('#searchForm').serialize(); $('#listTable').bootstrapTable({
window.location.href = "/insurer/original-mng?" + params; url: "/insurer/original-mng-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
被保险人:<input name="id_man" type="text" value="<?=$id_man?>">
电话:<input name="phone" type="text" value="<?=$phone?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
收款人:<select name="payee_id" id="payee_id" style="width:100px;">
<option value="">全部</option>
<?php
foreach($payee_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $payee_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
收款方式:<select name="payment_id" id="payment_id" style="width:100px;">
<option value="">全部</option>
<?php
foreach($payment_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $payment_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr">序号</td>
<td width="60" align="center" class="bg_tr">被保险人</td>
<td width="60" align="center" class="bg_tr">联系电话</td>
<td width="60" align="center" class="bg_tr">车牌号</td>
<td width="60" align="center" class="bg_tr">商业保单号</td>
<td width="80" align="center" class="bg_tr">交强保单号</td>
<td width="80" align="center" class="bg_tr">保险公司</td>
<td width="60" align="center" class="bg_tr">验证码</td>
<td width="60" align="center" class="bg_tr">销售座席</td>
<td width="60" align="center" class="bg_tr">状态</td>
<td width="60" align="center" class="bg_tr">支付方式</td>
<td width="60" align="center" class="bg_tr">收款人</td>
<td width="60" align="center" class="bg_tr">收款方式</td>
<td width="60" align="center" class="bg_tr">当前操作</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page - 1) * 20 + $index;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?=$start_index+1?></td>
<td class="td_bg" nowrap><?=MyLib::substr_cut($item->id_man,30)?></td>
<td class="td_bg" nowrap><?=$item->link_phone?></td>
<td class="td_bg" nowrap><?=$item->car_no?></td>
<td class="td_bg" nowrap><?=$item->insurer1_no?></td>
<td class="td_bg" nowrap><?=$item->insurer2_no?></td>
<td class="td_bg" ><?=MyLib::substr_cut($item->company?$item->company->name:'',30)?>&nbsp;</td>
<td class="td_bg" nowrap><?=$item->sms_code?></td>
<td class="td_bg" ><?=$item->user?$item->user->getShowName():''?>&nbsp;</td>
<td class="td_bg" ><?=$item->status->name?></td>
<td class="td_bg" align="center" nowrap><?=$item->shoufei_id?MyLib::zhifufs($item->shoufei_id).'-':''?><?=$item->payType?$item->payType->name:''?></td>
<td class="td_bg" ><?=$item->payee_id?$item->payee->name:''?></td>
<td class="td_bg" ><?=$item->payment_id?$item->payment->name:''?></td>
<td class="td_bg" ><?=$item->lock?$item->lock->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->id?>)">详情</a>]
</td>
</tr>
<?php
}
?>
<tr>
<td height="25" colspan="15" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -1,161 +1,107 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//详情 <div class="wrapper wrapper-content animated fadeInRight">
function info(id,index) { <div class="ibox float-e-margins">
var params = $('#searchForm').serialize(); <div class="ibox-title">
window.location.href = '/car/info-renewal?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params); <h5>全部预约</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group">
<label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th width="50" data-field="car_id">ID</th>
<th data-field="pdate">预约日期</th>
<th data-field="ptime">预约时间</th>
<th data-field="car_no">车牌号</th>
<th data-field="car_man">车主</th>
<th data-field="register_date">初登日期</th>
<th data-field="insurer1_date">商业起保日期</th>
<th data-field="insurer2_date">交强起保日期</th>
<th data-field="remark">预约备注</th>
<th data-field="user_name">业务员</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.car_id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
} }
$(function(){ function view(car_id) {
$("#search-btn").click(function(){ location.href = '/car/info?id=' + car_id;
$('#page').val(1); }
var params = $('#searchForm').serialize();
window.location.href = "/renewal/all?" + params; function refreshList() {
}); $('#listTable').bootstrapTable('refresh');
$('.invalid-btn').click(function(){ }
if(confirm('是否确认收回?')) {
var params = $('#listForm').serialize(); function search() {
$.post('/renewal/invalid-c',params,function(obj){ $('#listTable').bootstrapTable('destroy');
alert(obj.msg); $('#listTable').bootstrapTable({
if(obj.success) { url: "/renewal/all-json",
window.location.reload(); pagination: true,
} sidePagination: 'server',
},'json'); multipleSelectRow: true,
} queryParams: function(params) {
}); o['car_man'] = $('#car_man').val();
$('#assign-other-btn').click(function () { o['phone'] = $('#phone').val();
if(confirm('是否确认平移?')) { o['car_no'] = $('#car_no').val();
var params = $('#listForm').serialize(); o['id_man'] = $('#id_man').val();
var user_id = $('#user_id').val(); o['limit'] = params['limit'];
params = params + '&user_id=' + user_id; o['offset'] = params['offset'];
$.post('/renewal/assign-other',params,function(obj){ return o;
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
},'json');
}
})
$('#all').click(function(){
if($(this).prop('checked')==true) {
$('input:checkbox').each(function() {
$(this).prop('checked', true);
});
} else {
$('input:checkbox').each(function () {
$(this).prop('checked',false);
});
} }
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
车主:<input name="car_man" type="text" value="<?=$car_man?>" style="width: 100px;">
电话:<input name="phone" type="text" value="<?=$phone?>" style="width: 100px;">
车牌:<input name="car_no" type="text" value="<?=$car_no?>" style="width: 100px;">
工号:<input name="username" type="text" value="<?=$username?>" style="width: 100px;">
排序:<select name="sort_key">
<option value="appointment_t.pdate" <?=$sort_key=='appointment_t.pdate'?'selected':''?>>按预约时间</option>
<option value="car_t.register_date" <?=$sort_key=='car_t.register_date'?'selected':''?>>按初登时间</option>
<option value="car_t.insurer1_date" <?=$sort_key=='car_t.insurer1_date'?'selected':''?>>按保险时间</option>
</select>
<select name="sort_value">
<option value="ASC" <?=$sort_value=='ASC'?'selected':''?>>顺序</option>
<option value="DESC" <?=$sort_value=='DESC'?'selected':''?>>倒序</option>
</select>
预约类型:<select name="ptype">
<option value="0">全部类型</option>
<?php foreach($list as $k=>$v){ ?>
<option value='<?= $v->code; ?>' <?php if($ptype == $v->code){ echo 'selected'; } ?> ><?= $v->name; ?></option>
<?php } ?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
</td>
</tr>
<tr>
<td class="td_bg">
<?php
if($this->context->my->role_id != 5) {
?>
<input type=button class="ACT_btn invalid-btn" name="invalid-btn" value=" 回收数据 "/>
<input type="button" class="act_btn" id="assign-other-btn" name="assign-other-btn" value="批量平移到">
业务员:<select name="user_id" id="user_id">
<option value="0">请选择</option>
<?php
foreach($user_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $user_id)
echo ' selected ';
echo '>'.$item->getShowName().'</option>';
}
?>
</select>
<?php
}
?>
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr"><?php
if($this->context->my->role_id==5)
echo '序号';
else
echo '<input type="checkbox" id="all">';
?></td>
<td width="50" align="center" class="bg_tr">预约日期</td>
<td width="50" align="center" class="bg_tr">预约时间</td>
<td width="70" align="center" class="bg_tr">车牌号</td>
<td width="120" align="center" class="bg_tr">车主</td>
<td width="70" align="center" class="bg_tr">初登日期</td>
<td width="100" align="center" class="bg_tr" nowrap>商业起保日期</td>
<td width="100" align="center" class="bg_tr" nowrap>交强起保日期</td>
<td width="200" align="center" class="bg_tr">预约备注</td>
<td width="30" align="center" class="bg_tr">业务员</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<form id="listForm">
<?php
foreach($items as $index => $item) {
$start_index = ($page-1) * 20 + $index;
$car_info = $item->car;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?php
if($this->context->my->role_id == 5)
echo $start_index + 1;
else
echo '<input type="checkbox" name="ids[]" value="'.$item->car_id.'">';
?></td>
<td align="center" class="td_bg" nowrap><?=$item->pdate?></td>
<td align="center" class="td_bg" nowrap><?=$item->ptime?></td>
<td class="td_bg" nowrap><?=$car_info->car_no?></td>
<td class="td_bg" nowrap><?=$car_info->car_man?></td>
<td class="td_bg" nowrap><?=$car_info->register_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer1_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer2_date?></td>
<td class="td_bg" ><?=MyLib::substr_cut($item->remark,40)?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->car_id?>,<?=$start_index?>)">详情</a>]
</td>
</tr>
<?php
}
?>
</form>
<tr>
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -1,161 +1,107 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//详情 <div class="wrapper wrapper-content animated fadeInRight">
function info(id,index) { <div class="ibox float-e-margins">
var params = $('#searchForm').serialize(); <div class="ibox-title">
window.location.href = '/car/info-renewal?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params); <h5>首拨</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group">
<label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th width="50" data-field="car_id">ID</th>
<th data-field="pdate">预约日期</th>
<th data-field="ptime">预约时间</th>
<th data-field="car_no">车牌号</th>
<th data-field="car_man">车主</th>
<th data-field="register_date">初登日期</th>
<th data-field="insurer1_date">商业起保日期</th>
<th data-field="insurer2_date">交强起保日期</th>
<th data-field="remark">预约备注</th>
<th data-field="user_name">业务员</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.car_id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
} }
$(function(){ function view(car_id) {
$("#search-btn").click(function(){ location.href = '/car/info?id=' + car_id;
$('#page').val(1); }
var params = $('#searchForm').serialize();
window.location.href = "/renewal/first?" + params; function refreshList() {
}); $('#listTable').bootstrapTable('refresh');
$('.invalid-btn').click(function(){ }
if(confirm('是否确认收回?')) {
var params = $('#listForm').serialize(); function search() {
$.post('/renewal/invalid-c',params,function(obj){ $('#listTable').bootstrapTable('destroy');
alert(obj.msg); $('#listTable').bootstrapTable({
if(obj.success) { url: "/renewal/first-json",
window.location.reload(); pagination: true,
} sidePagination: 'server',
},'json'); multipleSelectRow: true,
} queryParams: function(params) {
}); o['car_man'] = $('#car_man').val();
$('#assign-other-btn').click(function () { o['phone'] = $('#phone').val();
if(confirm('是否确认平移?')) { o['car_no'] = $('#car_no').val();
var params = $('#listForm').serialize(); o['id_man'] = $('#id_man').val();
var user_id = $('#user_id').val(); o['limit'] = params['limit'];
params = params + '&user_id=' + user_id; o['offset'] = params['offset'];
$.post('/renewal/assign-other',params,function(obj){ return o;
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
},'json');
}
});
$('#all').click(function(){
if($(this).prop('checked')==true) {
$('input:checkbox').each(function() {
$(this).prop('checked', true);
});
} else {
$('input:checkbox').each(function () {
$(this).prop('checked',false);
});
} }
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
车主:<input name="car_man" type="text" value="<?=$car_man?>" style="width: 100px;">
电话:<input name="phone" type="text" value="<?=$phone?>" style="width: 100px;">
车牌:<input name="car_no" type="text" value="<?=$car_no?>" style="width: 100px;">
<?php
if($this->context->my->role_id != 5) {
?>
工号:<input name="username" type="text" value="<?=$username?>" style="width: 100px;">
<?php
}
?>
排序:<select name="sort_key">
<option value="appointment_t.pdate" <?=$sort_key=='appointment_t.pdate'?'selected':''?>>预约时间</option>
<option value="car_t.register_date" <?=$sort_key=='car_t.register_date'?'selected':''?>>初登时间</option>
<option value="car_t.insurer1_date" <?=$sort_key=='car_t.insurer1_date'?'selected':''?>>保险时间</option>
</select>
<select name="sort_value">
<option value="ASC" <?=$sort_value=='ASC'?'selected':''?>>顺序</option>
<option value="DESC" <?=$sort_value=='DESC'?'selected':''?>>倒序</option>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
</td>
</tr>
<tr>
<td class="td_bg">
<?php
if($this->context->my->role_id != 5) {
?>
<input type=button class="ACT_btn invalid-btn" name="invalid-btn" value=" 回收数据 "/>
<input type="button" class="act_btn" id="assign-other-btn" name="assign-other-btn" value="批量平移到">
业务员:<select name="user_id" id="user_id">
<option value="0">请选择</option>
<?php
foreach($user_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $user_id)
echo ' selected ';
echo '>'.$item->getShowName().'</option>';
}
?>
</select>
<?php
}
?>
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr"><?php
if($this->context->my->role_id==5)
echo '序号';
else
echo '<input type="checkbox" id="all">';
?></td>
<td width="50" align="center" class="bg_tr">预约日期</td>
<td width="50" align="center" class="bg_tr">预约时间</td>
<td width="70" align="center" class="bg_tr">车牌号</td>
<td width="120" align="center" class="bg_tr">车主</td>
<td width="70" align="center" class="bg_tr">初登日期</td>
<td width="100" align="center" class="bg_tr" nowrap>商业起保日期</td>
<td width="100" align="center" class="bg_tr" nowrap>交强起保日期</td>
<td width="200" align="center" class="bg_tr">预约备注</td>
<td width="30" align="center" class="bg_tr">业务员</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<form id="listForm">
<?php
foreach($items as $index => $item) {
$start_index = ($page-1) * 20 + $index;
$car_info = $item->car;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?php
if($this->context->my->role_id == 5)
echo $start_index + 1;
else
echo '<input type="checkbox" name="ids[]" value="'.$item->car_id.'">';
?></td>
<td align="center" class="td_bg" nowrap><?=$item->pdate?></td>
<td align="center" class="td_bg" nowrap><?=$item->ptime?></td>
<td class="td_bg" nowrap><?=$car_info->car_no?></td>
<td class="td_bg" nowrap><?=$car_info->car_man?></td>
<td class="td_bg" nowrap><?=$car_info->register_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer1_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer2_date?></td>
<td class="td_bg" ><?=MyLib::substr_cut($item->remark,40)?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->car_id?>,<?=$start_index?>)">详情</a>]
</td>
</tr>
<?php
}
?>
</form>
<tr>
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -1,94 +1,107 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//详情 <div class="wrapper wrapper-content animated fadeInRight">
function info(id,index) { <div class="ibox float-e-margins">
var params = $('#searchForm').serialize(); <div class="ibox-title">
window.location.href = '/car/info-renewal?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params); <h5>今日预约</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group">
<label>车主</label>
<input type="text" name="car_man" id="car_man" class="form-control">
<label>电话</label>
<input type="text" name="phone" id="phone" class="form-control">
<label>车牌</label>
<input type="text" name="car_no" id="car_no" class="form-control">
<label>被保险人</label>
<input type="text" name="id_man" id="id_man" class="form-control">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th width="50" data-field="car_id">ID</th>
<th data-field="pdate">预约日期</th>
<th data-field="ptime">预约时间</th>
<th data-field="car_no">车牌号</th>
<th data-field="car_man">车主</th>
<th data-field="register_date">初登日期</th>
<th data-field="insurer1_date">商业起保日期</th>
<th data-field="insurer2_date">交强起保日期</th>
<th data-field="remark">预约备注</th>
<th data-field="user_name">业务员</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="view(' + row.car_id + ')">');
opStr.push('<i class="fa fa-file-o" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function view(car_id) {
location.href = '/car/info?id=' + car_id;
} }
$(function(){ function refreshList() {
$("#search-btn").click(function(){ $('#listTable').bootstrapTable('refresh');
$('#page').val(1); }
var params = $('#searchForm').serialize();
window.location.href = "/renewal/today?" + params; function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/renewal/today-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['car_man'] = $('#car_man').val();
o['phone'] = $('#phone').val();
o['car_no'] = $('#car_no').val();
o['id_man'] = $('#id_man').val();
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
车主:<input name="car_man" type="text" value="<?=$car_man?>">
电话:<input name="phone" type="text" value="<?=$phone?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
预约类型:<select name="ptype">
<option value="0">全部类型</option>
<?php foreach($list as $k=>$v){ ?>
<option value='<?= $v->code; ?>' <?php if($ptype == $v->code){ echo 'selected'; } ?> ><?= $v->name; ?></option>
<?php } ?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> </td>
</tr>
<tr>
<td class="td_bg">
排序:<select name="sort_key">
<option value="appointment_t.pdate" <?=$sort_key=='appointment_t.pdate'?'selected':''?>>按预约时间</option>
<option value="car_t.register_date" <?=$sort_key=='car_t.register_date'?'selected':''?>>按初登时间</option>
<option value="car_t.insurer1_date" <?=$sort_key=='car_t.insurer1_date'?'selected':''?>>按商业保险时间</option>
<option value="car_t.insurer2_date" <?=$sort_key=='car_t.insurer2_date'?'selected':''?>>按商业保险时间</option>
</select>
<select name="sort_value">
<option value="ASC" <?=$sort_value=='ASC'?'selected':''?>>顺序</option>
<option value="DESC" <?=$sort_value=='DESC'?'selected':''?>>倒序</option>
</select>
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr">序号</td>
<td width="50" align="center" class="bg_tr">预约日期</td>
<td width="50" align="center" class="bg_tr">预约时间</td>
<td width="70" align="center" class="bg_tr">车牌号</td>
<td width="120" align="center" class="bg_tr">车主</td>
<td width="70" align="center" class="bg_tr">初登日期</td>
<td width="100" align="center" class="bg_tr" nowrap>商业起保日期</td>
<td width="100" align="center" class="bg_tr" nowrap>交强起保日期</td>
<td width="200" align="center" class="bg_tr">预约备注</td>
<td width="30" align="center" class="bg_tr">业务员</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page-1) * 20 + $index;
$car_info = $item->car;
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg"nowrap ><?=$start_index+1?></td>
<td align="center" class="td_bg" nowrap><?=$item->pdate?></td>
<td align="center" class="td_bg" nowrap><?=$item->ptime?></td>
<td class="td_bg" nowrap><?=$car_info->car_no?></td>
<td class="td_bg" nowrap><?=$car_info->car_man?></td>
<td class="td_bg" nowrap><?=$car_info->register_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer1_date?></td>
<td class="td_bg" nowrap><?=$car_info->insurer2_date?></td>
<td class="td_bg" ><?=MyLib::substr_cut($item->remark,40)?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->car_id?>,<?=$start_index?>)">详情</a>]
</td>
</tr>
<?php
}
?>
<tr>
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

Loading…
Cancel
Save