Merge branch 'dev' of ssh://gogs.banmacar.com:10022/chenying/simple-yewu into dev

* 'dev' of ssh://gogs.banmacar.com:10022/chenying/simple-yewu:
  my-list-finish,my-search,step1-list-finish,step1-lit列表
  维修提单列表,编辑页面
  维修提单列表,编辑页面
dev
曾超新 5 years ago
commit 85a864c178
  1. 454
      composer.lock
  2. 83
      frontend/controllers/FixCarController.php
  3. 2
      frontend/controllers/PhoneCenterController.php
  4. 1207
      frontend/views/fix-car/my-list-edit.php
  5. 168
      frontend/views/fix-car/my-list-finish.php
  6. 180
      frontend/views/fix-car/my-list.php
  7. 115
      frontend/views/fix-car/my-search.php
  8. 141
      frontend/views/fix-car/step1-list-finish.php
  9. 145
      frontend/views/fix-car/step1-list.php
  10. 1
      frontend/views/phone-center/call-records.php

454
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -77,8 +77,13 @@ class FixCarController extends BaseController
]); ]);
} }
public function actionMyList() public function actionMyList() {
return $this->render('my-list');
}
public function actionMyListJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
@ -90,17 +95,29 @@ class FixCarController extends BaseController
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]); $query = $query->andWhere(['like','car_no',$car_no]);
} }
$total = $query->count();
$query = $query->orderBy('id DESC'); $query = $query->orderBy('id DESC');
$items = $query->all(); $items = $query->all();
return $this->render('my-list',[ $data = [];
'items' => $items, $data['total'] = $total;
'car_no' => $car_no $data['rows'] = [];
]); foreach($items as $item) {
$row = $item->toArray();
$data['rows'][] = $row;
}
return $data;
}
public function actionMyListFinish() {
return $this->render('my-list-finish');
} }
public function actionMyListFinish()
public function actionMyListFinishJson()
{ {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
@ -112,13 +129,20 @@ class FixCarController extends BaseController
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]); $query = $query->andWhere(['like','car_no',$car_no]);
} }
$total = $query->count();
$query = $query->orderBy('status ASC'); $query = $query->orderBy('status ASC');
$items = $query->all(); $items = $query->all();
return $this->render('my-list-finish',[ $data = [];
'items' => $items, $data['total'] = $total;
'car_no' => $car_no $data['rows'] = [];
]); foreach($items as $item) {
$row = $item->toArray();
$data['rows'][] = $row;
}
return $data;
} }
public function actionMyListDelete() public function actionMyListDelete()
@ -557,6 +581,12 @@ class FixCarController extends BaseController
public function actionStep1List() public function actionStep1List()
{ {
return $this->render('step1-list');
}
public function actionStep1ListJson()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
@ -565,17 +595,29 @@ class FixCarController extends BaseController
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]); $query = $query->andWhere(['like','car_no',$car_no]);
} }
$total = $query->count();
$query = $query->orderBy('status ASC,receive_date ASC'); $query = $query->orderBy('status ASC,receive_date ASC');
$items = $query->all(); $items = $query->all();
return $this->render('step1-list',[ $data = [];
'items' => $items, $data['total'] = $total;
'car_no' => $car_no $data['rows'] = [];
]); foreach($items as $item) {
$row = $item->toArray();
$data['rows'][] = $row;
}
return $data;
} }
public function actionStep1ListFinish() public function actionStep1ListFinish()
{ {
return $this->render('step1-list');
}
public function actionStep1ListFinishJson()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$car_no = $request->get('car_no'); $car_no = $request->get('car_no');
@ -584,13 +626,18 @@ class FixCarController extends BaseController
if($car_no != '') { if($car_no != '') {
$query = $query->andWhere(['like','car_no',$car_no]); $query = $query->andWhere(['like','car_no',$car_no]);
} }
$total = $query->count();
$query = $query->orderBy('status ASC,updated_at DESC'); $query = $query->orderBy('status ASC,updated_at DESC');
$items = $query->all(); $items = $query->all();
return $this->render('step1-list-finish',[ $data = [];
'items' => $items, $data['total'] = $total;
'car_no' => $car_no $data['rows'] = [];
]); foreach($items as $item) {
$row = $item->toArray();
$data['rows'][] = $row;
}
return $data;
} }
public function actionPrintReceive() public function actionPrintReceive()

@ -71,6 +71,8 @@ class PhoneCenterController extends BaseController
$company_id=2; $company_id=2;
}elseif ($company_type == 2){ }elseif ($company_type == 2){
$company_id=3; $company_id=3;
}else {
$company_id=0;
} }
$query = NetworkPhoneT::find() $query = NetworkPhoneT::find()

File diff suppressed because it is too large Load Diff

@ -1,82 +1,110 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>已提单</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="/fix-car/my-search"">
<i class="fa fa-refresh"></i> 添加
</a>
<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" style="margin-bottom: 8px;">
<label for="username">车牌号</label>
<input type="text" id="car_no" name="car_no" class="form-control">
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="car_no">车牌号</th>
<th data-field="id_man">被保险人</th>
<th data-field="link_man">联系人</th>
<th data-field="link_phone">电话</th>
<th data-field="submit_date">提单日期</th>
<th data-field="show_name">提单者</th>
<th data-field="status">状态</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 type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
//编辑 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>');
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">');
opStr.push('<i class="fa fa-trash" title="删除"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function create() {
title = '已提单';
layer_show(title, '/fix-car/my-search');
}
function edit(id) { function edit(id) {
var title = '已提单';
window.location.href = '/fix-car/my-list-edit?id=' + id; window.location.href = '/fix-car/my-list-edit?id=' + id;
} }
//删除
function del(id) { function del(id) {
if(confirm('是否确认删除?')) { parent.layer.confirm('是否确认删除?', {
$.post('/fix-car/my-list-delete',{id:id},function(obj){ btn: ['删除','取消'], //按钮
alert(obj.msg); shade: false //不显示遮罩
if(obj.success) { }, function(){
window.location.reload(); $.post('/fix-car/my-list-delete',{id:id},function(data) {
} parent.layer.msg(data.msg);
},'json'); refreshList();
} }, 'json');
} }, function(){
$(function(){ //
$("#search-btn").click(function(){
var params = $('#searchForm').serialize();
window.location.href = "/fix-car/my-list-finish?" + params;
}); });
$('#add-btn').click(function(){ }
window.location.href = '/fix-car/my-search'; function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/fix-car/my-list-finish-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
return params;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<tr>
<td class="td_bg">
车牌号:<input name="car_no" type="text" value="<?=$car_no?>">
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加">
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td>
<td align="center" align="center" class="bg_tr">车牌号</td>
<td align="center" align="center" class="bg_tr">被保险人</td>
<td align="center" align="center" class="bg_tr">联系人</td>
<td align="center" align="center" class="bg_tr">电话</td>
<td align="center" align="center" class="bg_tr">提单日期</td>
<td align="center" align="center" class="bg_tr">提单者</td>
<td align="center" align="center" class="bg_tr">状态</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
<td align="left" class="td_bg" nowrap><?=$item->car_no?></td>
<td align="left" class="td_bg" nowrap><?=$item->id_man?></td>
<td align="left" class="td_bg" nowrap><?=$item->link_man?></td>
<td align="left" class="td_bg" nowrap><?=$item->link_phone?></td>
<td align="left" class="td_bg" nowrap><?=$item->submit_date?></td>
<td align="left" class="td_bg" nowrap><?=$item->user->getShowName()?></td>
<td align="left" class="td_bg" nowrap><?=$item->getStatus()?></td>
<td align="center" class="td_bg" nowrap>
<?php
if($item->status == 0) {
?>
[<a href="javascript:void(0);" onclick="edit(<?= $item->id ?>)">修改</a>]
[<a href="javascript:void(0);" onclick="del(<?= $item->id ?>)">删除</a>]
<?php
}
?>
</td>
</tr>
<?php
}
?>
</table>

@ -1,82 +1,110 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<script type="text/javascript" language="javascript">
//编辑 <div class="wrapper wrapper-content animated fadeInRight">
function edit(id) { <div class="ibox float-e-margins">
window.location.href = '/fix-car/my-list-edit?id=' + id; <div class="ibox-title">
} <h5>维修提单</h5>
//删除 <div class="ibox-tools">
function del(id) { <a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)">
if(confirm('是否确认删除?')) { <i class="fa fa-plus"></i> 添加
$.post('/fix-car/my-list-delete',{id:id},function(obj){ </a>
alert(obj.msg); <a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
if(obj.success) { <i class="fa fa-refresh"></i> 刷新
window.location.reload(); </a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label for="username">车牌号</label>
<input type="text" id="car_no" name="car_no" class="form-control">
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="car_no">车牌号</th>
<th data-field="id_man">被保险人</th>
<th data-field="link_man">联系人</th>
<th data-field="link_phone">电话</th>
<th data-field="submit_date">提单日期</th>
<th data-field="show_name">提单者</th>
<th data-field="status">状态</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 type="text/javascript" language="javascript">
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>');
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">');
opStr.push('<i class="fa fa-trash" title="删除"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function create() {
title = '维修提单';
layer_show(title, '/fix-car/my-search');
}
function edit(id) {
var title = '维修信息';
window.location.href = '/fix-car/my-list-edit?id=' + id;
}
function del(id) {
parent.layer.confirm('是否确认删除?', {
btn: ['删除','取消'], //按钮
shade: false //不显示遮罩
}, function(){
$.post('/fix-car/my-list-delete',{id:id},function(data) {
parent.layer.msg(data.msg);
refreshList();
}, 'json');
}, function(){
//
});
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/fix-car/my-list-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
return params;
} }
},'json'); });
return false;
} }
}
$(function(){ $(function() {
$("#search-btn").click(function(){ search();
var params = $('#searchForm').serialize();
window.location.href = "/fix-car/my-list?" + params;
});
$('#add-btn').click(function(){
window.location.href = '/fix-car/my-search';
}); });
}); </script>
</script> <?php $this->endBlock(); ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="searchForm">
<tr>
<td class="td_bg">
车牌号:<input name="car_no" type="text" value="<?=$car_no?>">
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加">
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td>
<td align="center" align="center" class="bg_tr">车牌号</td>
<td align="center" align="center" class="bg_tr">被保险人</td>
<td align="center" align="center" class="bg_tr">联系人</td>
<td align="center" align="center" class="bg_tr">电话</td>
<td align="center" align="center" class="bg_tr">提单日期</td>
<td align="center" align="center" class="bg_tr">提单者</td>
<td align="center" align="center" class="bg_tr">状态</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
<td align="left" class="td_bg" nowrap><?=$item->car_no?></td>
<td align="left" class="td_bg" nowrap><?=$item->id_man?></td>
<td align="left" class="td_bg" nowrap><?=$item->link_man?></td>
<td align="left" class="td_bg" nowrap><?=$item->link_phone?></td>
<td align="left" class="td_bg" nowrap><?=$item->submit_date?></td>
<td align="left" class="td_bg" nowrap><?=$item->user->getShowName()?></td>
<td align="left" class="td_bg" nowrap><?=$item->getStatus()?></td>
<td align="center" class="td_bg" nowrap>
<?php
if($item->status == 0) {
?>
[<a href="javascript:void(0);" onclick="edit(<?= $item->id ?>)">修改</a>]
[<a href="javascript:void(0);" onclick="del(<?= $item->id ?>)">删除</a>]
<?php
}
?>
</td>
</tr>
<?php
}
?>
</table>

@ -1,49 +1,70 @@
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php
<form id="theFrm"> use \common\libs\MyLib;
<tr> ?>
<td width="100" height="25" class="td_bg">车牌号</td> <?php $this->beginBlock('header_css'); ?>
<td height="25" class="td_bg" nowrap> <?php $this->endBlock(); ?>
<input name="car_no" type="text" id="car_no" value="" style="width:100px;"/>
</td> <div class="wrapper wrapper-content animated fadeInRight">
<td width="100" height="25" class="td_bg">发动机号</td> <div class="ibox float-e-margins">
<td height="25" class="td_bg"> <div class="ibox-title">
<input name="engine_no" type="text" id="engine_no" value="" style="width:100px;"/> <h5>销售提单 - 新增</h5>
</td> </div>
<td width="100" height="25" class="td_bg">车架号</td> <div class="ibox-content">
<td height="25" class="td_bg"> <div class="row">
<input name="car_frame_no" type="text" id="car_frame_no" value="" style="width:100px;"/> <div class="col-md-12">
</td> <form role="form" class="form-horizontal data-from" id="theFrm">
<td width="100" height="25" class="td_bg">车主</td> <div class="row">
<td height="25" class="td_bg"> <div class="form-group col-md-3" style="margin-right: 1%;">
<input name="car_man" type="text" id="car_man" value="" style="width:100px;"/> <label class="control-label">车牌号</label>
</td> <input type="text" class="form-control" name="car_no" id="car_no">
<td width="100" height="25" class="td_bg">手机</td> </div>
<td height="25" class="td_bg"> <div class="form-group col-md-3" style="margin-right: 1%;">
<input name="car_phone" type="text" id="car_phone" value="" style="width:100px;"/> <label class="control-label">发动机号</label>
</td> <input type="text" class="form-control" name="engine_no" id="engine_no">
</tr> </div>
</form> <div class="form-group col-md-3" style="margin-right: 1%;">
<tr> <label class="control-label">车架号</label>
<td colspan="10" height="22" colspan="2" align="center" class="td_bg"> <input type="text" class="form-control" name="car_frame_no" id="car_frame_no">
<input id="search-btn" type=button class="ACT_btn" name=Submit1 value=" 搜索 "/> </div>
<input id="back-btn" type=button class="ACT_btn" name=Submit2 value=" 返回 "/> </div>
</td> <div class="row">
</tr> <div class="form-group col-md-3" style="margin-right: 1%;">
</table> <label class="control-label">车主</label>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <input type="text" class="form-control" name="car_man" id="car_man">
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script> </div>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <div class="form-group col-md-3" style="margin-right: 1%;">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <label class="control-label">手机</label>
<input type="text" class="form-control" name="car_phone" id="car_phone">
</div>
</div>
<div class="row">
<div class="col-md-2 col-md-offset-3">
<button class="btn btn-primary btn-save" type="button" onclick="saveInfo()">
<strong>搜索</strong>
</button>
</div>
<div class="col-md-2">
<button class="btn btn-primary btn-save" type="button" onclick="goBack()">
<strong>返回</strong>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
$(function () { function saveInfo(){
//保存按钮 var params = $("#theFrm").serialize();
$("#search-btn").click(function(){ window.location.href = '/fix-car/my-search-result?' + params;
var params = $("#theFrm").serialize(); }
window.location.href = '/fix-car/my-search-result?' + params;
}); function goBack(){
//返回按钮 window.location.href='/fix-car/my-list';
$('#back-btn').click(function(){ }
window.location.href='/fix-car/my-list';
});
})
</script> </script>
<?php $this->endBlock('footer_js'); ?>

@ -1,67 +1,92 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>维修调度</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label for="username">车牌号</label>
<input type="text" id="car_no" name="car_no" class="form-control">
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="link_man">联系人</th>
<th data-field="car_no">车牌号</th>
<th data-field="brand">品牌</th>
<th data-field="series">车型</th>
<th data-field="address">地址</th>
<th data-field="">代步车</th>
<th data-field="receive_date">接车日期</th>
<th data-field="accident_type">事故类型</th>
<th data-field="responsibility">责任</th>
<th data-field="show_name">提单者</th>
<th data-field="status">状态</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 type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
//编辑 function opFormatter(value, row, index) {
function edit(id,status) { var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ',' + row.status +')">');
opStr.push('<i class="fa fa-edit" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function edit(id) {
var title = '维修调度';
window.location.href = '/fix-car/my-list-edit?id=' + id + '&status=' + status + '&type=1'; window.location.href = '/fix-car/my-list-edit?id=' + id + '&status=' + status + '&type=1';
} }
$(function(){
$("#search-btn").click(function(){ function refreshList() {
var params = $('#searchForm').serialize(); $('#listTable').bootstrapTable('refresh');
window.location.href = "/fix-car/step1-list-finish?" + params; }
});
$('#add-btn').click(function(){ function search() {
edit(0); $('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/fix-car/step1-list-finish-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
return params;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<tr>
<td class="td_bg">
车牌号:<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="50" align="center" align="center" class="bg_tr" nowrap>排序</td>
<td align="center" align="center" class="bg_tr">联系人</td>
<td align="center" align="center" class="bg_tr">车牌号</td>
<td align="center" align="center" class="bg_tr">品牌</td>
<td align="center" align="center" class="bg_tr">车型</td>
<td align="center" align="center" class="bg_tr">地址</td>
<td align="center" align="center" class="bg_tr">代步车</td>
<td align="center" align="center" class="bg_tr">事故类型</td>
<td align="center" align="center" class="bg_tr">责任</td>
<td align="center" align="center" class="bg_tr">提单者</td>
<td align="center" align="center" class="bg_tr">状态</td>
<td align="center" align="center" class="bg_tr">操作时间</td>
</tr>
<?php
foreach($items as $index => $item) {
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
<td align="left" class="td_bg" nowrap><?=$item->link_man?></td>
<td align="left" class="td_bg" nowrap><?=$item->car_no?></td>
<td align="left" class="td_bg" nowrap><?=$item->brand?$item->brand->name:''?></td>
<td align="left" class="td_bg" nowrap><?=$item->series?$item->series->name:''?></td>
<td align="left" class="td_bg" nowrap><?=$item->address?></td>
<td align="left" class="td_bg" nowrap></td>
<td align="left" class="td_bg" nowrap><?=$item->accident_type?></td>
<td align="left" class="td_bg" nowrap><?=$item->responsibility?></td>
<td align="left" class="td_bg" nowrap><?=$item->user->getShowName()?></td>
<td align="left" class="td_bg" nowrap><?=$item->getStatus()?></td>
<td align="left" class="td_bg" nowrap><?=$item->updated_at?></td>
</tr>
<?php
}
?>
</table>

@ -1,71 +1,92 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <?php $this->beginBlock('header_css'); ?>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>维修调度</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label for="username">车牌号</label>
<input type="text" id="car_no" name="car_no" class="form-control">
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="link_man">联系人</th>
<th data-field="car_no">车牌号</th>
<th data-field="brand">品牌</th>
<th data-field="series">车型</th>
<th data-field="address">地址</th>
<th data-field="">代步车</th>
<th data-field="receive_date">接车日期</th>
<th data-field="accident_type">事故类型</th>
<th data-field="responsibility">责任</th>
<th data-field="show_name">提单者</th>
<th data-field="status">状态</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 type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
//编辑 function opFormatter(value, row, index) {
function edit(id,status) { var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ',' + row.status +')">');
opStr.push('<i class="fa fa-edit" title="详情"></i>');
opStr.push('</a>');
return opStr.join(' ');
}
function edit(id) {
var title = '维修调度';
window.location.href = '/fix-car/my-list-edit?id=' + id + '&status=' + status + '&type=1'; window.location.href = '/fix-car/my-list-edit?id=' + id + '&status=' + status + '&type=1';
} }
$(function(){
$("#search-btn").click(function(){ function refreshList() {
var params = $('#searchForm').serialize(); $('#listTable').bootstrapTable('refresh');
window.location.href = "/fix-car/step1-list?" + params; }
});
$('#add-btn').click(function(){ function search() {
edit(0); $('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/fix-car/step1-list-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
return params;
}
}); });
return false;
}
$(function() {
search();
}); });
</script> </script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php $this->endBlock(); ?>
<form id="searchForm">
<tr>
<td class="td_bg">
车牌号:<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="50" align="center" align="center" class="bg_tr" nowrap>排序</td>
<td align="center" align="center" class="bg_tr">联系人</td>
<td align="center" align="center" class="bg_tr">车牌号</td>
<td align="center" align="center" class="bg_tr">品牌</td>
<td align="center" align="center" class="bg_tr">车型</td>
<td align="center" align="center" class="bg_tr">地址</td>
<td align="center" align="center" class="bg_tr">代步车</td>
<td align="center" align="center" class="bg_tr">接车日期</td>
<td align="center" align="center" class="bg_tr">事故类型</td>
<td align="center" align="center" class="bg_tr">责任</td>
<td align="center" align="center" class="bg_tr">提单者</td>
<td align="center" align="center" class="bg_tr">状态</td>
<td width="30" align="center" class="bg_tr">操作</td>
</tr>
<?php
foreach($items as $index => $item) {
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
<td align="left" class="td_bg" nowrap><?=$item->link_man?></td>
<td align="left" class="td_bg" nowrap><?=$item->car_no?></td>
<td align="left" class="td_bg" nowrap><?=$item->brand?$item->brand->name:''?></td>
<td align="left" class="td_bg" nowrap><?=$item->series?$item->series->name:''?></td>
<td align="left" class="td_bg" nowrap><?=$item->address?></td>
<td align="left" class="td_bg" nowrap></td>
<td align="left" class="td_bg" nowrap><?=$item->receive_date?></td>
<td align="left" class="td_bg" nowrap><?=$item->accident_type?></td>
<td align="left" class="td_bg" nowrap><?=$item->responsibility?></td>
<td align="left" class="td_bg" nowrap><?=$item->user->getShowName()?></td>
<td align="left" class="td_bg" nowrap><?=$item->getStatus()?></td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="edit(<?= $item->id ?>,<?=$item->status?>)">详情</a>]
</td>
</tr>
<?php
}
?>
</table>

@ -110,6 +110,7 @@ use \common\libs\MyLib;
您的浏览器不支持在线播放,请<a href="http://music.baidu.com/cms/app/muplayer/test_mp3/1.mp3">下载</a> 您的浏览器不支持在线播放,请<a href="http://music.baidu.com/cms/app/muplayer/test_mp3/1.mp3">下载</a>
</audio> </audio>
</div> </div>
<?php $this->beginBlock('footer_js'); ?> <?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.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> <script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>

Loading…
Cancel
Save