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.
simple-yewu/frontend/views/fix-car/my-search-result.php

80 lines
2.7 KiB

5 years ago
<?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="/fix-car/my-search">
<i class="fa fa-backward"></i> 返回
</a>
</div>
</div>
<div class="ibox-content">
<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="car_man">车主</th>
<th data-field="phone">电话</th>
<th data-field="engine_no">发动机号</th>
<th data-field="car_frame_no">车架号</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>
5 years ago
<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>');
return opStr.join(' ');
}
5 years ago
function edit(id) {
var title = '修车记录';
5 years ago
window.location.href = '/fix-car/my-list-edit?car_id=' + id + '&status=0';
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
5 years ago
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
data: <?=json_encode($items)?>,
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
return params;
}
5 years ago
});
return false;
}
$(function() {
search();
5 years ago
});
</script>
<?php $this->endBlock(); ?>