|
|
|
<?php
|
|
|
|
use \common\libs\MyLib;
|
|
|
|
?>
|
|
|
|
<?php $this->beginBlock('header_css'); ?>
|
|
|
|
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
|
|
|
|
<style>
|
|
|
|
label.control-label {
|
|
|
|
width: 120px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-inline .form-control {
|
|
|
|
width: 180px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<?php $this->endBlock(); ?>
|
|
|
|
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title fixed">
|
|
|
|
<h5>保单信息</h5>
|
|
|
|
<div class="ibox-tools">
|
|
|
|
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="print_infos('insurer')">
|
|
|
|
<i class="fa fa-plus"></i> 保单打印信息
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="container">
|
|
|
|
<input type="hidden" name="id" value="" class="form-control car-info">
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">车牌号</label>
|
|
|
|
<span class="car-info" data-name="car_no"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">厂牌型号</label>
|
|
|
|
<span class="car-info" data-name="factory_model"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">品牌</label>
|
|
|
|
<span class="car-info" data-name="brand_txt"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">车系</label>
|
|
|
|
<span class="car-info" data-name="series_txt"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">发动机号</label>
|
|
|
|
<span class="car-info" data-name="engine_no"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">车架号</label>
|
|
|
|
<span class="car-info" data-name="car_frame_no"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">初登日期</label>
|
|
|
|
<span class="car-info" data-name="register_date"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">排量</label>
|
|
|
|
<span class="car-info" data-name="displacement_txt"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">车辆类型</label>
|
|
|
|
<span class="car-info" data-name="car_type_txt"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">运营性质</label>
|
|
|
|
<span class="car-info" data-name="car_use_txt"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">座位数</label>
|
|
|
|
<span class="car-info" data-name="seats"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">年份</label>
|
|
|
|
<span class="car-info" data-name="car_year"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">车主</label>
|
|
|
|
<span class="car-info" data-name="car_man"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">联系电话</label>
|
|
|
|
<span class="car-info" data-name="phone"></span>
|
|
|
|
</div>
|
|
|
|
</div><hr>
|
|
|
|
<div class="container">
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">业务分组</label>
|
|
|
|
<span class="order-info" data-name="businessGroup"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">被保险人</label>
|
|
|
|
<span class="order-info" data-name="id_man"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">证件号码</label>
|
|
|
|
<span class="order-info" data-name="id_man_number"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">联系人</label>
|
|
|
|
<span class="order-info" data-name="link_man"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">联系电话</label>
|
|
|
|
<span class="order-info" data-name="link_man_phone"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">送单日期</label>
|
|
|
|
<span class="order-info" data-name="send_date"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">保险公司</label>
|
|
|
|
<span class="order-info" data-name="company_name"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">付款方式</label>
|
|
|
|
<span class="order-info" data-name="pay_type_txt"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">收款人</label>
|
|
|
|
<span class="order-info" data-name="payee_name"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">商业起保日期</label>
|
|
|
|
<span class="order-info" data-name="insurer1_begin_date"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">交强起保日期</label>
|
|
|
|
<span class="order-info" data-name="insurer2_begin_date"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">付款人</label>
|
|
|
|
<span class="order-info" data-name="payer_name"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">缴费单号</label>
|
|
|
|
<span class="order-info" data-name="pay_no"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">商业保单号</label>
|
|
|
|
<span class="order-info" data-name="insurer1_no"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">交强保单号</label>
|
|
|
|
<span class="order-info" data-name="insurer2_no"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">收款方式</label>
|
|
|
|
<span class="order-info" data-name="payment_name"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">送单地址</label>
|
|
|
|
<span class="order-info" data-name=""></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">备注</label>
|
|
|
|
<span class="order-info" data-name=""></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">正本送单地址</label>
|
|
|
|
<span class="order-info" data-name="receiver_addr_txt"></span>
|
|
|
|
</div>
|
|
|
|
</div><hr>
|
|
|
|
<div class="container">
|
|
|
|
<table id="insurer_type_table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th data-field="id">ID</th>
|
|
|
|
<th data-field="show_name">险种</th>
|
|
|
|
<th data-field="show_content">内容</th>
|
|
|
|
<th data-field="is_nopay_txt">不计免赔</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div><hr>
|
|
|
|
<div class="container">
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">商业总净保费</label>
|
|
|
|
<span class="order-info" data-name="total1_clear"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">商业含税总保费</label>
|
|
|
|
<span class="order-info" data-name="total1"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">交强总净保费</label>
|
|
|
|
<span class="order-info" data-name="total2_clear"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">交强含税总保费</label>
|
|
|
|
<span class="order-info" data-name="total2"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">车船税</label>
|
|
|
|
<span class="order-info" data-name="total3"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">共计签单</label>
|
|
|
|
<span class="order-info" data-name="total_all"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">折扣后商业净保费</label>
|
|
|
|
<span class="order-info" data-name="total1_real"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">减免金额</label>
|
|
|
|
<span class="order-info" data-name="total1_dis"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">商业折扣率</label>
|
|
|
|
<span class="order-info" data-name="total1_percent"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">应收</label>
|
|
|
|
<span class="order-info" data-name="total_real"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">备注</label>
|
|
|
|
<span class="order-info" data-name="price_remark"></span>
|
|
|
|
</div>
|
|
|
|
</div><hr>
|
|
|
|
<form method="get" class="form-horizontal">
|
|
|
|
<input type="hidden" name="id" class="form-control order-info">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label">商业保单文件</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" name="shangye_src" class="form-control order-info" value="">
|
|
|
|
<a href="javascript:void(0);" class="input-group-addon" id="upload">
|
|
|
|
上传文件
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label">交强保单文件</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" name="urlfile1" class="form-control order-info" value="">
|
|
|
|
<a href="javascript:void(0);" class="input-group-addon" id="upload">
|
|
|
|
上传文件
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="">
|
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" onclick="print_infos('insurer')">
|
|
|
|
<i class="fa fa-save"></i> 保存
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" onclick="print_infos('insurer')">
|
|
|
|
<i class="fa fa-search"></i> 查看商业保单并打印
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" onclick="print_infos('insurer')">
|
|
|
|
<i class="fa fa-search"></i> 查看交强保单并打印
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title fixed">
|
|
|
|
<h5>礼品信息</h5>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h4 class="title">免费礼品</h4>
|
|
|
|
<table id="gift_free_table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th data-field="id">ID</th>
|
|
|
|
<th data-field="group_name">组名</th>
|
|
|
|
<th data-field="gift_name">礼品名</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h4 class="title">自费礼品</h4>
|
|
|
|
<table id="gift_free_table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th data-field="id">ID</th>
|
|
|
|
<th data-field="group_name">组名</th>
|
|
|
|
<th data-field="gift_name">礼品名</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title fixed">
|
|
|
|
<h5>财务信息</h5>
|
|
|
|
<div class="ibox-tools">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">领款人</label>
|
|
|
|
<span class="money-info" data-name="money_man"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">开户行</label>
|
|
|
|
<span class="money-info" data-name="money_bank"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;">
|
|
|
|
<label class="control-label">品牌</label>
|
|
|
|
<span class="money-info" data-name="money_no"></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title fixed">
|
|
|
|
<h5>操作记录</h5>
|
|
|
|
<div class="ibox-tools">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<table id="car_history_table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th data-field="id">ID</th>
|
|
|
|
<th data-field="op_man">操作者</th>
|
|
|
|
<th data-field="op_time_txt">操作时间</th>
|
|
|
|
<th data-field="remark">操作内容</th>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title fixed">
|
|
|
|
<div class="ibox-tools">
|
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);"
|
|
|
|
onclick="print_infos('insurer')">
|
|
|
|
<i class="fa fa-backward"></i> 退单
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);"
|
|
|
|
onclick="print_infos('insurer')">
|
|
|
|
<i class="fa fa-close"></i> 关闭
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></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">
|
|
|
|
var params = {};
|
|
|
|
$(function () {
|
|
|
|
$('.input-date').datepicker({
|
|
|
|
keyboardNavigation: false,
|
|
|
|
forceParse: false,
|
|
|
|
autoclose: true
|
|
|
|
});
|
|
|
|
|
|
|
|
// 获取数据,初始化
|
|
|
|
$.get('info-json' + window.location.search, function (obj) {
|
|
|
|
if (obj.code == 200) {
|
|
|
|
params = obj.data;
|
|
|
|
init();
|
|
|
|
} else {
|
|
|
|
alert('数据加载错误');
|
|
|
|
window.history.go(-1);
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
|
|
|
|
$('#pdate').blur(function () {
|
|
|
|
var params = $("#appointmentFrm").serialize();
|
|
|
|
$.post('/appointment/count', params, function (obj) {
|
|
|
|
if (obj.success) {
|
|
|
|
$('#day_count').val(obj.count);
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
});
|
|
|
|
$('#brand_info').change(function () {
|
|
|
|
var brand_id = $(this).val();
|
|
|
|
$('#series_info').html('<option value="0">---请选择---</option>');
|
|
|
|
$('#displacement_info').html('<option value="0">---请选择---</option>');
|
|
|
|
if (brand_id > 0) {
|
|
|
|
$.get('/car/series-fix', {brand_id: brand_id}, function (obj) {
|
|
|
|
if (obj.success) {
|
|
|
|
$('#series_info').html(obj.html);
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$('#series_info').change(function () {
|
|
|
|
var series_id = $(this).val();
|
|
|
|
$('#displacement_info').html('<option value="0">---请选择---</option>');
|
|
|
|
if (series_id > 0) {
|
|
|
|
$.get('/car/displacements-fix', {series_id: series_id}, function (obj) {
|
|
|
|
if (obj.success) {
|
|
|
|
$('#displacement_info').html(obj.html);
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
function init(){
|
|
|
|
carInfoInit(params['car_info']);
|
|
|
|
orderInfoInit(params['order_info']);
|
|
|
|
selectInfoInit(params);
|
|
|
|
tableInfoInit(params);
|
|
|
|
buttonInit(params['can_cancel']);
|
|
|
|
}
|
|
|
|
|
|
|
|
//拨号
|
|
|
|
function strCall(phone) {
|
|
|
|
parent.drtCall(phone);
|
|
|
|
}
|
|
|
|
//挂断
|
|
|
|
function strHook() {
|
|
|
|
parent.drtHook();
|
|
|
|
}
|
|
|
|
// 保存车辆信息
|
|
|
|
function saveCarInfo() {
|
|
|
|
var params = $('#carFrm').serialize();
|
|
|
|
$.post('/car/save',params,function(obj){
|
|
|
|
alert(obj.msg);
|
|
|
|
window.location.reload();
|
|
|
|
},'json');
|
|
|
|
}
|
|
|
|
|
|
|
|
// 下一条信息
|
|
|
|
function nextInfo(){
|
|
|
|
var param = 'index=' + params['next_index'] + '&type='+ params['type'];
|
|
|
|
$.get('/track/ajax-next', param, function (obj) {
|
|
|
|
if (obj.success) {
|
|
|
|
if (obj.car_id > 0) {
|
|
|
|
window.location.href = '/car/info-track?id=' + obj.car_id + '&type='+ params['type'] +'&next_index='+ params['next_index'] + '&back_params=' + encodeURIComponent(params['back_params']);
|
|
|
|
} else {
|
|
|
|
alert('没有记录');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
}
|
|
|
|
// 返回
|
|
|
|
function goBack(){
|
|
|
|
var url = '';
|
|
|
|
switch (+type) {
|
|
|
|
case 1:
|
|
|
|
url = '/track/first?' + params['next_index'];break;
|
|
|
|
case 2:
|
|
|
|
url = '/track/today?' + params['next_index'];break;
|
|
|
|
case 3:
|
|
|
|
url = '/track/all?' + params['next_index'];break;
|
|
|
|
}
|
|
|
|
return window.location.href = url;
|
|
|
|
}
|
|
|
|
// 保险信息保存
|
|
|
|
function saveInsurerInfo(){
|
|
|
|
var params = $('#insurerFm').serialize();
|
|
|
|
$.post('/car/baocun', params, function (obj) {
|
|
|
|
alert(obj.msg);
|
|
|
|
}, 'json');
|
|
|
|
}
|
|
|
|
// 取消预约
|
|
|
|
function cancelAppointment(){
|
|
|
|
//这里是后来需求改了,暂时注释
|
|
|
|
//if(location == 6){
|
|
|
|
// var url = '/track/car-cancel-e';
|
|
|
|
//}else if(location == 3 || ptype == 3){
|
|
|
|
// var url = '/track/car-cancel';
|
|
|
|
//}
|
|
|
|
|
|
|
|
var location = params['car_info']['location'];
|
|
|
|
var ptype = $('#appointment_list').children("table").children("tbody").children("tr").eq(1).children(".ptyp").attr('data');
|
|
|
|
|
|
|
|
if (location == 3) {
|
|
|
|
//C库数据
|
|
|
|
//放d
|
|
|
|
var url = '/track/car-cancel';
|
|
|
|
} else if (location == 6 && ptype == 5) {
|
|
|
|
var url = '/track/car-cancel-e';
|
|
|
|
} else {
|
|
|
|
//无效
|
|
|
|
alert('不是目标客户,请点击无效数据按钮!');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (confirm('是否确认放弃?')) {
|
|
|
|
$.post(url, {id:params['car_info']['id']}, function (obj) {
|
|
|
|
alert(obj.msg);
|
|
|
|
if (obj.success) {
|
|
|
|
$('.back-btn').click();
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 预约保存
|
|
|
|
function appointmentSave(){
|
|
|
|
if (confirm('是否确认提交?')) {
|
|
|
|
var params = $("#appointmentFrm").serialize();
|
|
|
|
$.post('/appointment/save', params, function (obj) {
|
|
|
|
alert(obj.msg);
|
|
|
|
if (obj.success) {
|
|
|
|
$('#appointmentFrm')[0].reset();
|
|
|
|
$('#appointment_table').bootstrapTable('refresh');
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 无效保存
|
|
|
|
function appointmentInvalid(){
|
|
|
|
var car_id = params['car_info']['id'];
|
|
|
|
var invalid_id = $('#invalid_id').val();
|
|
|
|
if (invalid_id == 0) {
|
|
|
|
alert('必须选择无效理由!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (confirm('是否无效这条数据?')) {
|
|
|
|
$.post('/car/invalid', {car_id: car_id, invalid_id: invalid_id}, function (obj) {
|
|
|
|
alert(obj.msg);
|
|
|
|
if (obj.success) {
|
|
|
|
$('#appointment-save-btn').attr('disabled', true);
|
|
|
|
$('.save-btn').attr('disabled', true);
|
|
|
|
$('.invalid-btn').attr('disabled', true);
|
|
|
|
}
|
|
|
|
}, 'json');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function tableInfoInit(data){
|
|
|
|
var tables = {
|
|
|
|
'appointment': '/appointment/index-json',
|
|
|
|
'insurer_order': '/car/info-track-table-json',
|
|
|
|
'new_gift': '/car/info-track-table-json',
|
|
|
|
'old_gift': '/car/info-track-table-json',
|
|
|
|
'car_history': '/car/info-track-table-json',
|
|
|
|
};
|
|
|
|
$.each(tables,function(name,url){
|
|
|
|
var $table = $('#'+ name +'_table');
|
|
|
|
$table.bootstrapTable('destroy');
|
|
|
|
$table.bootstrapTable({
|
|
|
|
url: url,
|
|
|
|
pagination: true,
|
|
|
|
sidePagination: 'server',
|
|
|
|
queryParams: function (param) {
|
|
|
|
if(name == 'new_gift'){
|
|
|
|
param['car_no'] = params['car_info']['car_no'];
|
|
|
|
}else {
|
|
|
|
param['car_id'] = params['car_info']['id'];
|
|
|
|
}
|
|
|
|
param['name'] = name;
|
|
|
|
param['limit'] = param['limit'];
|
|
|
|
param['offset'] = param['offset'];
|
|
|
|
return param;
|
|
|
|
},
|
|
|
|
responseHandler: function (res) {
|
|
|
|
console.log(res);
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 品牌选项初始化
|
|
|
|
function selectInfoInit(data){
|
|
|
|
var keys = [
|
|
|
|
'brand',
|
|
|
|
'series',
|
|
|
|
'displacement',
|
|
|
|
'car_type',
|
|
|
|
'car_use',
|
|
|
|
'appointment_type',
|
|
|
|
'business_group',
|
|
|
|
'invalid',
|
|
|
|
];
|
|
|
|
$.each(keys,function(index,key){
|
|
|
|
var html = '<option value="0">---请选择---</option>';
|
|
|
|
$.each(data[key + '_info'],function(i,item){
|
|
|
|
var val = item['code']?item['code']:item['id'];
|
|
|
|
var selected = data['car_info'][key + '_id'] && data['car_info'][key + '_id'] == val? 'selected': '';
|
|
|
|
html += '<option value="'+ val +'" '+ selected +'>'+ item.name +'</option>'
|
|
|
|
});
|
|
|
|
$('#'+ key + '_info').html(html);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 页面车辆数据初始化
|
|
|
|
function carInfoInit(data){
|
|
|
|
$('.car-info:not(input)').each(function(key,item) {
|
|
|
|
$(item).html(data[$(item).data('name')]);
|
|
|
|
});
|
|
|
|
$('.car-info:input').each(function(key,item) {
|
|
|
|
$(item).val(data[$(item).data('name')]);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function orderInfoInit(data){
|
|
|
|
$('.order-info:not(input)').each(function(key,item) {
|
|
|
|
$(item).html(data[$(item).data('name')]);
|
|
|
|
});
|
|
|
|
$('.order-info:input').each(function(key,item) {
|
|
|
|
$(item).val(data[$(item).data('name')]);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function buttonInit(param) {
|
|
|
|
if(param){
|
|
|
|
$('#appointment_btn').prepend('<button type="button" class="btn btn-primary" onclick="cancelAppointment()">放弃</button>');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<?php $this->endBlock('footer_js'); ?>
|