<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>勘测信息变更-审核</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="decorator" content="base"/>
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css"/>
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.css" media="all">
    <style>
        html {
            background-color: #fff;
            padding-bottom: 50px;
        }
        .form-span {
            display: block;
            padding: 8px 0;
            margin-left: 110px;
        }

        .page-iframe {
            border: none;
            width: 100%;
            min-height: calc(100vh - 250px);
        }
        .mb-10{
            margin-bottom: 10px !important;
        }
        .pd-10{
            padding: 10px;
        }
        .idea-text{
            width: 320px; height: 100px;outline: none; padding: 3px
        }
        .msg-title{
            text-align: center;
            margin: 10px 0;
            font-size: 16px;
        }
        .title1 {
            border-left: 4px solid #1b6073;
            padding-left: 20px;
            font-size: 14px;
            margin: 10px auto;
            font-weight: 600;
            height: 34px;
            line-height: 34px;
            background-color: #f4f6f9;
            color: #666666;
        }
        .layui-input-block {
            margin-left: 110px;
        }

        .layui-form-label {
            width: 110px;
        }
        .clearfix{*zoom:1;}
        .clearfix:before,.clearfix:after{display:table; line-height:0; content:"";}
        .clearfix:after{clear:both;}

        .layui-tab-title{
            margin: 0 0 0 20px;
        }
        .layui-tab-content{
            margin: 0 0 0 20px;
        }
        .bj-img {
            margin-right: 5px;
        }
        .blank-img {
            background: url('${ctxPlugin}/static/imgs/blankImg.png') center center no-repeat;
            width: 80px;
            height: 80px;
            display: inline-block;
        }
        .link-blue{ color: #1b6073; cursor: pointer;}
        .download-link {
            display: inline-block;
            padding: 8px 16px;
            color: #007bff;
            text-decoration: none;
            border-radius: 4px;
        }

        .download-link:hover {
            color: #0056b3;
        }
    </style>
</head>
<body>
<div class="layui-fluid pd-10">
    <div class="order-win layui-form" id="LAY_app">
        <button class="layui-btn" style="margin-left: 94.5%;" onclick="approvalRecord()">审批记录</button>
        <div class="layui-card-body pt-20 pb-40">
            <div class="layui-col-xs12 form-box">
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">电站编码：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="stationCode" lay-verify="stationCode" class="layui-input" value="${customerEntry.powerStationCode}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">电站状态：</label>
                    <div class="layui-input-block ">
                        <input type="text"  name="status" class="layui-input" value="" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">代理商：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="traderName" class="layui-input" value="${customerEntry.createTraderName}" disabled>
                    </div>
                </div>
                <%--<div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">产品名称：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="projectName"  class="layui-input" value="${project.name}" disabled>
                    </div>
                </div>--%>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">项目公司：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="projectCompanyName" class="layui-input" value="${customerEntry.projectCompanyName}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">所属资方：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="partnerName" class="layui-input" value="${customerEntry.partnerName}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">业主姓名：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="tenantName"  class="layui-input" value="${customerEntry.tenantName}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">身份证号：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="idCode" class="layui-input" value="${customerEntry.idCode}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs9">
                    <label class="layui-form-label w-130">安装地址：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="address" class="layui-input" value="${customerEntry.province}${customerEntry.city}${customerEntry.area}${customerEntry.address}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs12">
                    <label class="layui-form-label w-130">变更原因：</label>
                    <div class="layui-input-block ">
                        <textarea name="reason" id="reason" disabled class="layui-textarea">${change.reason}</textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="clear-both">
            <p class="layui-elem-quote" style="margin: 0px 0px 0px 10px">产品信息</p>
            <div class="layui-form-item layui-row">
                <div class="layui-col-sm3 layui-col-md3">
                    <label class="layui-form-label">备案类型：</label>
                    <span class="form-span">
                    <c:choose>
                        <c:when test="${customerEntry.filingType eq '1'}">
                            农户备案
                        </c:when>
                        <c:when test="${customerEntry.filingType eq '2'}">
                            项目公司备案
                        </c:when>
                    </c:choose>
                </span>
                </div>
                <div class="layui-col-sm3 layui-col-md3">
                    <label class="layui-form-label">项目公司：</label>
                    <span class="form-span"> ${customerEntry.projectCompanyName}</span>
                </div>
                <div class="layui-col-sm3 layui-col-md3">
                    <label class="layui-form-label">业务属性：</label>
                    <span class="form-span">
                    <c:choose>
                        <c:when test="${customerEntry.productLine eq '1'}">
                            纯租25年业务
                        </c:when>
                        <c:when test="${customerEntry.productLine eq '2'}">
                            经营性租赁
                        </c:when>
                        <c:when test="${customerEntry.productLine eq '3'}">
                            融资租赁
                        </c:when>
                        <c:when test="${customerEntry.productLine eq '4'}">
                            光伏贷
                        </c:when>
                        <c:when test="${customerEntry.productLine eq '5'}">
                            全款
                        </c:when>
                        <c:when test="${customerEntry.productLine eq '6'}">
                            其他
                        </c:when>
                        <c:otherwise>
                            ${customerEntry.productLine}
                        </c:otherwise>
                    </c:choose>
                </span>
                </div>
                <div class="layui-col-sm12 layui-col-md12">
                    <table class="layui-table">
                        <colgroup>
                            <col width="25%">
                            <col width="25%">
                            <col width="25%">
                            <col width="25%">
                        </colgroup>
                        <thead>
                        <tr style="background: white">
                            <th style="text-align: center">序号</th>
                            <th style="text-align: center">产品编号</th>
                            <th style="text-align: center">产品名称</th>
                            <th style="text-align: center">屋顶类型</th>
                        </tr>
                        </thead>
                        <tbody id="projectList">
                        <c:forEach items="${projectDetailList}" varStatus="vs" var="project">
                            <tr style="text-align: center" data-id="${project.columns.projectId}" class="projectTr" >
                                <td>${vs.count}</td>
                                <td>${project.columns.projectCode}</td>
                                <td>${project.columns.projectName}</td>
                                <td>${project.columns.roofType}</td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="clear-both">
            <p class="layui-elem-quote" style="margin: 0px 0px 0px 10px">勘测信息</p>
            <div class="layui-tab layui-tab-brief" id="surveyImgTab" lay-filter="docDemoTabBriefSurvey">
                <ul class="layui-tab-title" id="surveyImgUl">
                    <c:forEach items="${projectDetailList}" var="entryProject" varStatus="vs">

                        <li  id="${entryProject.columns.projectCode}" <c:if test="${vs.index==0}">class="layui-this"</c:if> >
                            <c:choose>
                                <c:when test="${not empty entryProject.columns.roofType}">
                                    ${entryProject.columns.roofType}
                                </c:when>
                                <c:otherwise>
                                    ${entryProject.columns.projectName}
                                </c:otherwise>
                            </c:choose>
                        </li>
                    </c:forEach>
                </ul>
                <c:forEach items="${newList}" var="entrySurvey" varStatus="vs">
                    <c:set var="oldSurvey" value="${oldListMap.get(entrySurvey.projectId)}"/>
                    <div class="layui-tab-content  surveyTabContent <c:if test="${vs.index!=0}">layui-hide</c:if>" id="surveyImgDiv${vs.index}">
                        <c:set var="indexNum" value="1"/>
                        <table class="layui-table" style="margin: 0 10px 0 0;">
                            <thead>
                            <tr>
                                <th width="5%">序号</th>
                                <th width="15%">文件名称</th>
                                <th width="40%">变更前信息</th>
                                <th width="40%">变更后信息</th>
                            </tr>
                            </thead>
                            <c:if test="${info2.columns.fly_imgs.status eq '1' || info2.columns.fly_imgs_04.status eq '1'}">
                                <tr style="height: 100px">
                                    <td width="5%">${indexNum}</td>
                                    <td width="15%">
                                        <c:choose>
                                            <c:when test="${info2.columns.fly_imgs.status eq '1'}">
                                                无人机航拍图
                                            </c:when>
                                            <c:when test="${info2.columns.fly_imgs_04.status eq '1'}">
                                                屋顶高空俯视照片
                                            </c:when>
                                        </c:choose>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.flyImgs}">
                                                        <c:forEach var="quaim" items="${oldSurvey.flyImgs.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="flyImgs" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.flyImgs}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty entrySurvey.flyImgs}">
                                                        <c:forEach var="quaim" items="${entrySurvey.flyImgs.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="flyImgs" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.flyImgs}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>

                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.roof_photo_one.status eq '1' || info2.columns.roof_photo_one_03.status eq '1'}">
                                <tr style="height: 100px">
                                    <td width="5%">${indexNum}</td>
                                    <c:choose>
                                        <c:when test="${info2.columns.roof_photo_one.status eq '1'}">
                                            <td width="15%">整体照片</td>
                                        </c:when>
                                        <c:when test="${info2.columns.roof_photo_one_03.status eq '1'}">
                                            <td width="15%">房屋屋顶照片</td>
                                        </c:when>
                                    </c:choose>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.roofPhotoOne}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.roofPhotoOne.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoOne" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.roofPhotoOne}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoOneDiv">
                                                    <c:if test="${not empty entrySurvey.roofPhotoOne}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.roofPhotoOne.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoOne" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.roofPhotoOne}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>

                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.roof_photo_two.status eq '1' || info2.columns.roof_photo_two_03.status eq '1' || info2.columns.roof_photo_two_04.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <c:choose>
                                        <c:when test="${info2.columns.roof_photo_two.status eq '1'}">
                                            <td width="15%">东南角照片</td>
                                        </c:when>
                                        <c:when test="${info2.columns.roof_photo_two_03.status eq '1'}">
                                            <td width="15%">房屋屋顶东侧图片</td>
                                        </c:when>
                                        <c:when test="${info2.columns.roof_photo_two_04.status eq '1'}">
                                            <td width="15%">屋顶东南照片</td>
                                        </c:when>
                                    </c:choose>
                                    <td>

                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.roofPhotoTwo}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.roofPhotoTwo.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoTwo" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.roofPhotoTwo}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td>
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoTwoDiv">
                                                    <c:if test="${not empty entrySurvey.roofPhotoTwo}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.roofPhotoTwo.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoTwo" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.roofPhotoTwo}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>

                            </c:if>

                            <c:if test="${info2.columns.roof_photo_four.status eq '1' || info2.columns.roof_photo_four_03.status eq '1' || info2.columns.roof_photo_four_04.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <c:choose>
                                        <c:when test="${info2.columns.roof_photo_four.status eq '1'}">
                                            <td width="15%">正南照片</td>
                                        </c:when>
                                        <c:when test="${info2.columns.roof_photo_four_03.status eq '1'}">
                                            <td width="15%">房屋屋顶南侧图片</td>
                                        </c:when>
                                        <c:when test="${info2.columns.roof_photo_four_04.status eq '1'}">
                                            <td width="15%">屋顶正南照片</td>
                                        </c:when>
                                    </c:choose>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.roofPhotoFour}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.roofPhotoFour.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoFour" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.roofPhotoFour}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>

                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoFourDiv">
                                                    <c:if test="${not empty entrySurvey.roofPhotoFour}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.roofPhotoFour.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoFour" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.roofPhotoFour}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>

                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.roof_photo_three.status eq '1' || info2.columns.roof_photo_three_03.status eq '1' || info2.columns.roof_photo_three_04.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <c:choose>
                                        <c:when test="${info2.columns.roof_photo_three.status eq '1'}">
                                            <td width="15%">西南角照片</td>
                                        </c:when>
                                        <c:when test="${info2.columns.roof_photo_three_03.status eq '1'}">
                                            <td width="15%">房屋屋顶西侧图片</td>
                                        </c:when>
                                        <c:when test="${info2.columns.roof_photo_three_04.status eq '1'}">
                                            <td width="15%">屋顶西南照片</td>
                                        </c:when>
                                    </c:choose>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.roofPhotoThree}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.roofPhotoThree.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoThree"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.roofPhotoThree}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoThreeDiv">
                                                    <c:if test="${not empty entrySurvey.roofPhotoThree}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.roofPhotoThree.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoThree"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.roofPhotoThree}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.fw_img3.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋屋顶东南侧照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div >
                                                    <c:if test="${not empty oldSurvey.fwImg3}">
                                                        <c:forEach var="quaim"  items="${oldSurvey.fwImg3.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg3" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.fwImg3}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="fwImg3Div">
                                                    <c:if test="${not empty entrySurvey.fwImg3}">
                                                        <c:forEach var="quaim"  items="${entrySurvey.fwImg3.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg3" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.fwImg3}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.fw_img4.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋屋顶西南侧照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.fwImg4}">
                                                        <c:forEach var="quaim"  items="${oldSurvey.fwImg4.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg4" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.fwImg4}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="fwImg4Div">
                                                    <c:if test="${not empty entrySurvey.fwImg4}">
                                                        <c:forEach var="quaim"  items="${entrySurvey.fwImg4.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg4" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.fwImg4}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.fw_img5.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">遮阴物与房屋距离、高度</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.fwImg5}">
                                                        <c:forEach var="quaim"  items="${oldSurvey.fwImg5.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg5" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.fwImg5}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="fwImg5Div">
                                                    <c:if test="${not empty entrySurvey.fwImg5}">
                                                        <c:forEach var="quaim"  items="${entrySurvey.fwImg5.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg5" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.fwImg5}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.roof_photo_five.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">细节照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.roofPhotoFive}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.roofPhotoFive.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoFive" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.roofPhotoFive}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoFiveDiv">
                                                    <c:if test="${not empty entrySurvey.roofPhotoFive}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.roofPhotoFive.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoFive" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.roofPhotoFive}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.roof_photo_interior.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋内部环境照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.roofPhotoInterior}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.roofPhotoInterior.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoInterior"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.roofPhotoInterior}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoInteriorDiv">
                                                    <c:if test="${not empty entrySurvey.roofPhotoInterior}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.roofPhotoInterior.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoInterior"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.roofPhotoInterior}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.roof_photo_facade.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋内部结构照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.roofPhotoFacade}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.roofPhotoFacade.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoFacade"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.roofPhotoFacade}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoFacadeDiv">
                                                    <c:if test="${not empty entrySurvey.roofPhotoFacade}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.roofPhotoFacade.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoFacade"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.roofPhotoFacade}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.detail_supplement_one.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">逆变器、配电箱预安装位置照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.detailSupplementOne}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.detailSupplementOne.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="detailSupplementOne"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.detailSupplementOne}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="detailSupplementOneDiv">
                                                    <c:if test="${not empty entrySurvey.detailSupplementOne}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.detailSupplementOne.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="detailSupplementOne"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.detailSupplementOne}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.house_supplement_one.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">其他障碍物照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.houseSupplementOne}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.houseSupplementOne.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="houseSupplementOne"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.houseSupplementOne}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="houseSupplementOneDiv">
                                                    <c:if test="${not empty entrySurvey.houseSupplementOne}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.houseSupplementOne.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="houseSupplementOne"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.houseSupplementOne}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>


                            <c:if test="${info2.columns.house_outline_photo.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋轮廓照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.houseOutlinePhoto}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.houseOutlinePhoto.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="houseOutlinePhoto"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.houseOutlinePhoto}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="houseOutlinePhotoDiv">
                                                    <c:if test="${not empty entrySurvey.houseOutlinePhoto}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.houseOutlinePhoto.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="houseOutlinePhoto"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.houseOutlinePhoto}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.survey_video.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">踏勘补充证明视频</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.surveyVideo}">
                                                        <c:forEach var="quaim" items="${oldSurvey.surveyVideo.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <video controls
                                                                       src="${commonStaticImgPath}${quaim}"
                                                                       height="80px" width="80px"></video>
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty entrySurvey.surveyVideo}">
                                                        <c:forEach var="quaim" items="${entrySurvey.surveyVideo.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <video controls
                                                                       src="${commonStaticImgPath}${quaim}"
                                                                       height="80px" width="80px"></video>
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.house_ownership.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%"><c:if test="${info2.columns.house_ownership.mustFillFlag eq '1'}"><i class="mark">*</i></c:if>房产证图片(1-8张)</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.houseOwnership}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.houseOwnership.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="houseOwnership"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.houseOwnership}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="houseOwnershipDiv">
                                                    <c:if test="${not empty entrySurvey.houseOwnership}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.houseOwnership.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="houseOwnership"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.houseOwnership}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.survey_files.status eq '1' || info2.columns.survey_files_03.status eq '1' || info2.columns.survey_files_04.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <c:choose>
                                        <c:when test="${info2.columns.survey_files.status eq '1'}">
                                            <td width="15%">踏勘记录表</td>
                                        </c:when>
                                        <c:when test="${info2.columns.survey_files_03.status eq '1'}">
                                            <td width="15%">户用勘察记录表（附平面草图）</td>
                                        </c:when>
                                        <c:when test="${info2.columns.survey_files_04.status eq '1'}">
                                            <td width="15%">现场勘测表</td>
                                        </c:when>
                                    </c:choose>
                                    <td width="40%">
                                        <div class="layui-input-inline img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:choose>
                                                    <c:when test="${not empty oldSurvey.surveyFiles}">
                                                        <c:forEach items="${oldSurvey.surveyFiles}" var="file"
                                                                   varStatus="vs">
                                                            <div <c:if test="${vs.count eq 0}">style="margin-top: 5px"</c:if>>
                                                                <a href="${commonStaticImgPath}${file}" download="${file}"
                                                                   class="download-link">${fns:substringAfterLast(file, '/')}</a>
                                                                <a onclick="previewUrl('${commonStaticImgPath}${file}')"
                                                                   class="download-link">查看</a>
                                                            </div>
                                                        </c:forEach>
                                                    </c:when>
                                                </c:choose>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-inline img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:choose>
                                                    <c:when test="${not empty entrySurvey.surveyFiles}">
                                                        <c:forEach items="${entrySurvey.surveyFiles}" var="file"
                                                                   varStatus="vs">
                                                            <div <c:if test="${vs.count eq 0}">style="margin-top: 5px"</c:if>>
                                                                <a href="${commonStaticImgPath}${file}" download="${file}"
                                                                   class="download-link">${fns:substringAfterLast(file, '/')}</a>
                                                                <a onclick="previewUrl('${commonStaticImgPath}${file}')"
                                                                   class="download-link">查看</a>
                                                            </div>
                                                        </c:forEach>
                                                    </c:when>
                                                </c:choose>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.fw_img1.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋整体图</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.fwImg1}">
                                                        <c:forEach var="quaim"  items="${oldSurvey.fwImg1.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg1" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.fwImg1}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="fwImg1Div">
                                                    <c:if test="${not empty entrySurvey.fwImg1}">
                                                        <c:forEach var="quaim"  items="${entrySurvey.fwImg1.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg1" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.fwImg1}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.vr_roof_one.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋整体图（VR全景）</td>
                                    <td width="40%">
                                        <div style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty oldSurvey.vrRoofOne}">
                                                    <c:forEach var="quaim"  items="${oldSurvey.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofOne"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty oldSurvey.vrRoofOne}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty entrySurvey.vrRoofOne}">
                                                    <c:forEach var="quaim"  items="${entrySurvey.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofOne"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty entrySurvey.vrRoofOne}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.vr_roof_two.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋整体俯视图（无人机）</td>
                                    <td width="40%">
                                        <div style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty oldSurvey.vrRoofTwo}">
                                                    <c:forEach var="quaim"  items="${oldSurvey.vrRoofTwo.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofTwo"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty oldSurvey.vrRoofTwo}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty entrySurvey.vrRoofTwo}">
                                                    <c:forEach var="quaim"  items="${entrySurvey.vrRoofTwo.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofTwo"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty entrySurvey.vrRoofTwo}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.vr_roof_three.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋内部结构图（VR）</td>
                                    <td width="40%">
                                        <div  style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty oldSurvey.vrRoofThree}">
                                                    <c:forEach var="quaim"  items="${oldSurvey.vrRoofThree.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofThree"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty oldSurvey.vrRoofThree}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div  style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty entrySurvey.vrRoofThree}">
                                                    <c:forEach var="quaim"  items="${entrySurvey.vrRoofThree.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofThree"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty entrySurvey.vrRoofThree}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.fw_img2.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">房屋内部结构图</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.fwImg2}">
                                                        <c:forEach var="quaim"  items="${oldSurvey.fwImg2.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg2" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.fwImg2}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="fwImg2Div">
                                                    <c:if test="${not empty entrySurvey.fwImg2}">
                                                        <c:forEach var="quaim"  items="${entrySurvey.fwImg2.split(',')}"  varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"  width="1200">
                                                                <input type="hidden" class="fwImg2" value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.fwImg2}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                            <c:if test="${info2.columns.vr_roof_four.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">入户全景照片（VR）</td>
                                    <td width="40%">
                                        <div  style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty oldSurvey.vrRoofFour}">
                                                    <c:forEach var="quaim"  items="${oldSurvey.vrRoofFour.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofFour"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty oldSurvey.vrRoofFour}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div  style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <c:if test="${not empty entrySurvey.vrRoofFour}">
                                                    <c:forEach var="quaim"  items="${entrySurvey.vrRoofFour.split(',')}"  varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${commonStaticImgPath}${quaim}" height="700" width="1200">
                                                            <input type="hidden" class="vrRoofFour"  value="${quaim}">
                                                        </div>
                                                    </c:forEach>
                                                </c:if>
                                                <c:if test="${empty entrySurvey.vrRoofFour}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>

                            <c:if test="${info2.columns.vr_roof_four_04.status eq '1'}">
                                <tr style="height: 100px">
                                    <td>${indexNum}</td>
                                    <td width="15%">入户全景照片</td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div>
                                                    <c:if test="${not empty oldSurvey.vrRoofFour}">
                                                        <c:forEach var="quaim"
                                                                   items="${oldSurvey.vrRoofFour.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="vrRoofFour"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty oldSurvey.vrRoofFour}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td width="40%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="vrRoofFourDiv">
                                                    <c:if test="${not empty entrySurvey.vrRoofFour}">
                                                        <c:forEach var="quaim"
                                                                   items="${entrySurvey.vrRoofFour.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <img src="${commonStaticImgPath}${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="vrRoofFour"
                                                                       value="${quaim}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                    <c:if test="${empty entrySurvey.vrRoofFour}">
                                                        <i class="blank-img"></i>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </c:if>
                        </table>
                    </div>
                </c:forEach>
            </div>
            <c:if test="${'audit' eq from}">
                <div class="layui-inline layui-col-xs12">
                    <label class="layui-form-label w-130">审核备注：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="auditRemarks" class="layui-input" value="${change.auditRemark}" autocomplete="off">
                    </div>
                </div>
            </c:if>


        </div>
    </div>
</div>
<div class="layui-form-item text-c operate-footer">
    <c:if test="${'audit' eq from}">
        button type="button" class="layui-btn" id="temp">暂存</button>
        <button type="button" class="layui-btn" id="pass">审核通过</button>
        <button type="button" class="layui-btn" id="refuse">审核驳回</button>
    </c:if>
    <button class="layui-btn layui-btn-primary" onclick="closeSelf()">取消</button>
</div>

<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.js"></script>
<script src="${ctxPlugin}/lib/base64.js"></script>
<script>
    //图片查看效果
    var viewer = new Viewer(document.getElementById('LAY_app'));
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'element', 'tableExt', 'jquery', 'layer', 'laypage', 'laydate', 'form'], function () {
        $ = layui.$;
        tableExt = layui.tableExt;
        layer = layui.layer;
        laypage = layui.laypage;
        laydate = layui.laydate;
        form = layui.form;
        table = tableExt.getLayTable();
        var element = layui.element;



        element.on('tab(docDemoTabBriefSurvey)', function (data) {
            console.log(data);
            $('.surveyTabContent').eq(data.index).removeClass('layui-hide').siblings('.surveyTabContent').addClass('layui-hide');
        });

        $(function(){
            hideOrShowHtml();
            $("input[name='status']").val(getStatus('${customerEntry.status}','${customerEntry.credit}','${customerEntry.designAuditFlag}','${customerEntry.installFlag}'));
        })

        var opeRep = false;
        $("#temp").click(function(){
            if(opeRep){
                return;
            }
            var id = '${change.id}';
            var auditRemark = $("input[name='auditRemarks']").val();
            if (isBlank(auditRemark)) {
                layer.msg("请输入审核备注！",{icon:"2"});
                return;
            }
            opeRep = true;
            $.ajax({
                type: 'post',
                url: '${ctx}/customer/entry/change/survey/temp',
                dataType: 'json',
                data: {
                    id: id,
                    auditRemark: auditRemark
                },
                success: function(data){
                    if (data.code == "200") {
                        top.layer.msg("暂存成功，请处理下一条数据!");
                    } else {
                        layer.msg(data.errMsg);
                    }
                },
                complete: function(){
                    opeRep = false;
                }
            });
        })

        var opeRep = false;
        $("#pass").click(function(){
            if(opeRep){
                return;
            }
            var id = '${change.id}';
            var auditRemark = $("input[name='auditRemarks']").val();
            opeRep = true;
            $.ajax({
                type: 'post',
                url: '${ctx}/customer/entry/change/survey/passHR',
                dataType: 'json',
                data: {
                    id: id,
                    auditRemark: auditRemark
                },
                success: function(data){
                    if (data.code == "200") {
                        top.layer.msg("操作成功");
                        closeSelf();
                        parent.location.reload();
                    } else {
                        layer.msg(data.errMsg);
                    }
                },
                complete: function(){
                    opeRep = false;
                }
            });
        })


        var refRep = false;
        $("#refuse").click(function(){
            if(refRep){
                return;
            }
            var id = '${change.id}';
            var auditRemark = $("input[name='auditRemarks']").val();
            if (isBlank(auditRemark)) {
                layer.msg("请输入审核备注！",{icon:"2"});
                return;
            }
            refRep = true;
            $.ajax({
                type: 'post',
                url: '${ctx}/customer/entry/change/survey/refuse',
                dataType: 'json',
                data: {
                    id: id,
                    auditRemark: auditRemark
                },
                success: function(data){
                    if (data.code == "200") {
                        top.layer.msg("操作成功");
                        closeSelf();
                        parent.location.reload();
                    } else {
                        layer.msg(data.errMsg);
                    }
                },
                complete: function(){
                    refRep = false;
                }
            });
        })
    })

    function getStatus(status, credit, design_audit_flag,install_flag) {
        if (status == '0') {
            if (credit == '0') {
                return "暂存";
            } else if(credit == '1'){
                return "待预审";
            } else if(credit == '2'){
                return "预审待审批";
            } else if(credit == '3'){
                return "预审审批中";
            } else if(credit == '4'){
                if(design_audit_flag == '3'){
                    return '自审驳回';
                }else if(design_audit_flag == 'a'){
                    return '待设计';
                }else {
                    return '待踏勘';
                }
            } else if(credit == '5'){
                return "预审拒绝";
            }
        }else if (status == '1') {
            if (design_audit_flag == '1') {
                return "待踏勘";
            } else if (design_audit_flag == '2') {
                return "待自审";
            } else if (design_audit_flag == '3') {
                return "自审驳回";
            } else if (design_audit_flag == '4') {
                return "自审通过";
            } else if (design_audit_flag == '5') {
                return "设计审核驳回";
            } else if (design_audit_flag == '6') {
                return "设计审核通过";
            } else if (design_audit_flag == '7') {
                return "进件审核驳回";
            } else if (design_audit_flag == '8') {
                return "进件审核中";
            } else if (design_audit_flag == '9') {
                return "进件审核通过";
            } else if (design_audit_flag == 'a') {
                return "待设计";
            }
        } else if (status == '2') {
            return "审核驳回";
        } else if (status == '3') {
            return "待下单";
        } else if(status=='4'){
            if(install_flag=='1'){
                return "待派工";
            }else if(install_flag=='2'){
                return "待安装";
            }else if(install_flag=='3'){
                return "自审驳回";
            }else if(install_flag=='4'){
                return "安装完成";
            }
        } else if(status=='5'){
            return "待安装验收";
        } else if(status=='f'){
            return "安装验收驳回";
        } else if(status=='6'){
            return "待并网";
        } else if(status=='7'){
            return "待并网验收";
        } else if(status=='8'){
            return "待交付";
        } else if(status=='9'){
            return "待归档";
        } else if(status=='10'){
            return "验收驳回";
        } else if(status=='11'){
            return "归档驳回";
        } else if(status=='a'){
            return "已完成";
        } else if(status=='c'){
            return "待代理商确认";
        } else if(status=='e'){
            return "待签署合同";
        } else if(status=='w'){
            return "信息登记";
        } else if(status=='g'){
            return "设计审核";
        } else if(status=='AN'){
            return "待安装确认";
        } else if(status=='AT'){
            return "安装确认驳回";
        } else if(status=='BW'){
            return "待并网确认";
        } else if(status=='BN'){
            return "并网确认驳回";
        } else if(status=='h'){
            return "勘测设计自审";
        } else if(status=='i'){
            return "安装自审";
        }
    }

    function hideOrShowHtml() {
        var setData = JSON.parse('${formSet}');
        var partnerId = '${customerEntry.partnerId}';
        console.log(partnerId)
        for (var i = 0; i < setData.length; i++) {
            let columnKey = setData[i].columnKey;
            if (setData[i].useFlag == '0') {//不启用
                $("#" + setData[i].columnKey).addClass("hide");
                $("#" + columnKey).addClass("hide");
            } else {
                $("#" + setData[i].columnKey).removeClass("hide");
                if (columnKey.includes(partnerId)) {
                    columnKey = columnKey.substring(0, columnKey.indexOf(partnerId)-1);
                }
                $("#" + columnKey).removeClass("hide");
                $("#" + columnKey+'_name').text(setData[i].columnName);
            }
        }
        resetSort();
    }

    function resetSort(){
        var sort = 1;
        $("#contentBody").find("tr").each(function (index) {
            if (!$(this).hasClass("hide")) {
                $(this).find("td:first").text(sort);
                sort++;
            }
        });
    }

    window.closeSelf = function () {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);//关闭当前页
    }

    function previewUrl(_url) {
        if (!checkUrl(_url)) {
            return false;
        }
        var base = new Base64();
        var b64Encoded = base.encode(_url);
        if(_url.endsWith('pdf')){
            window.open('http://47.98.203.224:8012/onlinePreview?url=' + encodeURIComponent(b64Encoded)+'&officePreviewType=pdf');
        }else{
            window.open('http://47.98.203.224:8012/onlinePreview?url=' + encodeURIComponent(b64Encoded));
        }
    }

    function checkUrl(url) {
        //url= 协议://(ftp的登录信息)[IP|域名](:端口号)(/或?请求参数)
        var strRegex = '^((https|http|ftp)://)'//(https或http或ftp)
            + '(([\\w_!~*\'()\\.&=+$%-]+: )?[\\w_!~*\'()\\.&=+$%-]+@)?' //ftp的user@  可有可无
            + '(([0-9]{1,3}\\.){3}[0-9]{1,3}' // IP形式的URL- 3位数字.3位数字.3位数字.3位数字
            + '|' // 允许IP和DOMAIN（域名）
            + '(localhost)|'	//匹配localhost
            + '([\\w_!~*\'()-]+\\.)*' // 域名- 至少一个[英文或数字_!~*\'()-]加上.
            + '\\w+\\.' // 一级域名 -英文或数字  加上.
            + '[a-zA-Z]{1,6})' // 顶级域名- 1-6位英文
            + '(:[0-9]{1,5})?' // 端口- :80 ,1-5位数字
            + '((/?)|' // url无参数结尾 - 斜杆或这没有
            + '(/[\\w_!~*\'()\\.;?:@&=+$,%#-]+)+/?)$';//请求参数结尾- 英文或数字和[]内的各种字符
        var re = new RegExp(strRegex, 'i');//i不区分大小写
        //将url做uri转码后再匹配，解除请求参数中的中文和空字符影响
        if (re.test(encodeURI(url))) {
            return (true);
        } else {
            return (false);
        }
    }



    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }
    function approvalRecord(){
        layer.open({
            title: '审批记录',
            type: 2,
            area: ['35%', '100%'],
            offset: 'rt',
            content: '${ctx}/customerEntry/approvalRecordPage?entryId=${customerEntry.id}'
        })
    }
</script>
</body>
</html>

