Merge remote-tracking branch 'origin/dev' into dev

dev
zhaocheng 5 years ago
commit 98065ee11b
  1. 251
      frontend/controllers/DatabaseController.php
  2. 12
      frontend/views/common/index.php
  3. 2
      frontend/views/database/a-index.php
  4. 10
      frontend/views/database/b-index.php
  5. 12
      frontend/views/database/c-index.php
  6. 8
      frontend/views/database/d-index.php
  7. 30
      frontend/views/database/invalid-index.php
  8. 12
      frontend/views/insurer-company/edit.php
  9. 1
      frontend/views/insurer-company/index.php
  10. 18
      frontend/views/marketing-strategy/add.php
  11. 16
      frontend/views/marketing-strategy/edit.php
  12. 37
      frontend/views/work-day/edit.php
  13. BIN
      frontend/web/assets/js/plugins/layer/laydate/theme/default/font/iconfont.eot
  14. 45
      frontend/web/assets/js/plugins/layer/laydate/theme/default/font/iconfont.svg
  15. BIN
      frontend/web/assets/js/plugins/layer/laydate/theme/default/font/iconfont.ttf
  16. BIN
      frontend/web/assets/js/plugins/layer/laydate/theme/default/font/iconfont.woff
  17. 2
      frontend/web/assets/js/plugins/layer/laydate/theme/default/laydate.css

@ -437,7 +437,7 @@ class DatabaseController extends BaseController
if(!$invalid_info) { if(!$invalid_info) {
$invalid_info = new CarInvalidT(false); $invalid_info = new CarInvalidT(false);
$invalid_info->id = $car_info->id; $invalid_info->id = $car_info->id;
$invalid_info->user_id = 0; $invalid_info->user_id = $this->my->id;
$invalid_info->invalid_id = $invalid_id; $invalid_info->invalid_id = $invalid_id;
if(!$invalid_info->save(false)) { if(!$invalid_info->save(false)) {
throw new Exception(print_r($invalid_info->getFirstErrors(),true)); throw new Exception(print_r($invalid_info->getFirstErrors(),true));
@ -934,6 +934,79 @@ class DatabaseController extends BaseController
} }
return $result; return $result;
} }
//钩选B库到无效库
public function actionBInvalid()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result = array();
$result['success'] = false;
$result['msg'] = '操作失败';
if($request->isPost) {
$ids = explode(',',$request->post('ids'));
$invalid_id = $request->post('invalid_id',0);
if($invalid_id == 0) {
$result['msg'] = '请选择无效理由';
return $result;
}
if($ids[0] == '') {
$result['msg'] = '请先钩选车辆';
return $result;
}
$tran = CarT::getDb()->beginTransaction();
try {
foreach($ids as $id) {
$car_info = CarT::findOne(['id'=>$id]);
if($car_info->location == 2) {
$car_info->location = 5;
if(!$car_info->save(false)) {
throw new Exception(print_r($car_info->getFirstErrors(),true));
}
$invalid_info = CarInvalidT::findOne(['id'=>$car_info->id]);
if(!$invalid_info) {
$invalid_info = new CarInvalidT(false);
$invalid_info->id = $car_info->id;
$invalid_info->user_id = $this->my->id;
$invalid_info->invalid_id = $invalid_id;
if(!$invalid_info->save(false)) {
throw new Exception(print_r($invalid_info->getFirstErrors(),true));
}
}
$b_info = CarBT::findOne(['id'=>$id]);
if($b_info->user_id > 0) {
//删除预约
AppointmentT::deleteAll('car_id='.$b_info->id);
//删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作
//删除操作人员
$orders = OrderT::find()
->where('car_id='.$b_info->id.' and status_id<5')
->all();
foreach($orders as $order_info) {
OrderUserT::deleteAll('order_id='.$order_info->id);
//删除保单
$order_info->delete();
}
}
$this->addLog($car_info->id,'从B库移动到无效库',1);
}
}
$result['success'] = true;
$result['msg'] = '操作成功';
$tran->commit();
} catch (\Exception $e) {
$tran->rollBack();
$result['msg'] = $e->getMessage();
}
}
return $result;
}
//C库 //C库
//C库列表页 //C库列表页
@ -1532,6 +1605,79 @@ class DatabaseController extends BaseController
} }
return $result; return $result;
} }
//钩选C库到无效库
public function actionCInvalid()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result = array();
$result['success'] = false;
$result['msg'] = '操作失败';
if($request->isPost) {
$ids = explode(',',$request->post('ids'));
$invalid_id = $request->post('invalid_id',0);
if($invalid_id == 0) {
$result['msg'] = '请选择无效理由';
return $result;
}
if($ids[0] == '') {
$result['msg'] = '请先钩选车辆';
return $result;
}
$tran = CarT::getDb()->beginTransaction();
try {
foreach($ids as $id) {
$car_info = CarT::findOne(['id'=>$id]);
if($car_info->location == 3) {
$car_info->location = 5;
if(!$car_info->save(false)) {
throw new Exception(print_r($car_info->getFirstErrors(),true));
}
$invalid_info = CarInvalidT::findOne(['id'=>$car_info->id]);
if(!$invalid_info) {
$invalid_info = new CarInvalidT(false);
$invalid_info->id = $car_info->id;
$invalid_info->user_id = $this->my->id;
$invalid_info->invalid_id = $invalid_id;
if(!$invalid_info->save(false)) {
throw new Exception(print_r($invalid_info->getFirstErrors(),true));
}
}
$c_info = CarCT::findOne(['id'=>$id]);
if($c_info->user_id > 0) {
//删除预约
AppointmentT::deleteAll('car_id='.$c_info->id);
//删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作
//删除操作人员
$orders = OrderT::find()
->where('car_id='.$c_info->id.' and status_id<5')
->all();
foreach($orders as $order_info) {
OrderUserT::deleteAll('order_id='.$order_info->id);
//删除保单
$order_info->delete();
}
}
$this->addLog($car_info->id,'从C库移动到无效库',1);
}
}
$result['success'] = true;
$result['msg'] = '操作成功';
$tran->commit();
} catch (\Exception $e) {
$tran->rollBack();
$result['msg'] = $e->getMessage();
}
}
return $result;
}
//D库 //D库
//D库列表页 //D库列表页
@ -2036,6 +2182,79 @@ class DatabaseController extends BaseController
} }
return $result; return $result;
} }
//钩选C库到无效库
public function actionDInvalid()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result = array();
$result['success'] = false;
$result['msg'] = '操作失败';
if($request->isPost) {
$ids = explode(',',$request->post('ids'));
$invalid_id = $request->post('invalid_id',0);
if($invalid_id == 0) {
$result['msg'] = '请选择无效理由';
return $result;
}
if($ids[0] == '') {
$result['msg'] = '请先钩选车辆';
return $result;
}
$tran = CarT::getDb()->beginTransaction();
try {
foreach($ids as $id) {
$car_info = CarT::findOne(['id'=>$id]);
if($car_info->location == 4) {
$car_info->location = 5;
if(!$car_info->save(false)) {
throw new Exception(print_r($car_info->getFirstErrors(),true));
}
$invalid_info = CarInvalidT::findOne(['id'=>$car_info->id]);
if(!$invalid_info) {
$invalid_info = new CarInvalidT(false);
$invalid_info->id = $car_info->id;
$invalid_info->user_id = $this->my->id;
$invalid_info->invalid_id = $invalid_id;
if(!$invalid_info->save(false)) {
throw new Exception(print_r($invalid_info->getFirstErrors(),true));
}
}
$d_info = CarDT::findOne(['id'=>$id]);
if($d_info->user_id > 0) {
//删除预约
AppointmentT::deleteAll('car_id='.$d_info->id);
//删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作
//删除操作人员
$orders = OrderT::find()
->where('car_id='.$d_info->id.' and status_id<5')
->all();
foreach($orders as $order_info) {
OrderUserT::deleteAll('order_id='.$order_info->id);
//删除保单
$order_info->delete();
}
}
$this->addLog($car_info->id,'从C库移动到无效库',1);
}
}
$result['success'] = true;
$result['msg'] = '操作成功';
$tran->commit();
} catch (\Exception $e) {
$tran->rollBack();
$result['msg'] = $e->getMessage();
}
}
return $result;
}
//无效库列表页 //无效库列表页
private function getInvalidQuery($request) private function getInvalidQuery($request)
@ -2125,12 +2344,6 @@ class DatabaseController extends BaseController
{ {
$invalid_items = InvalidT::getTree(); $invalid_items = InvalidT::getTree();
return $this->render('invalid-index',[ return $this->render('invalid-index',[
'invalid_items'
]);
}
public function actionInvalidSearch() {
$invalid_items = InvalidT::getTree();
return $this->render('invalid-index-search',[
'invalid_items'=>$invalid_items 'invalid_items'=>$invalid_items
]); ]);
} }
@ -2160,6 +2373,8 @@ class DatabaseController extends BaseController
$row['factory_model'] = MyLib::substr_cut($car_info->factory_model, 8); $row['factory_model'] = MyLib::substr_cut($car_info->factory_model, 8);
$row['car_man'] = MyLib::substr_cut($car_info->car_man, 8); $row['car_man'] = MyLib::substr_cut($car_info->car_man, 8);
$row['op_user'] = $item->user?$item->user->getShowName():''; $row['op_user'] = $item->user?$item->user->getShowName():'';
$row['invalid_info'] = $item->invalid->getPath();
$row['invalid_time'] = $item->invalid->created_at;
$data['rows'][] = $row; $data['rows'][] = $row;
} }
return $data; return $data;
@ -2638,14 +2853,16 @@ class DatabaseController extends BaseController
$result['msg'] = '操作失败'; $result['msg'] = '操作失败';
if($request->isPost) { if($request->isPost) {
$ids = $request->post('ids',array()); $ids = explode(',',$request->post('ids'));
$tran = CarT::getDb()->beginTransaction(); $tran = CarT::getDb()->beginTransaction();
try { try {
foreach($ids as $id) { foreach($ids as $id) {
$car_info = CarT::findOne(['id'=>$id]); $car_info = CarT::findOne(['id'=>$id]);
$car_info->location = 1; $car_info->location = 1;
$car_info->save(); if(!$car_info->save()) {
throw new \Exception(print_r($car_info->getErrors(), true));
}
CarInvalidT::deleteAll('id='.$id); CarInvalidT::deleteAll('id='.$id);
AppointmentHistoryT::deleteAll('car_id='.$id); AppointmentHistoryT::deleteAll('car_id='.$id);
@ -2657,7 +2874,7 @@ class DatabaseController extends BaseController
$tran->commit(); $tran->commit();
} catch (\Exception $e) { } catch (\Exception $e) {
$tran->rollBack(); $tran->rollBack();
echo $e->getMessage(); $result['msg'] = $e->getMessage();
} }
} }
return $result; return $result;
@ -2674,10 +2891,10 @@ class DatabaseController extends BaseController
if($request->isPost) { if($request->isPost) {
$invalid_id = $request->post('invalid_id'); $invalid_id = $request->post('invalid_id');
if($invalid_id == 0) { // if($invalid_id == 0) {
$result['msg'] = '请先选择无效理由'; // $result['msg'] = '请先选择无效理由';
return $result; // return $result;
} // }
$data = $this->getInvalidQuery($request); $data = $this->getInvalidQuery($request);
$query = $data['query']; $query = $data['query'];
@ -2686,7 +2903,9 @@ class DatabaseController extends BaseController
foreach($query->each(1000) as $item) { foreach($query->each(1000) as $item) {
$car_info = $item->car; $car_info = $item->car;
$car_info->location = 1; $car_info->location = 1;
$car_info->save(); if(!$car_info->save()) {
throw new \Exception(print_r($car_info->getErrors(), true));
}
AppointmentHistoryT::deleteAll('car_id='.$item->id); AppointmentHistoryT::deleteAll('car_id='.$item->id);
$item->delete(); $item->delete();
$this->addLog($item->id,'从无效数据中恢复数据',1); $this->addLog($item->id,'从无效数据中恢复数据',1);
@ -2698,7 +2917,7 @@ class DatabaseController extends BaseController
$tran->commit(); $tran->commit();
} catch (\Exception $e) { } catch (\Exception $e) {
$tran->rollBack(); $tran->rollBack();
throw $e; $result['msg'] = $e->getMessage();
} }
} }
return $result; return $result;

@ -64,6 +64,8 @@
<!--右侧部分开始--> <!--右侧部分开始-->
<div id="page-wrapper" class="gray-bg dashbard-1"> <div id="page-wrapper" class="gray-bg dashbard-1">
<div class="row content-tabs"> <div class="row content-tabs">
<button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
</button>
<button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i> <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
</button> </button>
<nav class="page-tabs J_menuTabs"> <nav class="page-tabs J_menuTabs">
@ -74,12 +76,13 @@
<button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i> <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
</button> </button>
<div class="btn-group roll-nav roll-right"> <div class="btn-group roll-nav roll-right">
<button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span> <button class="dropdown J_tabClose" data-toggle="dropdown">其他操作<span class="caret"></span>
</button> </button>
<ul role="menu" class="dropdown-menu dropdown-menu-right"> <ul role="menu" class="dropdown-menu dropdown-menu-right">
<li class="J_tabShowActive"><a>定位当前选项卡</a> <li class="navbar-minimalize"><a>关闭左侧菜单</a></li>
</li> <li class="divider"></li>
<li class="J_tabShowActive"><a>定位当前选项卡</a></li>
<li class="divider"></li> <li class="divider"></li>
<li class="J_tabCloseAll"><a>关闭全部选项卡</a> <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
</li> </li>
@ -88,9 +91,6 @@
</ul> </ul>
</div> </div>
<a href="/common/logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a> <a href="/common/logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
<a class="navbar-minimalize minimalize-styl-2 btn btn-success roll-right" href="#" style="position:fixed;bottom:50%;">
<i class="fa fa-bars"></i>
</a>
</div> </div>
<div class="row J_mainContent" id="content-main"> <div class="row J_mainContent" id="content-main">
<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/welcome" frameborder="0" data-id="index_v1.html" seamless></iframe> <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/welcome" frameborder="0" data-id="index_v1.html" seamless></iframe>

@ -97,7 +97,7 @@ use \common\libs\MyLib;
<button type="button" class="btn btn-primary btn-a-c">勾选A-&gt;C</button> <button type="button" class="btn btn-primary btn-a-c">勾选A-&gt;C</button>
<button type="button" class="btn btn-primary btn-a-b-all">批量A-&gt;B</button> <button type="button" class="btn btn-primary btn-a-b-all">批量A-&gt;B</button>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;"> <select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;">
<option value="0">请选择无效理由</option> <option value="0">请选择无效理由</option>
<?php foreach($invalid_items as $item) { <?php foreach($invalid_items as $item) {

@ -62,7 +62,7 @@ use \common\libs\MyLib;
<input type="text" id="username" name="username" class="form-control"> <input type="text" id="username" name="username" class="form-control">
</div> </div>
<button type="submit" class="btn btn-primary mb-8">搜索</button> <button type="submit" class="btn btn-primary mb-8">搜索</button>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<select class="form-control" id="user_id" name="user_id"> <select class="form-control" id="user_id" name="user_id">
<option value="0">请选择业务员</option> <option value="0">请选择业务员</option>
<?php foreach($user_items as $item) { <?php foreach($user_items as $item) {
@ -71,11 +71,11 @@ use \common\libs\MyLib;
?> ?>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<button type="button" class="btn btn-primary btn-assign">勾选分配</button> <button type="button" class="btn btn-primary btn-assign">勾选分配</button>
<button type="button" class="btn btn-primary btn-assign-return">勾选收回</button> <button type="button" class="btn btn-primary btn-assign-return">勾选收回</button>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<label class="form-control-static">分配给业务员</label> <label class="form-control-static">分配给业务员</label>
<input type="text" name="assign_users" id="assign_users" class="form-control"> <input type="text" name="assign_users" id="assign_users" class="form-control">
<label class="form-control-static">每个业务员分配</label> <label class="form-control-static">每个业务员分配</label>
@ -84,7 +84,7 @@ use \common\libs\MyLib;
<button type="button" class="btn btn-primary btn-assign-all">批量分配</button> <button type="button" class="btn btn-primary btn-assign-all">批量分配</button>
<button type="button" class="btn btn-primary btn-assign-all-return">批量收回</button> <button type="button" class="btn btn-primary btn-assign-all-return">批量收回</button>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;"> <select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;">
<option value="0">请选择无效理由</option> <option value="0">请选择无效理由</option>
<?php foreach($invalid_items as $item) { <?php foreach($invalid_items as $item) {
@ -247,7 +247,7 @@ use \common\libs\MyLib;
}); });
}); });
$('.btn-a-invalid').click(function() { $('.btn-a-invalid').click(function() {
layer.confirm('是否确认移动?', { layer.confirm('是否确认无效?', {
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮
shade: false //不显示遮罩 shade: false //不显示遮罩
}, function(){ }, function(){

@ -62,10 +62,8 @@ use \common\libs\MyLib;
<input type="text" id="username" name="username" class="form-control"> <input type="text" id="username" name="username" class="form-control">
</div> </div>
<button type="submit" class="btn btn-primary mb-8">搜索</button> <button type="submit" class="btn btn-primary mb-8">搜索</button>
<div class="form-group"> <button type="button" class="btn btn-primary btn-c-all-d mb-8">批量C-&gt;D</button>
<button type="button" class="btn btn-primary btn-c-all-d">批量C-&gt;D</button> <div class="form-group" style="margin-bottom: 8px;">
</div>
<div class="form-group">
<select class="form-control" id="user_id" name="user_id"> <select class="form-control" id="user_id" name="user_id">
<option value="0">请选择业务员</option> <option value="0">请选择业务员</option>
<?php foreach($user_items as $item) { <?php foreach($user_items as $item) {
@ -77,7 +75,7 @@ use \common\libs\MyLib;
<button type="button" class="btn btn-primary btn-assign-return">勾选收回</button> <button type="button" class="btn btn-primary btn-assign-return">勾选收回</button>
<button type="button" class="btn btn-primary btn-c-d">勾选移动D库</button> <button type="button" class="btn btn-primary btn-c-d">勾选移动D库</button>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<label class="form-control-static">分配给业务员</label> <label class="form-control-static">分配给业务员</label>
<input type="text" name="assign_users" id="assign_users" class="form-control"> <input type="text" name="assign_users" id="assign_users" class="form-control">
<label class="form-control-static">每个业务员分配</label> <label class="form-control-static">每个业务员分配</label>
@ -86,7 +84,7 @@ use \common\libs\MyLib;
<button type="button" class="btn btn-primary btn-assign-all">批量分配</button> <button type="button" class="btn btn-primary btn-assign-all">批量分配</button>
<button type="button" class="btn btn-primary btn-assign-all-return">批量收回</button> <button type="button" class="btn btn-primary btn-assign-all-return">批量收回</button>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;"> <select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;">
<option value="0">请选择无效理由</option> <option value="0">请选择无效理由</option>
<?php foreach($invalid_items as $item) { <?php foreach($invalid_items as $item) {
@ -289,7 +287,7 @@ use \common\libs\MyLib;
}); });
}); });
$('.btn-a-invalid').click(function() { $('.btn-a-invalid').click(function() {
layer.confirm('是否确认移动?', { layer.confirm('是否确认无效?', {
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮
shade: false //不显示遮罩 shade: false //不显示遮罩
}, function(){ }, function(){

@ -54,7 +54,7 @@ use \common\libs\MyLib;
<input type="text" id="username" name="username" class="form-control"> <input type="text" id="username" name="username" class="form-control">
</div> </div>
<button type="submit" class="btn btn-primary mb-8">搜索</button> <button type="submit" class="btn btn-primary mb-8">搜索</button>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<select class="form-control" id="user_id" name="user_id"> <select class="form-control" id="user_id" name="user_id">
<option value="0">请选择业务员</option> <option value="0">请选择业务员</option>
<?php foreach($user_items as $item) { <?php foreach($user_items as $item) {
@ -65,7 +65,7 @@ use \common\libs\MyLib;
<button type="button" class="btn btn-primary btn-assign">勾选分配</button> <button type="button" class="btn btn-primary btn-assign">勾选分配</button>
<button type="button" class="btn btn-primary btn-assign-return">勾选收回</button> <button type="button" class="btn btn-primary btn-assign-return">勾选收回</button>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<label class="form-control-static">分配给业务员</label> <label class="form-control-static">分配给业务员</label>
<input type="text" name="assign_users" id="assign_users" class="form-control"> <input type="text" name="assign_users" id="assign_users" class="form-control">
<label class="form-control-static">每个业务员分配</label> <label class="form-control-static">每个业务员分配</label>
@ -74,7 +74,7 @@ use \common\libs\MyLib;
<button type="button" class="btn btn-primary btn-assign-all">批量分配</button> <button type="button" class="btn btn-primary btn-assign-all">批量分配</button>
<button type="button" class="btn btn-primary btn-assign-all-return">批量收回</button> <button type="button" class="btn btn-primary btn-assign-all-return">批量收回</button>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-bottom: 8px;">
<select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;"> <select class="form-control" id="invalid_id" name="invalid_id" style="width:200px;">
<option value="0">请选择无效理由</option> <option value="0">请选择无效理由</option>
<?php foreach($invalid_items as $item) { <?php foreach($invalid_items as $item) {
@ -224,7 +224,7 @@ use \common\libs\MyLib;
}); });
}); });
$('.btn-a-invalid').click(function() { $('.btn-a-invalid').click(function() {
layer.confirm('是否确认移动?', { layer.confirm('是否确认无效?', {
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮
shade: false //不显示遮罩 shade: false //不显示遮罩
}, function(){ }, function(){

@ -10,16 +10,13 @@ use \common\libs\MyLib;
<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="searchDlg()">
<i class="fa fa-search"></i> 搜索
</a>
<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> 刷新
</a> </a>
</div> </div>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();"> <form role="form" id="searchFrm" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;"> <div class="form-group" style="margin-bottom: 8px;">
<label for="car_no">车牌</label> <label for="car_no">车牌</label>
<input type="text" id="car_no" name="car_no" class="form-control"> <input type="text" id="car_no" name="car_no" class="form-control">
@ -50,7 +47,7 @@ use \common\libs\MyLib;
</div> </div>
<div class="form-group" style="margin-bottom: 8px;"> <div class="form-group" style="margin-bottom: 8px;">
<label for="invalid_id">无效理由</label> <label for="invalid_id">无效理由</label>
<select class="form-control" id="invalid_id" name="invalid_id"> <select class="form-control" id="invalid_id" name="invalid_id" style="width: 200px;">
<option value="0">请选择无效理由</option> <option value="0">请选择无效理由</option>
<?php foreach($invalid_items as $item) { <?php foreach($invalid_items as $item) {
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; echo '<option value="'.$item->id.'">'.$item->name.'</option>';
@ -59,10 +56,8 @@ use \common\libs\MyLib;
</select> </select>
</div> </div>
<button type="submit" class="btn btn-primary mb-8">搜索</button> <button type="submit" class="btn btn-primary mb-8">搜索</button>
<div class="form-group"> <button type="button" class="btn btn-primary btn-assign-return mb-8">勾选恢复</button>
<button type="button" class="btn btn-primary btn-assign-return">勾选恢复</button> <button type="button" class="btn btn-primary btn-assign-all mb-8">批量恢复</button>
<button type="button" class="btn btn-primary btn-assign-all">批量恢复</button>
</div>
</form> </form>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -75,11 +70,11 @@ use \common\libs\MyLib;
<th data-field="factory_model">车型</th> <th data-field="factory_model">车型</th>
<th data-field="car_man">车主</th> <th data-field="car_man">车主</th>
<th data-field="phone">联系电话</th> <th data-field="phone">联系电话</th>
<th data-field="register_date">初登日期</th>
<th data-field="print_date">出单日期</th> <th data-field="print_date">出单日期</th>
<th data-field="insurer1_date">保险日期</th> <th data-field="insurer1_date">保险日期</th>
<th data-field="company">保险公司</th> <th data-field="invalid_info">无效理由</th>
<th data-field="op_user">业务员</th> <th data-field="invalid_time">无效时间</th>
<th data-field="op_user">操作者</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@ -107,6 +102,11 @@ use \common\libs\MyLib;
} }
function search() { function search() {
o = {};
var params = $("#searchFrm").serializeArray();
$.each(params, function(index) {
o[this['name']] = this['value'];
});
$('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({ $('#listTable').bootstrapTable({
url: "/database/invalid-index-json", url: "/database/invalid-index-json",
@ -150,7 +150,7 @@ use \common\libs\MyLib;
rows.forEach(function(item,index,array){ rows.forEach(function(item,index,array){
params.push(item.id); params.push(item.id);
}); });
$.post('/database/d-return',{ids:params.join(',')},function(obj){ $.post('/database/invalid-a',{ids:params.join(',')},function(obj){
layer.msg(obj.msg); layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
search(); search();
@ -165,9 +165,7 @@ use \common\libs\MyLib;
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮
shade: false //不显示遮罩 shade: false //不显示遮罩
}, function(){ }, function(){
o.assign_users = $('#assign_users').val(); $.post('/database/invalid-all-a',o,function(obj){
o.assign_count = $('#assign_count').val();
$.post('/database/d-all-assign',o,function(obj){
layer.msg(obj.msg); layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
search(); search();

@ -13,20 +13,14 @@ use \common\libs\MyLib;
<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 class="form-group">
<label class="col-md-1 control-label">SAM代码</label>
<div class="col-md-6">
<input type="text" name="sam" value="<?=$info->sam?>" class="form-control">
</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-1">
<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>

@ -26,7 +26,6 @@ use \common\libs\MyLib;
<tr> <tr>
<th data-field="id">ID</th> <th data-field="id">ID</th>
<th data-field="name">公司名称</th> <th data-field="name">公司名称</th>
<th data-field="sam">SAM</th>
<th data-formatter="opFormatter">操作</th> <th data-formatter="opFormatter">操作</th>
</tr> </tr>
</thead> </thead>

@ -13,19 +13,19 @@ use \common\libs\MyLib;
<form role="form" class="form-horizontal data-from" id="theFrm"> <form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="op" value="add" /> <input type="hidden" name="op" value="add" />
<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="" class="form-control"> <input type="text" name="name" value="" 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-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="" /> <input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="" />
</div> </div>
</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-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="" /> <input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="" />
@ -33,14 +33,14 @@ use \common\libs\MyLib;
</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 class="form-control" name="remark" id="remark"></textarea> <textarea class="form-control" name="remark" id="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>添 加</strong> <strong>添 加</strong>
</button> </button>

@ -28,19 +28,19 @@ use \common\libs\MyLib;
<input type="hidden" name="op" value="edit" /> <input type="hidden" name="op" value="edit" />
<input type="hidden" name="id" value="<?=$info->id?>" /> <input type="hidden" name="id" value="<?=$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->celuo_name?>" class="form-control"> <input type="text" name="name" value="<?=$info->celuo_name?>" 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-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="<?=$info->begin_date?>" /> <input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="<?=$info->begin_date?>" />
</div> </div>
</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-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="<?=$info->end_date?>" /> <input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="<?=$info->end_date?>" />
@ -48,8 +48,8 @@ use \common\libs\MyLib;
</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 class="form-control" name="remark" id="remark"><?=$info->remark?></textarea> <textarea class="form-control" name="remark" id="remark"><?=$info->remark?></textarea>
</div> </div>
</div> </div>

@ -14,27 +14,27 @@ use \common\libs\MyLib;
<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-2 control-label">月份</label>
<div class="col-md-3"> <div class="col-sm-3">
<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="date" class="form-control" autocomplete="off" value="<?=$info->date?>"> <input type="text" id="date" name="date" class="form-control" autocomplete="off" value="<?=$info->date?>">
</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-2 control-label">双休天数</label>
<div class="col-md-3"> <div class="col-sm-3">
<input type="text" name="double_break" value="<?=$info->double_break?>" class="form-control"> <input type="text" name="double_break" value="<?=$info->double_break?>" 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-3">
<input type="text" name="single_break" value="<?=$info->single_break?>" class="form-control"> <input type="text" name="single_break" value="<?=$info->single_break?>" 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>
@ -50,17 +50,22 @@ use \common\libs\MyLib;
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/datapicker/bootstrap-datepicker.js"></script> <script src="/assets/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
$(function () { $(function () {
$('.input-group.date').datepicker({ // $('.input-group.date').datepicker({
minViewMode: 1, // minViewMode: 1,
keyboardNavigation: false, // keyboardNavigation: false,
forceParse: false, // forceParse: false,
autoclose: true, // autoclose: true,
todayHighlight: true, // todayHighlight: true,
format: "yyyy-mm" // format: "yyyy-mm"
// });
laydate({
elem:'#date',
format: 'YYYY-MM',
type:'month'
}); });
//提交按钮 //提交按钮
$(".btn-save").click(function(){ $(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', { parent.layer.confirm('是否确认提交?', {

@ -0,0 +1,45 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="laydate-icon" horiz-adv-x="1024" >
<font-face
font-family="laydate-icon"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="youyou" unicode="&#58882;" d="M283.648 721.918976 340.873216 780.926976 740.352 383.997952 340.876288-12.925952 283.648 46.077952 619.52 383.997952Z" horiz-adv-x="1024" />
<glyph glyph-name="zuozuo" unicode="&#58883;" d="M740.352 721.918976 683.126784 780.926976 283.648 383.997952 683.123712-12.925952 740.352 46.077952 404.48 383.997952Z" horiz-adv-x="1024" />
<glyph glyph-name="xiayiye" unicode="&#58970;" d="M62.573 384.103l423.401 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.751-18.976-68.727 0l-39.753 39.753 0.269 0.246-385.655 385.661zM451.365 384.103l423.407 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.757-18.977-68.727 0l-39.762 39.754 0.273 0.249-385.662 385.661zM451.365 384.103z" horiz-adv-x="1024" />
<glyph glyph-name="xiayiye1" unicode="&#58971;" d="M948.066926 382.958838l-411.990051-412.24426c-18.47333-18.47333-48.417689-18.47333-66.875207 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L814.691135 383.088983 467.512212 730.269123c-18.466032 18.458735-18.466032 48.405526 0 66.873991 18.468465 18.464816 48.410391 18.464816 66.872774 0l38.682336-38.682336-0.261507-0.239614 375.259894-375.265975v0.003649m-378.312834 0L157.756743-29.285422c-18.47333-18.47333-48.415256-18.47333-66.872775 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L436.369787 383.088983 89.19208 730.269123c-18.4636 18.458735-18.4636 48.405526 0 66.873991 18.470898 18.464816 48.415256 18.464816 66.872774 0l38.692067-38.682336-0.266372-0.239614 375.267191-375.265975-0.004865 0.003649m0 0z" horiz-adv-x="1024" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save