<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="service_date" type="text" id="service_date" style="width:100px;" onClick="WdatePicker()" readonly value="<?=$info->service_date?>"/>
                </td>
                <td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 保险时间</td>
                <td height="25" class="td_bg">
                    <input name="insurance_date" type="text" id="insurance_date" style="width:100px;" onClick="WdatePicker()" readonly value="<?=$info->insurance_date?>"/>
                </td>
                <td width="100" height="25" class="bg_tr"><span style="color:#ff0000">*</span> 驾驶证时间</td>
                <td height="25" class="td_bg">
                    <input name="driving_date" type="text" id="driving_date" style="width:100px;" onClick="WdatePicker()" readonly value="<?=$info->driving_date?>"/>
                </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="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?>" readonly 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>
            </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;" readonly 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;" readonly onclick="WdatePicker()"/>
                </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;" readonly onclick="WdatePicker()"/>
                </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>
    </table>
    <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table" style="table-layout: fixed;">
        <tr>
            <td rowspan="2" class="bg_tr" align="center" valign="center">
                交接物品
            </td>
            <td width="50" align="center" class="bg_tr" nowrap>行驶本</td>
            <td class="td_bg">
                <input type="radio" name="driving_this" value="1" <?=$info->driving_this == 1 ? 'checked' : ''?>> 原件
                <input type="radio" name="driving_this" value="2" <?=$info->driving_this == 2 ? 'checked' : ''?>> 复印件
            </td>
            <td width="200" align="center" class="bg_tr" nowrap>驾驶本</td>
            <td class="td_bg">
                <input type="radio" name="driver_licesne" value="1" <?=$info->driver_licesne == 1 ? 'checked' : ''?>> 原件
                <input type="radio" name="driver_licesne" value="2" <?=$info->driver_licesne == 2 ? 'checked' : ''?>> 复印件
            </td>
            <td width="80" align="center" class="bg_tr" nowrap>身份证</td>
            <td class="td_bg">
                <input type="radio" name="identity_card_paper" value="1" <?=$info->identity_card_paper == 1 ? 'checked' : ''?>> 原件
                <input type="radio" name="identity_card_paper" value="2" <?=$info->identity_card_paper == 2 ? 'checked' : ''?>> 复印件
            </td>
        </tr>
        <tr>
            <td width="50" align="center" class="bg_tr" nowrap>车钥匙</td>
            <td class="td_bg">
                <input type="radio" name="car_key" value="1" <?=$info->car_key == 1 ? 'checked' : ''?>> 一副
                <input type="radio" name="car_key" value="2" <?=$info->car_key == 2 ? 'checked' : ''?>> 二副
            </td>
            <td width="200" align="center" class="bg_tr" nowrap>保险单</td>
            <td class="td_bg">
                <input type="radio" name="policy_of_insurance" value="1" <?=$info->policy_of_insurance == 1 ? 'checked' : ''?>> 原件
                <input type="radio" name="policy_of_insurance" value="2" <?=$info->policy_of_insurance == 2 ? 'checked' : ''?>> 复印件
            </td>
            <td width="80" align="center" class="bg_tr" nowrap>交警证明</td>
            <td class="td_bg">
                <input type="radio" name="police_to_prove" value="1" <?=$info->police_to_prove == 1 ? 'checked' : ''?>> 原件
                <input type="radio" name="police_to_prove" value="2" <?=$info->police_to_prove == 2 ? 'checked' : ''?>> 复印件
            </td>
        </tr>
        <tr>
            <td class="bg_tr" align="center" valign="center">随车物品</td>
            <td class="td_bg" colspan="6">
                <input type="checkbox" name="follow_car_items[]" value="1" <?=strpos($info->follow_car_items,'1') !== false ? 'checked' : ''?>> 备胎
                <input type="checkbox" name="follow_car_items[]" value="2" <?=strpos($info->follow_car_items,'2') !== false ? 'checked' : ''?>> 工具
                <input type="checkbox" name="follow_car_items[]" value="3" <?=strpos($info->follow_car_items,'3') !== false ? 'checked' : ''?>> 警告牌
                <input type="checkbox" name="follow_car_items[]" value="4" <?=strpos($info->follow_car_items,'4') !== false ? 'checked' : ''?>> 灭火器
            </td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table" style="table-layout: fixed;">
        <tr>
            <td class="td_bg">
                <input type="file" id="fileUploadBtn" value="上传图片"><span style="color:#ff0000">1M/每张 | 最多上传6张</span>
                <input type="button" id="fileDownBtn" value="下载图片" onclick="downloadImg()"><span style="color:#ff0000">请先选择需要下载的图片</span>
            </td>
        </tr>

        <tr id="showImg" style="display: <?=$info->fixCarImg ? 'block': 'none'?>">
            <td class="td_bg">
                <textarea name="result" id="result" cols="30" rows="10" style="display:none"></textarea>
                <ul id="img-area">
                    <?php if($fixCarImg = $info->fixCarImg):?>
                        <?php foreach($fixCarImg as $img):?>
                            <li>
                                <i data-fix-img="<?=$img->id?>" onclick="rmImg(event,$(this))">删除</i>
                                <img src="\<?=$img->name?>" alt="">
                            </li>
                        <?php endforeach;?>
                    <?php endif;?>
                </ul>
            </td>
        </tr>
        </form>
        <tr>
            <td height="22" 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;" class="add-title">
    <h3 onclick="show('list3')">保险理赔<span id="list3_title">▼</span></h3>
    <h3 onclick="dialogBox('保险理赔',1,<?=$info->id?>)">清单添加</h3>
</div>
<div id="list3">
</div>
<div style="clear: both"></div>
<div style="width:98%; margin: 0 auto;" class="add-title">
    <h3 onclick="show('list4')">自费维修<span id="list4_title">▼</span></h3>
    <h3 onclick="dialogBox('自费维修',2,<?=$info->id?>)">清单添加</h3>
</div>
<div id="list4">
</div>
<div style="clear: both"></div>
<div style="width:98%; margin: 0 auto;" class="add-title">
    <h3 onclick="show('list5')">汽车保养<span id="list5_title">▼</span></h3>
</div>
<div id="list5">
</div>
<div style="clear: both"></div>
<div style="width:98%; margin: 0 auto;" class="add-title">
    <h3 onclick="show('list6')">汽车美容<span id="list6_title">▼</span></h3>
</div>
<div id="list6">
</div>
<div style="clear: both"></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">
    <tr>
        <td colspan="8" height="22" colspan="2" align="center" class="td_bg">
            <input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
        </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>
