|
|
|
<?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="business_group_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="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-6" 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>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<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" id="business_print_btn" href="javascript:void(0);" onclick="insurer_files_print('business')">
|
|
|
|
<i class="fa fa-search"></i> 查看商业保单并打印
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-primary btn-xs edit-btn" id="compulsory_print_btn" href="javascript:void(0);" onclick="insurer_files_print('compulsory')">
|
|
|
|
<i class="fa fa-search"></i> 查看交强保单并打印
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<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" data-name="shangye_src" name="shangye_src" class="form-control order-info" value="">
|
|
|
|
<a href="javascript:void(0);" class="input-group-addon 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" data-name="jiaoqiang_src" name="jiaoqiang_src" class="form-control order-info" value="">
|
|
|
|
<a href="javascript:void(0);" class="input-group-addon upload">
|
|
|
|
上传文件
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="text-center">
|
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" onclick="insurer_files_save()">
|
|
|
|
<i class="fa fa-save"></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="free_gift_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="private_gift_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="order-insurer-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="order-insurer-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="order-insurer-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="reBack()">
|
|
|
|
<i class="fa fa-backward"></i> 退单
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);"
|
|
|
|
onclick="goBack()">
|
|
|
|
<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 src="/assets/js/plugins/webuploader/webuploader.min.js"></script>
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
var params = {};
|
|
|
|
$(function () {
|
|
|
|
layui.use(['upload'], function(){
|
|
|
|
var upload = layui.upload;
|
|
|
|
var uploadInst = upload.render({
|
|
|
|
elem: '.upload' /*绑定元素*/,
|
|
|
|
url: '/common/upload' /*上传接口*/,
|
|
|
|
accept: 'file',
|
|
|
|
done: function(res){
|
|
|
|
//上传完毕回调
|
|
|
|
if(res.status == 'SUCCESS') {
|
|
|
|
$('#file').val(res.fileUrl);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error: 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('数据加载错误');
|
|
|
|
}
|
|
|
|
}, '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(){
|
|
|
|
console.log(params);
|
|
|
|
carInfoInit(params['car_info']);
|
|
|
|
|
|
|
|
if(!params['order_info']['shangye_src']){
|
|
|
|
$('#business_print_btn').hide();
|
|
|
|
}
|
|
|
|
if(!params['order_info']['jiaoqiang_src']){
|
|
|
|
$('#compulsory_print_btn').hide();
|
|
|
|
}
|
|
|
|
orderInfoInit(params['order_info']);
|
|
|
|
|
|
|
|
orderInsurerInfoInit(params['order_insurer_info']);
|
|
|
|
|
|
|
|
var free_gift = [],
|
|
|
|
private_gift = [];
|
|
|
|
$.each(params['gift_info'],function (i,d) {
|
|
|
|
if(d['is_free'] == 1){
|
|
|
|
free_gift.push(d);
|
|
|
|
}else {
|
|
|
|
private_gift.push(d);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
var tables = {
|
|
|
|
'insurer_type': params['insurer_type_info'],
|
|
|
|
'free_gift': free_gift,
|
|
|
|
'private_gift': private_gift,
|
|
|
|
'car_history': {
|
|
|
|
url: '/car/ajax-history-index-json',
|
|
|
|
queryParamsFunc: function (param) {
|
|
|
|
param['car_id'] = params['car_info']['id'];
|
|
|
|
param['limit'] = param['limit'];
|
|
|
|
param['offset'] = param['offset'];
|
|
|
|
return param;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
tableInfoInit(tables, params);
|
|
|
|
}
|
|
|
|
|
|
|
|
function insurer_files_print(type) {
|
|
|
|
if(type == 'compulsory' && params['order_info']['jiaoqiang_src']){
|
|
|
|
window.open('/upload/files'+ params['order_info']['jiaoqiang_src'])
|
|
|
|
}
|
|
|
|
if(type == 'compulsory' && !params['order_info']['jiaoqiang_src']){
|
|
|
|
alert('找不到文件,加载失败');
|
|
|
|
}
|
|
|
|
if(type == 'business' && params['order_info']['shangye_src']){
|
|
|
|
window.open('/upload/files'+ params['order_info']['shangye_src'])
|
|
|
|
}
|
|
|
|
if(type == 'business' && !params['order_info']['shangye_src']){
|
|
|
|
alert('找不到文件,加载失败');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function insurer_files_save() {
|
|
|
|
var param = $(this).closest('form').serialize();
|
|
|
|
$.post('/insurer/pdf-save',param,function(obj){
|
|
|
|
console.log(obj);
|
|
|
|
if(obj.success) {
|
|
|
|
alert('保单上传成功');
|
|
|
|
window.location.reload();
|
|
|
|
}
|
|
|
|
},'json');
|
|
|
|
}
|
|
|
|
|
|
|
|
function reBack(){
|
|
|
|
if(confirm('请核对好出单日期,确认退回到正本?')) {
|
|
|
|
$.post('/insurer/tuidan-save',{id:params['order_info']['id']},function(obj){
|
|
|
|
if(obj.success) {
|
|
|
|
alert('退单成功');
|
|
|
|
}
|
|
|
|
},'json');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function goBack(){
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function tableInfoInit(tables){
|
|
|
|
$.each(tables,function(name,data){
|
|
|
|
var $table = $('#'+ name +'_table');
|
|
|
|
var options = {};
|
|
|
|
if(typeof data == 'String'){
|
|
|
|
options = {
|
|
|
|
url: data.url,
|
|
|
|
pagination: true,
|
|
|
|
sidePagination: 'server',
|
|
|
|
queryParams: data.queryParamsFunc
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
options = {
|
|
|
|
data: data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$table.bootstrapTable('destroy');
|
|
|
|
$table.bootstrapTable(options);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 页面车辆数据初始化
|
|
|
|
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 orderInsurerInfoInit(data){
|
|
|
|
$('.order-insurer-info:not(input)').each(function(key,item) {
|
|
|
|
$(item).html(data[$(item).data('name')]);
|
|
|
|
});
|
|
|
|
$('.order-insurer-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'); ?>
|