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

657 lines
31 KiB

6 years ago
<script type="text/javascript" language="javascript" src="/js/artDialog/artDialog.js?skin=default"></script>
<script type="text/javascript" language="javascript" src="/js/artDialog/plugins/iframeTools.source.js"></script>
<div style="width:98%; margin: 0 auto;">
<h3 onclick="show('list1')">维修信息<span id="list1_title"></span></h3>
</div>
<div id="list1">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="theFrm">
<input type="hidden" id="id" name="id" value="<?=$info->id?>">
<input type="hidden" name="car_id" value="<?=$info->car_id?>">
<tr>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 车牌号</td>
<td height="25" class="td_bg" nowrap>
<input name="car_no" type="text" id="car_no" value="<?=$info->car_no?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">发动机号</td>
<td height="25" class="td_bg">
<input name="engine_no" type="text" id="engine_no" value="<?=$info->engine_no?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">车架号</td>
<td height="25" class="td_bg">
<input name="car_frame_no" type="text" id="car_frame_no" value="<?=$info->car_frame_no?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 事故类型</td>
<td height="25" class="td_bg">
<select name="accident_type">
<option><?=$info->accident_type?></option>
<option>单方</option>
<option>双方</option>
<option>多方</option>
<option>自费维修</option>
</select>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 被保险人</td>
<td height="25" class="td_bg">
<input name="id_man" type="text" id="id_man" value="<?=$info->id_man?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 电话</td>
<td height="25" class="td_bg">
<input name="id_phone" type="text" id="id_phone" value="<?=$info->id_phone?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 联系人</td>
<td height="25" class="td_bg">
<input name="link_man" type="text" id="link_man" value="<?=$info->link_man?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 电话</td>
<td height="25" class="td_bg">
<input name="link_phone" type="text" id="link_phone" value="<?=$info->link_phone?>" style="width:100px;"/>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 保险公司</td>
<td height="25" class="td_bg">
<input name="company" type="text" id="company" value="<?=$info->company?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 接车日期</td>
<td height="25" class="td_bg">
<input name="receive_date" type="text" id="receive_date" value="<?=$info->receive_date?>" style="width:100px;" onClick="WdatePicker()"/>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 交车方式</td>
<td height="25" class="td_bg">
<select name="receive_type" id="receive_type">
<option><?=$info->receive_type?></option>
<option>上门接车</option>
<option>客户自送</option>
</select>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 责任</td>
<td height="25" class="td_bg">
<select name="responsibility" id="responsibility">
<option><?=$info->responsibility?></option>
<option>全责</option>
<option>无责</option>
<option>主要责任</option>
<option>次要责任</option>
</select>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 品牌</td>
<td height="25" class="td_bg">
<select id="brand_id" name="brand_id">
<option value="0">---请选择---</option>
<?php
foreach($brand_items as $item) {
echo '<option value="'.$item->id.'"';
if($info->brand_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<td width="100" height="25" class="bg_tr">车系</td>
<td height="25" class="td_bg">
<select name="series_id" id="series_id">
<option value="0">---请选择---</option>
<?php
foreach($series_items as $item) {
echo '<option value="'.$item->id.'"';
if($info->series_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<td width="100" height="25" class="bg_tr">排量</td>
<td height="25" class="td_bg">
<select name="displacement_id" id="displacement_id">
<option value="0">---请选择---</option>
<?php
foreach($displacement_items as $item) {
echo '<option value="'.$item->id.'"';
if($info->displacement_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<td width="100" height="25" class="bg_tr">年份</td>
<td height="25" class="td_bg">
<input type="text" id="car_year" name="car_year" value="<?=$info->car_year?>" style="width:100px;">
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">商业保单号</td>
<td height="25" class="td_bg" nowrap>
<input name="insurer1_no" type="text" id="insurer1_no" value="<?=$info->insurer1_no?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">交强保单号</td>
<td height="25" class="td_bg" nowrap>
<input name="insurer2_no" type="text" id="insurer2_no" value="<?=$info->insurer2_no?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">险项</td>
<td height="25" class="td_bg" nowrap>
<input name="insurer_type" type="text" id="insurer_type" value="" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">新车购置价</td>
<td height="25" class="td_bg">
<input name="new_price" type="text" id="new_price" value="<?=$info->new_price?>" style="width:100px;"/>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">方位</td>
<td height="25" class="td_bg">
<select name="direction_id" id="direction_id">
<option value="0">请选择</option>
<?php
foreach($direction_items as $item) {
echo '<option value="'.$item->id.'"';
if($info->direction_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<td width="100" height="25" class="bg_tr">范围</td>
<td height="25" class="td_bg">
<select name="range_id" id="range_id">
<option value="0">请选择</option>
<?php
foreach($range_items as $item) {
echo '<option value="'.$item->id.'"';
if($info->range_id == $item->id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 地址</td>
<td colspan="3" height="25" class="td_bg">
<input name="address" type="text" id="address" value="<?=$info->address?>" style="width:80%;"/>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">代步车</td>
<td height="25" class="td_bg">
<select name="replace_car_id" id="replace_car_id">
<option value="0">无代步车</option>
</select>
</td>
<td width="100" height="25" class="bg_tr">接车司机</td>
<td height="25" class="td_bg">
<select name="driver_id">
<option value="0">请选择</option>
<?php
foreach($driver_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $info->driver_id)
echo ' selected ';
echo '>'.$item->getShowName().'</option>';
}
?>
</select>
</td>
<td width="100" height="25" class="bg_tr"></td>
<td height="25" class="td_bg"></td>
<td width="100" height="25" class="bg_tr"></td>
<td height="25" class="td_bg"></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">接车里程数</td>
<td height="25" class="td_bg">
<input name="receive_mileage" type="text" id="receive_mileage" value="<?=$info->receive_mileage?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">接车油表数</td>
<td height="25" class="td_bg">
<input name="receive_oil" type="text" id="receive_oil" value="<?=$info->receive_oil?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr"></td>
<td height="25" class="td_bg"></td>
<td width="100" height="25" class="bg_tr"></td>
<td height="25" class="td_bg"></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">进厂里程数</td>
<td height="25" class="td_bg">
<input name="factory_mileage" type="text" id="factory_mileage" value="<?=$info->factory_mileage?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">进厂油表数</td>
<td height="25" class="td_bg">
<input name="factory_oil" type="text" id="factory_oil" value="<?=$info->factory_oil?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">预计出厂时间</td>
<td height="25" class="td_bg">
<input name="finish_date" type="text" id="finish_date" value="<?=$info->finish_date?>" style="width:100px;" onClick="WdatePicker()"/>
</td>
<td width="100" height="25" class="bg_tr"></td>
<td height="25" class="td_bg"></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">报案号</td>
<td height="25" class="td_bg">
<input name="report_no" type="text" id="report_no" value="<?=$info->report_no?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">报案人</td>
<td height="25" class="td_bg">
<input name="baoan_man" type="text" id="baoan_man" value="<?=$info->baoan_man?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">报案时间</td>
<td height="25" class="td_bg">
<input name="baoan_time" type="text" id="baoan_time" value="<?=$info->baoan_time?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">出险时间</td>
<td height="25" class="td_bg">
<input name="chuxian_time" type="text" id="chuxian_time" value="<?=$info->chuxian_time?>" style="width:100px;"/>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">出险地点</td>
<td colspan="3" height="25" class="td_bg">
<input name="baoan_address" type="text" id="baoan_address" value="<?=$info->baoan_address?>" style="width:400px;"/>
</td>
<td width="100" height="25" class="bg_tr">事故描述</td>
<td colspan="3" height="25" class="td_bg">
<input name="shigu_info" type="text" id="shigu_info" value="<?=$info->shigu_info?>" style="width:400px;"/>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">理赔公司</td>
<td height="25" class="td_bg">
<input name="lipei_company" type="text" id="lipei_company" value="<?=$info->lipei_company?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">主车定损金额</td>
<td height="25" class="td_bg">
<input name="zhuche_money" type="text" id="zhuche_money" value="<?=$info->zhuche_money?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">三者外修</td>
<td height="25" class="td_bg">
<input name="sanzhe_money" type="text" id="sanzhe_money" value="<?=$info->sanzhe_money?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">物损</td>
<td height="25" class="td_bg">
<input name="wusun_money" type="text" id="wusun_money" value="<?=$info->wusun_money?>" style="width:100px;"/>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">拖车</td>
<td height="25" class="td_bg">
<input name="tuoche" type="text" id="tuoche" value="<?=$info->tuoche?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">拖车费用</td>
<td height="25" class="td_bg">
<input name="tuoche_money" type="text" id="tuoche_money" value="<?=$info->tuoche_money?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">定损工时费</td>
<td height="25" class="td_bg">
<input name="dingsun_hour_money" type="text" id="dingsun_hour_money" value="<?=$info->dingsun_hour_money?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">定损换件费</td>
<td height="25" class="td_bg">
<input name="dingsun_huanjian_money" type="text" id="dingsun_huanjian_money" value="<?=$info->dingsun_huanjian_money?>" style="width:100px;"/>
</td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">赔付比例</td>
<td height="25" class="td_bg">
<input name="peifu_bili" type="text" id="peifu_bili" value="<?=$info->peifu_bili?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">赔付金额</td>
<td height="25" class="td_bg">
<input name="peifu_money" type="text" id="peifu_money" value="<?=$info->peifu_money?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr">客户自付</td>
<td height="25" class="td_bg">
<input name="kehu_money" type="text" id="kehu_money" value="<?=$info->kehu_money?>" style="width:100px;"/>
</td>
<td width="100" height="25" class="bg_tr"></td>
<td height="25" class="td_bg"></td>
</tr>
<tr>
<td width="100" height="25" class="bg_tr">备注</td>
<td colspan="7" height="25" class="td_bg" align="left">
<textarea name="remark" id="remark" style="width: 600px;"><?=$info->remark?></textarea>
</td>
</tr>
</form>
<tr>
<td colspan="8" height="22" colspan="2" align="center" class="td_bg">
<input id="save-btn" type=button class="ACT_btn" name=Submit1 value=" 保存 "/>
</td>
</tr>
</table>
</div>
<div style="width:98%; margin: 0 auto;">
<h3 onclick="show('list2')">礼品列表<span id="list2_title"></span></h3>
</div>
<div id="list2">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table" style="table-layout: fixed;">
<tr>
<td width="50" align="center" class="bg_tr" nowrap>序号</td>
<td width="200" align="center" class="bg_tr" nowrap>礼品名称</td>
<td width="80" align="center" class="bg_tr" nowrap>类型</td>
<td width="50%" align="center" class="bg_tr" nowrap>描述</td>
<td width="80" align="center" class="bg_tr" nowrap>分类</td>
<td width="80" align="center" class="bg_tr" nowrap>添加者</td>
<td width="130" align="center" class="bg_tr" nowrap>操作时间</td>
<td width="50" align="center" class="bg_tr" nowrap>状态</td>
</tr>
<form id="giftFrm">
<?php
foreach($gift_items as $index => $item) {
//if(!$item->gift) continue;
?>
<tr>
<td align="center" class="td_bg"nowrap ><?php
if($item->status == 3) {
echo '';
} else if($item->gift->type_id == 2) {
if($gift_enable == 1 && $item->status == 1)
echo '<input type="checkbox" name="car_gift_ids[]" value="'.$item->id.'">';
else
echo '';
}
?></td>
<td class="td_bg" style="word-break: break-all"><?=$item->gift->name?></td>
<td align="center" class="td_bg" nowrap><?=$item->gift->type?$item->gift->type->name:''?></td>
<td class="td_bg" style="word-break: break-all"><?=$item->gift->remark?></td>
<td align="center" class="td_bg" nowrap><?=$item->strategy_id>0?'公司礼品':'自费礼品'?></td>
<td class="td_bg" nowrap><?=$item->user?$item->user->getShowName():''?></td>
<td align="center" class="td_bg" nowrap><?=date('Y-m-d H:i:s',$item->submit_time)?></td>
<td align="center" class="td_bg" nowrap>
<?php
if($item->status == 0) echo '未出库';
if($item->status == 1) echo '已出库';
if($item->status == 2) echo '正在退换';
if($item->status == 3) echo '已使用';
?>
</td>
</tr>
<?php
}
?>
</form>
<?php
if($gift_enable == 1) {
?>
<tr>
<td colspan="8" height="22" colspan="2" align="center" class="td_bg">
<input id="save-gift-btn" type=button class="ACT_btn" name="save-gift-btn" value=" 保存 "/>
</td>
</tr>
<?php
}
?>
</table>
</div>
<div style="width:98%; margin: 0 auto;">
<h3 onclick="show('list3')">保险理赔<span id="list3_title"></span></h3>
</div>
<div id="list3">
</div>
<div style="width:98%; margin: 0 auto;">
<h3 onclick="show('list4')">自费维修<span id="list4_title"></span></h3>
</div>
<div id="list4">
</div>
<div style="width:98%; margin: 0 auto;">
<h3 onclick="show('list5')">汽车保养<span id="list5_title"></span></h3>
</div>
<div id="list5">
</div>
<div style="width:98%; margin: 0 auto;">
<h3 onclick="show('list6')">汽车美容<span id="list6_title"></span></h3>
</div>
<div id="list6">
</div>
<div style="width:98%; margin: 0 auto;">
<h3 onclick="show('list7')">操作记录<span id="list7_title"></span></h3>
</div>
<div id="list7" style="display: none;">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="120" align="center" class="bg_tr" nowrap>姓名</td>
<td width="200" align="center" class="bg_tr" nowrap>操作时间</td>
<td width="50%" align="center" class="bg_tr" nowrap>意见</td>
<td width="30%" align="center" class="bg_tr" nowrap>意见说明</td>
</tr>
<?php
foreach($log_items as $item) {
?>
<tr>
<td align="center" class="td_bg"nowrap ><?=$item->op_man?></td>
<td class="td_bg" style="word-break: break-all"><?=date('Y-m-d H:i:s',$item->op_time)?></td>
<td class="td_bg" nowrap><?=$item->info?></td>
<td class="td_bg" style="word-break: break-all"><?=$item->remark?></td>
</tr>
<?php
}
?>
</table>
</div>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="otherFrm">
<tr>
<td width="100" height="25" class="bg_tr">审核意见</td>
<td colspan="7" height="25" class="td_bg" align="left">
<textarea name="sys_remark" id="sys_remark" style="width: 600px;"></textarea>
</td>
</tr>
<tr>
<td colspan="8" height="22" colspan="2" align="center" class="td_bg">
<?php
if($info->status > 0) {
?>
<input id="return-btn" type=button class="ACT_btn" name="return-btn" value=" 退回 "/>
&nbsp;&nbsp;
<?php
}
?>
<input id="add-info-btn" type=button class="ACT_btn" name="add-info-btn" value=" 维修明细 "/>
&nbsp;
<?php
if($info->status > 0 && $info->status < 4) {
?>
<input id="print-btn" type=button class="ACT_btn" name="print-btn" value=" 打印接车单 "/>
&nbsp;&nbsp;
<?php
}
?>
<?php
if($info->status != 5)
{
?>
<input id="submit-btn" type=button class="ACT_btn" name="submit-btn" value=" 提交 "/>
&nbsp;&nbsp;
<?php
}
?>
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
</td>
</tr>
</form>
</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">
function reloadItems() {
var id = $('#id').val();
if(id > 0) {
gotoPage('/fix-car/ajax-item-list?fix_id=' + id + '&big_type_id=1','list3');
gotoPage('/fix-car/ajax-item-list?fix_id=' + id + '&big_type_id=2','list4');
gotoPage('/fix-car/ajax-item-list?fix_id=' + id + '&big_type_id=3','list5');
gotoPage('/fix-car/ajax-item-list?fix_id=' + id + '&big_type_id=4','list6');
}
}
function closeDlg() {
reloadItems();
art.dialog.close();
}
function show(id_str) {
var obj = $('#' + id_str);
var obj_title = $('#' + id_str + '_title');
obj.toggle();
if(obj_title.html() == '▼')
obj_title.html('▲');
else
obj_title.html('▼');
}
$(function () {
//退回处理
$('#return-btn').click(function(){
var r = prompt('退回原因', '');
if(r != null && r != '') {
$.post('/fix-car/return-op',{
id:<?=$info->id>0?$info->id:0?>,
return_remark:r,
return_status_id:<?=$info->status?>
},function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
} else {
alert('不填写原因,无法退回');
}
});
//保存按钮
$("#save-btn").click(function(){
if(confirm('是否确认提交?')) {
var params = $("#theFrm").serialize();
params = params + '&status=<?=$info->status?>';
$.post('/fix-car/my-list-save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#id').val(obj.fix_id);
}
},'json');
}
});
//保存礼品按钮
$("#save-gift-btn").click(function(){
var id = $('#id').val();
if(id > 0) {
var params = $("#giftFrm").serialize();
params = params + '&id=' + id;
$.post('/fix-car/gift-save',params,function(obj){
alert(obj.msg);
},'json');
} else {
alert('请先保存维修信息');
}
});
//提交按钮
$("#submit-btn").click(function(){
var id = $('#id').val();
var sys_remark = $('#sys_remark').val();
if(sys_remark == '') {
alert('请先输入审核意见');
return;
}
if(id > 0) {
if(confirm('是否确认提交?')) {
var params = $("#theFrm").serialize();
params = params + '&status=<?=$info->status+1?>' + '&sys_remark=' + sys_remark;
$.post('/fix-car/my-list-save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
} else {
alert('请先保存维修信息');
}
});
//提交维修明细
$('#add-info-btn').click(function(){
var id = $('#id').val();
if(id > 0) {
art.dialog.open('/fix-car/add-item?fix_id=' + id);
} else {
alert('请先保存维修信息');
}
});
//返回按钮
$('#back-btn').click(function(){
<?php
$url = '';
switch($type) {
case 1:
$url = '/fix-car/step1-list';
break;
case 2:
$url = '/fix-car/step2-list';
break;
case 3:
$url = '/fix-car/step3-list';
break;
case 4:
$url = '/fix-car/step4-list';
break;
case 5:
$url = '/fix-car/step5-list';
break;
case 6:
$url = '/fix-car/step6-list';
break;
case 7:
$url = '/fix-car/step7-list';
break;
case 8:
$url = '/fix-car/work-shop';
break;
case 9:
$url = '/fix-car/last-check';
break;
default:
$url = '/fix-car/my-list';
break;
}
echo 'window.location.href="'.$url.'"';
?>
});
//打印接车单
$('#print-btn').click(function(){
window.open('/fix-car/print-receive?id=<?=$info->id?>');
});
//刷新明细
reloadItems();
$('#brand_id').change(function(){
var brand_id = $(this).val();
$('#series_id').html('<option value="0">---请选择---</option>');
$('#displacement_id').html('<option value="0">---请选择---</option>');
if(brand_id > 0) {
$.get('/car/series',{brand_id:brand_id},function(obj){
if(obj.success) {
$('#series_id').html(obj.html);
}
},'json');
}
});
$('#series_id').change(function(){
var series_id = $(this).val();
$('#displacement_id').html('<option value="0">---请选择---</option>');
if(series_id > 0) {
$.get('/car/displacement',{series_id:series_id},function(obj){
if(obj.success) {
$('#displacement_id').html(obj.html);
}
},'json');
}
});
})
</script>