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/business-order/check-info.php

441 lines
29 KiB

<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 colspan="13" height="22" class="td_bg">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height="30" align="center" class=tab-on id=navcell onclick=switchCell(1) name="navcell">
提单详情
</TD>
<TD height="30" align="center" class=tab-off id=navcell onclick=switchCell(2) name="navcell">
操作记录
</TD>
<TD height="30" class=tab-none>&nbsp;</TD>
</TR>
</TBODY>
</TABLE>
</td>
</tr>
<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 id=tb cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
<TR>
<TD valign="top">
<form id="theForm">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"
class="table" style="table-layout: fixed;">
<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">
<input name="new_price" type="text" id="car_frame_no"
value="<?= $info->new_price ?>"
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">
<select id="brand_id" name="brand_id">
<option value="">---请选择---</option>
<?php foreach ($brand_items as $item): ?>
<option value="<?= $item->id ?>" <?= $info->brand_id == $item->id ? 'selected' : '' ?>><?= $item->name ?></option>
<?php endforeach; ?>
</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="">---请选择---</option>
<?php foreach ($series_items as $item): ?>
<option value="<?= $item->id ?>" <?= $info->series_id == $item->id ? 'selected' : '' ?>><?= $item->name ?></option>
<?php endforeach; ?>
</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="">---请选择---</option>
<?php foreach ($displacement_items as $item): ?>
<option value="<?= $item->id ?>" <?= $info->displacement_id == $item->id ? 'selected' : '' ?>><?= $item->name ?></option>
<?php endforeach; ?>
</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"
onclick="WdatePicker({dateFmt:'yyyy'})" readonly
value="<?= $info->car_year ?>" 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="link_man" type="text" id="company"
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" colspan="5">
<input type="text" name="link_phone"
value="<?= $info->link_phone ?>">
</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"
class="table" style="table-layout: fixed;">
<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="company"
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 type="text" name="id_phone" value="<?= $info->id_phone ?>">
</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" id="accident_type">
<option value="单方" <?= "单方" == $info->accident_type ? 'selected' : '' ?>>单方</option>
<option value="双方" <?= "双方" == $info->accident_type ? 'selected' : '' ?>>双方</option>
<option value="多方" <?= "多方" == $info->accident_type ? 'selected' : '' ?>>多方</option>
<option value="自费维修" <?= "自费维修" == $info->accident_type ? 'selected' : '' ?>>自费维修</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 value="全责" <?= "全责" === $info->responsibility ? 'selected' : '' ?>>全责</option>
<option value="无责" <?= "无责" === $info->responsibility ? 'selected' : '' ?>>无责</option>
<option value="主要责任" <?= "主要责任" === $info->responsibility ? 'selected' : '' ?>>主要责任</option>
<option value="次要责任" <?= "次要责任" === $info->responsibility ? 'selected' : '' ?>>次要责任</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 name="company" id="company">
<option value="1" <?= '1' === $info->company ? 'selected' : '' ?>>人保</option>
<option value="2" <?= '2' === $info->company ? 'selected' : '' ?>>平安</option>
</select>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span>商业保单号</td>
<td height="25" class="td_bg">
<input type="text" name="insurer1_no" value="<?= $info->insurer1_no ?>">
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span>交强保单号</td>
<td height="25" class="td_bg">
<input type="text" name="insurer2_no" value="<?= $info->insurer2_no ?>">
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span>险项</td>
<td height="25" class="td_bg">
<input type="text" name="insurer_type" value="<?= $info->insurer_type ?>">
</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"
class="table" style="table-layout: fixed;">
<tr>
<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 ?>" readonly
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})"/>
</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"
onchange="receiveTypeChange()">
<option value="">--请选择--</option>
<option value="上门接车" <?= $info->receive_type === '上门接车' ? 'selected' : '' ?>>
上门接车
</option>
<option value="客户自送" <?= $info->receive_type === '客户自送' ? 'selected' : '' ?>>
客户自送
</option>
</select>
</td>
<td width="100" height="25" class="bg_tr">代步车</td>
<td height="25" class="td_bg">
<select id="replace_car_id" name="replace_car_id">
<option value="0">--请选择--</option>
<option value="1" <?= 1 === $info->replace_car_id ? 'selected' : '' ?>>不需要</option>
<option value="2" <?= 2 === $info->replace_car_id ? 'selected' : '' ?>>京A74110</option>
</select>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000;display:none;" class="adb">*</span>接车司机</td>
<td height="25" class="td_bg">
<select name="driver_id" id="driver_id">
<option value="0">请选择</option>
<?php foreach($driver_items as $item): ?>
<option value="<?= $item->id ?>" <?= $item->id === $info->driver_id ? 'selected' : '' ?>><?= $item->getShowName() ?></option>
<?php endforeach; ?>
</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 name="direction_id" id="direction_id">
<option value="">请选择</option>
<?php foreach ($direction_items as $item): ?>
<option value="<?= $item->id ?>" <?= $info->direction_id == $item->id ? 'selected' : '' ?>><?= $item->name ?></option>
<?php endforeach; ?>
</select>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span>范围</td>
<td height="25" class="td_bg">
<select name="range_id" id="range_id">
<option value="">请选择</option>
<?php foreach ($range_items as $item): ?>
<option value="<?= $item->id ?>" <?= $info->range_id == $item->id ? 'selected' : '' ?>><?= $item->name ?></option>
<?php endforeach; ?>
</select>
</td>
<td width="100" height="25" class="bg_tr"><span style="color:#ff0000;display:none;" class="ada">*</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>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"
class="table" style="table-layout: fixed;">
<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;"><?= $info->remark ?></textarea>
</td>
</tr>
<tr>
<td class="td_bg" colspan="8" align="center">
<?php if (1 === $info->status): ?>
<input type="button" class="ACT_btn js-insert-btn" value="提交">
<input type="button" class="ACT_btn js-update-btn" value="保存">
<?php endif; ?>
<input type="button" class="ACT_btn js-back-btn" value="返回">
</td>
</tr>
</table>
</form>
</TD>
</TR>
</TABLE>
<TABLE id=tb cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"
class="table" style="table-layout: fixed;">
<tr>
<td width="10%" align="center" class="bg_tr" nowrap>姓名</td>
<td width="10%" align="center" class="bg_tr" nowrap>操作时间</td>
<td width="70%" align="center" class="bg_tr" nowrap>审核意见</td>
<td width="10%" align="center" class="bg_tr" nowrap>意见说明</td>
</tr>
<?php if($log_items): ?>
<?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 endforeach; ?>
<?php endif; ?>
<tr>
<td class="td_bg" colspan="6" align="center">
<input type="button" class="ACT_btn js-back-btn" value="返回">
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--对话框begin-->
<div id="dialog" style="display: none">
</div>
<!--end-->
<!--遮罩层 begin-->
<div class="mask-layer" style="display: none">
</div>
<!--end-->
<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">
//自动触发接车方式change事件
$('#receive_type').change();
//接车方式change事件
function receiveTypeChange() {
var receive_type = $('#receive_type').val();
if('上门接车' == receive_type){
$('.adb').show();
$('.ada').show();
$('#driver_id').attr('disabled',false);
$('#address').attr('disabled',false);
$('#replace_car_id').attr('disabled',false);
}else{
$('.adb').hide();
$('.ada').hide();
$('#driver_id').attr('disabled','disabled');
$('#address').attr('disabled','disabled');
$('#replace_car_id').attr('disabled','disabled');
}
}
//当交车方式为司机接车,则接车司机、地址不可为空
function confirmDriverId() {
var receive_type = $('#receive_type').val(),
driver_id = $('#driver_id').val(),
address = $('#address').val(),
message = '';
if ('上门接车' == receive_type) {
if ('0' == driver_id) {
message = "接车司机不可为空!";
}
if ('' == address) {
message = "地址不可为空!";
}
}
return message;
}
//保存按钮
$(".js-update-btn").click(function () {
var isDriver = confirmDriverId();
if ('' != isDriver) {
alert(isDriver);
return false;
}
if (confirm('是否确认保存?')) {
var params = $("#theForm").serialize();
params = params + '&status=<?=$info->status?>';
$.post('/business-order/fix-car-save', params, function (obj) {
alert(obj.msg);
if (obj.success) {
$('#id').val(obj.fix_id);
window.location.reload();
}
}, 'json');
}
});
//提交按钮
$(".js-insert-btn").click(function () {
var sys_remark = $('#sys_remark').val(),
isDriver = confirmDriverId();
if (!sys_remark) {
alert('请先输入审核意见!');
return false;
}
if ('' != isDriver) {
alert(isDriver);
return false;
}
if (confirm('是否确认提交?')) {
var params = $("#theForm").serialize();
params = params + '&status=<?= $info->status + 1 ?>';
$.post('/business-order/fix-car-save', params, function (obj) {
alert(obj.msg);
if (obj.success) {
$('#id').val(obj.fix_id);
window.location.href = '/business-order/check-list';
}
}, 'json');
}
});
//提交维修明细
$('#add-info-btn').click(function () {
var id = $('#id').val();
if (id > 0) {
art.dialog.open('/fix-car/add-item?fix_id=' + id);
} else {
alert('请先保存维修信息');
}
});
//返回按钮
$('.js-back-btn').click(function () {
window.history.go(-1);
});
$('#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');
}
});
//图片点击加边框
$('#img-area > li').on('click', function () {
$(this).addClass('active-border');
$(this).siblings().removeClass('active-border');
});
</script>