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/car/info.php

228 lines
11 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="searchDlg()">-->
<!-- <i class="fa fa-list"></i> 历史记录-->
<!-- </a>-->
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="opDlg()">
<i class="fa fa-history"></i> 操作记录
</a>
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="history.go(-1)">
<i class="fa fa-backward"></i> 返回
</a>
</div>
</div>
<div class="ibox-content">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-1 control-label">车牌号</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->car_no?></label>
</div>
<label class="col-sm-1 control-label">车架号</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->car_frame_no?></label>
</div>
<label class="col-sm-1 control-label">发动机号</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->engine_no?></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">车主</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->car_man?></label>
</div>
<label class="col-sm-1 control-label">联系电话</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->phone?></label>
</div>
<label class="col-sm-1 control-label">证件号码</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->car_man_number?></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">厂牌型号</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->factory_model?></label>
</div>
<label class="col-sm-1 control-label">初登日期</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->register_date?></label>
</div>
<label class="col-sm-1 control-label">座位数</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->seats?></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">车辆类型</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->carType?$car_info->carType->name:''?></label>
</div>
<label class="col-sm-1 control-label">运营性质</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$car_info->carUse?$car_info->carUse->name:''?></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">备注</label>
<div class="col-sm-11">
<label class="form-control-static"><?=$car_info->remark?></label>
</div>
</div>
</form>
</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="linkmanDlg()">
<i class="fa fa-user"></i> 添加新联系人
</a>
</div>
</div>
<div class="ibox-content">
<form class="form-horizontal">
<?php foreach($link_men as $link) { ?>
<div class="form-group">
<label class="col-sm-1 control-label">姓名</label>
<div class="col-sm-2">
<label class="form-control-static"><?=$link->name?></label>
</div>
<label class="col-sm-1 control-label">联系电话</label>
<div class="col-sm-2">
<label class="form-control-static"><?=$link->phone?></label>
</div>
<label class="col-sm-1 control-label"><?=$link->id_type?></label>
<div class="col-sm-2">
<label class="form-control-static"><?=$link->id_number?></label>
</div>
<label class="col-sm-1 control-label">关系</label>
<div class="col-sm-2">
<label class="form-control-static"><?=$link->type?></label>
</div>
</div>
<?php } ?>
</form>
</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="insurerDlg()">
<i class="fa fa-plus"></i> 投保
</a>
</div>
</div>
<div class="ibox-content">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-1 control-label">商业止保</label>
<div class="col-sm-3">
<label class="form-control-static text-danger"><?=$car_info->insurer1_date?></label>
</div>
<label class="col-sm-1 control-label">交强止保</label>
<div class="col-sm-3">
<label class="form-control-static text-danger"><?=$car_info->insurer2_date?></label>
</div>
<label class="col-sm-1 control-label">保险公司</label>
<div class="col-sm-3">
<label class="form-control-static text-danger"><?=$car_info->company?></label>
</div>
</div>
</form>
</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="appointmentDlg()">
<i class="fa fa-calendar"></i> 预约
</a>
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="refreshList()">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="pdate">预约日期</th>
<th data-field="ptime">预约时间</th>
<th data-field="remark">预约备注</th>
<th data-field="user">业务员</th>
<th data-field="updated_at">操作时间</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>
var o = {};
function insurerDlg() {
title = '投保';
layer_show_full(title, '/car/order-add?car_id=<?=$car_info->id?>');
}
function appointmentDlg() {
title = '添加预约';
layer_show(title, '/appointment/add?car_id=<?=$car_info->id?>');
}
function linkmanDlg() {
title = '添加联系人';
layer_show(title, '/car/linkman-add?car_id=<?=$car_info->id?>');
}
function opDlg() {
title = '操作记录';
layer_show(title, '/car/history?car_id=<?=$car_info->id?>');
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/appointment/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() {
search();
});
</script>
<?php $this->endBlock(); ?>