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.
529 lines
34 KiB
529 lines
34 KiB
<?php
|
|
use \common\libs\MyLib;
|
|
use \common\models\PriceT;
|
|
?>
|
|
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
|
|
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
<tr>
|
|
<td height="22" colspan="2" class="td_bg">
|
|
<table width="100%" align="center" height="120" border="0" cellpadding="0" cellspacing="0" id="mainTable">
|
|
<tr>
|
|
<td height="120" valign="top" class="td_bg">
|
|
<!--保单信息-->
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<TD height="30" align="center" class=tab-on id=navcell onclick=open_up(1) name="navcell">▼保单信息</TD>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<TABLE id=tb1 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
|
|
<TR>
|
|
<TD vAlign=top>
|
|
<form id="orderFrm">
|
|
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
|
|
<input type="hidden" name="car_id" value="<?=$car_info->id?>">
|
|
<tr>
|
|
<td width="100" height="25" class="bg_tr">车牌号</td>
|
|
<td height="25" class="td_bg"><?=$car_info->car_no?></td>
|
|
<td width="100" height="25" class="bg_tr">厂牌型号</td>
|
|
<td height="25" class="td_bg"><?=$car_info->factory_model?></td>
|
|
<td width="60" height="25" class="bg_tr">品牌</td>
|
|
<td width="120" height="25" class="td_bg"><?=$car_info->brand?$car_info->brand->name:''?></td>
|
|
<td width="60" height="25" class="bg_tr">车系</td>
|
|
<td height="25" class="td_bg"><?=$car_info->series?$car_info->series->name:''?></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="bg_tr">发动机号</td>
|
|
<td height="25" class="td_bg"><?=$car_info->engine_no?></td>
|
|
<td width="100" height="25" class="bg_tr">车架号</td>
|
|
<td height="25" class="td_bg"><?=$car_info->car_frame_no?></td>
|
|
<td width="60" height="25" class="bg_tr">初登日期</td>
|
|
<td height="25" class="td_bg"><?=$car_info->register_date?></td>
|
|
<td width="60" height="25" class="bg_tr">排量</td>
|
|
<td height="25" class="td_bg"><?=$car_info->displacement?$car_info->displacement->name:''?></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="bg_tr">车辆类型</td>
|
|
<td height="25" class="td_bg"><?=$car_info->carType?$car_info->carType->name:''?></td>
|
|
<td width="100" height="25" class="bg_tr">运营性质</td>
|
|
<td height="25" class="td_bg"><?=$car_info->carUse?$car_info->carUse->name:''?></td>
|
|
<td width="60" height="25" class="bg_tr">座位数</td>
|
|
<td height="25" class="td_bg"><?=$car_info->seats?></td>
|
|
<td width="60" height="25" class="bg_tr">年份</td>
|
|
<td height="25" class="td_bg"><?=$car_info->car_year?></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="bg_tr">车主</td>
|
|
<td height="25" class="td_bg"><?=$car_info->car_man?></td>
|
|
<td width="100" height="25" class="bg_tr">联系电话</td>
|
|
<td height="25" class="td_bg"><?=$car_info->phone?></td>
|
|
<td width="60" height="25" class="bg_tr">证件号码</td>
|
|
<td colspan="3" height="25" class="td_bg"><?=$car_info->car_man_number?></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="60" height="25" class="bg_tr">备注</td>
|
|
<td height="25" class="td_bg"><?=$car_info->remark?></td>
|
|
<td width="60" height="25" class="bg_tr">业务分组</td>
|
|
<td height="25" class="td_bg"><?=$order_info->businessGroup ? $order_info->businessGroup->name : ''?></td>
|
|
<td width="100" height="25" class="bg_tr">业务员</td>
|
|
<td height="25" class="td_bg"><?=$order_info->user?$order_info->user->getShowName():''?></td>
|
|
<td width="60" height="25" class="bg_tr">联系电话</td>
|
|
<td height="25" class="td_bg"><?=$order_info->user?$order_info->user->phone:''?></td>
|
|
</tr>
|
|
</table>
|
|
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
|
|
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
|
|
<tr>
|
|
<td class="bg_tr">被保险人</td>
|
|
<td class="td_bg"><?=$order_info->id_man?></td>
|
|
<td class="bg_tr">证件号码</td>
|
|
<td class="td_bg"><?=$order_info->id_number?></td>
|
|
<td width="60" class="bg_tr">联系人</td>
|
|
<td class="td_bg"><?=$order_info->link_man?></td>
|
|
<td width="60" class="bg_tr">联系电话</td>
|
|
<td class="td_bg"><?=$order_info->link_phone?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">送单日期</td>
|
|
<td class="td_bg"><?=$order_info->send_date?></td>
|
|
<td class="bg_tr">保险公司</td>
|
|
<td class="td_bg"><?=$order_info->company?$order_info->company->name:''?></td>
|
|
<td class="bg_tr">付款方式</td>
|
|
<td class="td_bg"><?=$order_info->shoufei_id?MyLib::zhifufs($order_info->shoufei_id).'-':''?><?=$order_info->payType?$order_info->payType->name:''?></td>
|
|
<td class="bg_tr">付款人</td>
|
|
<td class="td_bg">
|
|
|
|
<select name="payer" id="payer">
|
|
<option value="">---请选择---</option>
|
|
<option value="1" <?php if($order_info->payer ==1) echo ' selected '; ?>>---公司支付---</option>
|
|
<option value="2" <?php if($order_info->payer ==2) echo ' selected '; ?>>---客户支付---</option>
|
|
<option value="3" <?php if($order_info->payer ==3) echo ' selected '; ?>>---合作方支付---</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">商业起保日期</td>
|
|
<td class="td_bg"><?=$order_info->insurer1_begin_date?></td>
|
|
<td class="bg_tr">交强起保日期</td>
|
|
<td class="td_bg"><?=$order_info->insurer2_begin_date?></td>
|
|
<td class="bg_tr">缴费单号</td>
|
|
<td class="td_bg"><?=$order_info->pay_no?></td>
|
|
<td class="bg_tr">收款人</td>
|
|
<td class="td_bg">
|
|
<select name="payee_id" id="payee_id" style="width:100px;">
|
|
<option value="">---请选择---</option>
|
|
<?php
|
|
foreach($payee_items as $item) {
|
|
echo '<option value="'.$item->id.'"';
|
|
if($item->id == $order_info->payee_id)
|
|
echo ' selected ';
|
|
echo '>'.$item->name.'</option>';
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">商业保单号</td>
|
|
<td class="td_bg"><input name="insurer1_no" id="insurer1_no" type="text" value="<?=$order_info->insurer1_no?>" style="width:100px;"></td>
|
|
<td class="bg_tr">交强保单号</td>
|
|
<td class="td_bg"><input name="insurer2_no" id="insurer2_no" type="text" value="<?=$order_info->insurer2_no?>" style="width:100px;"></td>
|
|
<td class="bg_tr">验证码</td>
|
|
<td class="td_bg"><?=$order_info->sms_code?></td>
|
|
<td class="bg_tr">收款方式</td>
|
|
<td class="td_bg">
|
|
<select name="payment_id" id="payment_id" style="width:100px;">
|
|
<option value="">---请选择---</option>
|
|
<?php
|
|
foreach($payment_items as $item) {
|
|
echo '<option value="'.$item->id.'"';
|
|
if($item->id == $order_info->payment_id)
|
|
echo ' selected ';
|
|
echo '>'.$item->name.'</option>';
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">送单地址</td>
|
|
<td colspan="5" class="td_bg">
|
|
<?=$order_info->direction1?$order_info->direction1->name:''?>
|
|
<?=$order_info->range1?$order_info->range1->name:''?>
|
|
<?=$order_info->city1?$order_info->city1->name:''?>
|
|
<?=$order_info->district1?$order_info->district1->name:''?>
|
|
<?=$order_info->send_address1?>
|
|
</td>
|
|
<td rowspan="2" class="bg_tr" valign="center">备注</td>
|
|
<td rowspan="2" valign="top" class="td_bg"><?=$order_info->remark?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">正本送单地址</td>
|
|
<td colspan="5" class="td_bg">
|
|
<?=$order_info->receiver_province?>
|
|
<?=$order_info->receiver_province?>
|
|
<?=$order_info->receiver_city?>
|
|
<?=$order_info->receiver_county?>
|
|
<?=$order_info->receiver_address?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table width="98%" border="0" align="center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
|
<tr>
|
|
<td width="40%" valign="top">
|
|
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
<tr>
|
|
<td align="center" class="bg_tr">险种</td>
|
|
<td align="center" class="bg_tr">内容</td>
|
|
<td align="center" class="bg_tr" nowrap>不计免赔</td>
|
|
</tr>
|
|
<?php
|
|
$len = count($insurer_type_items);
|
|
for($i = 0; $i < $len; $i++) {
|
|
$item = $insurer_type_items[$i];
|
|
$order_id = $order_info->id;
|
|
if(!$order_id)
|
|
$order_id = 0;
|
|
$tmp_row = PriceT::find()
|
|
->where('order_id='.$order_id.' and type_id='.$item->id)
|
|
->one();
|
|
if($tmp_row->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue;
|
|
?>
|
|
<tr>
|
|
<td class="bg_tr" nowrap><?=$item->name?>(<?=$item->code?>)</td>
|
|
<td class="td_bg"><?=$tmp_row->val?></td>
|
|
<td align="center" class="td_bg"><?php
|
|
if($tmp_row->is_nopay==1) {
|
|
echo '是';
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
</td>
|
|
<td width="10px;"> </td>
|
|
<td width="60%" valign="top">
|
|
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
<tr>
|
|
<td class="bg_tr">商业总净保费</td>
|
|
<td class="td_bg"><?=$order_info->total1_clear?></td>
|
|
<td class="bg_tr">商业含税总保费</td>
|
|
<td class="td_bg"><?=$order_info->total1?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">交强总净保费</td>
|
|
<td class="td_bg"><?=$order_info->total2_clear?></td>
|
|
<td class="bg_tr">交强含税总保费</td>
|
|
<td class="td_bg"><?=$order_info->total2?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">车船税</td>
|
|
<td class="td_bg"><?=$order_info->total3?></td>
|
|
<td class="bg_tr">共计签单</td>
|
|
<td class="td_bg"><?=$order_info->total_all?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">折扣后商业净保费</td>
|
|
<td class="td_bg"><?=$order_info->total1_real?></td>
|
|
<td class="bg_tr">减免金额</td>
|
|
<td class="td_bg"><?=$order_info->total1_dis?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">商业折扣率</td>
|
|
<td class="td_bg"><?=$order_info->total1_percent?></td>
|
|
<td class="bg_tr">应收</td>
|
|
<td class="td_bg"><?=$order_info->total_real?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bg_tr">备注</td>
|
|
<td colspan="3" class="td_bg"><?=$order_info->price_remark?></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<p>礼券</p>
|
|
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
<tr>
|
|
<?php
|
|
$index = 0;
|
|
foreach($gift_free_group_items as $item) {
|
|
if($index > 0 && $index%2==0) {
|
|
echo '</tr><tr>';
|
|
}
|
|
$index++;
|
|
echo '<td width="85" class="bg_tr">'.$index.'</td>';
|
|
echo '<td width="40%" class="td_bg">';
|
|
echo $item->name;
|
|
echo '</td>';
|
|
}
|
|
while($index%2!=0) {
|
|
echo '<td width="85" class="bg_tr"> </td>';
|
|
echo '<td width="40%" class="td_bg"> </td>';
|
|
$index++;
|
|
}
|
|
?>
|
|
</tr>
|
|
</table>
|
|
<p>实物礼品</p>
|
|
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
<tr>
|
|
<?php
|
|
$index = 0;
|
|
foreach($gift_group_items as $item) {
|
|
if($index > 0 && $index%2==0) {
|
|
echo '</tr><tr>';
|
|
}
|
|
$index++;
|
|
echo '<td width="85" class="bg_tr">'.$index.'</td>';
|
|
echo '<td width="40%" class="td_bg">';
|
|
echo $item->name;
|
|
echo '</td>';
|
|
}
|
|
while($index%2!=0) {
|
|
echo '<td width="85" class="bg_tr"> </td>';
|
|
echo '<td width="40%" class="td_bg"> </td>';
|
|
$index++;
|
|
}
|
|
?>
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<!--保单上传-->
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<TD height="30" align="center" class=tab-on id=navcell onclick=open_up(4) name="navcell">▼保单上传</TD>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
|
|
<TR>
|
|
<TD vAlign=top>
|
|
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="table-layout: fixed;">
|
|
<tr>
|
|
<td width="110" align="left" class="bg_tr">上传商业保单文件:</td>
|
|
<td class="td_bg">
|
|
<input type="text" name="urlfile" id="urlfile" style="width: 200px;" value="<?=$order_info->shangye_src?>">
|
|
<input id="fileupload" type="file" name="file">
|
|
</td>
|
|
<td width="110" align="left" class="bg_tr">上传交强保单文件:</td>
|
|
<td class="td_bg">
|
|
<input type="text" name="urlfile1" id="urlfile1" style="width: 200px;" value="<?=$order_info->jiaoqiang_src?>">
|
|
<input id="fileupload1" type="file" name="file1">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
|
|
|
|
<!--操作记录-->
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲操作记录</TD>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
|
|
<TR>
|
|
<TD vAlign=top>
|
|
<div id="car_history_list"></div>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td height="22" colspan="2" align="center" class="td_bg">
|
|
<input id="return-btn" type=button class="ACT_btn" name=Submit5 value=" 退回 "/>
|
|
|
|
<input id="cancel-btn" type=button class="ACT_btn" name=Submit4 value=" 放弃处理 "/>
|
|
|
|
<!--
|
|
<input id="gift-btn" type=button class="ACT_btn" name=Submit7 value=" 礼品出库 "/>
|
|
|
|
//-->
|
|
<!-- <input id="ems-btn" type=button class="ACT_btn" name=Submit6 value=" EMS打印 "/>-->
|
|
<!-- -->
|
|
<input id="save-btn" type=button class="ACT_btn" name=Submit1 value=" 保存 "/>
|
|
|
|
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 流程结束 "/>
|
|
|
|
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 ">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/common2.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.js"></script>
|
|
<script type="text/javascript" language="javascript">
|
|
//保单处理
|
|
function SaveOrder(status_id) {
|
|
var param = $('#orderFrm').serialize();
|
|
var payer = $("#payer").val();
|
|
var urlfile=$('#urlfile').val();
|
|
var urlfile1=$('#urlfile1').val();
|
|
|
|
param = param + '&status_id=' + status_id;
|
|
if(status_id>5){
|
|
|
|
if(isNull(payer)){
|
|
alert('付款人必填项!');
|
|
return false;
|
|
}
|
|
}
|
|
param=param+'&urlfile='+urlfile+'&urlfile1='+urlfile1
|
|
$.post('/insurer/original-mng-save',param,function(obj){
|
|
if(obj.success) {
|
|
if(status_id == 10)
|
|
$('#back-btn').click();
|
|
else
|
|
alert(obj.msg);
|
|
} else {
|
|
alert(obj.msg);
|
|
}
|
|
},'json');
|
|
}
|
|
//判断是否填写了选项
|
|
function isNull(data){
|
|
|
|
if(data == "" || data == undefined || data == null){
|
|
return true;
|
|
}else{
|
|
return false;
|
|
}
|
|
}
|
|
$(function(){
|
|
|
|
//操作历史
|
|
gotoPage('/car/ajax-history-index?car_id=<?=$car_info->id?>&page=1','car_history_list');
|
|
//退回处理
|
|
$('#return-btn').click(function(){
|
|
var r = prompt('退回原因', '');
|
|
if(r != null && r != '') {
|
|
$.post('/insurer/return-op',{
|
|
order_id:<?=$order_info->id?>,
|
|
return_remark:r,
|
|
return_status_id:<?=$order_info->status_id?>
|
|
},function(obj){
|
|
alert(obj.msg);
|
|
if(obj.success) {
|
|
$('#back-btn').click();
|
|
}
|
|
},'json');
|
|
} else {
|
|
alert('不填写原因,无法退回');
|
|
}
|
|
});
|
|
//放弃处理
|
|
$('#cancel-btn').click(function(){
|
|
if(confirm('是否确认放弃处理?')) {
|
|
$.post('/insurer/order-cancel-save',{order_id:<?=$order_info->id?>},function(obj){
|
|
if(obj.success) {
|
|
$('#back-btn').click();
|
|
} else {
|
|
alert(obj.msg);
|
|
}
|
|
},'json');
|
|
}
|
|
});
|
|
//添加EMS
|
|
$('#ems-save-btn').click(function(){
|
|
var params = $('#emsFrm').serialize();
|
|
$.post('/ems/save',params,function(obj){
|
|
alert(obj.msg);
|
|
if(obj.success) {
|
|
$('#emsFrm')[0].reset();
|
|
gotoPage('/ems/ajax-car-index?car_id=<?=$car_info->id?>&order_id=<?=$order_info->id?>&t='+Math.random(),'ems_list');
|
|
}
|
|
},'json');
|
|
});
|
|
gotoPage('/ems/ajax-car-index?car_id=<?=$car_info->id?>&order_id=<?=$order_info->id?>&t='+Math.random(),'ems_list');
|
|
//保存
|
|
$('#save-btn').click(function(){
|
|
SaveOrder(5);
|
|
});
|
|
//提交
|
|
$('#submit-btn').click(function(){
|
|
if(confirm('是否提交此保单?')) {
|
|
if(confirm('付款人是否正确?')) {
|
|
SaveOrder(10);
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
//返回
|
|
$('#back-btn').click(function(){
|
|
window.location.href = '/insurer/original-mng?<?=$back_params?>';
|
|
});
|
|
|
|
//EMS打印
|
|
// $('#ems-btn').click(function(){
|
|
// window.open('/insurer/original-ems-edit?id=<?//=$order_info->id?>//');
|
|
// });
|
|
|
|
//礼品出库
|
|
$('#gift-btn').click(function(){
|
|
var param = $('#orderFrm').serialize();
|
|
$.post('/insurer/office-mng-gift-save',param,function(obj){
|
|
alert(obj.msg);
|
|
if(obj.success) {
|
|
window.location.reload();
|
|
}
|
|
},'json');
|
|
});
|
|
//上传
|
|
$('#fileupload').fileupload({
|
|
url: '/finance/upload-pdf',
|
|
dataType: 'json',
|
|
done: function (e, data) {
|
|
if(!data.result.success){
|
|
alert(data.result.files[0]['error'])
|
|
}
|
|
var file_info = data.result.files[0];
|
|
$('#urlfile').val(file_info.src);
|
|
// $result['files'][0]['error'] = '上传格式文件不是pdf文件';
|
|
}
|
|
});
|
|
$('#fileupload1').fileupload({
|
|
url: '/finance/upload-pdf1',
|
|
dataType: 'json',
|
|
done: function (e, data) {
|
|
if(!data.result.success){
|
|
alert(data.result.files[0]['error'])
|
|
}
|
|
var file_info = data.result.files[0];
|
|
$('#urlfile1').val(file_info.src);
|
|
// $result['files'][0]['error'] = '上传格式文件不是pdf文件';
|
|
}
|
|
});
|
|
});
|
|
</script>
|