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

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. 706
      frontend/views/insurer/my-list-info.php
  12. 4
      frontend/views/insurer/my-list.php
  13. 720
      frontend/views/insurer/office-mng-edit.php
  14. 165
      frontend/views/insurer/office-mng.php
  15. 809
      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 $car_frame_no
* @property string $car_man
* @property string $car_man_type
* @property string $car_man_phone
* @property string $car_man_number
* @property string $gift_other
* @property integer $company_id
* @property integer $company2_id
* @property integer $status_id
* @property string $submit_date
* @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_phone
* @property string $link_man_phone
* @property string $link_man_type
* @property string $link_man_number
* @property string $insurer1_begin_date
* @property string $insurer1_end_date
* @property string $insurer2_begin_date
* @property string $insurer2_end_date
* @property string $send_date
* @property string $direction1_id
* @property string $direction_id
* @property string $range1_id
* @property string $city1_id
* @property string $district1_id
@ -103,10 +110,10 @@ class OrderT extends \common\models\Base
public function rules()
{
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'],
[['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],
[['link_phone','car_no','engine_no','pay_no','insurer1_no','insurer2_no','identifying_code','money_man','insurer_non_no'], 'string', 'max' => 50],
[['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],
[['car_no','engine_no','pay_no','insurer1_no','insurer2_no','identifying_code','money_man','insurer_non_no'], 'string', 'max' => 50],
[['remark'], 'string', 'max' => 200],
];
}
@ -138,7 +145,7 @@ class OrderT extends \common\models\Base
'insurer2_begin_date' => 'Insurer2 Begin Date',
'insurer2_end_date' => 'Insurer2 End Date',
'send_date' => 'Send Date',
'direction1_id' => 'Direction 1 ID',
'direction_id' => 'Direction 1 ID',
'range1_id' => 'Range 1 ID',
'city1_id' => 'City 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']);
}
public function getSuccess()
{
return $this->hasOne(InvalidT::className(),['id'=>'success_id']);
}
public function getPayType()
{
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']);
}
public function getDirection1()
{
return $this->hasOne(DirectionT::className(),['id'=>'direction1_id']);
}
public function getCity1()
public function getSendCity()
{
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()

@ -108,7 +108,7 @@ class AppointmentController extends BaseController
$items = $query->all();
$data = [];
$data['total'] = count($items);
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$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;
$request = Yii::$app->request;
$car_man = $request->get('car_man');
$phone = $request->get('phone');
$car_no = $request->get('car_no');
$page = $request->get('page',1);
$sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC');
$ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
@ -399,46 +410,52 @@ class AppointmentController extends BaseController
$session->remove('appointment_today');
$session->set('appointment_today',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$query = $query->offset($offset)->limit($limit);
$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',[
'items' => $items,
'page_info' => $page_info,
'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
return $this->render('all',[
'invalid_items' => $invalid_items,
'user_items' => $user_items
]);
}
//全部预约
public function actionAll()
public function actionAllJson()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session;
$request = Yii::$app->request;
$car_man = $request->get('car_man');
$phone = $request->get('phone');
$car_no = $request->get('car_no');
$page = $request->get('page',1);
$username = $request->get('username');
$sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC');
$user_id = $request->get('user_id');
$ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
@ -483,36 +500,25 @@ class AppointmentController extends BaseController
$session->remove('appointment_all');
$session->set('appointment_all',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$query = $query->offset($offset)->limit($limit);
$items = $query->all();
$page_info = MyLib::getPageInfo($pagination);
$invalid_items = InvalidT::getTree();
$user_items = $this->my->getChildren();
$list = MeetT::getAllData(1);
return $this->render('all',[
'items' => $items,
'page_info' => $page_info,
'car_man' => $car_man,
'phone' => $phone,
'ptype' => $ptype,
'list' => $list,
'car_no' => $car_no,
'page' => $page,
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'type' => 3,
'invalid_items' => $invalid_items,
'username' => $username,
'user_items' => $user_items,
'user_id' => $user_id
]);
$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 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;
$request = Yii::$app->request;
$car_man = $request->get('car_man');
@ -92,25 +102,26 @@ class RenewalController extends BaseController
$sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC');
$user_id = $request->get('user_id');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=1 and car_t.location=4');
->where('appointment_t.is_first=1 and car_t.location=2');
$user_ids = array();
if($username == '') {
$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 != '') {
$query = $query->andWhere('car_t.car_man like "'.$car_man.'"');
$query->andWhere('car_t.car_man like "'.$car_man.'"');
}
if($phone != '') {
$query = $query->andWhere('car_t.phone like "'.$phone.'"');
$query->andWhere('car_t.phone like "'.$phone.'"');
}
if($car_no != '') {
$query = $query->andWhere('car_t.car_no like "'.$car_no.'"');
$query->andWhere('car_t.car_no like "'.$car_no.'"');
}
if($username != '') {
$user_query = UserT::find()
@ -120,10 +131,10 @@ class RenewalController extends BaseController
$user_ids[] = $user_info->id;
}
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 != '') {
$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;
// echo $query->createCommand()->rawSql;
@ -131,52 +142,54 @@ class RenewalController extends BaseController
$session->remove('appointment_first');
$session->set('appointment_first',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]);
$pagination->setPage($page-1);
$current_index = $pagination->offset;
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$query = $query->offset($offset)->limit($limit);
$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();
$user_items = $this->my->getChildren();
return $this->render('first',[
'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,
return $this->render('today',[
'invalid_items' => $invalid_items,
'username' => $username,
'user_items' => $user_items,
'user_id' => $user_id
'user_items' => $user_items
]);
}
//今日预约
public function actionToday()
public function actionTodayJson()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session;
$request = Yii::$app->request;
$car_man = $request->get('car_man');
$phone = $request->get('phone');
$car_no = $request->get('car_no');
$page = $request->get('page',1);
$sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC');
$ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=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').'"');
$user_ids = $this->getChildrenUserIDs();
@ -189,7 +202,7 @@ class RenewalController extends BaseController
$query = $query->andWhere('car_t.phone="'.$phone.'"');
}
if($ptype > 0) {
$query = $query->andWhere('appointment_t.ptype="'.$ptype.'"');
$query = $query->andWhere('appointment_t.ptype='.$ptype);
}
if($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->set('appointment_today',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$query = $query->offset($offset)->limit($limit);
$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',[
'items' => $items,
'list' => $list,
'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
return $this->render('all',[
'invalid_items' => $invalid_items,
'user_items' => $user_items
]);
}
//全部预约
public function actionAll()
public function actionAllJson()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$session = Yii::$app->session;
$request = Yii::$app->request;
$car_man = $request->get('car_man');
$phone = $request->get('phone');
$car_no = $request->get('car_no');
$page = $request->get('page',1);
$username = $request->get('username');
$sort_key = $request->get('sort_key','appointment_t.pdate');
$sort_value = $request->get('sort_value','ASC');
$user_id = $request->get('user_id');
$ptype = $request->get('ptype');
$offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=0 and car_t.location=4');
->where('appointment_t.is_first=0 and car_t.location=2');
if($username == '') {
$user_ids = $this->getChildrenUserIDs();
@ -259,11 +278,9 @@ class RenewalController extends BaseController
if($phone != '') {
$query = $query->andWhere('car_t.phone="'.$phone.'"');
}
if($ptype > 0) {
$query = $query->andWhere('appointment_t.ptype="'.$ptype.'"');
$query = $query->andWhere('appointment_t.ptype='.$ptype);
}
if($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->set('appointment_all',$sql);
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$query = $query->offset($offset)->limit($limit);
$items = $query->all();
$page_info = MyLib::getPageInfo($pagination);
$invalid_items = InvalidT::getTree();
$user_items = $this->my->getChildren();
$list = MeetT::getAllData(1);
return $this->render('all',[
'items' => $items,
'page_info' => $page_info,
'car_man' => $car_man,
'phone' => $phone,
'list' => $list,
'ptype' => $ptype,
'car_no' => $car_no,
'page' => $page,
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'type' => 3,
'invalid_items' => $invalid_items,
'username' => $username,
'user_items' => $user_items,
'user_id' => $user_id
]);
$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 actionMyList()

@ -1,161 +1,107 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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">
//详情
function info(id,index) {
var params = $('#searchForm').serialize();
window.location.href = '/car/info?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params);
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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(){
$("#search-btn").click(function(){
$('#page').val(1);
var params = $('#searchForm').serialize();
window.location.href = "/appointment/all?" + params;
});
$('.invalid-btn').click(function(){
if(confirm('是否确认收回?')) {
var params = $('#listForm').serialize();
$.post('/appointment/invalid-a',params,function(obj){
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
},'json');
}
});
$('#assign-other-btn').click(function () {
if(confirm('是否确认平移?')) {
var params = $('#listForm').serialize();
var user_id = $('#user_id').val();
params = params + '&user_id=' + user_id;
$.post('/appointment/assign-other',params,function(obj){
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);
});
function view(car_id) {
location.href = '/car/info?id=' + car_id;
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/appointment/all-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>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

@ -1,94 +1,107 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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">
//详情
function info(id,index) {
var params = $('#searchForm').serialize();
window.location.href = '/car/info?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params);
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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(){
$("#search-btn").click(function(){
$('#page').val(1);
var params = $('#searchForm').serialize();
window.location.href = "/appointment/today?" + params;
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
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>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

@ -187,7 +187,7 @@ use \common\libs\MyLib;
var o = {};
function insurerDlg() {
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() {
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
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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/datepicker/WdatePicker.js"></script>
<script type="text/javascript" language="javascript">
//详情
function info(id) {
var params = $('#searchForm').serialize();
window.location.href = '/insurer/finance-mng-edit?id=' + id + '&back_params=' + encodeURIComponent(params);
}
function unlock(id) {
$.post('/insurer/unlocked',{id:id},function(obj){
if(obj.success) {
alert(obj.msg);
window.location.reload();
} else {
alert(obj.msg);
}
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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="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(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/insurer/finance-mng?" + params;
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
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>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

@ -1,481 +1,237 @@
<?php
use \common\libs\MyLib;
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">
use common\models\PriceT;
<?php if($order_info->caiwu->caiwu_status_id==0):?>
无操作
<?php else:?>
<?=$caiwu_status[$order_info->caiwu->caiwu_status_id]?>
<?php endif;?>
</td>
<?php else:?>
<td class="td_bg">
</td>
<?php endif;?>
</tr>
</table>
</td>
</tr>
</table>
</form>
</TD>
</TR>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 ">
</td>
</tr>
</TABLE>
<!--快递信息-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(2) name="navcell">▲快递信息</TD>
</tr>
</tbody>
</table>
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table" style="table-layout: fixed;">
<?php if($ems_items):?>
<tr>
<td width="50" align="center" class="bg_tr" nowrap>序号</td>
<td width="80" align="center" class="bg_tr" nowrap>快递公司</td>
<td width="80" align="center" class="bg_tr" nowrap>快递单号</td>
<td width="80" align="center" class="bg_tr" nowrap>配送员电话</td>
<td width="50%" align="center" class="bg_tr" nowrap>描述</td>
<td width="130" align="center" class="bg_tr" nowrap>送单时间</td>
<td width="80" align="center" class="bg_tr" nowrap>操作员</td>
</tr>
<?php
foreach($ems_items as $index => $item) {
?>
<tr>
<td align="center" class="td_bg"nowrap ><?=$index+1?></td>
<td class="td_bg" nowrap><?=$item->ems_company?></td>
<td align="center" class="td_bg" nowrap><?=$item->ems_no?></td>
<td class="td_bg" nowrap><?=$item->ems_phone?></td>
<td class="td_bg" nowrap><?=$item->ems_remark?></td>
<td align="center" class="td_bg" nowrap><?=$item->updated_at?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
</tr>
<?php
}
?>
<?php elseif($ems_items1):?>
<tr>
<td width="50" align="center" class="bg_tr" nowrap>序号</td>
<td width="80" align="center" class="bg_tr" nowrap>快递公司</td>
<td width="80" align="center" class="bg_tr" nowrap>快递单号</td>
<td width="80" align="center" class="bg_tr" nowrap>体检卡号</td>
<td width="80" align="center" class="bg_tr" nowrap>收件人姓名</td>
<td width="80" align="center" class="bg_tr" nowrap>收件人电话</td>
<td width="130" align="center" class="bg_tr" nowrap>出单时间</td>
<td width="80" align="center" class="bg_tr" nowrap>操作员</td>
</tr>
<?php
foreach($ems_items1 as $index => $item) {
?>
<tr>
<td align="center" class="td_bg"nowrap ><?=$index+1?></td>
<td class="td_bg" nowrap>
<?php if($item->ems_company==1):?>
德邦
<?php else:?>
<?php endif;?>
</td>
<td align="center" class="td_bg" nowrap><?=$item->ems_no?></td>
<td align="center" class="td_bg" nowrap><?=$item->physical_no?></td>
<td class="td_bg" nowrap><?=$item->link_name?></td>
<td class="td_bg" nowrap><?=$item->link_tel?></td>
<td align="center" class="td_bg" nowrap><?=$item->send_date?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
</tr>
<?php
}
?>
<?php endif;?>
</table>
</TD>
</TR>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 ">
</td>
</tr>
</TABLE>
<!--礼品信息-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲礼品信息</TD>
</tr>
</tbody>
</table>
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<div id="my_list_info">
<form id="giftEditFrom">
<input type="hidden" name="order_id" value="<?php echo $order_info->id; ?>">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="x`table">
<tr>
<?php
$index = 0;
foreach($gift_group_items as $item) {
if($index > 0 && $index%4==0) {
echo '</tr><tr>';
}
$index++;
$sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null;
echo '<td width="85" class="bg_tr">'.$item->name.'</td>';
echo '<td class="td_bg">';
echo '<select class="gifts" min="'.$item->min_money.'" max="'.$item->max_money.'" name="gifts[]" is_damage="'.$item->is_damage.'" style="width:132px;"';
if($order_info->total1_clear == 0 && $item->min_money > 0) {
echo ' disabled ';
}elseif($item->min_money > 0 && $item->max_money == 0 && $order_info->total1_clear > 0 && ($order_info->total1_clear < $item->min_money)){
echo ' disabled ';
}elseif($item->min_money == 0 && $item->max_money > 0 && $order_info->total1_clear > 0 && $order_info->total1_clear >= $item->max_money){
echo ' disabled ';
}
if($sel_gift != null)
echo ' disabled ';
echo '>';
echo '<option value="0"></option>';
foreach($item->gifts as $gift) {
echo '<option value="'.$item->id.'_'.$gift->id.'"';
if($sel_gift != null && $sel_gift->id == $gift->id) {
echo ' selected ';
}
echo '>'.$gift->name.'</option>';
}
echo '</select>';
echo '</td>';
}
while($index%4!=0) {
echo '<td width="85" class="bg_tr"></td>';
echo '<td class="td_bg"></td>';
$index++;
}
?>
</tr>
</table>
</form>
</div>
</TD>
</TR>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<!--如果用户ID小于5,说明是有权限的-->
<?php if($uid <= 2){ ?>
<input id="save-btn" type="button" class="ACT_btn" name="Submit3" value=" 保存 ">
<?php } ?>
<!--如果用户ID小于5,说明是有权限的-->
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 ">
</td>
</tr>
</TABLE>
<!--操作记录-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(4) name="navcell">▲操作记录</TD>
</tr>
</tbody>
</table>
<TABLE id=tb4 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<div id="car_history_list"></div>
</TD>
</TR>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<input id="back-btn" type="button" class="ACT_btn js-back-btn" name="Submit3" value=" 返回 ">
</td>
</tr>
</TABLE>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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(){
//操作历史
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1&t='+Math.random(),'car_history_list');
//返回
$('.js-back-btn').click(function(){
?>
<?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="order_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);
$index = 0;
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 == '') continue;
?>
<th class="bg-warning">
<?=$item->name?>(<?=$item->code?>)
</th>
<td><label><?=$tmp_row->val?></label></td>
<td><label><?=(!empty($tmp_row) && $tmp_row->is_nopay == 1)?'不计免赔':''?></label></td>
<?php
if(($index+1)%3==0) {
echo '</tr>';
echo '<tr>';
}
$index++;
}
?>
</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_clear?></label></td>
<th class="bg-warning">商业含税总保费</th>
<td><label><?=$order_info->total1?></label></td>
<th class="bg-warning">车船税</th>
<td><label><?=$order_info->total3?></label></td>
</tr>
<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 class="row">
<div class="col-md-5 col-md-offset-4">
<button type="button" class="btn btn-primary btn-back" 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() {
$('.btn-back').click(function() {
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="status_name">状态</th>
<th>礼品状态</th>
<th data-field="user">业务员</th>
<th data-field="lock">当前操作</th>
<th data-field="user_name">业务员</th>
<th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>

@ -1,378 +1,268 @@
<?php
use \common\libs\MyLib;
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?>
use common\models\PriceT;
</td>
<td class="bg_tr">备注</td>
<td class="td_bg"><?=$order_info->remark?></td>
<td class="bg_tr"><span style="color:#ff0000">*</span>收款方式</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>
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
</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 class="td_bg"><input name="total1_rate" id="total1_rate" type="text" value="<?=$order_info->total1_rate?>" style="width:100px;"></td>
<td class="bg_tr">交强手续费</td>
<td class="td_bg"><input name="total2_rate" id="total2_rate" type="text" value="<?=$order_info->total2_rate?>" style="width:100px;"></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-off id=navcell onclick=open_up(2) name="navcell">▲操作记录</TD>
</tr>
</tbody>
</table>
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<div id="car_history_list"></div>
</TD>
</TR>
</TABLE>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<input id="return-btn" type=button class="ACT_btn" name=Submit5 value=" 退回 "/>
&nbsp;&nbsp;
<input id="cancel-btn" type=button class="ACT_btn" name=Submit4 value=" 放弃处理 "/>
&nbsp;&nbsp;
<!-- <input id="print-btn" type=button class="ACT_btn" name=Submit6 value=" 送单表打印 "/>-->
&nbsp;&nbsp;
<input id="save-btn" type=button class="ACT_btn" name=Submit1 value=" 保存 "/>
&nbsp;&nbsp;
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 提交 "/>
&nbsp;&nbsp;
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 ">
</td>
</tr>
</table>
<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="order_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);
$index = 0;
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 == '') continue;
?>
<th class="bg-warning">
<?=$item->name?>(<?=$item->code?>)
</th>
<td><label><?=$tmp_row->val?></label></td>
<td><label><?=(!empty($tmp_row) && $tmp_row->is_nopay == 1)?'不计免赔':''?></label></td>
<?php
if(($index+1)%3==0) {
echo '</tr>';
echo '<tr>';
}
$index++;
}
?>
</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_clear?></label></td>
<th class="bg-warning">商业含税总保费</th>
<td><label><?=$order_info->total1?></label></td>
<th class="bg-warning">车船税</th>
<td><label><?=$order_info->total3?></label></td>
</tr>
<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 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){
if(obj.success) {
if(status_id == 5)
$('#back-btn').click();
else
alert(obj.msg);
} else {
alert(obj.msg);
}
},'json');
}
<?php $this->beginBlock('footer_js'); ?>
<script>
var o = {};
//判断是否填写了选项
function isNull(data){
@ -382,75 +272,45 @@ use \common\models\PriceT;
return false;
}
}
$(function(){
//操作历史
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1','car_history_list');
//退回处理
$('#return-btn').click(function(){
var r = prompt('退回原因', '');
if(r != null && r != '') {
$.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('不填写原因,无法退回');
//保存订单
function saveOrder(status_id) {
var params = $('#orderFrm').serialize();
params = params + '&status_id=' + status_id;
$.post('/insurer/office-mng-save',params,function(obj){
parent.layer.msg(obj.msg);
if(obj.success && status_id>2) {
$('.btn-back')
}
});
//放弃处理
$('#cancel-btn').click(function(){
if(confirm('是否确认放弃处理?')) {
},'json');
}
$(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){
parent.layer.msg(obj.msg);
if(obj.success) {
$('#back-btn').click();
$('.btn-back').click();
} else {
alert(obj.msg);
}
},'json');
}
}, function(){
//
});
});
//保存
$('#save-btn').click(function(){
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-save').click(function(){
saveOrder(2);
});
//提交
$('#submit-btn').click(function(){
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-submit').click(function(){
saveOrder(5);
});
//返回
$('#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?>');
$('.btn-back').click(function() {
window.location.href = '/insurer/office-mng';
});
});
</script>
</script>
<?php $this->endBlock(); ?>

@ -1,79 +1,102 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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">
//详情
function info(id) {
var params = $('#searchForm').serialize();
window.location.href = '/insurer/office-mng-edit?id=' + id + '&back_params=' + encodeURIComponent(params);
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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(){
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/insurer/office-mng?" + params;
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
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>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

@ -1,416 +1,284 @@
<?php
use \common\libs\MyLib;
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>
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(); ?>
<!--操作记录-->
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲操作记录</TD>
</tr>
</tbody>
</table>
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<div id="car_history_list"></div>
</TD>
</TR>
</TABLE>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<input id="return-btn" type=button class="ACT_btn" name=Submit5 value=" 退回 "/>
&nbsp;&nbsp;
<input id="cancel-btn" type=button class="ACT_btn" name=Submit4 value=" 放弃处理 "/>
&nbsp;&nbsp;
<!--
<input id="gift-btn" type=button class="ACT_btn" name=Submit7 value=" 礼品出库 "/>
&nbsp;&nbsp;
//-->
<!-- <input id="ems-btn" type=button class="ACT_btn" name=Submit6 value=" EMS打印 "/>-->
<!-- &nbsp;&nbsp;-->
<input id="save-btn" type=button class="ACT_btn" name=Submit1 value=" 保存 "/>
&nbsp;&nbsp;
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 流程结束 "/>
&nbsp;&nbsp;
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 ">
</td>
</tr>
</table>
<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" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.js"></script>
<script type="text/javascript" language="javascript">
//保单处理
function SaveOrder(status_id) {
var param = $('#orderFrm').serialize();
var payer = $("#payer").val();
var urlfile=$('#urlfile').val();
var urlfile1=$('#urlfile1').val();
<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="order_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);
$index = 0;
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 == '') continue;
?>
<th class="bg-warning">
<?=$item->name?>(<?=$item->code?>)
</th>
<td><label><?=$tmp_row->val?></label></td>
<td><label><?=(!empty($tmp_row) && $tmp_row->is_nopay == 1)?'不计免赔':''?></label></td>
<?php
if(($index+1)%3==0) {
echo '</tr>';
echo '<tr>';
}
$index++;
}
?>
</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_clear?></label></td>
<th class="bg-warning">商业含税总保费</th>
<td><label><?=$order_info->total1?></label></td>
<th class="bg-warning">车船税</th>
<td><label><?=$order_info->total3?></label></td>
</tr>
<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)){
alert('付款人必填项!');
return false;
}
}
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');
}
<?php $this->beginBlock('footer_js'); ?>
<script>
var o = {};
//判断是否填写了选项
function isNull(data){
@ -420,110 +288,45 @@ use \common\models\PriceT;
return false;
}
}
$(function(){
//操作历史
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1','car_history_list');
//退回处理
$('#return-btn').click(function(){
var r = prompt('退回原因', '');
if(r != null && r != '') {
$.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('不填写原因,无法退回');
//保存订单
function saveOrder(status_id) {
var params = $('#orderFrm').serialize();
params = params + '&status_id=' + status_id;
$.post('/insurer/original-mng-save',params,function(obj){
parent.layer.msg(obj.msg);
if(obj.success && status_id>5) {
$('.btn-back')
}
});
//放弃处理
$('#cancel-btn').click(function(){
if(confirm('是否确认放弃处理?')) {
},'json');
}
$(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){
parent.layer.msg(obj.msg);
if(obj.success) {
$('#back-btn').click();
$('.btn-back').click();
} else {
alert(obj.msg);
}
},'json');
}
});
//添加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);
}, function(){
//
});
});
//提交
$('#submit-btn').click(function(){
if(confirm('是否提交此保单?')) {
if(confirm('付款人是否正确?')) {
SaveOrder(10);
}
}
$('.btn-save').click(function(){
saveOrder(5);
});
//返回
$('#back-btn').click(function(){
window.location.href = '/insurer/original-mng?<?=$back_params?>';
$('.btn-submit').click(function(){
saveOrder(10);
});
//EMS打印
// $('#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文件';
}
$('.btn-back').click(function() {
window.location.href = '/insurer/original-mng';
});
});
</script>
</script>
<?php $this->endBlock(); ?>

@ -1,105 +1,101 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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">
//详情
function info(id) {
var params = $('#searchForm').serialize();
window.location.href = '/insurer/original-mng-edit?id=' + id + '&back_params=' + encodeURIComponent(params);
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/insurer/original-mng?" + params;
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
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>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

@ -1,161 +1,107 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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">
//详情
function info(id,index) {
var params = $('#searchForm').serialize();
window.location.href = '/car/info-renewal?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params);
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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(){
$("#search-btn").click(function(){
$('#page').val(1);
var params = $('#searchForm').serialize();
window.location.href = "/renewal/all?" + params;
});
$('.invalid-btn').click(function(){
if(confirm('是否确认收回?')) {
var params = $('#listForm').serialize();
$.post('/renewal/invalid-c',params,function(obj){
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
},'json');
}
});
$('#assign-other-btn').click(function () {
if(confirm('是否确认平移?')) {
var params = $('#listForm').serialize();
var user_id = $('#user_id').val();
params = params + '&user_id=' + user_id;
$.post('/renewal/assign-other',params,function(obj){
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);
});
function view(car_id) {
location.href = '/car/info?id=' + car_id;
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/renewal/all-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>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

@ -1,161 +1,107 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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">
//详情
function info(id,index) {
var params = $('#searchForm').serialize();
window.location.href = '/car/info-renewal?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params);
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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(){
$("#search-btn").click(function(){
$('#page').val(1);
var params = $('#searchForm').serialize();
window.location.href = "/renewal/first?" + params;
});
$('.invalid-btn').click(function(){
if(confirm('是否确认收回?')) {
var params = $('#listForm').serialize();
$.post('/renewal/invalid-c',params,function(obj){
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
},'json');
}
});
$('#assign-other-btn').click(function () {
if(confirm('是否确认平移?')) {
var params = $('#listForm').serialize();
var user_id = $('#user_id').val();
params = params + '&user_id=' + user_id;
$.post('/renewal/assign-other',params,function(obj){
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);
});
function view(car_id) {
location.href = '/car/info?id=' + car_id;
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/renewal/first-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>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

@ -1,94 +1,107 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.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">
//详情
function info(id,index) {
var params = $('#searchForm').serialize();
window.location.href = '/car/info-renewal?id=' + id + '&type=<?=$type?>' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params);
<?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">
<div class="ibox float-e-margins">
<div class="ibox-title">
<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(){
$("#search-btn").click(function(){
$('#page').val(1);
var params = $('#searchForm').serialize();
window.location.href = "/renewal/today?" + params;
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
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>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
<?php $this->endBlock(); ?>

Loading…
Cancel
Save