|
|
@ -89,7 +89,7 @@ use \common\libs\MyLib; |
|
|
|
<div class="container"> |
|
|
|
<div class="container"> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<label class="control-label">业务分组</label> |
|
|
|
<label class="control-label">业务分组</label> |
|
|
|
<span class="order-info" data-name="businessGroup"></span> |
|
|
|
<span class="order-info" data-name="business_group_name"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<label class="control-label">被保险人</label> |
|
|
|
<label class="control-label">被保险人</label> |
|
|
@ -159,7 +159,7 @@ use \common\libs\MyLib; |
|
|
|
<label class="control-label">备注</label> |
|
|
|
<label class="control-label">备注</label> |
|
|
|
<span class="order-info" data-name=""></span> |
|
|
|
<span class="order-info" data-name=""></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<div class="form-group col-md-6" style="margin-bottom: 8px;"> |
|
|
|
<label class="control-label">正本送单地址</label> |
|
|
|
<label class="control-label">正本送单地址</label> |
|
|
|
<span class="order-info" data-name="receiver_addr_txt"></span> |
|
|
|
<span class="order-info" data-name="receiver_addr_txt"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -221,15 +221,34 @@ use \common\libs\MyLib; |
|
|
|
<label class="control-label">备注</label> |
|
|
|
<label class="control-label">备注</label> |
|
|
|
<span class="order-info" data-name="price_remark"></span> |
|
|
|
<span class="order-info" data-name="price_remark"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div><hr> |
|
|
|
</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"> |
|
|
|
<form method="get" class="form-horizontal"> |
|
|
|
<input type="hidden" name="id" class="form-control order-info"> |
|
|
|
<input type="hidden" name="id" class="form-control order-info"> |
|
|
|
<div class="form-group"> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-4 control-label">商业保单文件</label> |
|
|
|
<label class="col-sm-4 control-label">商业保单文件</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<div class="input-group"> |
|
|
|
<div class="input-group"> |
|
|
|
<input type="text" name="shangye_src" class="form-control order-info" value=""> |
|
|
|
<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" id="upload"> |
|
|
|
<a href="javascript:void(0);" class="input-group-addon upload"> |
|
|
|
上传文件 |
|
|
|
上传文件 |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -240,8 +259,8 @@ use \common\libs\MyLib; |
|
|
|
<label class="col-sm-4 control-label">交强保单文件</label> |
|
|
|
<label class="col-sm-4 control-label">交强保单文件</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<div class="input-group"> |
|
|
|
<div class="input-group"> |
|
|
|
<input type="text" name="urlfile1" class="form-control order-info" value=""> |
|
|
|
<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" id="upload"> |
|
|
|
<a href="javascript:void(0);" class="input-group-addon upload"> |
|
|
|
上传文件 |
|
|
|
上传文件 |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -249,16 +268,10 @@ use \common\libs\MyLib; |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="hr-line-dashed"></div> |
|
|
|
<div class="hr-line-dashed"></div> |
|
|
|
<div class="form-group"> |
|
|
|
<div class="form-group"> |
|
|
|
<div class=""> |
|
|
|
<div class="text-center"> |
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" onclick="print_infos('insurer')"> |
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" onclick="insurer_files_save()"> |
|
|
|
<i class="fa fa-save"></i> 保存 |
|
|
|
<i class="fa fa-save"></i> 保存 |
|
|
|
</a> |
|
|
|
</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> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</form> |
|
|
@ -274,7 +287,7 @@ use \common\libs\MyLib; |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-md-6"> |
|
|
|
<div class="col-md-6"> |
|
|
|
<h4 class="title">免费礼品</h4> |
|
|
|
<h4 class="title">免费礼品</h4> |
|
|
|
<table id="gift_free_table"> |
|
|
|
<table id="free_gift_table"> |
|
|
|
<thead> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<th data-field="id">ID</th> |
|
|
|
<th data-field="id">ID</th> |
|
|
@ -286,7 +299,7 @@ use \common\libs\MyLib; |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-6"> |
|
|
|
<div class="col-md-6"> |
|
|
|
<h4 class="title">自费礼品</h4> |
|
|
|
<h4 class="title">自费礼品</h4> |
|
|
|
<table id="gift_free_table"> |
|
|
|
<table id="private_gift_table"> |
|
|
|
<thead> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<th data-field="id">ID</th> |
|
|
|
<th data-field="id">ID</th> |
|
|
@ -310,15 +323,15 @@ use \common\libs\MyLib; |
|
|
|
<div class="col-md-12"> |
|
|
|
<div class="col-md-12"> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<label class="control-label">领款人</label> |
|
|
|
<label class="control-label">领款人</label> |
|
|
|
<span class="money-info" data-name="money_man"></span> |
|
|
|
<span class="order-insurer-info" data-name="money_man"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<label class="control-label">开户行</label> |
|
|
|
<label class="control-label">开户行</label> |
|
|
|
<span class="money-info" data-name="money_bank"></span> |
|
|
|
<span class="order-insurer-info" data-name="money_bank"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<div class="form-group col-md-3" style="margin-bottom: 8px;"> |
|
|
|
<label class="control-label">品牌</label> |
|
|
|
<label class="control-label">品牌</label> |
|
|
|
<span class="money-info" data-name="money_no"></span> |
|
|
|
<span class="order-insurer-info" data-name="money_no"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -352,11 +365,11 @@ use \common\libs\MyLib; |
|
|
|
<div class="ibox-title fixed"> |
|
|
|
<div class="ibox-title fixed"> |
|
|
|
<div class="ibox-tools"> |
|
|
|
<div class="ibox-tools"> |
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" |
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" |
|
|
|
onclick="print_infos('insurer')"> |
|
|
|
onclick="reBack()"> |
|
|
|
<i class="fa fa-backward"></i> 退单 |
|
|
|
<i class="fa fa-backward"></i> 退单 |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" |
|
|
|
<a class="btn btn-primary edit-btn" data-id="0" href="javascript:void(0);" |
|
|
|
onclick="print_infos('insurer')"> |
|
|
|
onclick="goBack()"> |
|
|
|
<i class="fa fa-close"></i> 关闭 |
|
|
|
<i class="fa fa-close"></i> 关闭 |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -369,9 +382,28 @@ use \common\libs\MyLib; |
|
|
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
|
|
|
<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/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/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"> |
|
|
|
<script type="text/javascript" language="javascript"> |
|
|
|
var params = {}; |
|
|
|
var params = {}; |
|
|
|
$(function () { |
|
|
|
$(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({ |
|
|
|
$('.input-date').datepicker({ |
|
|
|
keyboardNavigation: false, |
|
|
|
keyboardNavigation: false, |
|
|
|
forceParse: false, |
|
|
|
forceParse: false, |
|
|
@ -385,7 +417,6 @@ use \common\libs\MyLib; |
|
|
|
init(); |
|
|
|
init(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
alert('数据加载错误'); |
|
|
|
alert('数据加载错误'); |
|
|
|
window.history.go(-1); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, 'json'); |
|
|
|
}, 'json'); |
|
|
|
|
|
|
|
|
|
|
@ -423,182 +454,103 @@ use \common\libs\MyLib; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function init(){ |
|
|
|
function init(){ |
|
|
|
|
|
|
|
console.log(params); |
|
|
|
carInfoInit(params['car_info']); |
|
|
|
carInfoInit(params['car_info']); |
|
|
|
orderInfoInit(params['order_info']); |
|
|
|
|
|
|
|
selectInfoInit(params); |
|
|
|
|
|
|
|
tableInfoInit(params); |
|
|
|
|
|
|
|
buttonInit(params['can_cancel']); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//拨号 |
|
|
|
if(!params['order_info']['shangye_src']){ |
|
|
|
function strCall(phone) { |
|
|
|
$('#business_print_btn').hide(); |
|
|
|
parent.drtCall(phone); |
|
|
|
} |
|
|
|
} |
|
|
|
if(!params['order_info']['jiaoqiang_src']){ |
|
|
|
//挂断 |
|
|
|
$('#compulsory_print_btn').hide(); |
|
|
|
function strHook() { |
|
|
|
|
|
|
|
parent.drtHook(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 保存车辆信息 |
|
|
|
|
|
|
|
function saveCarInfo() { |
|
|
|
|
|
|
|
var params = $('#carFrm').serialize(); |
|
|
|
|
|
|
|
$.post('/car/save',params,function(obj){ |
|
|
|
|
|
|
|
alert(obj.msg); |
|
|
|
|
|
|
|
window.location.reload(); |
|
|
|
|
|
|
|
},'json'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
orderInfoInit(params['order_info']); |
|
|
|
|
|
|
|
|
|
|
|
// 下一条信息 |
|
|
|
orderInsurerInfoInit(params['order_insurer_info']); |
|
|
|
function nextInfo(){ |
|
|
|
|
|
|
|
var param = 'index=' + params['next_index'] + '&type='+ params['type']; |
|
|
|
var free_gift = [], |
|
|
|
$.get('/track/ajax-next', param, function (obj) { |
|
|
|
private_gift = []; |
|
|
|
if (obj.success) { |
|
|
|
$.each(params['gift_info'],function (i,d) { |
|
|
|
if (obj.car_id > 0) { |
|
|
|
if(d['is_free'] == 1){ |
|
|
|
window.location.href = '/car/info-track?id=' + obj.car_id + '&type='+ params['type'] +'&next_index='+ params['next_index'] + '&back_params=' + encodeURIComponent(params['back_params']); |
|
|
|
free_gift.push(d); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
alert('没有记录'); |
|
|
|
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; |
|
|
|
} |
|
|
|
} |
|
|
|
}, 'json'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// 返回 |
|
|
|
}; |
|
|
|
function goBack(){ |
|
|
|
tableInfoInit(tables, params); |
|
|
|
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']; |
|
|
|
function insurer_files_print(type) { |
|
|
|
var ptype = $('#appointment_list').children("table").children("tbody").children("tr").eq(1).children(".ptyp").attr('data'); |
|
|
|
if(type == 'compulsory' && params['order_info']['jiaoqiang_src']){ |
|
|
|
|
|
|
|
window.open('/upload/files'+ params['order_info']['jiaoqiang_src']) |
|
|
|
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('是否确认放弃?')) { |
|
|
|
if(type == 'compulsory' && !params['order_info']['jiaoqiang_src']){ |
|
|
|
$.post(url, {id:params['car_info']['id']}, function (obj) { |
|
|
|
alert('找不到文件,加载失败'); |
|
|
|
alert(obj.msg); |
|
|
|
|
|
|
|
if (obj.success) { |
|
|
|
|
|
|
|
$('.back-btn').click(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, 'json'); |
|
|
|
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 appointmentSave(){ |
|
|
|
|
|
|
|
if (confirm('是否确认提交?')) { |
|
|
|
function insurer_files_save() { |
|
|
|
var params = $("#appointmentFrm").serialize(); |
|
|
|
var param = $(this).closest('form').serialize(); |
|
|
|
$.post('/appointment/save', params, function (obj) { |
|
|
|
$.post('/insurer/pdf-save',param,function(obj){ |
|
|
|
alert(obj.msg); |
|
|
|
console.log(obj); |
|
|
|
if(obj.success) { |
|
|
|
if(obj.success) { |
|
|
|
$('#appointmentFrm')[0].reset(); |
|
|
|
alert('保单上传成功'); |
|
|
|
$('#appointment_table').bootstrapTable('refresh'); |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
} |
|
|
|
},'json'); |
|
|
|
},'json'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 无效保存 |
|
|
|
function reBack(){ |
|
|
|
function appointmentInvalid(){ |
|
|
|
if(confirm('请核对好出单日期,确认退回到正本?')) { |
|
|
|
var car_id = params['car_info']['id']; |
|
|
|
$.post('/insurer/tuidan-save',{id:params['order_info']['id']},function(obj){ |
|
|
|
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) { |
|
|
|
if(obj.success) { |
|
|
|
$('#appointment-save-btn').attr('disabled', true); |
|
|
|
alert('退单成功'); |
|
|
|
$('.save-btn').attr('disabled', true); |
|
|
|
|
|
|
|
$('.invalid-btn').attr('disabled', true); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
},'json'); |
|
|
|
},'json'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function tableInfoInit(data){ |
|
|
|
function goBack(){ |
|
|
|
var tables = { |
|
|
|
window.close(); |
|
|
|
'appointment': '/appointment/index-json', |
|
|
|
} |
|
|
|
'insurer_order': '/car/info-track-table-json', |
|
|
|
|
|
|
|
'new_gift': '/car/info-track-table-json', |
|
|
|
function tableInfoInit(tables){ |
|
|
|
'old_gift': '/car/info-track-table-json', |
|
|
|
$.each(tables,function(name,data){ |
|
|
|
'car_history': '/car/info-track-table-json', |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
$.each(tables,function(name,url){ |
|
|
|
|
|
|
|
var $table = $('#'+ name +'_table'); |
|
|
|
var $table = $('#'+ name +'_table'); |
|
|
|
$table.bootstrapTable('destroy'); |
|
|
|
var options = {}; |
|
|
|
$table.bootstrapTable({ |
|
|
|
if(typeof data == 'String'){ |
|
|
|
url: url, |
|
|
|
options = { |
|
|
|
|
|
|
|
url: data.url, |
|
|
|
pagination: true, |
|
|
|
pagination: true, |
|
|
|
sidePagination: 'server', |
|
|
|
sidePagination: 'server', |
|
|
|
queryParams: function (param) { |
|
|
|
queryParams: data.queryParamsFunc |
|
|
|
if(name == 'new_gift'){ |
|
|
|
|
|
|
|
param['car_no'] = params['car_info']['car_no']; |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
param['car_id'] = params['car_info']['id']; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
param['name'] = name; |
|
|
|
}else { |
|
|
|
param['limit'] = param['limit']; |
|
|
|
options = { |
|
|
|
param['offset'] = param['offset']; |
|
|
|
data: data |
|
|
|
return param; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
responseHandler: function (res) { |
|
|
|
|
|
|
|
console.log(res); |
|
|
|
|
|
|
|
return res |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$table.bootstrapTable('destroy'); |
|
|
|
// 品牌选项初始化 |
|
|
|
$table.bootstrapTable(options); |
|
|
|
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); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -621,6 +573,15 @@ use \common\libs\MyLib; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) { |
|
|
|
function buttonInit(param) { |
|
|
|
if(param){ |
|
|
|
if(param){ |
|
|
|
$('#appointment_btn').prepend('<button type="button" class="btn btn-primary" onclick="cancelAppointment()">放弃</button>'); |
|
|
|
$('#appointment_btn').prepend('<button type="button" class="btn btn-primary" onclick="cancelAppointment()">放弃</button>'); |
|
|
|