You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
4.4 KiB
122 lines
4.4 KiB
<?php
|
|
use \common\libs\MyLib;
|
|
?>
|
|
<?php $this->beginBlock('header_css'); ?>
|
|
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
|
|
<?php $this->endBlock(); ?>
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<h5>司机接车</h5>
|
|
<div class="ibox-tools">
|
|
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
|
|
<i class="fa fa-refresh"></i> 刷新
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="ibox-content">
|
|
<form role="form" class="form-inline" onsubmit="return search();">
|
|
<div class="form-group" 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" data-formatter="statusFormatter">状态</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 + ',' + 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';
|
|
}
|
|
|
|
function refreshList() {
|
|
$('#listTable').bootstrapTable('refresh');
|
|
}
|
|
|
|
function search() {
|
|
$('#listTable').bootstrapTable('destroy');
|
|
$('#listTable').bootstrapTable({
|
|
url: "/fix-car/step2-list-json",
|
|
pagination: true,
|
|
sidePagination: 'server',
|
|
queryParams: function(params) {
|
|
return params;
|
|
}
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function statusFormatter(value){
|
|
var result = '';
|
|
switch(+value) {
|
|
case 1:
|
|
result = '维修调度';
|
|
break;
|
|
case 2:
|
|
result = '司机接车';
|
|
break;
|
|
case 3:
|
|
result = '前台派工';
|
|
break;
|
|
case 4:
|
|
result = '查勘定损';
|
|
break;
|
|
case 5:
|
|
result = '技工维修';
|
|
break;
|
|
case 6:
|
|
result = '总检';
|
|
break;
|
|
case 7:
|
|
result = '财务结算';
|
|
break;
|
|
default:
|
|
result = '';
|
|
}
|
|
return result;
|
|
}
|
|
|
|
$(function() {
|
|
search();
|
|
});
|
|
</script>
|
|
<?php $this->endBlock(); ?>
|