完成业务系统功能开发

dev
曾超新 5 years ago
parent 98065ee11b
commit 4893774b22
  1. 106
      frontend/controllers/CarController.php
  2. 2
      frontend/controllers/CommonController.php
  3. 157
      frontend/controllers/FinanceController.php
  4. 233
      frontend/controllers/InsurerController.php
  5. 149
      frontend/controllers/MarketingStrategyController.php
  6. 20
      frontend/views/appointment/add.php
  7. 8
      frontend/views/car-use/edit.php
  8. 24
      frontend/views/car/linkman-add.php
  9. 378
      frontend/views/car/order-add.php
  10. 247
      frontend/views/finance/budian-list.php
  11. 88
      frontend/views/finance/car-update-frame.php
  12. 85
      frontend/views/finance/receipt-import.php
  13. 347
      frontend/views/finance/receipt.php
  14. 136
      frontend/views/gift/edit.php
  15. 30
      frontend/views/gift/index.php
  16. 18
      frontend/views/insurer/finance-mng-edit.php
  17. 6
      frontend/views/insurer/finance-mng.php
  18. 277
      frontend/views/insurer/my-list-info.php
  19. 2
      frontend/views/insurer/my-list.php
  20. 150
      frontend/views/insurer/my-return-list.php
  21. 198
      frontend/views/insurer/office-mng-edit.php
  22. 2
      frontend/views/insurer/office-mng.php
  23. 292
      frontend/views/insurer/original-mng-edit.php
  24. 2
      frontend/views/insurer/original-mng.php
  25. 3
      frontend/views/layouts/blue-main.php
  26. 7
      frontend/views/marketing-strategy/gifts.php
  27. 54
      frontend/views/marketing-strategy/select-fanxian.php
  28. 2
      frontend/web/assets/js/plugins/layui/css/layui.css
  29. 2
      frontend/web/assets/js/plugins/layui/css/layui.mobile.css
  30. 2
      frontend/web/assets/js/plugins/layui/css/modules/code.css
  31. 2
      frontend/web/assets/js/plugins/layui/css/modules/laydate/default/laydate.css
  32. BIN
      frontend/web/assets/js/plugins/layui/css/modules/layer/default/icon-ext.png
  33. BIN
      frontend/web/assets/js/plugins/layui/css/modules/layer/default/icon.png
  34. 2
      frontend/web/assets/js/plugins/layui/css/modules/layer/default/layer.css
  35. BIN
      frontend/web/assets/js/plugins/layui/css/modules/layer/default/loading-0.gif
  36. BIN
      frontend/web/assets/js/plugins/layui/css/modules/layer/default/loading-1.gif
  37. BIN
      frontend/web/assets/js/plugins/layui/css/modules/layer/default/loading-2.gif
  38. BIN
      frontend/web/assets/js/plugins/layui/font/iconfont.eot
  39. 485
      frontend/web/assets/js/plugins/layui/font/iconfont.svg
  40. BIN
      frontend/web/assets/js/plugins/layui/font/iconfont.ttf
  41. BIN
      frontend/web/assets/js/plugins/layui/font/iconfont.woff
  42. BIN
      frontend/web/assets/js/plugins/layui/font/iconfont.woff2
  43. BIN
      frontend/web/assets/js/plugins/layui/images/face/0.gif
  44. BIN
      frontend/web/assets/js/plugins/layui/images/face/1.gif
  45. BIN
      frontend/web/assets/js/plugins/layui/images/face/10.gif
  46. BIN
      frontend/web/assets/js/plugins/layui/images/face/11.gif
  47. BIN
      frontend/web/assets/js/plugins/layui/images/face/12.gif
  48. BIN
      frontend/web/assets/js/plugins/layui/images/face/13.gif
  49. BIN
      frontend/web/assets/js/plugins/layui/images/face/14.gif
  50. BIN
      frontend/web/assets/js/plugins/layui/images/face/15.gif
  51. BIN
      frontend/web/assets/js/plugins/layui/images/face/16.gif
  52. BIN
      frontend/web/assets/js/plugins/layui/images/face/17.gif
  53. BIN
      frontend/web/assets/js/plugins/layui/images/face/18.gif
  54. BIN
      frontend/web/assets/js/plugins/layui/images/face/19.gif
  55. BIN
      frontend/web/assets/js/plugins/layui/images/face/2.gif
  56. BIN
      frontend/web/assets/js/plugins/layui/images/face/20.gif
  57. BIN
      frontend/web/assets/js/plugins/layui/images/face/21.gif
  58. BIN
      frontend/web/assets/js/plugins/layui/images/face/22.gif
  59. BIN
      frontend/web/assets/js/plugins/layui/images/face/23.gif
  60. BIN
      frontend/web/assets/js/plugins/layui/images/face/24.gif
  61. BIN
      frontend/web/assets/js/plugins/layui/images/face/25.gif
  62. BIN
      frontend/web/assets/js/plugins/layui/images/face/26.gif
  63. BIN
      frontend/web/assets/js/plugins/layui/images/face/27.gif
  64. BIN
      frontend/web/assets/js/plugins/layui/images/face/28.gif
  65. BIN
      frontend/web/assets/js/plugins/layui/images/face/29.gif
  66. BIN
      frontend/web/assets/js/plugins/layui/images/face/3.gif
  67. BIN
      frontend/web/assets/js/plugins/layui/images/face/30.gif
  68. BIN
      frontend/web/assets/js/plugins/layui/images/face/31.gif
  69. BIN
      frontend/web/assets/js/plugins/layui/images/face/32.gif
  70. BIN
      frontend/web/assets/js/plugins/layui/images/face/33.gif
  71. BIN
      frontend/web/assets/js/plugins/layui/images/face/34.gif
  72. BIN
      frontend/web/assets/js/plugins/layui/images/face/35.gif
  73. BIN
      frontend/web/assets/js/plugins/layui/images/face/36.gif
  74. BIN
      frontend/web/assets/js/plugins/layui/images/face/37.gif
  75. BIN
      frontend/web/assets/js/plugins/layui/images/face/38.gif
  76. BIN
      frontend/web/assets/js/plugins/layui/images/face/39.gif
  77. BIN
      frontend/web/assets/js/plugins/layui/images/face/4.gif
  78. BIN
      frontend/web/assets/js/plugins/layui/images/face/40.gif
  79. BIN
      frontend/web/assets/js/plugins/layui/images/face/41.gif
  80. BIN
      frontend/web/assets/js/plugins/layui/images/face/42.gif
  81. BIN
      frontend/web/assets/js/plugins/layui/images/face/43.gif
  82. BIN
      frontend/web/assets/js/plugins/layui/images/face/44.gif
  83. BIN
      frontend/web/assets/js/plugins/layui/images/face/45.gif
  84. BIN
      frontend/web/assets/js/plugins/layui/images/face/46.gif
  85. BIN
      frontend/web/assets/js/plugins/layui/images/face/47.gif
  86. BIN
      frontend/web/assets/js/plugins/layui/images/face/48.gif
  87. BIN
      frontend/web/assets/js/plugins/layui/images/face/49.gif
  88. BIN
      frontend/web/assets/js/plugins/layui/images/face/5.gif
  89. BIN
      frontend/web/assets/js/plugins/layui/images/face/50.gif
  90. BIN
      frontend/web/assets/js/plugins/layui/images/face/51.gif
  91. BIN
      frontend/web/assets/js/plugins/layui/images/face/52.gif
  92. BIN
      frontend/web/assets/js/plugins/layui/images/face/53.gif
  93. BIN
      frontend/web/assets/js/plugins/layui/images/face/54.gif
  94. BIN
      frontend/web/assets/js/plugins/layui/images/face/55.gif
  95. BIN
      frontend/web/assets/js/plugins/layui/images/face/56.gif
  96. BIN
      frontend/web/assets/js/plugins/layui/images/face/57.gif
  97. BIN
      frontend/web/assets/js/plugins/layui/images/face/58.gif
  98. BIN
      frontend/web/assets/js/plugins/layui/images/face/59.gif
  99. BIN
      frontend/web/assets/js/plugins/layui/images/face/6.gif
  100. BIN
      frontend/web/assets/js/plugins/layui/images/face/60.gif
  101. Some files were not shown because too many files have changed in this diff Show More

@ -62,6 +62,7 @@ use common\models\OrderCaiwuT;
use common\models\OrderAddress; use common\models\OrderAddress;
use common\models\InvalidNew; use common\models\InvalidNew;
use common\models\InvalidRenewal; use common\models\InvalidRenewal;
use common\models\ZhongjiGiftT;
use Yii; use Yii;
use yii\data\Pagination; use yii\data\Pagination;
use yii\web\Response; use yii\web\Response;
@ -2288,7 +2289,15 @@ class CarController extends BaseController
$car_no = $request->post('car_no'); $car_no = $request->post('car_no');
$seats = (int)$request->post('seats'); $seats = (int)$request->post('seats');
$register_date = $request->post('register_date'); $register_date = $request->post('register_date');
$car_use_id = $request->post('car_use_id');
//策略信息
$celuo_id = $request->post('celuo_id');
$fanxian_id = $request->post('fanxian_id');
$gift_ids = $request->post('gift_ids', []);
$quan_ids = $request->post('quan_ids', []);
//投保信息
$car_man = $request->post('car_man'); $car_man = $request->post('car_man');
$car_man_number = $request->post('car_man_number'); $car_man_number = $request->post('car_man_number');
$car_man_type = $request->post('car_man_type'); $car_man_type = $request->post('car_man_type');
@ -2312,8 +2321,6 @@ class CarController extends BaseController
$email = $request->post('email'); $email = $request->post('email');
$send_date = $request->post('send_date'); $send_date = $request->post('send_date');
$company2_id = $request->post('company2_id'); $company2_id = $request->post('company2_id');
$pay_type_id = $request->post('pay_type_id');
$shoufei_id = $request->post('shoufei_id');
$insurer1_begin_date = $request->post('insurer1_begin_date'); $insurer1_begin_date = $request->post('insurer1_begin_date');
$insurer2_begin_date = $request->post('insurer2_begin_date'); $insurer2_begin_date = $request->post('insurer2_begin_date');
$order_remark = $request->post('order_remark'); $order_remark = $request->post('order_remark');
@ -2331,6 +2338,7 @@ class CarController extends BaseController
$total_all = $request->post('total_all'); $total_all = $request->post('total_all');
$total_real = $request->post('total_real'); $total_real = $request->post('total_real');
$price_remark = $request->post('price_remark'); $price_remark = $request->post('price_remark');
$yuangong_money = $request->post('yuangong_money');
//报价明细 //报价明细
$types = $request->post('types', array()); $types = $request->post('types', array());
@ -2353,10 +2361,6 @@ class CarController extends BaseController
} }
//提交才判断的条件 //提交才判断的条件
if ($status_id > 1) { if ($status_id > 1) {
if ($success_id == 0) {
$result['msg'] = '请选择成功理由';
return $result;
}
if ($seats == 0) { if ($seats == 0) {
$result['msg'] = '请输入座位数'; $result['msg'] = '请输入座位数';
return $result; return $result;
@ -2373,6 +2377,7 @@ class CarController extends BaseController
$car_info->register_date = $register_date; $car_info->register_date = $register_date;
$car_info->car_man = $car_man; $car_info->car_man = $car_man;
$car_info->car_man_number = $car_man_number; $car_info->car_man_number = $car_man_number;
$car_info->car_use_id = $car_use_id;
if(!$car_info->save()) { if(!$car_info->save()) {
throw new \Exception(print_r($car_info->getErrors(), true)); throw new \Exception(print_r($car_info->getErrors(), true));
} }
@ -2396,8 +2401,15 @@ class CarController extends BaseController
$order_info->link_man_number = $link_man_number; $order_info->link_man_number = $link_man_number;
$order_info->company2_id = $company2_id; $order_info->company2_id = $company2_id;
$order_info->success_id = $success_id; if($order_info->status_id != $status_id) {
$order_info->status_id = $status_id; if($order_info->return_status_id > 0) {
$order_info->status_id = $order_info->return_status_id;
$order_info->return_status_id = 0;
} else {
$order_info->status_id = $status_id;
$order_info->return_status_id = 0;
}
}
$order_info->submit_date = date('Y-m-d'); $order_info->submit_date = date('Y-m-d');
$order_info->insurer1_begin_date = $insurer1_begin_date; $order_info->insurer1_begin_date = $insurer1_begin_date;
$insurer1_end_date = ''; $insurer1_end_date = '';
@ -2414,8 +2426,6 @@ class CarController extends BaseController
$order_info->send_district_id = $send_district_id; $order_info->send_district_id = $send_district_id;
$order_info->send_city_id = $send_city_id; $order_info->send_city_id = $send_city_id;
$order_info->send_address = $send_address; $order_info->send_address = $send_address;
$order_info->pay_type_id = $pay_type_id;
$order_info->shoufei_id = $shoufei_id;
$order_info->email = $email; $order_info->email = $email;
$order_info->remark = $order_remark; $order_info->remark = $order_remark;
@ -2430,11 +2440,15 @@ class CarController extends BaseController
$order_info->total_all = $total_all; $order_info->total_all = $total_all;
$order_info->total_real = $total_real; $order_info->total_real = $total_real;
$order_info->price_remark = $price_remark; $order_info->price_remark = $price_remark;
$order_info->yuangong_money = $yuangong_money;
$order_info->money_man = $money_man; $order_info->money_man = $money_man;
$order_info->money_bank = $money_bank; $order_info->money_bank = $money_bank;
$order_info->money_no = $money_no; $order_info->money_no = $money_no;
$order_info->celuo_id = $celuo_id;
$order_info->fanxian_id = $fanxian_id;
if(!$order_info->save()) { if(!$order_info->save()) {
throw new \Exception(print_r($order_info->getErrors(), true)); throw new \Exception(print_r($order_info->getErrors(), true));
} }
@ -2485,23 +2499,67 @@ class CarController extends BaseController
// 处理财务-如果是在线支付-生成财务分支 // 处理财务-如果是在线支付-生成财务分支
if ($status_id > 1) { if ($status_id > 1) {
if ($shoufei_id == 2) { $order_caiwu = OrderCaiwuT::findOne(['order_id'=>$order_info->id]);
$order_caiwu = OrderCaiwuT::findOne(['order_id'=>$order_info->id]);
if(!$order_caiwu){ if(!$order_caiwu){
$order_caiwu = new OrderCaiwuT(); $order_caiwu = new OrderCaiwuT();
$order_caiwu->status_id = 2; $order_caiwu->status_id = 2;
} }
$order_caiwu->order_id = $order_info->id; $order_caiwu->order_id = $order_info->id;
$order_caiwu->money_man = $money_man; $order_caiwu->money_man = $money_man;
$order_caiwu->money_no = $money_no; $order_caiwu->money_no = $money_no;
$order_caiwu->money_bank = $money_bank; $order_caiwu->money_bank = $money_bank;
if(!$order_caiwu->save()) { if(!$order_caiwu->save()) {
throw new \Exception(print_r($order_caiwu->getErrors(), true)); throw new \Exception(print_r($order_caiwu->getErrors(), true));
}
} }
}
//处理策略
OrderGiftT::deleteAll('order_id=' . $order_info->id . ' and status=0');
//礼品
foreach($gift_ids as $gift_str) {
$tmp = explode('-', $gift_str);
$zhongjigift_item = ZhongjiGiftT::findOne(['id'=>$tmp[0]]);
$gift_id = $tmp[1];
$gift_item = GiftT::findOne(['id'=>$gift_id]);
if($zhongjigift_item && $gift_item) {
$row = new OrderGiftT();
$row->order_id = $order_info->id;
$row->group_id = 0;
$row->gift_id = $gift_id;
$row->is_free = $zhongjigift_item->free_type;
$row->gift_type = $zhongjigift_item->gift_type;
$row->send_id = 0;
$row->send_time = 0;
$row->price = $gift_item->price;
$row->status = 0;
if (!$row->save()) {
throw new \Exception(print_r($row->getErrors(), true));
}
}
}
//礼券
foreach($quan_ids as $gift_str) {
$tmp = explode('-', $gift_str);
$zhongjigift_item = ZhongjiGiftT::findOne(['id'=>$tmp[0]]);
$gift_id = $tmp[1];
$gift_item = GiftT::findOne(['id'=>$gift_id]);
if($zhongjigift_item && $gift_item) {
$row = new OrderGiftT();
$row->order_id = $order_info->id;
$row->group_id = 0;
$row->gift_id = $gift_id;
$row->is_free = $zhongjigift_item->free_type;
$row->gift_type = $zhongjigift_item->gift_type;
$row->send_id = 0;
$row->send_time = 0;
$row->price = $gift_item->price;
$row->status = 0;
if (!$row->save()) {
throw new \Exception(print_r($row->getErrors(), true));
}
}
} }
$result['success'] = true; $result['success'] = true;
@ -5016,6 +5074,7 @@ class CarController extends BaseController
} }
$insurer_type_items = InsurerTypeT::find()->all(); $insurer_type_items = InsurerTypeT::find()->all();
$insurer_company_items = InsurerCompanyT::find()->all(); $insurer_company_items = InsurerCompanyT::find()->all();
$car_use_items = CarUseT::find()->all();
$insurer_company2_items = InsurerCompany2T::find()->all(); $insurer_company2_items = InsurerCompany2T::find()->all();
$pay_type_items = PayTypeT::find()->all(); $pay_type_items = PayTypeT::find()->all();
$success_items = InvalidT::getTree(1); $success_items = InvalidT::getTree(1);
@ -5029,6 +5088,7 @@ class CarController extends BaseController
'insurer_type_items' => $insurer_type_items, 'insurer_type_items' => $insurer_type_items,
'insurer_company_items' => $insurer_company_items, 'insurer_company_items' => $insurer_company_items,
'insurer_company2_items' => $insurer_company2_items, 'insurer_company2_items' => $insurer_company2_items,
'car_use_items' => $car_use_items,
'pay_type_items' => $pay_type_items, 'pay_type_items' => $pay_type_items,
'success_items' => $success_items, 'success_items' => $success_items,
'city_items' => $city_items, 'city_items' => $city_items,

@ -371,7 +371,7 @@ class CommonController extends \yii\web\Controller
$data['status'] = 'FAILSE'; $data['status'] = 'FAILSE';
$data['fileUrl'] = ''; $data['fileUrl'] = '';
if($request->isPost){ if($request->isPost){
$img = UploadedFile::getInstanceByName('img'); $img = UploadedFile::getInstanceByName('file');
$filename = 'upload/images/'.date('Ym').'/'.time().rand(1111,9999).'.'.$img->extension; $filename = 'upload/images/'.date('Ym').'/'.time().rand(1111,9999).'.'.$img->extension;
FileHelper::createDirectory(dirname($filename)); FileHelper::createDirectory(dirname($filename));
$img->saveAs($filename); $img->saveAs($filename);

@ -55,10 +55,12 @@ class FinanceController extends \frontend\controllers\UserBaseController
public $enableCsrfValidation = false; public $enableCsrfValidation = false;
public $layout = 'blue-main'; public $layout = 'blue-main';
public function actionReceipt() public function actionReceipt() {
return $this->render('receipt');
}
public function actionReceiptJson()
{ {
$request = Yii::$app->request; $request = Yii::$app->request;
$page = $request->get('page', 1);
$begin_date = $request->get('begin_date'); $begin_date = $request->get('begin_date');
$end_date = $request->get('end_date'); $end_date = $request->get('end_date');
$r_begin_date = $request->get('r_begin_date'); $r_begin_date = $request->get('r_begin_date');
@ -70,10 +72,12 @@ class FinanceController extends \frontend\controllers\UserBaseController
$sort_value = $request->get('sort_value'); $sort_value = $request->get('sort_value');
$company_id = $request->get('company_id'); $company_id = $request->get('company_id');
$username = $request->get('username'); $username = $request->get('username');
$offset = $request->get('offset', 0);
$limit = $request->get('limit', 10);
//级别 //级别
$group_id = $request->get('group_id'); $group_id = $request->get('group_id');
$group_items = GroupT::getTree((int)$this->my->group_id); $group_items = GroupT::getTree((int)$this->my->group_id);
if($this->my->id == 1 || $this->my->username=='6002' || $this->my->username=='7053') if($this->my->id == 1)
$group_items = GroupT::getTree(); $group_items = GroupT::getTree();
$group_ids[] = $group_id; $group_ids[] = $group_id;
@ -84,13 +88,11 @@ class FinanceController extends \frontend\controllers\UserBaseController
$group_ids[] = $group_info->id; $group_ids[] = $group_info->id;
} }
} }
// var_dump($group_ids);
if ($page < 1) $page = 1; if ($page < 1) $page = 1;
$query = CaiwuT::find() $query = CaiwuT::find()
->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id"); ->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id");
// ->orderBy('order_t.print_date DESC');
switch ($sort_key) { switch ($sort_key) {
case 'total': case 'total':
@ -121,53 +123,49 @@ class FinanceController extends \frontend\controllers\UserBaseController
$query = $query->orderBy($sort); $query = $query->orderBy($sort);
if( $company_id > 0) { if( $company_id > 0) {
$query = $query->andWhere('order_t.company_id='.$company_id); $query->andWhere('order_t.company_id='.$company_id);
} }
if ($username != "") { if ($username != "") {
$userdata = UserT::findOne(['username'=>$username]); $userdata = UserT::findOne(['username'=>$username]);
if($userdata){ if($userdata){
$query = $query->andWhere('caiwu_t.user_id = ' . $userdata->id . ''); $query->andWhere('caiwu_t.user_id = ' . $userdata->id . '');
} }
} }
if ($car_no != "") { if ($car_no != "") {
$query = $query->andWhere('caiwu_t.car_no like "%' . $car_no . '%"'); $query->andWhere('caiwu_t.car_no like "%' . $car_no . '%"');
} }
if ($car_no != "") { if ($car_no != "") {
$query = $query->andWhere('caiwu_t.car_no like "%' . $car_no . '%"'); $query->andWhere('caiwu_t.car_no like "%' . $car_no . '%"');
} }
if ($insurer_no != "") { if ($insurer_no != "") {
$query = $query->andWhere('caiwu_t.insurer_no like "' . $insurer_no . '%"'); $query->andWhere('caiwu_t.insurer_no like "' . $insurer_no . '%"');
} }
if ($status > 0) { if ($status > 0) {
if ($status == 1) { if ($status == 1) {
$query = $query->andWhere('r_date="" or r_date is null'); $query->andWhere('r_date="" or r_date is null');
} }
if ($status == 2) { if ($status == 2) {
$query = $query->andWhere('r_date<>"" and total_dis=0'); $query->andWhere('r_date<>"" and total_dis=0');
} }
if($status == 3) { if($status == 3) {
$query = $query->andWhere('r_date<>"" and total_dis<>0'); $query->andWhere('r_date<>"" and total_dis<>0');
} }
} }
if ($begin_date != "") { if ($begin_date != "") {
$query = $query->andWhere('order_t.print_date>="' . $begin_date . '"'); $query->andWhere('order_t.print_date>="' . $begin_date . '"');
} }
if ($end_date != "") { if ($end_date != "") {
$query = $query->andWhere('order_t.print_date<="' . $end_date . '"'); $query->andWhere('order_t.print_date<="' . $end_date . '"');
} }
if ($r_begin_date != "") { if ($r_begin_date != "") {
$query = $query->andWhere('caiwu_t.r_date>="' . $r_begin_date . '"'); $query->andWhere('caiwu_t.r_date>="' . $r_begin_date . '"');
} }
if ($r_end_date != "") { if ($r_end_date != "") {
$query = $query->andWhere('caiwu_t.r_date<="' . $r_end_date . '"'); $query->andWhere('caiwu_t.r_date<="' . $r_end_date . '"');
} }
//找出$group_id 有多少在职的user_ids //找出$group_id 有多少在职的user_ids
// 现在的搜索条件 // 现在的搜索条件
$userSql = ''; $userSql = '';
// if($username != '') {
// $userSql = ' username like "'.$username.'" and ';
// }
//$userSql .= 'is_locked=0 and is_login=1';
$user_items = $this->my->getChildren($userSql); $user_items = $this->my->getChildren($userSql);
if($this->my->username == '6002' || $this->my->username == '7053') if($this->my->username == '6002' || $this->my->username == '7053')
@ -176,8 +174,6 @@ class FinanceController extends \frontend\controllers\UserBaseController
$row = array(); $row = array();
foreach($user_items as $user_info) { foreach($user_items as $user_info) {
// if ($user_info->is_leave == 1) continue;
// var_dump($user_info);
if ($group_id > 0) { if ($group_id > 0) {
if (!in_array($user_info->group_id, $group_ids)) { if (!in_array($user_info->group_id, $group_ids)) {
continue; continue;
@ -188,16 +184,12 @@ class FinanceController extends \frontend\controllers\UserBaseController
} }
// var_dump($row);
//加上级别筛选 //加上级别筛选
if($group_id > 0){ if($group_id > 0){
// $query = $query->andWhere('order_t.company_id='.$company_id); $query->andWhere(['in','caiwu_t.user_id',$row]);
$query = $query->andWhere(['in','caiwu_t.user_id',$row]);
// $query = $query->andWhere('caiwu_t.user_id ="' . $group_id . '"');
} }
// echo $query->createCommand()->rawSql;
$total = $query->count(); $total = $query->count();
$sum_r_total = $query->sum('r_total'); $sum_r_total = $query->sum('r_total');
@ -209,40 +201,22 @@ class FinanceController extends \frontend\controllers\UserBaseController
$sum_total_dis = $query->sum('total_dis'); $sum_total_dis = $query->sum('total_dis');
$pagination = new Pagination(['totalCount' => $total, 'pageSize' => 20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page - 1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
// var_dump($items);
$page_info = MyLib::getPageInfo($pagination);
$company_items = InsurerCompanyT::find()->all(); $data = [];
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();
$row['user'] = $item->user?$item->user->getShowName():'';
$data['rows'][] = $row;
}
return $this->render('receipt', [ return $data;
'items' => $items, }
'username' => $username, public function actionReceiptImport() {
'page' => $page, return $this->render('receipt-import');
'car_no' => $car_no,
'insurer_no' => $insurer_no,
'status' => $status,
'begin_date' => $begin_date,
'end_date' => $end_date,
'r_begin_date' => $r_begin_date,
'r_end_date' => $r_end_date,
'page_info' => $page_info,
'sort_key' => $sort_key,
'sort_value' => $sort_value,
'sum_r_total' => $sum_r_total,
'sum_total_clear' => $sum_total_clear,
'sum_total' => $sum_total,
'sum_total_dis' => $sum_total_dis,
'company_items' => $company_items,
'group_id' => $group_id,
'group_items' => $group_items,
'company_id' => $company_id
]);
} }
public function actionEmsReceipt() public function actionEmsReceipt()
{ {
@ -6572,8 +6546,12 @@ class FinanceController extends \frontend\controllers\UserBaseController
} }
public function actionBudianList() public function actionBudianList() {
return $this->render('budian-list');
}
public function actionBudianListJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$begin_date = $request->get('begin_date',date('Y-m-d')); $begin_date = $request->get('begin_date',date('Y-m-d'));
$end_date = $request->get('end_date',date('Y-m-d')); $end_date = $request->get('end_date',date('Y-m-d'));
@ -6586,45 +6564,45 @@ class FinanceController extends \frontend\controllers\UserBaseController
$budian_rate = $request->get('budian_rate'); $budian_rate = $request->get('budian_rate');
$page = $request->get('page',1); $offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
$query = CaiwuT::find() $query = CaiwuT::find()
->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id") ->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id")
// ->where('caiwu_t.insurer_type=1')
->orderBy('order_t.print_date DESC'); ->orderBy('order_t.print_date DESC');
if( $insurer_type > 0) { if( $insurer_type > 0) {
$query = $query->andWhere('caiwu_t.insurer_type='.$insurer_type); $query->andWhere('caiwu_t.insurer_type='.$insurer_type);
} }
if( $company_id > 0) { if( $company_id > 0) {
$query = $query->andWhere('order_t.company_id='.$company_id); $query->andWhere('order_t.company_id='.$company_id);
} }
if($car_no_type == 1){ if($car_no_type == 1){
$query = $query->andWhere('caiwu_t.car_no like "' . '京' . '%"'); $query->andWhere('caiwu_t.car_no like "' . '京' . '%"');
}elseif($car_no_type == 2){ }elseif($car_no_type == 2){
$query = $query->andWhere('caiwu_t.car_no not like "' . '京' . '%"'); $query->andWhere('caiwu_t.car_no not like "' . '京' . '%"');
} }
if($begin_totalclear != ''){ if($begin_totalclear != ''){
$query = $query->andWhere('caiwu_t.total_clear >=' . $begin_totalclear); $query->andWhere('caiwu_t.total_clear >=' . $begin_totalclear);
} }
if($end_totalclear != ''){ if($end_totalclear != ''){
$query = $query->andWhere('caiwu_t.total_clear <=' . $end_totalclear); $query->andWhere('caiwu_t.total_clear <=' . $end_totalclear);
} }
if ($begin_date != "") { if ($begin_date != "") {
$query = $query->andWhere('order_t.print_date>="' . $begin_date . '"'); $query->andWhere('order_t.print_date>="' . $begin_date . '"');
} }
if ($end_date != "") { if ($end_date != "") {
$query = $query->andWhere('order_t.print_date<="' . $end_date . '"'); $query->andWhere('order_t.print_date<="' . $end_date . '"');
} }
$total1_clear_all = $query->sum('total_clear'); $total1_clear_all = $query->sum('total_clear');
@ -6632,38 +6610,19 @@ class FinanceController extends \frontend\controllers\UserBaseController
$total = $query->count(); $total = $query->count();
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$company_items = InsurerCompanyT::find()->all(); $data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();
// $insurer_ticheng_items = InsurerTichengT::find()->orderBy('id')->all(); $row['user'] = $item->user?$item->user->getShowName():'';
// $gift_ticheng_items = InsurerTichengGiftT::find()->orderBy('id')->all(); $data['rows'][] = $row;
}
return $this->render('budian-list', [ return $data;
'total1_clear_all'=>$total1_clear_all,
'total_money_all'=>$total_money_all,
'items' => $items,
'page' => $page,
'page_info' => $page_info,
'begin_date' => $begin_date,
'end_date' => $end_date,
'company_items' => $company_items,
'begin_totalclear' => $begin_totalclear,
'end_totalclear' => $end_totalclear,
'car_no_type' => $car_no_type,
'company_id' => $company_id,
'budian_rate' => $budian_rate,
'insurer_type' => $insurer_type
// 'insurer_ticheng_items' => $insurer_ticheng_items,
// 'gift_ticheng_items' => $gift_ticheng_items
]);
} }
public function actionBudianSave() public function actionBudianSave()

@ -49,6 +49,7 @@ use common\models\SendLogT;
use common\models\SeriesT; use common\models\SeriesT;
use common\models\UserT; use common\models\UserT;
use common\models\CaiwuStatusT; use common\models\CaiwuStatusT;
use common\models\ZhongjiGiftT;
use Yii; use Yii;
use yii\data\Pagination; use yii\data\Pagination;
use yii\web\Response; use yii\web\Response;
@ -463,6 +464,7 @@ class InsurerController extends BaseController
$row['user_name'] = $item->user?$item->user->getShowName():''; $row['user_name'] = $item->user?$item->user->getShowName():'';
$row['status_name'] = $item->status->name; $row['status_name'] = $item->status->name;
$row['lock_name'] = $item->lock?$item->lock->getShowName():''; $row['lock_name'] = $item->lock?$item->lock->getShowName():'';
$row['gift_status_name'] = $item->gift_status == 1 ? '已确认':'';
$data['rows'][] = $row; $data['rows'][] = $row;
} }
return $data; return $data;
@ -1316,20 +1318,13 @@ class InsurerController extends BaseController
$insurer1_no = $request->post('insurer1_no'); $insurer1_no = $request->post('insurer1_no');
$insurer2_no = $request->post('insurer2_no'); $insurer2_no = $request->post('insurer2_no');
$payer = $request->post('payer'); $payer = $request->post('payer');
$gifts = $request->post('gifts',array());
$gift_types = $request->post('gift_types',array());
$payee_id = $request->post('payee_id'); $payee_id = $request->post('payee_id');
$payment_id = $request->post('payment_id'); $payment_id = $request->post('payment_id');
//上传商业和交强文件 //上传商业和交强文件
$urlfile= $request->post('urlfile'); $shangye_src= $request->post('shangye_src');
$urlfile1= $request->post('urlfile1'); $fapiao_src= $request->post('fapiao_src');
$jiaoqiang_src= $request->post('jiaoqiang_src');
// if(substr($urlfile,-3)!='pdf' && substr($urlfile1,-3)!='pdf'){ $jq_fapiao_src= $request->post('jq_fapiao_src');
// $result['msg'] = '请上传正确的商业或交强pdf文件';
// return $result;
// }
$urlfile= trim($urlfile);
$urlfile1= trim($urlfile1);
if($insurer1_no == '' && $insurer2_no == '') { if($insurer1_no == '' && $insurer2_no == '') {
$result['msg'] = '请输入商业或交强保单号!'; $result['msg'] = '请输入商业或交强保单号!';
@ -1354,8 +1349,10 @@ class InsurerController extends BaseController
$order_info->insurer1_no = $insurer1_no; $order_info->insurer1_no = $insurer1_no;
$order_info->insurer2_no = $insurer2_no; $order_info->insurer2_no = $insurer2_no;
//上传文件 //上传文件
$order_info->shangye_src = $urlfile; $order_info->shangye_src = $shangye_src;
$order_info->jiaoqiang_src = $urlfile1; $order_info->jiaoqiang_src = $jiaoqiang_src;
$order_info->fapiao_src = $fapiao_src;
$order_info->jq_fapiao_src = $jq_fapiao_src;
$order_info->upload_status = 2; $order_info->upload_status = 2;
@ -1472,7 +1469,7 @@ class InsurerController extends BaseController
$car_info->insurer1_date = $order_info->insurer1_end_date; $car_info->insurer1_date = $order_info->insurer1_end_date;
$car_info->insurer2_date = $order_info->insurer2_end_date; $car_info->insurer2_date = $order_info->insurer2_end_date;
//续保次数 //续保次数
$car_info->xubao_num=$car_info->xubao_num+1; $car_info->xubao_num=intval($car_info->xubao_num)+1;
if(!$car_info->save()) { if(!$car_info->save()) {
throw new \Exception(print_r($car_info->getErrors(), true)); throw new \Exception(print_r($car_info->getErrors(), true));
} }
@ -2637,8 +2634,12 @@ class InsurerController extends BaseController
// 'end_date' => $end_date // 'end_date' => $end_date
// ]); // ]);
// } // }
public function actionFinanceMng() public function actionFinanceMng() {
return $this->render('finance-mng');
}
public function actionFinanceMngJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
//新增正本日期 //新增正本日期
$begin_date = $request->get('begin_date'); $begin_date = $request->get('begin_date');
@ -2652,7 +2653,8 @@ class InsurerController extends BaseController
$send_date = $request->get('send_date'); $send_date = $request->get('send_date');
$insurer_no = $request->get('insurer_no'); $insurer_no = $request->get('insurer_no');
$caiwu_status_id = $request->get('caiwu_status_id'); $caiwu_status_id = $request->get('caiwu_status_id');
$page = $request->get('page',1); $offset = $request->get('offset',0);
$limit = $request->get('limit', 10);
//级别 //级别
$group_id = $request->get('group_id'); $group_id = $request->get('group_id');
@ -2670,56 +2672,54 @@ class InsurerController extends BaseController
} }
if($page < 1) $page = 1;
$query = OrderT::find() $query = OrderT::find()
->leftJoin('order_caiwu_t','order_caiwu_t.order_id=order_t.id') ->leftJoin('order_caiwu_t','order_caiwu_t.order_id=order_t.id')
->where('order_caiwu_t.status_id>0') ->where('order_caiwu_t.status_id>0')
->orderBy('order_t.print_date asc'); ->orderBy('order_t.print_date asc');
if($car_man != '') { if($car_man != '') {
$query = $query->andWhere('id_man="'.$car_man.'"'); $query->andWhere('id_man="'.$car_man.'"');
} }
if($phone != '') { if($phone != '') {
$query = $query->andWhere('link_phone="'.$phone.'"'); $query->andWhere('link_phone="'.$phone.'"');
} }
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere('car_no="'.$car_no.'"'); $query->andWhere('car_no="'.$car_no.'"');
} }
if($send_date != '') { if($send_date != '') {
$query = $query->andWhere('send_date="'.$send_date.'"'); $query->andWhere('send_date="'.$send_date.'"');
} }
if($insurer_no != '') { if($insurer_no != '') {
$query = $query->andWhere('(insurer1_no="'.$insurer_no.'" or insurer2_no="'.$insurer_no.'")'); $query->andWhere('(insurer1_no="'.$insurer_no.'" or insurer2_no="'.$insurer_no.'")');
} }
//添加正本日期 //添加正本日期
if($begin_date != '') { if($begin_date != '') {
$query = $query->andWhere('print_date>="'.$begin_date.'"'); $query->andWhere('print_date>="'.$begin_date.'"');
} }
if($end_date != '') { if($end_date != '') {
$query = $query->andWhere('print_date<="'.$end_date.'"'); $query->andWhere('print_date<="'.$end_date.'"');
} }
//添加完成状态 //添加完成状态
if($status == 2) { if($status == 2) {
$query = $query->andWhere('order_caiwu_t.status_id=10 or order_caiwu_t.status_id=13'); $query->andWhere('order_caiwu_t.status_id=10 or order_caiwu_t.status_id=13');
} else if($status == 1) { } else if($status == 1) {
$query = $query->andWhere('order_caiwu_t.status_id=12'); $query->andWhere('order_caiwu_t.status_id=12');
} else { } else {
$query = $query->andWhere('order_caiwu_t.status_id=13 or order_caiwu_t.status_id=10 or order_caiwu_t.status_id=12'); $query->andWhere('order_caiwu_t.status_id=13 or order_caiwu_t.status_id=10 or order_caiwu_t.status_id=12');
} }
//转账状态 //转账状态
if($caiwu_status_id > 0){ if($caiwu_status_id > 0){
switch($caiwu_status_id){ switch($caiwu_status_id){
case 1: case 1:
$query = $query->andWhere('order_caiwu_t.caiwu_status_id=1'); $query->andWhere('order_caiwu_t.caiwu_status_id=1');
break; break;
case 2: case 2:
$query = $query->andWhere('order_caiwu_t.caiwu_status_id=2'); $query->andWhere('order_caiwu_t.caiwu_status_id=2');
break; break;
case 3: case 3:
$query = $query->andWhere('order_caiwu_t.caiwu_status_id=3'); $query->andWhere('order_caiwu_t.caiwu_status_id=3');
break; break;
case 4: case 4:
$query = $query->andWhere('order_caiwu_t.caiwu_status_id=4'); $query->andWhere('order_caiwu_t.caiwu_status_id=4');
break; break;
default: default:
break; break;
@ -2729,13 +2729,10 @@ class InsurerController extends BaseController
$userSql = ''; $userSql = '';
$user_items = $this->my->getChildren($userSql); $user_items = $this->my->getChildren($userSql);
if($this->my->username == '6002')
$user_items = $this->my->getChildren($userSql,1);
$user_items[] = $this->my; $user_items[] = $this->my;
$row = array(); $row = array();
foreach($user_items as $user_info) { foreach($user_items as $user_info) {
// if ($user_info->is_leave == 1) continue;
if ($group_id > 0) { if ($group_id > 0) {
if (!in_array($user_info->group_id, $group_ids)) { if (!in_array($user_info->group_id, $group_ids)) {
continue; continue;
@ -2748,43 +2745,23 @@ class InsurerController extends BaseController
//加上级别筛选 //加上级别筛选
if($group_id > 0){ if($group_id > 0){
// $query = $query->andWhere('order_t.company_id='.$company_id);
$query = $query->andWhere(['in','order_t.user_id',$row]); $query = $query->andWhere(['in','order_t.user_id',$row]);
// $query = $query->andWhere('caiwu_t.user_id ="' . $group_id . '"');
} }
// if($this->my->username == 'admin')
// echo $query->createCommand()->rawSql;
// echo $query->createCommand()->rawSql;
// die;
$total = $query->count(); $total = $query->count();
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$caiwu_status = CaiwuStatusT::find()->all(); $data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();
$row['user'] = $item->user?$item->user->getShowName():'';
$data['rows'][] = $row;
}
return $this->render('finance-mng',[ return $data;
'items' => $items,
'car_man' => $car_man,
'phone' => $phone,
'car_no' => $car_no,
'send_date' => $send_date,
'page' => $page,
'page_info' => $page_info,
'insurer_no' => $insurer_no,
'status' => $status,
'caiwu_status_id' => $caiwu_status_id,
'caiwu_status' => $caiwu_status,
'begin_date' => $begin_date,
'group_id' => $group_id,
'group_items' => $group_items,
'end_date' => $end_date
]);
} }
/** /**
@ -3968,8 +3945,13 @@ class InsurerController extends BaseController
]); ]);
} }
public function actionMyReturnList() public function actionMyReturnList() {
return $this->render('my-return-list');
}
public function actionMyReturnListJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_man = $request->get('car_man'); $car_man = $request->get('car_man');
$phone = $request->get('phone'); $phone = $request->get('phone');
@ -3978,8 +3960,8 @@ class InsurerController extends BaseController
$date_end = $request->get('date_end'); $date_end = $request->get('date_end');
$date2_begin = $request->get('date2_begin'); $date2_begin = $request->get('date2_begin');
$date2_end = $request->get('date2_end'); $date2_end = $request->get('date2_end');
$page = $request->get('page',1); $offset = $request->get('offset',0);
if($page < 1) $page = 1; $limit = $request->get('limit',10);
$query = OrderT::find() $query = OrderT::find()
->where('status_id=1 and return_status_id>0') ->where('status_id=1 and return_status_id>0')
@ -4018,26 +4000,19 @@ class InsurerController extends BaseController
//echo $query->createCommand()->rawSql; //echo $query->createCommand()->rawSql;
$total = $query->count(); $total = $query->count();
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); $query = $query->offset($offset)->limit($limit);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$page_info = MyLib::getPageInfo($pagination); $data = [];
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();
$row['return_time'] = date('Y-m-d H:i:s', $item->return_time);
$data['rows'][] = $row;
}
return $this->render('my-return-list',[ return $data;
'items' => $items,
'car_man' => $car_man,
'phone' => $phone,
'car_no' => $car_no,
'page' => $page,
'page_info' => $page_info,
'date_begin'=>$date_begin,
'date_end'=>$date_end,
'date2_begin'=>$date2_begin,
'date2_end'=>$date2_end
]);
} }
public function actionMyReturnListInfo() public function actionMyReturnListInfo()
@ -5144,5 +5119,93 @@ class InsurerController extends BaseController
} }
return $result; return $result;
} }
public function actionGiftSave()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result = array();
$result['success'] = false;
$result['msg'] = '保存失败';
if ($request->isPost) {
$id = $request->post('order_id', 0);
$gift_ids = $request->post('gift_ids', []);
$quan_ids = $request->post('quan_ids', []);
$order_info = OrderT::findOne($id);
if ($order_info->gift_status > 0) {
$result['msg'] = '礼品不能修改';
return $result;
}
if (!isset($order_info->print_date)) {
$result['msg'] = '正本还没有生成,不能确认礼品';
return $result;
}
$tran = OrderT::getDb()->beginTransaction();
try {
// OrderGiftT::deleteAll('order_id=' . $order_info->id . ' and gift_src is null');
OrderGiftT::deleteAll('order_id=' . $order_info->id);
//礼品
foreach($gift_ids as $gift_str) {
$tmp = explode('-', $gift_str);
$zhongjigift_item = ZhongjiGiftT::findOne(['id'=>$tmp[0]]);
$gift_id = $tmp[1];
$gift_item = GiftT::findOne(['id'=>$gift_id]);
if($zhongjigift_item && $gift_item) {
$row = new OrderGiftT();
$row->order_id = $order_info->id;
$row->group_id = 0;
$row->gift_id = $gift_id;
$row->is_free = $zhongjigift_item->free_type;
$row->gift_type = $zhongjigift_item->gift_type;
$row->send_id = 0;
$row->send_time = 0;
$row->price = $gift_item->price;
$row->status = 0;
if (!$row->save()) {
throw new \Exception(print_r($row->getErrors(), true));
}
}
}
//礼券
foreach($quan_ids as $gift_str) {
$tmp = explode('-', $gift_str);
$zhongjigift_item = ZhongjiGiftT::findOne(['id'=>$tmp[0]]);
$gift_id = $tmp[1];
$gift_item = GiftT::findOne(['id'=>$gift_id]);
if($zhongjigift_item && $gift_item) {
$row = new OrderGiftT();
$row->order_id = $order_info->id;
$row->group_id = 0;
$row->gift_id = $gift_id;
$row->is_free = $zhongjigift_item->free_type;
$row->gift_type = $zhongjigift_item->gift_type;
$row->send_id = 0;
$row->send_time = 0;
$row->price = $gift_item->price;
$row->status = 0;
if (!$row->save()) {
throw new \Exception(print_r($row->getErrors(), true));
}
}
}
$order_info->gift_status = 1;
if(!$order_info->save()) {
throw new \Exception(print_r($order_info->getErrors(), true));
}
$result['success'] = true;
$result['msg'] = '保存成功';
$tran->commit();
} catch (\Exception $e) {
$tran->rollBack();
$result['msg'] = $e->getMessage();
}
}
return $result;
}
} }

@ -5,6 +5,7 @@ namespace frontend\controllers;
use common\models\GiftT; use common\models\GiftT;
use common\models\OrderGiftT;
use common\models\UserT; use common\models\UserT;
use common\models\ZhongjiFanxianT; use common\models\ZhongjiFanxianT;
use common\models\ZhongjiGiftT; use common\models\ZhongjiGiftT;
@ -326,10 +327,9 @@ class MarketingStrategyController extends UserBaseController
foreach($gifts as $gift) { foreach($gifts as $gift) {
$tmp_row = []; $tmp_row = [];
$tmp_row['id'] = $gift->id; $tmp_row['id'] = $gift->id;
if($gift->free_type == 1) $tmp_row['free_type'] = '免费模式';
if($gift->free_type == 2) $tmp_row['free_type'] = '收费模式';
if($gift->free_type == 3) $tmp_row['free_type'] = 'M选'.$gift->n.'模式';
$tmp_row['gifts'] = json_decode($gift->gift_ids,true); $tmp_row['gifts'] = json_decode($gift->gift_ids,true);
if($gift->free_type == 1) $tmp_row['free_type'] = '免费模式-'.count($tmp_row['gifts']).'选'.$gift->n;
if($gift->free_type == 2) $tmp_row['free_type'] = '收费模式-'.count($tmp_row['gifts']).'选'.$gift->n;
$row['gifts'][] = $tmp_row; $row['gifts'][] = $tmp_row;
} }
//礼券 //礼券
@ -340,10 +340,9 @@ class MarketingStrategyController extends UserBaseController
foreach($gifts as $gift) { foreach($gifts as $gift) {
$tmp_row = []; $tmp_row = [];
$tmp_row['id'] = $gift->id; $tmp_row['id'] = $gift->id;
if($gift->free_type == 1) $tmp_row['free_type'] = '免费模式';
if($gift->free_type == 2) $tmp_row['free_type'] = '收费模式';
if($gift->free_type == 3) $tmp_row['free_type'] = 'M选'.$gift->n.'模式';
$tmp_row['gifts'] = json_decode($gift->gift_ids,true); $tmp_row['gifts'] = json_decode($gift->gift_ids,true);
if($gift->free_type == 1) $tmp_row['free_type'] = '免费模式-'.count($tmp_row['gifts']).'选'.$gift->n;
if($gift->free_type == 2) $tmp_row['free_type'] = '收费模式-'.count($tmp_row['gifts']).'选'.$gift->n;
$row['quans'][] = $tmp_row; $row['quans'][] = $tmp_row;
} }
$data[] = $row; $data[] = $row;
@ -456,4 +455,142 @@ class MarketingStrategyController extends UserBaseController
$result['msg'] = '删除成功'; $result['msg'] = '删除成功';
return $result; return $result;
} }
public function actionGetYingxiao() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '没有合适的策略';
$total1_clear = $request->post('total1_clear', 0);
$car_no = $request->post('car_no');
$car_use_id = $request->post('car_use_id', 0);
$company2_id = $request->post('company2_id', 0);
$date = date('Y-m-d H:i:s');
$yingxiao_item = ZhongjiYingxiao::find()
->where('begin_date<=:begin_date and end_date>=:end_date',[':begin_date'=>$date,':end_date'=>$date])
->orderBy('id desc')
->one();
if(!$yingxiao_item) {
return $result;
}
$items = ZhongjiTiaojian::find()
->where('celuo_id=:celuo_id and type=1',[':celuo_id'=>$yingxiao_item->id])
->all();
$ids = [];
foreach($items as $item) {
$flag = false;
//车牌
if($item->car_type_id != '') {
$car_type_ids = explode(',',$item->car_type_id);
$tmp_type_id = 1;
if(mb_substr($car_no, 0, 1, 'utf-8') != '京')
$tmp_type_id = 2;
if(in_array($tmp_type_id, $car_type_ids)) {
$flag = true;
}
}
//保险公司
if($item->company_ids != '') {
$company_ids = explode(',',$item->company_ids);
if(in_array($company2_id, $company_ids)) {
$flag = true;
}
}
//车辆使用类型
if($item->car_use_id != '') {
$car_use_ids = explode(',',$item->car_use_id);
if(in_array($car_use_id, $car_use_ids)) {
$flag = true;
}
}
//新保、续保
if($item->type_ids != '') {
$type_ids = explode(',',$item->type_ids);
$tmp_type_id = 1;
if($car_no->xubao_num > 0)
$tmp_type_id = 2;
if(in_array($tmp_type_id, $type_ids)) {
$flag = true;
}
}
if($flag) {
$ids[] = $item->id;
}
}
$result['success'] = true;
$result['ids'] = join(',',$ids);
$result['celuo_id'] = $yingxiao_item->id;
return $result;
}
public function actionSelectFanxian() {
$request = Yii::$app->request;
$ids = explode(',', $request->get('ids'));
$items = ZhongjiFanxianT::find()
->where(['id'=>$ids])
->all();
return $this->render('select-fanxian', [
'items' => $items
]);
}
public function actionGetFanxian() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '没有可选返现';
$fanxian_id = $request->get('fanxian_id', 0);
$fanxian_item = ZhongjiFanxianT::findOne(['id'=>$fanxian_id]);
if($fanxian_item) {
$result['fanxian_rate'] = $fanxian_item->fanxian_rate / 100;
$result['max_fanxian'] = $fanxian_item->max_cashback;
}
$result['success'] = true;
$result['msg'] = '获取成功';
return $result;
}
public function actionGetGifts() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '没有可选项目';
$fanxian_id = $request->get('fanxian_id', 0);
$type = $request->get('type', 0);
$order_id = $request->get('order_id', 0);
$order_gift_items = OrderGiftT::find()
->where(['order_id'=>$order_id,'gift_type'=>$type])
->all();
$order_gift_ids = [];
foreach($order_gift_items as $order_gift_item) {
$order_gift_ids[] = $order_gift_item->gift_id;
}
$gifts = ZhongjiGiftT::find()
->where(['fanxian_id'=>$fanxian_id,'gift_type'=>$type])
->all();
foreach($gifts as $gift) {
$tmp_row = [];
$tmp_row['id'] = $gift->id;
$tmp_row['gifts'] = json_decode($gift->gift_ids,true);
if($gift->free_type == 1) $tmp_row['free_type'] = '免费模式-'.count($tmp_row['gifts']).'选'.$gift->n;
if($gift->free_type == 2) $tmp_row['free_type'] = '收费模式-'.count($tmp_row['gifts']).'选'.$gift->n;
foreach($tmp_row['gifts'] as $index => $gift_info) {
if(in_array($gift_info['id'], $order_gift_ids)) {
$tmp_row['gifts'][$index]['selected'] = 1;
} else {
$tmp_row['gifts'][$index]['selected'] = 0;
}
}
$result['success'] = true;
$result['gifts'][] = $tmp_row;
}
return $result;
}
} }

@ -9,34 +9,34 @@ use \common\libs\MyLib;
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-content"> <div class="ibox-content">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-sm-12">
<form role="form" class="form-horizontal data-from" id="theFrm"> <form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="car_id" value="<?=$car_id?>"> <input type="hidden" name="car_id" value="<?=$car_id?>">
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">预约日期</label> <label class="col-sm-1 control-label">预约日期</label>
<div class="col-md-5"> <div class="col-sm-5">
<div class="input-group date"> <div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" name="pdate" class="form-control" value=""> <input type="text" name="pdate" class="form-control" value="" autocomplete="off">
</div> </div>
</div> </div>
<label class="col-md-1 control-label">预约时间</label> <label class="col-sm-1 control-label">预约时间</label>
<div class="col-md-5"> <div class="col-sm-5">
<div class="input-group clockpicker" data-autoclose="true"> <div class="input-group clockpicker" data-autoclose="true">
<input type="text" name="ptime" class="form-control" value="09:30"> <input type="text" name="ptime" class="form-control" value="09:30" autocomplete="off">
<span class="input-group-addon"><span class="fa fa-clock-o"></span></span> <span class="input-group-addon"><span class="fa fa-clock-o"></span></span>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">备注</label> <label class="col-sm-1 control-label">备注</label>
<div class="col-md-11"> <div class="col-sm-11">
<textarea name="remark" id="remark" class="form-control"></textarea> <textarea name="remark" id="remark" class="form-control"></textarea>
</div> </div>
</div> </div>
<div> <div>
<div class="row"> <div class="row">
<div class="col-md-5 col-md-offset-5"> <div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button"> <button class="btn btn-primary btn-save" type="button">
<strong>添 加</strong> <strong>添 加</strong>
</button> </button>

@ -9,18 +9,18 @@ use \common\libs\MyLib;
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-content"> <div class="ibox-content">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-sm-12">
<form role="form" class="form-horizontal data-from" id="theFrm"> <form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="id" value="<?=intval($info->id)?>"> <input type="hidden" name="id" value="<?=intval($info->id)?>">
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">名称</label> <label class="col-sm-1 control-label">名称</label>
<div class="col-md-6"> <div class="col-sm-6">
<input type="text" name="name" value="<?=$info->name?>" class="form-control"> <input type="text" name="name" value="<?=$info->name?>" class="form-control">
</div> </div>
</div> </div>
<div> <div>
<div class="row"> <div class="row">
<div class="col-md-5 col-md-offset-5"> <div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button"> <button class="btn btn-primary btn-save" type="button">
<strong><?=$info ? '保 存':'添 加'?></strong> <strong><?=$info ? '保 存':'添 加'?></strong>
</button> </button>

@ -9,35 +9,35 @@ use \common\libs\MyLib;
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-content"> <div class="ibox-content">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-sm-12">
<form role="form" class="form-horizontal data-from" id="theFrm"> <form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="car_id" value="<?=$car_id?>"> <input type="hidden" name="car_id" value="<?=$car_id?>">
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">名称</label> <label class="col-sm-1 control-label">名称</label>
<div class="col-md-5"> <div class="col-sm-5">
<input type="text" name="name" class="form-control" value=""> <input type="text" name="name" class="form-control" value="">
</div> </div>
<label class="col-md-1 control-label">电话</label> <label class="col-sm-1 control-label">电话</label>
<div class="col-md-5"> <div class="col-sm-5">
<input type="text" name="phone" class="form-control" value=""> <input type="text" name="phone" class="form-control" value="">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">证件类型</label> <label class="col-sm-1 control-label">证件类型</label>
<div class="col-md-5"> <div class="col-sm-5">
<select name="id_type" class="form-control"> <select name="id_type" class="form-control">
<option value="身份证">身份证</option> <option value="身份证">身份证</option>
<option value="营业执照">营业执照</option> <option value="营业执照">营业执照</option>
</select> </select>
</div> </div>
<label class="col-md-1 control-label">证件号码</label> <label class="col-sm-1 control-label">证件号码</label>
<div class="col-md-5"> <div class="col-sm-5">
<input type="text" name="id_number" class="form-control" value=""> <input type="text" name="id_number" class="form-control" value="">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">关系</label> <label class="col-sm-1 control-label">关系</label>
<div class="col-md-5"> <div class="col-sm-5">
<select name="type" class="form-control"> <select name="type" class="form-control">
<option value="其他联系人">其他联系人</option> <option value="其他联系人">其他联系人</option>
<option value="车主">车主</option> <option value="车主">车主</option>
@ -48,7 +48,7 @@ use \common\libs\MyLib;
</div> </div>
<div> <div>
<div class="row"> <div class="row">
<div class="col-md-5 col-md-offset-5"> <div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button"> <button class="btn btn-primary btn-save" type="button">
<strong>添 加</strong> <strong>添 加</strong>
</button> </button>

@ -11,6 +11,110 @@ use common\models\PriceT;
<form class="form-horizontal" id="orderFrm"> <form class="form-horizontal" id="orderFrm">
<input type="hidden" name="car_id" value="<?=$order_info->car_id?>"> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<input type="hidden" name="id" value="<?=$order_info->id?>"> <input type="hidden" name="id" value="<?=$order_info->id?>">
<input type="hidden" name="celuo_id" id="celuo_id" value="">
<input type="hidden" name="fanxian_id" id="fanxian_id" value="">
<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>
<input type="text" id="insurer1_begin_date" name="insurer1_begin_date" class="form-control" value="<?=$order_info->insurer1_begin_date?>" autocomplete="off">
</td>
<th class="bg-warning" nowrap>交强起保日期</th>
<td>
<input type="text" id="insurer2_begin_date" name="insurer2_begin_date" class="form-control" value="<?=$order_info->insurer2_begin_date?>" autocomplete="off">
</td>
<th class="bg-warning">保险公司</th>
<td>
<select name="company2_id" id="company2_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->company2_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<th class="bg-warning">车辆使用性质</th>
<td class="form-inline" nowrap>
<select name="car_use_id" id="car_use_id" class="form-control">
<option value="0">---请选择---</option>
<?php
foreach($car_use_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $order_info->car->car_use_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>险种</h5> <h5>险种</h5>
@ -94,16 +198,16 @@ use common\models\PriceT;
<td><input name="total2_clear" id="total2_clear" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total2_clear?>"></td> <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> <th class="bg-warning">交强含税总保费</th>
<td><input name="total2" id="total2" class="form-control" style="width:120px;" type="text" value="<?=$order_info->total2?>"></td> <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> <th class="bg-warning">业务自付金额</th>
<td>&nbsp;</td> <td><input name="yuangong_money" id="yuangong_money" class="form-control" style="width:120px;" type="text" value="<?=$order_info->yuangong_money?>"></td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning">折扣后商业净保费</th> <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> <td><input name="total1_real" id="total1_real" class="form-control" readonly style="width:120px;" type="text" value="<?=$order_info->total1_real?>"></td>
<th class="bg-warning">减免金额</th> <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> <td><input name="total1_dis" id="total1_dis" class="form-control" readonly style="width:120px;" type="text" value="<?=$order_info->total1_dis?>"></td>
<th class="bg-warning">商业折扣率</th> <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> <td><input name="total1_percent" id="total1_percent" class="form-control" readonly style="width:120px;" type="text" value="<?=$order_info->total1_percent?>"></td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning">共计签单</th> <th class="bg-warning">共计签单</th>
@ -138,111 +242,16 @@ use common\models\PriceT;
</table> </table>
</div> </div>
</div> </div>
<div id="gifts">
</div>
<div id="quans">
</div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>订单信息</h5> <h5>其他信息</h5>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<table class="table table-bordered"> <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>
<input type="text" id="insurer1_begin_date" name="insurer1_begin_date" class="form-control" value="<?=$order_info->insurer1_begin_date?>" autocomplete="off">
</td>
<th class="bg-warning" nowrap>交强起保日期</th>
<td>
<input type="text" id="insurer2_begin_date" name="insurer2_begin_date" class="form-control" value="<?=$order_info->insurer2_begin_date?>" autocomplete="off">
</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> <tr>
<th class="bg-warning">领款人</th> <th class="bg-warning">领款人</th>
<td><input name="money_man" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_man?>"></td> <td><input name="money_man" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_man?>"></td>
@ -250,26 +259,8 @@ use common\models\PriceT;
<td><input name="money_bank" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_bank?>"></td> <td><input name="money_bank" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_bank?>"></td>
<th class="bg-warning">银行账号</th> <th class="bg-warning">银行账号</th>
<td><input name="money_no" class="form-control" style="width:100%;" type="text" value="<?=$order_info->money_no?>"></td> <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>
<tr> <tr>
<th class="bg-warning" nowrap>送单日期</th>
<td>
<input type="text" id="send_date" name="send_date" class="form-control" value="<?=$order_info->send_date?>" autocomplete="off">
</td>
<th class="bg-warning">送单地址</th> <th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline"> <td colspan="5" class="form-inline">
<select name="send_city_id" class="form-control"> <select name="send_city_id" class="form-control">
@ -321,15 +312,111 @@ use common\models\PriceT;
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<script> <script>
layui.use(['laydate'], function(){
var laydate = layui.laydate;
laydate.render({
elem:'#insurer1_begin_date',
format: 'yyyy-MM-dd'
});
laydate.render({
elem:'#insurer2_begin_date',
format: 'yyyy-MM-dd'
});
});
var o = {}; var o = {};
var fanxian_rate = 0, max_fanxian = 0;
function getYingXiao() { function getYingXiao() {
layer.msg('操作成功'); parent.layer.msg('操作成功');
var params = $('#orderFrm').serialize(); var params = $('#orderFrm').serialize();
$.post('/marketing-strategy/select-yingxiao', params, function(obj) { $.post('/marketing-strategy/get-yingxiao', params, function(obj) {
if(obj.success) {
$('#celuo_id').val(obj.celuo_id);
layer_show('选择策略', '/marketing-strategy/select-fanxian?ids=' + obj.ids);
} else {
parent.layer.msg(obj.msg);
}
}, 'json');
}
function selectFanxian(fanxian_id) {
$('#fanxian_id').val(fanxian_id);
getGifts(fanxian_id);
$.get('/marketing-strategy/get-fanxian?fanxian_id=' + fanxian_id, function(obj) {
if(obj.success) { if(obj.success) {
layer.msg('操作成功'); fanxian_rate = obj.fanxian_rate;
max_fanxian = obj.max_fanxian;
calc();
}
}, 'json');
}
function getGifts(fanxian_id) {
$.get('/marketing-strategy/get-gifts?type=1&order_id=<?=$order_info->id?>&fanxian_id=' + fanxian_id, function(obj){
if(obj.success) {
var html = '<div class="ibox float-e-margins">';
html += '<div class="ibox-title">';
html += '<h5>礼品</h5>';
html += '</div>';
html += '<div class="ibox-content">';
obj.gifts.forEach(function(item, index) {
html += '<table class="table table-bordered">';
html += '<tr>';
html += '<th class="bg-warning">' + item.free_type + '</th>';
html += '</tr>';
html += '<tr>';
html += '<td>';
item.gifts.forEach(function(sub_item, sub_index) {
html += '<div class="checkbox checkbox-inline">';
html += '<input type="checkbox" id="gift_' + item.id + '_' + sub_item.id + '" name="gift_ids[]" value="' + item.id + '-' + sub_item.id + '"';
if(sub_item.selected == 1)
html += ' checked ';
html += '>';
html += '<label for="gift_' + item.id + '_' + sub_item.id + '">' + sub_item.name + '</label>';
html += '</div>';
});
html += '</td>';
html += '</tr>';
html += '</table>';
});
html += '</div>';
html += '</div>';
$('#gifts').html(html);
} else {
parent.layer.msg(obj.msg);
}
}, 'json');
$.get('/marketing-strategy/get-gifts?type=2&order_id=<?=$order_info->id?>&fanxian_id=' + fanxian_id, function(obj){
if(obj.success) {
var html = '<div class="ibox float-e-margins">';
html += '<div class="ibox-title">';
html += '<h5>礼券</h5>';
html += '</div>';
html += '<div class="ibox-content">';
obj.gifts.forEach(function(item, index) {
html += '<table class="table table-bordered">';
html += '<tr>';
html += '<th class="bg-warning">' + item.free_type + '</th>';
html += '</tr>';
html += '<tr>';
html += '<td>';
item.gifts.forEach(function(sub_item, sub_index) {
html += '<div class="checkbox checkbox-inline">';
html += '<input type="checkbox" id="gift_' + item.id + '_' + sub_item.id + '" name="gift_ids[]" value="' + item.id + '-' + sub_item.id + '"';
if(sub_item.selected == 1)
html += ' checked ';
html += '>';
html += '<label for="gift_' + item.id + '_' + sub_item.id + '">' + sub_item.name + '</label>';
html += '</div>';
});
html += '</td>';
html += '</tr>';
html += '</table>';
});
html += '</div>';
html += '</div>';
$('#quans').html(html);
} else {
parent.layer.msg(obj.msg);
} }
}, 'json'); }, 'json');
} }
@ -354,14 +441,13 @@ use common\models\PriceT;
var total1_percent = Number($('#total1_percent').val()); var total1_percent = Number($('#total1_percent').val());
var total_all = Number($('#total_all').val()); var total_all = Number($('#total_all').val());
var total_real = Number($('#total_real').val()); var total_real = Number($('#total_real').val());
total1 = 1.06 * total1_clear; var yuangong_money = Number($('#yuangong_money').val());
total2 = 1.06 * total2_clear;
total_all = total1 + total2 + total3; total_all = total1 + total2 + total3;
total1_dis = total1_clear - total1_real; total1_real = total1_clear * ( 1 - fanxian_rate);
total_real = total_all - total1_dis; total1_dis = total1_clear * fanxian_rate;
total_real = total_all - total1_dis - yuangong_money;
total1_percent = parseFloat(total1_real/total1_clear); total1_percent = parseFloat(total1_real/total1_clear);
$('#total1').val(total1.toFixed(2)); $('#total1_real').val(total1_real.toFixed(2));
$('#total2').val(total2.toFixed(2));
$('#total1_dis').val(total1_dis.toFixed(2)); $('#total1_dis').val(total1_dis.toFixed(2));
$('#total1_percent').val(total1_percent.toFixed(2)); $('#total1_percent').val(total1_percent.toFixed(2));
$('#total_all').val(total_all.toFixed(2)); $('#total_all').val(total_all.toFixed(2));
@ -380,34 +466,26 @@ use common\models\PriceT;
} }
$(function() { $(function() {
getGifts(<?=$order_info->fanxian_id?>);
$('#total1_clear').blur(function(){ $('#total1_clear').blur(function(){
$('#total1').val(($(this).val() * 1.06).toFixed(2));
calc(); calc();
refreshCompanyGift();
}); });
$('#total2_clear').blur(function(){ $('#total1').blur(function(){
$('#total1_clear').val(($(this).val()/1.06).toFixed(2));
calc(); calc();
}); });
$('#total3').blur(function(){ $('#total2_clear').blur(function(){
$('#total2').val(($(this).val() * 1.06).toFixed(2));
calc(); calc();
}); });
$('#total1_dis').blur(function(){ $('#total2').blur(function(){
$('#total2_clear').val(($(this).val()/1.06).toFixed(2));
calc(); calc();
}); });
$('#total1_real').blur(function(){ $('#yuangong_money').blur(function(){
calc(); calc();
}); });
laydate({
elem:'#send_date',
format: 'YYYY-MM-DD'
});
laydate({
elem:'#insurer1_begin_date',
format: 'YYYY-MM-DD'
});
laydate({
elem:'#insurer2_begin_date',
format: 'YYYY-MM-DD'
});
//生成短信内容 //生成短信内容
$('.sms-make-btn').click(function(){ $('.sms-make-btn').click(function(){

@ -1,184 +1,79 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<?php $this->beginBlock('header_css'); ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<form id="searchForm"> <?php $this->endBlock(); ?>
<tr>
<td class="td_bg"> <div class="wrapper wrapper-content animated fadeInRight">
<!--新增搜索项--> <div class="ibox float-e-margins">
<div class="ibox-title">
保险类型:<select name="insurer_type"> <h5>补点设置</h5>
<option value="0" >所有类型</option> <div class="ibox-tools">
<option value="1" <?= $insurer_type == 1 ? 'selected': ''?>>商业险</option> <a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<option value="2" <?= $insurer_type == 2 ? 'selected': ''?>>交强险</option> <i class="fa fa-refresh"></i> 刷新
</select> </a>
车牌类型:<select name="car_no_type"> </div>
<option value="0" >所有类型</option> </div>
<option value="1" <?= $car_no_type == 1 ? 'selected': ''?>>京牌</option> <div class="ibox-content">
<option value="2" <?= $car_no_type == 2 ? 'selected': ''?>>非京牌</option> <form role="form" class="form-inline" onsubmit="return search();">
<option value="3" <?= $car_no_type == 3 ? 'selected': ''?>>特殊车辆</option> <div class="form-group" style="margin-bottom: 8px;">
</select> <label for="name">补点比例</label>
保险公司:<select name="company_id"> <input type="text" id="name" name="name" class="form-control">
<option value="0">所有公司</option> </div>
<?php <button type="submit" class="btn btn-primary mb-8">计算</button>
foreach($company_items as $item) { </form>
echo '<option value="'.$item->id.'"'; <div class="row">
if($item->id == $company_id) <div class="col-md-12">
echo ' selected '; <table id="listTable">
echo '>'.$item->name.'</option>'; <thead>
} <tr>
?> <th data-field="id">ID</th>
</select> <th data-field="car_no">车牌号</th>
<th data-field="id_man">被保险人</th>
<!--日期--> <th data-field="company_name">保险公司</th>
出单日期: <th data-field="insurer_no">保单号</th>
<input type="Text" class="Wdate" name="begin_date" onclick="WdatePicker()" value="<?= $begin_date ?>" /> <th data-field="print_date">出单日期</th>
-- <th data-field="total_clear">商业净保费</th>
<input type="Text" class="Wdate" name="end_date" onclick="WdatePicker()" value="<?= $end_date ?>" /> <th data-field="insurer_type">保险类型</th>
&nbsp;&nbsp;商业净保费: <th data-field="budian_rate">补点比例</th>
<input type="Text" class="" name="begin_totalclear" " value="<?= $begin_totalclear ?>" /> <th data-field="budian_money">补点金额</th>
-- </tr>
<input type="Text" class="" name="end_totalclear" " value="<?= $end_totalclear?>" /> </thead>
</table>
</div>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> </div>
</td> </div>
</tr> </div>
</div>
</table>
<?php $this->beginBlock('footer_js'); ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <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>
<tr> function refreshList() {
<td class="td_bg"> $('#listTable').bootstrapTable('refresh');
<!--新增搜索项-->
<!--完成程度-->
补点比例:<input name="budian_rate" type="text" value="<?=$budian_rate?>">
<input type="button" class="act_btn" id="save-btn" name="jisuan-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 align="center" class="bg_tr">车牌号</td>
<td align="center" class="bg_tr">被保险人</td>
<td align="center" class="bg_tr">保险公司</td>
<td align="center" class="bg_tr">保单号</td>
<td align="center" class="bg_tr">出单日期</td>
<td align="center" class="bg_tr">商业净保费</td>
<td align="center" class="bg_tr">保险类型</td>
<td align="center" class="bg_tr">补点比例</td>
<td align="center" class="bg_tr">补点金额</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = $index;
$total_real = $item->total * $item->total_rate/100;
$total_clear_real = $item->total_clear * $item->total_rate/100;
$total_dis = round($total_clear_real - $item->r_total,2);
$order_caiwu_info = $item->orderCaiwu;
$order_info = $item->order;
$car_info = $order_info->car;
?>
<tr style="height:24px;" 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->car_no?></td>
<td align="center" class="td_bg" nowrap><?=$item->id_man?></td>
<td align="center" class="td_bg" nowrap><?=$order_info && $order_info->company ? $order_info->company->name:''?></td>
<td align="center" class="td_bg" nowrap><?=$item->insurer_no?></td>
<td align="center" class="td_bg" nowrap><?=$order_info ? $order_info->print_date : ''?></td>
<td align="center" class="td_bg" nowrap><?=$item->total_clear?></td>
<td align="center" class="td_bg" nowrap><?=$item->insurer_type == 1?'商业':'交强'?></td>
<td align="center" class="td_bg" nowrap><?=$item->budian_rate?></td>
<td align="center" class="td_bg" nowrap><?=$item->budian_money?></td>
</tr>
<?php
} }
?>
<tr>
<td align="center" class="td_bg" nowrap>合计</td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=$total1_clear_all?></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=$total_money_all?></td>
</tr>
<tr>
<td height="25" colspan="10" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>
<link href="/css/fSelect.css" rel="stylesheet" type="text/css">
<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/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>
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js?v=2019"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
<script src="/js/fSelect.js"></script>
<script type="text/javascript" language="javascript" src="/js/artDialog/artDialog.js?skin=default"></script>
<script type="text/javascript" language="javascript" src="/js/artDialog/plugins/iframeTools.source.js"></script>
<script type="text/javascript" language="javascript">
function edit(id) {
var params = $('#searchForm').serialize();
window.location.href = '/finance/receipt-info?id=' + id + '&back_params=' + encodeURIComponent(params);
}
$(function () { function search() {
$('#listTable').bootstrapTable('destroy');
//搜索 $('#listTable').bootstrapTable({
$("#search-btn").click(function(){ url: "/finance/budian-list-json",
$('#page').val(0); pagination: true,
var params = $('#searchForm').serialize(); sidePagination: 'server',
window.location.href = "/finance/budian-list?" + params; queryParams: function(params) {
}); params.type_id = $('#type_id').val();
params.name = $('#name').val();
return params;
$("#save-btn").click(function(){ }
var last_url = '/finance/budian-save';
var params = $("#searchForm").serialize();
$.get(last_url,params,function(obj){
alert(obj.msg);
if(obj.success){
window.location.href = "/finance/budian-list?" + params;
}
},'json');
}); });
return false;
}
$(function() {
search();
}) });
</script> </script>
<?php $this->endBlock(); ?>

@ -15,14 +15,13 @@ use \common\libs\MyLib;
<div class="col-md-12"> <div class="col-md-12">
<form role="form" class="form-horizontal data-from" id="theFrm"> <form role="form" class="form-horizontal data-from" id="theFrm">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-1">图片</label> <label class="control-label col-sm-1">文件</label>
<div id="uploader" class="wu-example col-sm-10 col-md-10"> <div class="col-sm-8">
<div class="col-sm-6"> <div class="input-group">
<input type="text" name="file" id="file" value="" class="form-control"> <input type="text" name="file" id="file" class="form-control" value="">
</div> <a href="javascript:void(0);" class="input-group-addon" id="upload">
<div class="col-sm-6"> 上传文件
<div id="picker" style="float: left;">选择文件</div> </a>
<div id="ctlBtn" class="btn btn-primary" style="margin-left:5px; height: 38px">开始上传</div>
</div> </div>
</div> </div>
</div> </div>
@ -45,6 +44,23 @@ use \common\libs\MyLib;
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/webuploader/webuploader.min.js"></script> <script src="/assets/js/plugins/webuploader/webuploader.min.js"></script>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
layui.use(['upload'], function(){
var upload = layui.upload;
var uploadInst = upload.render({
elem: '#upload' //绑定元素
,url: '/common/upload' //上传接口
,accept: 'file'
,done: function(res){
//上传完毕回调
if(res.status == 'SUCCESS') {
$('#file').val(res.fileUrl);
}
}
,error: function(){
//请求异常回调
}
});
});
$(function () { $(function () {
//上传 //上传
$('#fileupload').fileupload({ $('#fileupload').fileupload({
@ -74,61 +90,5 @@ use \common\libs\MyLib;
}); });
}); });
}) })
var uploader = WebUploader.create({
auto:false,
// swf文件路径
swf: "/assets/js/plugins/webuploader/Uploader.swf) ",
// 文件接收服务端。
server: "/common/upload",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
pick: {
id:'#picker',
multiple:false //限制多文件上传
},
accept:{
title:'Excel',
extentions: "xls,xlsx"
},
fileVal:"img",
fileNumLimit: 1
});
uploader.on( 'fileQueued', function( file ) {
//删除错误的第一个文件
$("#picker").on("click",function () {
uploader.removeFile(file);
})
});
//点击上传
$("#ctlBtn").on("click",function () {
uploader.upload();
})
// 文件上传成功,给item添加成功class, 用样式标记上传成功。
uploader.on( 'uploadSuccess', function( file , msg ) {
$( '#'+file.id ).addClass('upload-state-done');
// 把服务器返回的图片地址保存到隐藏域
if(msg.status ="SUCCESS"){
layer.msg('上传成功',{icon:1,time:2000});
$('input[name=file]').val( msg.fileUrl );
}else{
layer.msg("上传失败",{icon:2,time:3000});
}
});
// 文件上传失败,显示上传出错。
uploader.on( 'uploadError', function( file ) {
var $li = $( '#'+file.id ),
$error = $li.find('div.error');
// 避免重复创建
if ( !$error.length ) {
$error = $('<div class="error"></div>').appendTo( $li );
}
$error.text('上传失败');
});
</script> </script>
<?php $this->endBlock('footer_js'); ?> <?php $this->endBlock('footer_js'); ?>

@ -0,0 +1,85 @@
<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<link rel="stylesheet" type="text/css" href="/assets/css/plugins/webuploader/webuploader.css">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="row">
<div class="col-sm-12">
<form role="form" class="form-horizontal data-from" id="theFrm">
<div class="form-group">
<label class="control-label col-sm-2">导入文件</label>
<div class="col-sm-6">
<div class="input-group">
<input type="text" name="urlfile" id="urlfile" class="form-control" value="">
<a href="javascript:void(0);" class="input-group-addon" id="upload">
上传文件
</a>
</div>
</div>
</div>
<div>
<div class="row">
<div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong>导 入</strong>
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/webuploader/webuploader.min.js"></script>
<script type="text/javascript" language="javascript">
layui.use(['upload'], function(){
var upload = layui.upload;
var uploadInst = upload.render({
elem: '#upload' //绑定元素
,url: '/common/upload' //上传接口
,accept: 'file'
,done: function(res){
//上传完毕回调
if(res.status == 'SUCCESS') {
$('#urlfile').val(res.fileUrl);
}
}
,error: function(){
//请求异常回调
}
});
});
$(function () {
//提交按钮
$(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/finance/receipt-process',params,function(obj){
if(obj.success) {
parent.layer.msg('保存成功');
parent.refreshList();
layer_close();
} else {
parent.layer.msg(data.msg);
}
},'json');
}, function(){
//
});
});
})
</script>
<?php $this->endBlock('footer_js'); ?>

@ -1,263 +1,108 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<link rel="stylesheet" href="/js/fileupload/css/jquery.fileupload.css"> <?php $this->beginBlock('header_css'); ?>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<form id="theFrm"> <?php $this->endBlock(); ?>
<tr>
<td align="center" width="100" height="25" class="td_bg">导入类型</td>
<td height="25" class="td_bg">手续费导入</td>
</tr>
<tr>
<td align="center" width="100" height="25" class="td_bg">保险公司</td>
<td height="25" class="td_bg">
<select name="company">
<option>人保</option>
<option>太平洋</option>
</select>
</td>
</tr>
<tr>
<td align="center" width="100" height="25" class="td_bg">批对日期</td>
<td height="25" class="td_bg">
<input type="text" name="urlfile" id="urlfile" style="width: 300px;">
<input id="fileupload" type="file" name="file">
</td>
</tr>
</form>
<tr>
<td height="22" colspan="2" align="center" class="td_bg">
<input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>
&nbsp;&nbsp;
<input type="button" class="ACT_btn" name="Submit3" value=" 刷新 " onclick="window.location.reload();">
</td>
</tr>
</table>
<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>
<option value=3 <?= $status==3?'selected':'' ?>>匹配差额</option>
</select>
保单号:<input name="insurer_no" type="text" value="<?=$insurer_no?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
工号:<input name="username" type="text" value="<?=$username?>">
<!--日期-->
出单日期:
<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 ?>" />
回单日期:
<input type="Text" class="Wdate" name="r_begin_date" onclick="WdatePicker()" value="<?= $r_begin_date ?>" />
--
<input type="Text" class="Wdate" name="r_end_date" onclick="WdatePicker()" value="<?= $r_end_date ?>" />
保险公司:<select name="company_id">
<option value="0">所有模型</option>
<?php
foreach($company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
级别:<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>
排序:
<select name="sort_key">
<option value="0">请选择</option>
<option value="print_date" <?= $sort_key == 'print_date' ? 'selected' : ''?>>出单日期</option>
<option value="total" <?= $sort_key == 'total' ? 'selected' : ''?>>商业总保费</option>
<option value="total_clear" <?= $sort_key == 'total_clear' ? 'selected' : ''?>>商业净保费</option>
<option value="total_rate" <?= $sort_key == 'total_rate' ? 'selected' : ''?>>手续费比例</option>
</select>
<select name="sort_value">
<option value="0">请选择</option>
<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="搜索">
<!-- <input type="button" class="act_btn" id="output-btn" name="output-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 align="center" class="bg_tr">车牌号</td>
<td align="center" class="bg_tr">被保险人</td>
<td align="center" class="bg_tr">保险公司</td>
<td align="center" class="bg_tr">工号</td>
<td align="center" class="bg_tr">级别</td>
<td align="center" class="bg_tr">付款人</td>
<td align="center" class="bg_tr">保单号</td>
<td align="center" class="bg_tr">提单日期</td>
<td align="center" class="bg_tr">出单日期</td>
<td align="center" class="bg_tr">商业总保费</td>
<td align="center" class="bg_tr">商业净保费</td>
<td align="center" class="bg_tr">手续费比例</td>
<td align="center" class="bg_tr">应得金额</td>
<td align="center" class="bg_tr">实得金额</td>
<td align="center" class="bg_tr">税差</td>
<td align="center" class="bg_tr">回款金额</td>
<td align="center" class="bg_tr">回款差额</td>
<td align="center" class="bg_tr">回款日期</td>
<td align="center" class="bg_tr">编辑</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = ($page-1)*20+$index;
$order = $item->order;
$users=$item->user->group;
$username=$item->user;
$uname=$username['name'];
$nams=$users['name'];
$total_real = $item->total * $item->total_rate/100; <div class="wrapper wrapper-content animated fadeInRight">
$total_clear_real = $item->total_clear * $item->total_rate/100; <div class="ibox float-e-margins">
$total_dis = round($total_clear_real - $item->r_total,2); <div class="ibox-title">
?> <h5>回单匹配</h5>
<tr style="height:24px;" onMouseOver="overColor(this)" onMouseOut="outColor(this)"> <div class="ibox-tools">
<td align="center" class="td_bg" nowrap><?=$start_index+1?></td> <a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="importDlg()">
<td align="center" class="td_bg" nowrap><?=$item->car_no?></td> <i class="fa fa-plus"></i> 手续费导入
<td align="center" class="td_bg" nowrap><?=$item->id_man?></td> </a>
<td align="center" class="td_bg" nowrap><?=$order && $order->company ? $order->company->name:''?></td> <a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<td align="center" class="td_bg" nowrap><?=$item->user->username?></td> <i class="fa fa-refresh"></i> 刷新
<td align="center" class="td_bg" nowrap><?=$uname?>-<?=$nams?></td> </a>
<td align="center" class="td_bg" nowrap><?=$order && $order->payer? MyLib::payers($order->payer):''?></td> </div>
<td align="center" class="td_bg" nowrap><?=$item->insurer_no?></td> </div>
<td align="center" class="td_bg" nowrap><?=$order ? $order->submit_date : ''?></td> <div class="ibox-content">
<td align="center" class="td_bg" nowrap><?=$order ? $order->print_date : ''?></td> <form role="form" class="form-inline" onsubmit="return search();">
<td align="center" class="td_bg" nowrap><?=$item->total?></td> <div class="form-group" style="margin-bottom: 8px;">
<td align="center" class="td_bg" nowrap><?=$item->total_clear?></td> <label for="name">名称</label>
<td align="center" class="td_bg" nowrap><?=$item->total_rate?></td> <input type="text" id="name" name="name" class="form-control">
<td align="center" class="td_bg" nowrap><?=sprintf("%.2f",$total_real)?></td> </div>
<td align="center" class="td_bg" nowrap><?=sprintf("%.2f",$total_clear_real)?></td> <button type="submit" class="btn btn-primary mb-8">搜索</button>
<td align="center" class="td_bg" nowrap><?=sprintf("%.2f",$total_real - $total_clear_real)?></td> </form>
<td align="center" class="td_bg" nowrap><?=$item->r_total?></td> <div class="row">
<td align="center" class="td_bg" nowrap><?=$item->total_dis?></td> <div class="col-md-12">
<td align="center" class="td_bg" nowrap><?=$item->r_date?></td> <table id="listTable">
<td align="center" class="td_bg" nowrap> <thead>
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">维护</a>] <tr>
</td> <th data-field="id">ID</th>
</tr> <th data-field="car_no">车牌号</th>
<?php <th data-field="id_man">被保险人</th>
} <th data-field="company_name">保险公司</th>
?> <th data-field="username">工号</th>
<tr> <th data-field="nams">级别</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="payer">付款人</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="insurer_no">保单号</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="submit_date">提单日期</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="print_date">出单日期</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="total">商业总保费</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="total_clear">商业净保费</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="total_rate">手续费比例</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="total_real">应得金额</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="total_clear_real">实得金额</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="total_real_dis">税差</th>
<td align="center" class="td_bg" nowrap><?=number_format($sum_total,2)?></td> <th data-field="r_total">回款金额</th>
<td align="center" class="td_bg" nowrap><?=number_format($sum_total_clear,2)?></td> <th data-field="r_total_dis">回款差额</th>
<td align="center" class="td_bg" nowrap></td> <th data-field="r_date">回款日期</th>
<td align="center" class="td_bg" nowrap></td> <th data-formatter="opFormatter">操作</th>
<td align="center" class="td_bg" nowrap></td> </tr>
<td align="center" class="td_bg" nowrap></td> </thead>
<td align="center" class="td_bg" nowrap><?=number_format($sum_r_total,2)?></td> </table>
<td align="center" class="td_bg" nowrap><?=number_format($sum_total_dis,2)?></td> </div>
<td align="center" class="td_bg" nowrap></td> </div>
<td align="center" class="td_bg" nowrap></td> </div>
<!-- <td align="center" class="td_bg" nowrap></td>--> </div>
</tr> </div>
<tr>
<td height="25" colspan="20" align="center" class="td_bg"><?=$page_info?></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/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" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript">
//编辑
function edit(id) {
var params = $('#searchForm').serialize();
window.location.href = '/finance/receipt-info?id=' + id + '&back_params=' + encodeURIComponent(params);
}
$(function () {
//上传按钮
$('#upload-btn').click(function(){
$('#fileupload').click();
});
//提交按钮 <?php $this->beginBlock('footer_js'); ?>
$("#submit-btn").click(function(){ <script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
if(confirm('是否确认提交?')) { <script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
var urlfile = $("#urlfile").val(); <script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
var import_type = $(".import_type").val(); <script>
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">');
opStr.push('<i class="fa fa-edit" title="编辑"></i>');
opStr.push('</a>');
if(urlfile == ''){ return opStr.join(' ');
alert('请先选择文件!'); }
return false; function importDlg(id) {
} var title = '手续费导入';
var last_url = '/finance/receipt-process'; layer_show(title, '/finance/receipt-import');
var params = $("#theFrm").serialize(); }
function edit(id) {
var title = '详情';
layer_show(title, '/finance/receipt-info?id=' + id);
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
$.post(last_url,params,function(obj){ function search() {
alert(obj.msg); $('#listTable').bootstrapTable('destroy');
if(obj.success){ $('#listTable').bootstrapTable({
$('#theFrm')[0].reset(); url: "/finance/receipt-json",
window.location.reload(); pagination: true,
} sidePagination: 'server',
},'json'); queryParams: function(params) {
} params.type_id = $('#type_id').val();
}); params.name = $('#name').val();
//上传 return params;
$('#fileupload').fileupload({
url: '/finance/receipt-upload',
dataType: 'json',
done: function (e, data) {
var file_info = data.result.files[0];
$('#urlfile').val(file_info.url);
$('#submit-btn').removeAttr('disabled');
} }
}); });
//搜索 return false;
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/finance/receipt?" + params;
});
//导出
$("#output-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/finance/receipt-output?" + params;
});
})
</script>
<style>
input[type="text"] {
width: 134px;
} }
</style> $(function() {
search();
});
</script>
<?php $this->endBlock(); ?>

@ -9,16 +9,16 @@ use \common\libs\MyLib;
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-content"> <div class="ibox-content">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-sm-12">
<form role="form" class="form-horizontal data-from" id="theFrm"> <form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="id" value="<?=intval($info->id)?>"> <input type="hidden" name="id" value="<?=intval($info->id)?>">
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">名称</label> <label class="col-sm-1 control-label">名称</label>
<div class="col-md-3"> <div class="col-sm-3">
<input type="text" name="name" value="<?=$info->name?>" class="form-control"> <input type="text" name="name" value="<?=$info->name?>" class="form-control">
</div> </div>
<label class="col-md-1 control-label">所属分类</label> <label class="col-sm-2 control-label">所属分类</label>
<div class="col-md-3"> <div class="col-sm-2">
<select name="type_id" class="form-control"> <select name="type_id" class="form-control">
<option value="0">---请选择---</option> <option value="0">---请选择---</option>
<option value="1" <?=$info->type_id==1?'selected':''?>>实物礼品</option> <option value="1" <?=$info->type_id==1?'selected':''?>>实物礼品</option>
@ -28,38 +28,41 @@ use \common\libs\MyLib;
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-1">图片</label> <label class="control-label col-sm-1">图片</label>
<div id="uploader" class="wu-example col-sm-10 col-md-6"> <div class="col-sm-8">
<input type="hidden" name="img" id="img" value="<?=$info->original_img?>"> <div class="input-group">
<!--预览--> <input type="text" name="img" id="img" class="form-control" value="<?=$info->original_img?>">
<div id="preview" class="uploader-list" style="margin-bottom: 3px"><img src="<?=$info->original_img?>" alt="" class="img-responsive"></div> <a href="javascript:void(0);" class="input-group-addon" id="upload">
<div id="picker" class="col-sm-5 col-md-3">选择文件</div> 上传文件
<div id="ctlBtn" class="btn btn-primary" style="height: 40px">开始上传</div> </a>
  <span class="require_red font-size">图片尺寸255x255,透明背景</span> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">价格</label> <label class="col-sm-1 control-label">价格</label>
<div class="col-md-3"> <div class="col-sm-2">
<input type="text" name="price" value="<?=$info->price?>" class="form-control"> <div class="input-group">
<input type="text" name="price" value="<?=$info->price?>" class="form-control">
<div class="input-group-addon"></div>
</div>
</div> </div>
<label class="col-md-1 control-label">使用次数</label> <label class="col-sm-3 control-label">使用次数</label>
<div class="col-md-3"> <div class="col-sm-2">
<input type="text" name="use_num" value="<?=$info->use_num?>" class="form-control"> <input type="text" name="use_num" value="<?=$info->use_num?>" class="form-control">
</div> </div>
<label class="col-md-1 control-label">总数量</label> <label class="col-sm-1 control-label">总数量</label>
<div class="col-md-3"> <div class="col-sm-2">
<input type="text" name="total" value="<?=$info->total?>" class="form-control"> <input type="text" name="total" value="<?=$info->total?>" class="form-control">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">描述</label> <label class="col-sm-1 control-label">描述</label>
<div class="col-md-6"> <div class="col-sm-10">
<textarea name="remark" class="form-control"><?=$info->remark?></textarea> <textarea name="remark" class="form-control"><?=$info->remark?></textarea>
</div> </div>
</div> </div>
<div> <div>
<div class="row"> <div class="row">
<div class="col-md-5 col-md-offset-5"> <div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button"> <button class="btn btn-primary btn-save" type="button">
<strong><?=$info ? '保 存':'添 加'?></strong> <strong><?=$info ? '保 存':'添 加'?></strong>
</button> </button>
@ -76,6 +79,24 @@ use \common\libs\MyLib;
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/webuploader/webuploader.min.js"></script> <script src="/assets/js/plugins/webuploader/webuploader.min.js"></script>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
layui.use(['upload'], function(){
var upload = layui.upload;
var uploadInst = upload.render({
elem: '#upload' //绑定元素
,url: '/common/upload' //上传接口
,accept: 'file'
,done: function(res){
//上传完毕回调
if(res.status == 'SUCCESS') {
$('#img').val(res.fileUrl);
}
}
,error: function(){
//请求异常回调
}
});
});
$(function () { $(function () {
//提交按钮 //提交按钮
$(".btn-save").click(function(){ $(".btn-save").click(function(){
@ -98,76 +119,5 @@ use \common\libs\MyLib;
}); });
}); });
}) })
var uploader = WebUploader.create({
auto:false,
// swf文件路径
swf: "/assets/js/plugins/webuploader/Uploader.swf) ",
// 文件接收服务端。
server: "/common/upload",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
pick: {
id:'#picker',
multiple:false //限制多文件上传
},
accept:{
title:'Images',
extentions: "png,jpeg,jpg",
mimeTypes: 'image/jpg,image/jpeg,image/png'
},
formData:{
'_token':'{{csrf_token()}}'//laravel框架必不可少的
},
fileVal:"img",
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
resize: false,
fileNumLimit: 1
});
uploader.on( 'fileQueued', function( file ) {
// 创建缩略图
// 如果为非图片文件,可以不用调用此方法。
uploader.makeThumb( file, function( error, src ) {
if ( error ) {
layer.msg('不能预览');
return;
}
$("#preview").html("<img src='"+src+"'>");
}, 100, 100 );
//删除错误的第一个文件
$("#picker").on("click",function () {
uploader.removeFile(file);
})
});
//点击上传
$("#ctlBtn").on("click",function () {
uploader.upload();
})
// 文件上传成功,给item添加成功class, 用样式标记上传成功。
uploader.on( 'uploadSuccess', function( file , msg ) {
$( '#'+file.id ).addClass('upload-state-done');
// 把服务器返回的图片地址保存到隐藏域
if(msg.status ="SUCCESS"){
layer.msg('上传成功',{icon:1,time:2000});
$('input[name=img]').val( msg.fileUrl );
}else{
layer.msg("上传失败",{icon:2,time:3000});
}
});
// 文件上传失败,显示上传出错。
uploader.on( 'uploadError', function( file ) {
var $li = $( '#'+file.id ),
$error = $li.find('div.error');
// 避免重复创建
if ( !$error.length ) {
$error = $('<div class="error"></div>').appendTo( $li );
}
$error.text('上传失败');
});
</script> </script>
<?php $this->endBlock('footer_js'); ?> <?php $this->endBlock('footer_js'); ?>

@ -19,24 +19,20 @@ use \common\libs\MyLib;
</div> </div>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<form role="form" class="form-horizontal" onsubmit="return search();"> <form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<label class="control-label col-md-1">礼品类型</label> <label for="free_type">礼品类型</label>
<div class="col-md-2"> <select id="is_leave" name="is_leave" class="form-control">
<select id="is_leave" name="is_leave" class="form-control"> <option value="">全部</option>
<option value="">全部</option> <option value="1">实名礼品</option>
<option value="1">实名礼品</option> <option value="2">礼券</option>
<option value="2">礼券</option> </select>
</select>
</div>
<label class="control-label col-md-1">名称</label>
<div class="col-md-2">
<input type="text" id="name" name="name" class="form-control">
</div>
<div class="col-md-3">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</div> </div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">名称</label>
<input type="text" id="name" name="name" class="form-control">
</div>
<button type="submit" class="btn btn-primary mb-8">搜索</button>
</form> </form>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">

@ -96,8 +96,6 @@ use \common\models\PriceT;
<td class="td_bg"><?=$order_info->link_phone?></td> <td class="td_bg"><?=$order_info->link_phone?></td>
</tr> </tr>
<tr> <tr>
<td class="bg_tr">送单日期</td>
<td class="td_bg"><?=$order_info->send_date?></td>
<td class="bg_tr">保险公司</td> <td class="bg_tr">保险公司</td>
<td class="td_bg"><?=$order_info->company?$order_info->company->name:''?></td> <td class="td_bg"><?=$order_info->company?$order_info->company->name:''?></td>
<td class="bg_tr">付款方式</td> <td class="bg_tr">付款方式</td>
@ -124,21 +122,7 @@ use \common\models\PriceT;
<tr> <tr>
<td class="bg_tr">送单地址</td> <td class="bg_tr">送单地址</td>
<td colspan="3" class="td_bg"> <td colspan="3" class="td_bg">
<?=$order_info->direction1?$order_info->direction1->name:''?> <?=$order_info->send_address?>
<?=$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">
<?=$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?>
</td> </td>
</tr> </tr>
</table> </table>

@ -8,7 +8,7 @@ use \common\libs\MyLib;
<div class="wrapper wrapper-content animated fadeInRight"> <div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>我的提单</h5> <h5>返现管理</h5>
<div class="ibox-tools"> <div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> <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> 刷新 <i class="fa fa-refresh"></i> 刷新
@ -75,7 +75,7 @@ use \common\libs\MyLib;
return opStr.join(' '); return opStr.join(' ');
} }
function view(id) { function view(id) {
window.location.href = '/insurer/office-mng-edit?id=' + id; window.location.href = '/insurer/finance-mng-edit?id=' + id;
} }
function refreshList() { function refreshList() {
$('#listTable').bootstrapTable('refresh'); $('#listTable').bootstrapTable('refresh');
@ -84,7 +84,7 @@ use \common\libs\MyLib;
function search() { function search() {
$('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({ $('#listTable').bootstrapTable({
url: "/insurer/office-mng-json", url: "/insurer/finance-mng-json",
pagination: true, pagination: true,
sidePagination: 'server', sidePagination: 'server',
multipleSelectRow: true, multipleSelectRow: true,

@ -11,6 +11,87 @@ use common\models\PriceT;
<form class="form-horizontal" id="orderFrm"> <form class="form-horizontal" id="orderFrm">
<input type="hidden" name="car_id" value="<?=$order_info->car_id?>"> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<input type="hidden" name="order_id" value="<?=$order_info->id?>"> <input type="hidden" name="order_id" value="<?=$order_info->id?>">
<input type="hidden" name="fanxian_id" value="<?=$order_info->fanxian_id?>">
<input type="hidden" name="celuo_id" value="<?=$order_info->celuo_id?>">
<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>
</td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>险种</h5> <h5>险种</h5>
@ -93,84 +174,16 @@ use common\models\PriceT;
</table> </table>
</div> </div>
</div> </div>
<div id="gifts">
</div>
<div id="quans">
</div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>订单信息</h5> <h5>其他信息</h5>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<table class="table table-bordered"> <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> <tr>
<th class="bg-warning">领款人</th> <th class="bg-warning">领款人</th>
<td><label><?=$order_info->money_man?></label></td> <td><label><?=$order_info->money_man?></label></td>
@ -178,16 +191,8 @@ use common\models\PriceT;
<td><label><?=$order_info->money_bank?></label></td> <td><label><?=$order_info->money_bank?></label></td>
<th class="bg-warning">银行账号</th> <th class="bg-warning">银行账号</th>
<td><label><?=$order_info->money_no?></label></td> <td><label><?=$order_info->money_no?></label></td>
<th class="bg-warning" nowrap>成功理由</th>
<td>
<label><?=$order_info->success->name?></label>
</td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning" nowrap>送单日期</th>
<td>
<label><?=$order_info->send_date?></label>
</td>
<th class="bg-warning">送单地址</th> <th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline"> <td colspan="5" class="form-inline">
<label><?=$order_info->sendCity->name?></label> <label><?=$order_info->sendCity->name?></label>
@ -197,12 +202,17 @@ use common\models\PriceT;
</tr> </tr>
<tr> <tr>
<th class="bg-warning">备注</th> <th class="bg-warning">备注</th>
<td colspan="7"><label><?=$order_info->remark?></label></td> <td colspan="5"><label><?=$order_info->remark?></label></td>
</tr> </tr>
</table> </table>
<div> <div>
<div class="row"> <div class="row">
<div class="col-md-5 col-md-offset-4"> <div class="col-md-5 col-md-offset-4">
<?php if($order_info->gift_status == 0) { ?>
<button type="button" class="btn btn-primary btn-save" type="button">
<strong>确认礼品</strong>
</button>
<?php } ?>
<button type="button" class="btn btn-primary btn-back" type="button"> <button type="button" class="btn btn-primary btn-back" type="button">
<strong>返 回</strong> <strong>返 回</strong>
</button> </button>
@ -217,6 +227,86 @@ use common\models\PriceT;
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script> <script>
function getGifts(fanxian_id) {
$.get('/marketing-strategy/get-gifts?type=1&order_id=<?=$order_info->id?>&fanxian_id=' + fanxian_id, function(obj){
if(obj.success) {
var html = '<div class="ibox float-e-margins">';
html += '<div class="ibox-title">';
html += '<h5>礼品</h5>';
html += '</div>';
html += '<div class="ibox-content">';
obj.gifts.forEach(function(item, index) {
html += '<table class="table table-bordered">';
html += '<tr>';
html += '<th class="bg-warning">' + item.free_type + '</th>';
html += '</tr>';
html += '<tr>';
html += '<td>';
item.gifts.forEach(function(sub_item, sub_index) {
<?php if($order_info->gift_status == 0) { ?>
html += '<div class="checkbox checkbox-inline">';
html += '<input type="checkbox" id="gift_' + item.id + '_' + sub_item.id + '" name="gift_ids[]" value="' + item.id + '-' + sub_item.id + '"';
if(sub_item.selected == 1)
html += ' checked ';
html += '>';
html += '<label for="gift_' + item.id + '_' + sub_item.id + '">' + sub_item.name + '</label>';
html += '</div>';
<?php } else { ?>
if(sub_item.selected == 1)
html += '<div class="col-sm-4">' + sub_item.name + '</div>';
<?php } ?>
});
html += '</td>';
html += '</tr>';
html += '</table>';
});
html += '</div>';
html += '</div>';
$('#gifts').html(html);
} else {
parent.layer.msg(obj.msg);
}
}, 'json');
$.get('/marketing-strategy/get-gifts?type=2&order_id=<?=$order_info->id?>&fanxian_id=' + fanxian_id, function(obj){
if(obj.success) {
var html = '<div class="ibox float-e-margins">';
html += '<div class="ibox-title">';
html += '<h5>礼券</h5>';
html += '</div>';
html += '<div class="ibox-content">';
obj.gifts.forEach(function(item, index) {
html += '<table class="table table-bordered">';
html += '<tr>';
html += '<th class="bg-warning">' + item.free_type + '</th>';
html += '</tr>';
html += '<tr>';
html += '<td>';
item.gifts.forEach(function(sub_item, sub_index) {
<?php if($order_info->gift_status == 0) { ?>
html += '<div class="checkbox checkbox-inline">';
html += '<input type="checkbox" id="gift_' + item.id + '_' + sub_item.id + '" name="gift_ids[]" value="' + item.id + '-' + sub_item.id + '"';
if(sub_item.selected == 1)
html += ' checked ';
html += '>';
html += '<label for="gift_' + item.id + '_' + sub_item.id + '">' + sub_item.name + '</label>';
html += '</div>';
<?php } else { ?>
if(sub_item.selected == 1)
html += '<div class="col-sm-4">' + sub_item.name + '</div>';
<?php } ?>
});
html += '</td>';
html += '</tr>';
html += '</table>';
});
html += '</div>';
html += '</div>';
$('#quans').html(html);
} else {
parent.layer.msg(obj.msg);
}
}, 'json');
}
var o = {}; var o = {};
//判断是否填写了选项 //判断是否填写了选项
function isNull(data){ function isNull(data){
@ -232,6 +322,29 @@ use common\models\PriceT;
$('.btn-back').click(function() { $('.btn-back').click(function() {
window.location.href = '/insurer/my-list'; window.location.href = '/insurer/my-list';
}); });
getGifts(<?=$order_info->fanxian_id?>);
$('.btn-save').click(function () {
parent.layer.confirm('注意:一旦确认礼品修改,则无法修改更换礼品??', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
parent.layer.confirm('再次确认修改礼品?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $('#orderFrm').serialize();
$.post('/insurer/gift-save',params,function(data) {
parent.layer.msg(data.msg);
window.location.reload();
}, 'json');
}, function(){
//
});
}, function(){
//
});
});
}); });
</script> </script>
<?php $this->endBlock(); ?> <?php $this->endBlock(); ?>

@ -43,7 +43,7 @@ use \common\libs\MyLib;
<th data-field="total_all">共计签单</th> <th data-field="total_all">共计签单</th>
<th data-field="total_real">应收</th> <th data-field="total_real">应收</th>
<th data-field="status_name">状态</th> <th data-field="status_name">状态</th>
<th>礼品状态</th> <th data-field="gift_status_name">礼品状态</th>
<th data-field="user_name">业务员</th> <th data-field="user_name">业务员</th>
<th data-field="lock_name">当前操作</th> <th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th> <th data-formatter="opFormatter">操作</th>

@ -1,70 +1,96 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript"> <div class="wrapper wrapper-content animated fadeInRight">
//详情 <div class="ibox float-e-margins">
function info(id,index) { <div class="ibox-title">
var params = $('#searchForm').serialize(); <h5>我的退单</h5>
window.location.href = '/car/info?id=' + id + '&type=4' + '&next_index=' + index + '&back_params=' + encodeURIComponent(params); <div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<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="car_no">车牌号</th>
<th data-field="car_man">车主</th>
<th data-field="link_man">联系人</th>
<th data-field="link_man_phone">联系电话</th>
<th data-field="return_time">退回时间</th>
<th data-field="return_remark">备注</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(id) {
window.location.href = '/car/info?id=' + id;
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
} }
$(function(){ function search() {
$("#search-btn").click(function(){ $('#listTable').bootstrapTable('destroy');
$('#page').val(0); $('#listTable').bootstrapTable({
var params = $('#searchForm').serialize(); url: "/insurer/my-return-list-json",
window.location.href = "/insurer/my-return-list?" + params; pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
出单日期:从<input name="date_begin" type="text" value="<?=$date_begin?>" style="width:100px;" onclick="WdatePicker()"><input name="date_end" type="text" value="<?=$date_end?>" style="width:100px;" onclick="WdatePicker()">截止
退单日期:从<input name="date2_begin" type="text" value="<?=$date2_begin?>" style="width:100px;" onclick="WdatePicker()"><input name="date2_end" type="text" value="<?=$date2_end?>" style="width:100px;" onclick="WdatePicker()">截止
车主:<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="30" align="center" class="bg_tr" nowrap>序号</td>
<td width="60" align="center" class="bg_tr" nowrap>车牌号</td>
<td width="50" align="center" class="bg_tr" nowrap>车主</td>
<td width="60" align="center" class="bg_tr" nowrap>联系人</td>
<td width="60" align="center" class="bg_tr" nowrap>联系电话</td>
<td width="60" align="center" class="bg_tr" nowrap>退回时间</td>
<td width="50%" align="center" class="bg_tr" nowrap>备注</td>
<td width="30" align="center" class="bg_tr" nowrap>操作</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"n owrap ><?=$start_index + 1?></td>
<td class="td_bg" nowrap><?=$item->car_no?></td>
<td class="td_bg" nowrap><?=$item->car_man?></td>
<td class="td_bg" nowrap><?=$item->link_man?></td>
<td class="td_bg" nowrap><?=$item->link_phone?></td>
<td class="td_bg" nowrap><?=date('Y-m-d H:i:s',$item->return_time)?></td>
<td class="td_bg" nowrap><?=$item->return_remark?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="info(<?=$item->car_id?>,<?=$start_index+1?>)">详情</a>]
</td>
</tr>
<?php
}
?>
<tr >
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>

@ -11,6 +11,88 @@ use common\models\PriceT;
<form class="form-horizontal" id="orderFrm"> <form class="form-horizontal" id="orderFrm">
<input type="hidden" name="car_id" value="<?=$order_info->car_id?>"> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<input type="hidden" name="order_id" value="<?=$order_info->id?>"> <input type="hidden" name="order_id" value="<?=$order_info->id?>">
<input type="hidden" name="celuo_id" value="<?=$order_info->celuo_id?>">
<input type="hidden" name="fanxian_id" value="<?=$order_info->fanxian_id?>">
<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>
<label><?=$order_info->car->carUse->name?></label>
</td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>险种</h5> <h5>险种</h5>
@ -67,8 +149,8 @@ use common\models\PriceT;
<td><label><?=$order_info->total2_clear?></label></td> <td><label><?=$order_info->total2_clear?></label></td>
<th class="bg-warning">交强含税总保费</th> <th class="bg-warning">交强含税总保费</th>
<td><label><?=$order_info->total2?></label></td> <td><label><?=$order_info->total2?></label></td>
<th class="bg-warning">&nbsp;</th> <th class="bg-warning">业务自付金额</th>
<td>&nbsp;</td> <td><label><?=$order_info->yuangong_money?></label></td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning">折扣后商业净保费</th> <th class="bg-warning">折扣后商业净保费</th>
@ -95,82 +177,10 @@ use common\models\PriceT;
</div> </div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>订单信息</h5> <h5>其他信息</h5>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<table class="table table-bordered"> <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> <tr>
<th class="bg-warning">领款人</th> <th class="bg-warning">领款人</th>
<td><label><?=$order_info->money_man?></label></td> <td><label><?=$order_info->money_man?></label></td>
@ -178,18 +188,13 @@ use common\models\PriceT;
<td><label><?=$order_info->money_bank?></label></td> <td><label><?=$order_info->money_bank?></label></td>
<th class="bg-warning">银行账号</th> <th class="bg-warning">银行账号</th>
<td><label><?=$order_info->money_no?></label></td> <td><label><?=$order_info->money_no?></label></td>
<th class="bg-warning" nowrap>成功理由</th> <th class="bg-warning" nowrap></th>
<td> <td>
<label><?=$order_info->success->name?></label>
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning" nowrap>送单日期</th>
<td>
<label><?=$order_info->send_date?></label>
</td>
<th class="bg-warning">送单地址</th> <th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline"> <td colspan="7" class="form-inline">
<label><?=$order_info->sendCity->name?></label> <label><?=$order_info->sendCity->name?></label>
<label><?=$order_info->sendDistrict->name?></label> <label><?=$order_info->sendDistrict->name?></label>
<label><?=$order_info->send_address?></label> <label><?=$order_info->send_address?></label>
@ -233,6 +238,16 @@ use common\models\PriceT;
<td><input name="pay_no" id="pay_no" class="form-control" type="text" value="<?=$order_info->pay_no?>"></td> <td><input name="pay_no" id="pay_no" class="form-control" type="text" value="<?=$order_info->pay_no?>"></td>
</tr> </tr>
</table> </table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>退回理由</h5>
</div>
<div class="ibox-content">
<div class="mb-8">
<textarea name="return_remark" id="return_remark" class="form-control"></textarea>
</div>
<div> <div>
<div class="row"> <div class="row">
<div class="col-md-5 col-md-offset-4"> <div class="col-md-5 col-md-offset-4">
@ -265,7 +280,6 @@ use common\models\PriceT;
var o = {}; var o = {};
//判断是否填写了选项 //判断是否填写了选项
function isNull(data){ function isNull(data){
if(data == "" || data == undefined || data == null){ if(data == "" || data == undefined || data == null){
return true; return true;
}else{ }else{
@ -285,6 +299,23 @@ use common\models\PriceT;
} }
$(function() { $(function() {
$('.btn-return').click(function(){
var remark = $('#return_remark').val();
if(remark === '') {
parent.layer.msg('请输入退回理由');
return;
}
$.post('/insurer/return-op',{
order_id:<?=$order_info->id?>,
return_remark:remark,
return_status_id:<?=$order_info->status_id?>
},function(obj){
parent.layer.msg(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
});
$('.btn-cancel').click(function(){ $('.btn-cancel').click(function(){
parent.layer.confirm('是否确认放弃处理?', { parent.layer.confirm('是否确认放弃处理?', {
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮
@ -295,7 +326,6 @@ use common\models\PriceT;
parent.layer.msg(obj.msg); parent.layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
$('.btn-back').click(); $('.btn-back').click();
} else {
} }
},'json'); },'json');
}, function(){ }, function(){

@ -41,11 +41,9 @@ use \common\libs\MyLib;
<th data-field="car_no">车牌号</th> <th data-field="car_no">车牌号</th>
<th data-field="factory_model">车型</th> <th data-field="factory_model">车型</th>
<th data-field="submit_date">提单日期</th> <th data-field="submit_date">提单日期</th>
<th data-field="send_date">送单日期</th>
<th data-field="total_all">共计签单</th> <th data-field="total_all">共计签单</th>
<th data-field="user_name">销售座席</th> <th data-field="user_name">销售座席</th>
<th data-field="status_name">状态</th> <th data-field="status_name">状态</th>
<th data-field="pay_type">支付方式</th>
<th data-field="lock_name">当前操作</th> <th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th> <th data-formatter="opFormatter">操作</th>
</tr> </tr>

@ -11,6 +11,88 @@ use common\models\PriceT;
<form class="form-horizontal" id="orderFrm"> <form class="form-horizontal" id="orderFrm">
<input type="hidden" name="car_id" value="<?=$order_info->car_id?>"> <input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<input type="hidden" name="order_id" value="<?=$order_info->id?>"> <input type="hidden" name="order_id" value="<?=$order_info->id?>">
<input type="hidden" name="celuo_id" value="<?=$order_info->celuo_id?>">
<input type="hidden" name="fanxian_id" value="<?=$order_info->fanxian_id?>">
<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>
<label><?=$order_info->car->carUse->name?></label>
</td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>险种</h5> <h5>险种</h5>
@ -67,8 +149,8 @@ use common\models\PriceT;
<td><label><?=$order_info->total2_clear?></label></td> <td><label><?=$order_info->total2_clear?></label></td>
<th class="bg-warning">交强含税总保费</th> <th class="bg-warning">交强含税总保费</th>
<td><label><?=$order_info->total2?></label></td> <td><label><?=$order_info->total2?></label></td>
<th class="bg-warning">&nbsp;</th> <th class="bg-warning">业务自付金额</th>
<td>&nbsp;</td> <td><label><?=$order_info->yuangong_money?></label></td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning">折扣后商业净保费</th> <th class="bg-warning">折扣后商业净保费</th>
@ -95,82 +177,10 @@ use common\models\PriceT;
</div> </div>
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>订单信息</h5> <h5>其他信息</h5>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<table class="table table-bordered"> <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> <tr>
<th class="bg-warning">领款人</th> <th class="bg-warning">领款人</th>
<td><label><?=$order_info->money_man?></label></td> <td><label><?=$order_info->money_man?></label></td>
@ -178,18 +188,13 @@ use common\models\PriceT;
<td><label><?=$order_info->money_bank?></label></td> <td><label><?=$order_info->money_bank?></label></td>
<th class="bg-warning">银行账号</th> <th class="bg-warning">银行账号</th>
<td><label><?=$order_info->money_no?></label></td> <td><label><?=$order_info->money_no?></label></td>
<th class="bg-warning" nowrap>成功理由</th> <th class="bg-warning" nowrap></th>
<td> <td>
<label><?=$order_info->success->name?></label>
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning" nowrap>送单日期</th>
<td>
<label><?=$order_info->send_date?></label>
</td>
<th class="bg-warning">送单地址</th> <th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline"> <td colspan="7" class="form-inline">
<label><?=$order_info->sendCity->name?></label> <label><?=$order_info->sendCity->name?></label>
<label><?=$order_info->sendDistrict->name?></label> <label><?=$order_info->sendDistrict->name?></label>
<label><?=$order_info->send_address?></label> <label><?=$order_info->send_address?></label>
@ -238,17 +243,55 @@ use common\models\PriceT;
</tr> </tr>
<tr> <tr>
<th class="bg-warning text-danger">商业保单文件</th> <th class="bg-warning text-danger">商业保单文件</th>
<td></td> <td>
<div class="input-group">
<input type="text" name="shangye_src" id="shangye_src" class="form-control" value="<?=$order_info->shangye_src?>">
<a href="javascript:void(0);" class="input-group-addon" id="upload1">
上传文件
</a>
</div>
</td>
<th class="bg-warning text-danger">商业发票文件</th> <th class="bg-warning text-danger">商业发票文件</th>
<td></td> <td>
<div class="input-group">
<input type="text" name="fapiao_src" id="fapiao_src" class="form-control" value="<?=$info->fapiao_src?>">
<a href="javascript:void(0);" class="input-group-addon" id="upload2">
上传文件
</a>
</div>
</td>
</tr> </tr>
<tr> <tr>
<th class="bg-warning text-danger">交强保单文件</th> <th class="bg-warning text-danger">交强保单文件</th>
<td></td> <td>
<div class="input-group">
<input type="text" name="jiaoqiang_src" id="jiaoqiang_src" class="form-control" value="<?=$info->jiaoqiang_src?>">
<a href="javascript:void(0);" class="input-group-addon" id="upload3">
上传文件
</a>
</div>
</td>
<th class="bg-warning text-danger">交强发票文件</th> <th class="bg-warning text-danger">交强发票文件</th>
<td></td> <td>
<div class="input-group">
<input type="text" name="jq_fapiao_src" id="jq_fapiao_src" class="form-control" value="<?=$info->jq_fapiao_src?>">
<a href="javascript:void(0);" class="input-group-addon" id="upload4">
上传文件
</a>
</div>
</td>
</tr> </tr>
</table> </table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>退回理由</h5>
</div>
<div class="ibox-content">
<div class="mb-8">
<textarea name="return_remark" id="return_remark" class="form-control"></textarea>
</div>
<div> <div>
<div class="row"> <div class="row">
<div class="col-md-5 col-md-offset-4"> <div class="col-md-5 col-md-offset-4">
@ -278,6 +321,66 @@ use common\models\PriceT;
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script> <script>
layui.use(['upload'], function(){
var upload = layui.upload;
var upload1 = upload.render({
elem: '#upload1' //绑定元素
,url: '/common/upload' //上传接口
,accept: 'file'
,done: function(res){
//上传完毕回调
if(res.status == 'SUCCESS') {
$('#shangye_src').val(res.fileUrl);
}
}
,error: function(){
//请求异常回调
}
});
var upload2 = upload.render({
elem: '#upload2' //绑定元素
,url: '/common/upload' //上传接口
,accept: 'file'
,done: function(res){
//上传完毕回调
if(res.status == 'SUCCESS') {
$('#fapiao_src').val(res.fileUrl);
}
}
,error: function(){
//请求异常回调
}
});
var upload3 = upload.render({
elem: '#upload3' //绑定元素
,url: '/common/upload' //上传接口
,accept: 'file'
,done: function(res){
//上传完毕回调
if(res.status == 'SUCCESS') {
$('#jiaoqiang_src').val(res.fileUrl);
}
}
,error: function(){
//请求异常回调
}
});
var upload4 = upload.render({
elem: '#upload4' //绑定元素
,url: '/common/upload' //上传接口
,accept: 'file'
,done: function(res){
//上传完毕回调
if(res.status == 'SUCCESS') {
$('#jq_fapiao_src').val(res.fileUrl);
}
}
,error: function(){
//请求异常回调
}
});
});
var o = {}; var o = {};
//判断是否填写了选项 //判断是否填写了选项
function isNull(data){ function isNull(data){
@ -301,6 +404,23 @@ use common\models\PriceT;
} }
$(function() { $(function() {
$('.btn-return').click(function(){
var remark = $('#return_remark').val();
if(remark === '') {
parent.layer.msg('请输入退回理由');
return;
}
$.post('/insurer/return-op',{
order_id:<?=$order_info->id?>,
return_remark:remark,
return_status_id:<?=$order_info->status_id?>
},function(obj){
parent.layer.msg(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
});
$('.btn-cancel').click(function(){ $('.btn-cancel').click(function(){
parent.layer.confirm('是否确认放弃处理?', { parent.layer.confirm('是否确认放弃处理?', {
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮

@ -41,10 +41,8 @@ use \common\libs\MyLib;
<th data-field="insurer1_no">商业保单号</th> <th data-field="insurer1_no">商业保单号</th>
<th data-field="insurer2_no">交强保单号</th> <th data-field="insurer2_no">交强保单号</th>
<th data-field="company_name">保险公司</th> <th data-field="company_name">保险公司</th>
<th data-field="sms_code">验证码</th>
<th data-field="user_name">销售座席</th> <th data-field="user_name">销售座席</th>
<th data-field="status_name">状态</th> <th data-field="status_name">状态</th>
<th data-field="pay_type">支付方式</th>
<th data-field="lock_name">当前操作</th> <th data-field="lock_name">当前操作</th>
<th data-formatter="opFormatter">操作</th> <th data-formatter="opFormatter">操作</th>
</tr> </tr>

@ -13,6 +13,7 @@ use yii\helpers\Html;
<title><?= Html::encode($this->title) ?></title> <title><?= Html::encode($this->title) ?></title>
<?=Html::csrfMetaTags() ?> <?=Html::csrfMetaTags() ?>
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
<link href="/assets/js/plugins/layui/css/layui.css" rel="stylesheet">
<link href="/assets/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> <link href="/assets/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="/assets/css/font-awesome.css?v=4.4.0" rel="stylesheet"> <link href="/assets/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> <link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
@ -29,6 +30,7 @@ use yii\helpers\Html;
<?php $this->beginBody() ?> <?php $this->beginBody() ?>
<?=$content ?> <?=$content ?>
<!-- 全局js --> <!-- 全局js -->
<script src="/assets/js/plugins/layui/layui.js"></script>
<script src="/assets/js/jquery.min.js?v=2.1.4"></script> <script src="/assets/js/jquery.min.js?v=2.1.4"></script>
<script src="/assets/js/bootstrap.min.js?v=3.3.6"></script> <script src="/assets/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/assets/js/plugins/iCheck/icheck.min.js"></script> <script src="/assets/js/plugins/iCheck/icheck.min.js"></script>
@ -36,7 +38,6 @@ use yii\helpers\Html;
<script src="/assets/js/plugins/layer/layer.min.js"></script> <script src="/assets/js/plugins/layer/layer.min.js"></script>
<!-- 自定义js --> <!-- 自定义js -->
<script src="/assets/js/content.js?v=1.0.0"></script> <script src="/assets/js/content.js?v=1.0.0"></script>
<!-- Bootstrap table --> <!-- Bootstrap table -->
<?php if (isset($this->blocks['footer_js'])): ?> <?php if (isset($this->blocks['footer_js'])): ?>
<?= $this->blocks['footer_js'] ?> <?= $this->blocks['footer_js'] ?>

@ -15,14 +15,13 @@ use \common\libs\MyLib;
<label class="col-sm-2 control-label">模式</label> <label class="col-sm-2 control-label">模式</label>
<div class="col-sm-4"> <div class="col-sm-4">
<select name="free_type" id="type" class="form-control"> <select name="free_type" id="type" class="form-control">
<option value="3">M选N模式</option>
<option value="2">收费模式</option> <option value="2">收费模式</option>
<option value="1">免费模式</option> <option value="1">免费模式</option>
</select> </select>
</div> </div>
<label class="col-sm-2 control-label">最大选择数</label>
<div class="col-sm-2"> <div class="col-sm-2">
<div class="input-group"> <div class="input-group">
<div class="input-group-addon">N=</div>
<input type="text" name="n" id="n" class="form-control"> <input type="text" name="n" id="n" class="form-control">
<div class="input-group-addon"></div> <div class="input-group-addon"></div>
</div> </div>
@ -33,13 +32,13 @@ use \common\libs\MyLib;
<div class="col-sm-9"> <div class="col-sm-9">
<div class="row"> <div class="row">
<?php foreach($items as $item) { ?> <?php foreach($items as $item) { ?>
<div class="col-sm-2 mb-8"> <div class="col-sm-3 mb-8">
<div class="checkbox checkbox-inline"> <div class="checkbox checkbox-inline">
<input type="checkbox" id="gift_id_<?=$item->id?>" name="gift_ids[]" value="<?=$item->id?>"> <input type="checkbox" id="gift_id_<?=$item->id?>" name="gift_ids[]" value="<?=$item->id?>">
<label for="gift_id_<?=$item->id?>"><?=$item->name?></label> <label for="gift_id_<?=$item->id?>"><?=$item->name?></label>
</div> </div>
</div> </div>
<div class="col-sm-2 mb-8"> <div class="col-sm-3 mb-8">
<div class="input-group"> <div class="input-group">
<input type="text" name="gift_prices[<?=$item->id?>]" class="form-control" value="<?=$item->price?>"> <input type="text" name="gift_prices[<?=$item->id?>]" class="form-control" value="<?=$item->price?>">
<div class="input-group-addon"></div> <div class="input-group-addon"></div>

@ -0,0 +1,54 @@
<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/clockpicker/clockpicker.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="op" value="add" />
<div class="form-group">
<label class="col-sm-2 control-label">选择返现</label>
<div class="col-sm-6">
<select name="fanxian_id" id="fanxian_id" class="form-control">
<?php
foreach($items as $item) {
echo '<option value="'.$item->id.'">客户返现:'.$item->fanxian_rate.'%,最高返现:'.$item->max_cashback.'</option>';
}
?>
</select>
</div>
</div>
<div>
<div class="row">
<div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong>选 择</strong>
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript" language="javascript">
$(function () {
//提交按钮
$(".btn-save").click(function(){
parent.selectFanxian($('#fanxian_id').val());
layer_close();
});
})
</script>
<?php $this->endBlock('footer_js'); ?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,2 @@
/** layui-v2.5.5 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save