在车辆信息中,增加历史保单功能

dev
曾超新 5 years ago
parent 4fb456b6d9
commit 73dc8edec5
  1. 4
      frontend/controllers/CarController.php
  2. 2
      frontend/views/car/info-track.php
  3. 44
      frontend/views/car/info.php

@ -5081,8 +5081,8 @@ class CarController extends BaseController
$data['rows'] = []; $data['rows'] = [];
foreach($items as $item) { foreach($items as $item) {
$row = $item->toArray(); $row = $item->toArray();
$row['username'] = $row->user ? $row->user->getShowName():''; $row['username'] = $item->user->getShowName();
$row['status'] = $row->status->name; $row['status'] = $item->status->name;
$data['rows'][] = $row; $data['rows'][] = $row;
} }

@ -181,7 +181,7 @@ use \common\libs\MyLib;
return opStr.join(' '); return opStr.join(' ');
} }
function viewOrder(id) { function viewOrder(id) {
window.open('/car/order-view?id=' + id); window.open('/insurer/info?id=' + id);
} }
function searchGifts() { function searchGifts() {
$('#giftTable').bootstrapTable('destroy'); $('#giftTable').bootstrapTable('destroy');

@ -164,6 +164,33 @@ use \common\libs\MyLib;
</form> </form>
</div> </div>
</div> </div>
<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="$('#orderTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<table id="orderTable">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="id_man">被保险人</th>
<th data-field="insurer1_begin_date">商业起保日期</th>
<th data-field="insurer2_begin_date">交强起保日期</th>
<th data-field="print_date">出单日期</th>
<th data-field="total_all">共计签单</th>
<th data-field="username">业务员</th>
<th data-field="status">状态</th>
<th data-formatter="orderFormatter">操作</th>
</tr>
</thead>
</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>
@ -203,7 +230,21 @@ use \common\libs\MyLib;
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> <script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script> <script>
var o = {}; var o = {};
function insurerDlg() { function searchOrders() {
$('#orderTable').bootstrapTable('destroy');
$('#orderTable').bootstrapTable({
url: "/car/order-history-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['car_id'] = '<?=$car_info->id?>';
o['limit'] = params['limit'];
o['offset'] = params['offset'];
return o;
}
});
} function insurerDlg() {
title = '投保'; title = '投保';
layer_show(title, '/car/order-add?car_id=<?=$car_info->id?>'); layer_show(title, '/car/order-add?car_id=<?=$car_info->id?>');
} }
@ -241,6 +282,7 @@ use \common\libs\MyLib;
$(function() { $(function() {
search(); search();
searchOrders();
wsInit(); wsInit();
}); });
</script> </script>

Loading…
Cancel
Save