<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>设计自审</title>
    <meta name="decorator" content="base"/>
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" 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;
        }

        .bj-img > span{
            z-index: 1;
        }
        .lookBtn{
            color: #2890ac;
            width: 10px;
            padding: 11px;
        }
        .sl-img{
            width: 80px;
            height: 80px;
            border: 1px solid #ddd;
            float: left;
            /*margin-left: 10px;*/
            margin-right: 20px;
            margin-bottom: 10px;
            position: relative;
        }
        .sl-img > img {
            width: 100%;
            height: 100%;
        }
        .sl-img > span {
            position: absolute;
            right: 0;
            bottom: 0;
            background-color: #adacac;
            width: 100%;
            height: 20px;
            line-height: 20px;
            text-align: center;
            color: #fff;
            cursor: pointer;
            display: block;
        }
        .upload-container{
            /*margin-left: 10px;*/
        }

        input[type="radio"]:disabled, textarea:disabled, .layui-disabled {
            background-color: #ffffff;
        }
        .layui-form-longwid {
            width: 260px;
        }
        .layui-select-title .layui-disabled{
            background-color: #eee !important;
        }
    </style>
</head>
<body>
<div class="layui-form ">
    <div class="layui-card">
        <div class="layui-card-body layui-col-xs12" id="LAY_app">
            <div class="layui-card">
                <blockquote class="layui-elem-quote">项目信息</blockquote>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space12 layui-form-item">
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>电站编码：</label>
                            <div class="layui-input-block">
                                <input type="text" id="powerStationCode" class="layui-input layui-bg-gray" value="${entry.columns.powerStationCode}" disabled>
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>产品编号：</label>
                            <div class="layui-input-block">
                                <input type="text" disabled class="layui-input layui-bg-gray" value="${entry.columns.projectId}">
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label w-120"><i class="mark">*</i>代理商：</label>
                            <div class="layui-input-block ml-120">
                                <input type="text" disabled class="layui-input layui-bg-gray" value="${entry.columns.traderName}">
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>项目公司：</label>
                            <div class="layui-input-block">
                                <input type="text" disabled class="layui-input layui-bg-gray" value="${entry.columns.projectCompanyName}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-row layui-col-space12 layui-form-item">
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>电站状态：</label>
                            <div class="layui-input-block">
                                <input type="text" disabled class="layui-input layui-bg-gray"
                                <c:choose>
                                <c:when test="${entry.columns.status eq 'a'}">
                                       value="已完成"
                                </c:when>
                                </c:choose>
                                >
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>业务员：</label>
                            <div class="layui-input-block">
                                <input type="text" disabled class="layui-input layui-bg-gray" value="${entry.columns.creator}">
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>创建时间：</label>
                            <div class="layui-input-block">
                                <input type="text" disabled class="layui-input layui-bg-gray" value="<fmt:formatDate value="${entry.columns.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card ">
                <blockquote class="layui-elem-quote">业主信息&nbsp; &nbsp;<span><c:if test="${entry.columns.tenantType eq '1'}">(个人)</c:if><c:if test="${entry.columns.tenantType eq '2'}">(单位)</c:if></span></blockquote>

                <div class="layui-card-body">
                    <%--个人--%>
                    <c:if test="${empty entry.columns.tenantType || ('1' eq entry.columns.tenantType)}">
                        <div class="layui-row layui-col-space12 layui-form-item">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>业主姓名：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="tenantName" class="layui-input layui-bg-gray" disabled value="${entry.columns.tenantName}">
                                </div>
                            </div>
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>性别：</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="gender" disabled title="男"
                                           value="MALE" ${entry.columns.gender eq 'MALE' ? 'checked' : ''}/>
                                    <input type="radio" name="gender" disabled title="女"
                                           value="FEMALE" ${entry.columns.gender eq 'FEMALE' ? 'checked' : ''}/>
                                </div>
                            </div>
                            <div class="layui-col-lg3 layui-col-sm3">
                                <div>
                                    <label class="layui-form-label"><i class="mark">*</i>年龄：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="age" id="age" class="layui-input layui-bg-gray" value="${entry.columns.age}" disabled>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-lg3 layui-col-sm3" style="position:relative;">
                                <div>
                                    <label class="layui-form-label"><i class="mark">*</i>联系电话：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="mobile"
                                               disabled class="layui-input layui-bg-gray" value="${entry.columns.mobile}">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>身份证号：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="idCode"
                                           disabled class="layui-input layui-bg-gray" value="${entry.columns.idCode}">
                                </div>
                            </div>
                            <div class="layui-row layui-col-space12 layui-form-item">
                                <div class="layui-col-lg4 layui-col-sm4">
                                    <label class="layui-form-label"><i class="mark">*</i>身份证：</label>
                                    <div class="layui-input-block img-box">
                                        <div>
                                            <div id="imgsDiv1">
                                                <c:if test="${not empty entry.columns.idCardFront}">
                                                    <div class="bj-img imgSpan">
                                                        <img src="${entry.columns.idCardFront}" height="700" width="1200"/>
                                                        <input type="hidden" class="idCardFront" value="${entry.columns.idCardFront}"/>
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.idCardFront}">hide</c:if>">
                                                <img src="" alt="img placeholder" id="imgsAdd1">
                                            </div>
                                            <div style="width: 80px; text-align: center; color: #FF0000">正面</div>
                                        </div>
                                        <div>
                                            <div id="imgsDiv2">
                                                <c:if test="${not empty entry.columns.idCardBack}">
                                                    <div class="bj-img imgSpan">
                                                        <img src="${entry.columns.idCardBack}" height="700" width="1200"/>
                                                        <input type="hidden" class="idCardBack" value="${entry.columns.idCardBack}"/>
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.idCardBack}">hide</c:if>">
                                                <img src="" alt="img placeholder" id="imgsAdd2">
                                            </div>
                                            <div style="width: 80px; text-align: center; color: #FF0000">反面</div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-col-lg4 layui-col-sm4">
                                    <label class="layui-form-label w-120"><i class="mark">*</i>户口本复印件：</label>
                                    <div class="layui-input-block img-box ml-120">
                                        <div>
                                            <div id="imgsDiv3">
                                                <c:if test="${not empty entry.columns.residenceBooklet}">
                                                    <c:forEach var="quaim" items="${entry.columns.residenceBooklet.split(',')}" varStatus="vs">
                                                        <div class="bj-img imgSpan">
                                                            <img src="${quaim}" height="700" width="1200"/>
                                                            <input type="hidden" class="residenceBooklet" value="${quaim}"/>
                                                        </div>

                                                    </c:forEach>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.residenceBooklet}">hide</c:if>">
                                                <img src="" alt="img placeholder" id="imgsAdd303">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-row layui-col-space12 layui-form-item">
                                <div class="layui-col-lg4 layui-col-sm4">
                                    <label class="layui-form-label"><i class="mark">*</i>银行卡照片：</label>
                                    <div class="layui-input-block img-box">
                                        <div>
                                            <div id="imgsDiv4">
                                                <c:if test="${not empty entry.columns.bankCard}">
                                                    <div class="bj-img imgSpan">
                                                        <img src="${entry.columns.bankCard}" height="700" width="1200"/>
                                                        <input type="hidden" class="bankCard" value="${entry.columns.bankCard}"/>
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.bankCard}">hide</c:if>">
                                                <img src="" alt="img placeholder" id="imgsAdd4">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                                <div class="layui-col-lg3 layui-col-sm3">
                                    <label class="layui-form-label"><i class="mark">*</i>银行账户名：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="bankName" id="bankName" lay-verify="required"
                                               class="layui-input" value="${entry.columns.tenantName}" disabled>
                                    </div>
                                </div>

                                <div class="layui-col-lg3 layui-col-sm3">
                                    <label class="layui-form-label"><i class="mark">*</i>银行账户：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="bankCode" id="bankCode" lay-verify="required"
                                               class="layui-input" value="${entry.columns.bankCode}" disabled>
                                    </div>
                                </div>
                                <div class="layui-row layui-col-space12 layui-form-item"></div>
                                <div class="layui-col-lg6 layui-col-sm6">
                                    <label class="layui-form-label"><i class="mark">*</i>开户行：</label>
                                    <div class="layui-input-block">
                                        <select name="tssBankNum" id="tssBankNum" lay-verify="required" disabled>
                                            <option value="${entry.columns.bankName}" selected>${entry.columns.bankName}</option>
                                        </select>
                                    </div>
                                </div>
<%--                            <div class="layui-row layui-col-space12 layui-form-item">--%>
<%--                                <div class="layui-col-lg3 layui-col-sm3">--%>
<%--                                    <label class="layui-form-label">划转方式：</label>--%>
<%--                                    <div class="layui-input-block">--%>
<%--                                        <select name="repaymentMethod" id="repaymentMethod" disabled>--%>
<%--                                            <option value="">请选择</option>--%>
<%--                                            <option value="1" ${entry.columns.filingType eq '1' ? 'selected' : ''}>二类卡</option>--%>
<%--                                            <option value="0" ${entry.columns.filingType eq '2' ? 'selected' : ''}>其它</option>--%>
<%--                                        </select>--%>
<%--                                    </div>--%>
<%--                                </div>--%>
<%--                                <c:if test="${entry.columns.filingType ne '2'}">--%>
<%--                                    <div class="layui-col-lg3 layui-col-sm3" style="display: ${surveyRecord.columns.repaymentMethod eq '0' ? 'none' : 'block'};">--%>
<%--                                        <label class="layui-form-label">账号名称：</label>--%>
<%--                                        <div class="layui-input-block">--%>
<%--                                            <input type="text" disabled class="layui-input layui-bg-gray" value="${card.name}">--%>
<%--                                        </div>--%>
<%--                                    </div>--%>
<%--                                    <div class="layui-col-lg3 layui-col-sm3" style="display: ${surveyRecord.columns.repaymentMethod eq '0' ? 'none' : 'block'};">--%>
<%--                                        <label class="layui-form-label">二类卡号：</label>--%>
<%--                                        <div class="layui-input-block">--%>
<%--                                            <input type="text" disabled class="layui-input layui-bg-gray" value="${card.accountCode}">--%>
<%--                                        </div>--%>
<%--                                    </div>--%>
<%--                                    <div class="layui-col-lg3 layui-col-sm3" style="display: ${surveyRecord.columns.repaymentMethod eq '0' ? 'none' : 'block'};">--%>
<%--                                        <label class="layui-form-label">联行号：</label>--%>
<%--                                        <div class="layui-input-block">--%>
<%--                                            <input type="text" disabled class="layui-input layui-bg-gray" value="102581000353">--%>
<%--                                        </div>--%>
<%--                                    </div>--%>
<%--                                </c:if>--%>
<%--                            </div>--%>
                        </div>
                    </c:if>
                    <%--单位--%>
                    <c:if test="${entry.columns.tenantType eq '2'}">

                        <c:if test="${info.columns.tenant_name.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>单位名称：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="tenantNameAnother" disabled class="layui-input layui-bg-gray" value="${entry.columns.tenantName}">
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.regno.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>信用代码：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="regno" id="regno" disabled class="layui-input layui-bg-gray" value="${entry.columns.regno}">
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.mobile.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3" style="position:relative;">
                                <div>
                                    <label class="layui-form-label"><i class="mark">*</i>联系方式：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="mobileAnother" disabled class="layui-input layui-bg-gray"  value="${entry.columns.mobile}">
                                    </div>
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.corp.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3" style="position:relative;">
                                <div>
                                    <label class="layui-form-label"><i class="mark">*</i>负责人姓名：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="corp" id="corp" disabled class="layui-input layui-bg-gray"  value="${entry.columns.corp}">
                                    </div>
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.id_code.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>身份证号：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="idCodeAnother" disabled class="layui-input layui-bg-gray" value="${entry.columns.idCode}">
                                </div>
                            </div>
                        </c:if>

                        <div class="layui-row layui-col-space12 layui-form-item">
                            <c:if test="${info.columns.id_card_front.status eq '1'}">
                                <div class="layui-col-lg4 layui-col-sm4">
                                    <label class="layui-form-label w-120"><i class="mark">*</i>负责人身份证：</label>
                                    <div class="layui-input-block img-box ml-120">
                                        <div>
                                            <div id="imgsDiv33">
                                                <c:if test="${not empty entry.columns.idCardFront}">
                                                    <div class="bj-img imgSpan">
                                                            <%--  <span class="layui-icon-close layui-icon" onclick="delImg(this,'uploader33')"></span>--%>
                                                        <img src="${commonStaticImgPath}${entry.columns.idCardFront}" height="700" width="1200"/>
                                                        <input type="hidden" class="idCardFront" value="${entry.columns.idCardFront}"/>
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.idCardFront}">hide</c:if>" id="uploader33">
                                                <img src="" alt="img placeholder" id="imgsAdd33">
                                            </div>
                                            <div style="width: 80px; text-align: center; color: #FF0000">正面</div>
                                        </div>
                                        <div>
                                            <div id="imgsDiv34">
                                                <c:if test="${not empty entry.columns.idCardBack}">
                                                    <div class="bj-img imgSpan">
                                                            <%--  <span class="layui-icon-close layui-icon" onclick="delImg(this,'uploader34')"></span>--%>
                                                        <img src="${commonStaticImgPath}${entry.columns.idCardBack}" height="700" width="1200"/>
                                                        <input type="hidden" class="idCardBack" value="${entry.columns.idCardBack}"/>
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.idCardBack}">hide</c:if>" id="uploader34">
                                                <img src="" alt="img placeholder" id="imgsAdd34">
                                            </div>
                                            <div style="width: 80px; text-align: center; color: #FF0000">反面</div>
                                        </div>
                                    </div>
                                </div>
                            </c:if>

                            <c:if test="${info.columns.regno_url.status eq '1'}">
                                <div class="layui-col-lg4 layui-col-sm4">
                                    <label class="layui-form-label"><i class="mark">*</i>营业执照：</label>
                                    <div class="layui-input-block img-box">
                                        <div>
                                            <div>
                                                <div id="imgsDiv35">
                                                    <c:if test="${not empty tenant and not empty tenant.regnoUrl}">
                                                        <div class="bj-img imgSpan">
                                                                <%--<span class="layui-icon-close layui-icon" onclick="delImg(this,'uploader35')"></span>--%>
                                                            <img src="${commonStaticImgPath}${tenant.regnoUrl}" height="700" width="1200"/>
                                                            <input type="hidden" class="regnoUrl" value="${tenant.regnoUrl}"/>
                                                        </div>
                                                    </c:if>
                                                </div>
                                                <div class="upload-container <c:if test="${not empty tenant || not empty tenant.regnoUrl}">hide</c:if>" id="uploader35">
                                                    <img src="" alt="img placeholder" id="imgsAdd35">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </c:if>
                        </div>
                        <div class="layui-row layui-col-space12 layui-form-item">
                            <c:if test="${info.columns.exigence_name.status eq '1'}">
                                <div class="layui-col-lg3 layui-col-sm3">
                                    <label class="layui-form-label"><c:if test="${info.columns.exigence_name.mustFillFlag eq '1'}"><i class="mark">*</i></c:if>紧急联系人：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="exigenceName" id="exigenceName" lay-verify="required" disabled
                                               autocomplete="off" class="layui-input " value="${entry.columns.exigenceName}">
                                    </div>
                                </div>
                            </c:if>
                            <c:if test="${info.columns.exigence_phone.status eq '1'}">
                                <div class="layui-col-lg3 layui-col-sm3">
                                    <label class="layui-form-label"><c:if test="${info.columns.exigence_phone.mustFillFlag eq '1'}"><i class="mark">*</i></c:if>联系方式：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="exigencePhone" id="exigencePhone" lay-verify="required" disabled
                                               autocomplete="off" class="layui-input " value="${entry.columns.exigencePhone}">
                                    </div>
                                </div>
                            </c:if>
                        </div>
                        <div class="layui-row layui-col-space12 layui-form-item">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label">划转方式：</label>
                                <div class="layui-input-block">
                                    <select name="repaymentMethod" id="repaymentMethod" disabled>
                                        <option value="">请选择</option>
                                        <option value="1" ${entry.columns.filingType eq '1' ? 'selected' : ''}>二类卡</option>
                                        <option value="0" ${entry.columns.filingType eq '2' ? 'selected' : ''}>其它</option>
                                    </select>
                                </div>
                            </div>
                            <c:if test="${entry.columns.filingType ne '2'}">
                                <div class="layui-col-lg3 layui-col-sm3" style="display: ${surveyRecord.columns.repaymentMethod eq '0' ? 'none' : 'block'};">
                                    <label class="layui-form-label">账号名称：</label>
                                    <div class="layui-input-block">
                                        <input type="text" disabled class="layui-input layui-bg-gray" value="${card.name}">
                                    </div>
                                </div>
                                <div class="layui-col-lg3 layui-col-sm3" style="display: ${surveyRecord.columns.repaymentMethod eq '0' ? 'none' : 'block'};">
                                    <label class="layui-form-label">二类卡号：</label>
                                    <div class="layui-input-block">
                                        <input type="text" disabled class="layui-input layui-bg-gray" value="${card.accountCode}">
                                    </div>
                                </div>
                                <div class="layui-col-lg3 layui-col-sm3" style="display: ${surveyRecord.columns.repaymentMethod eq '0' ? 'none' : 'block'};">
                                    <label class="layui-form-label">联行号：</label>
                                    <div class="layui-input-block">
                                        <input type="text" disabled class="layui-input layui-bg-gray" value="${card.openBankNumber}">
                                    </div>
                                </div>
                            </c:if>
                        </div>
                    </c:if>
                </div>
            </div>
            <%--共签人信息--%>
            <c:if test="${entry.columns.age >= 65}">
            <div class="layui-card">
                <blockquote class="layui-elem-quote">补充信息</blockquote>
                <div class="layui-card-body ">
                    <div class="layui-row layui-col-space12 layui-form-item">
                        <c:if test="${info.columns.bp_name.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><c:if test="${info.columns.bp_name.mustFillFlag eq '1'}"><i class="mark">*</i></c:if>共签人名称：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="bpName" id="bpName" disabled lay-verify="required" class="layui-input " value="${entry.columns.bpName}" >
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.bp_id_card.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label">证件号码：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="bpIdCard" id="bpIdCard" disabled lay-verify="required" class="layui-input " value="${entry.columns.bpIdCard}" >
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.bp_mobile.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><c:if test="${info.columns.bp_mobile.mustFillFlag eq '1'}"><i class="mark">*</i></c:if>手机号：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="bpMobile" id="bpMobile" disabled lay-verify="required" class="layui-input " value="${entry.columns.bpMobile}" >
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.bp_relation.status eq '1'}">
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><c:if test="${info.columns.bp_relation.mustFillFlag eq '1'}"><i class="mark">*</i></c:if>共签人关系：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="bpRelation" id="bpRelation" disabled lay-verify="required" class="layui-input " value="${entry.columns.bpRelation}" >
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.bp_card_front.status eq '1' || info.columns.bp_card_back.status eq  '1'}">
                            <div class="layui-col-lg4 layui-col-sm4">
                                <label class="layui-form-label"><c:if test="${info.columns.bp_card_front.mustFillFlag eq '1' ||  info.columns.bp_card_back.mustFillFlag eq '1' }"><i class="mark">*</i></c:if>身份证：</label>
                                <div class="layui-input-block img-box">
                                    <c:if test="${info.columns.bp_card_front.status eq '1'}">
                                        <div>
                                            <div id="imgsDiv30">
                                                <c:if test="${not empty entry.columns.bpCardFront}">
                                                    <div class="bj-img imgSpan">
                                                            <%--                          <span class="layui-icon-close layui-icon" onclick="delImg(this,'uploader30')"></span>--%>
                                                        <img src="${commonStaticImgPath}${entry.columns.bpCardFront}" height="700" width="1200"/>
                                                        <input type="hidden" class="bpCardFront" value="${entry.columns.bpCardFront}"/>
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.bpCardFront}">hide</c:if>" id="uploader30">
                                                <img src="" alt="img placeholder" id="imgsAdd30">
                                            </div>
                                            <div style="width: 80px; text-align: center; color: #FF0000">正面</div>
                                        </div>
                                    </c:if>
                                    <c:if test="${info.columns.bp_card_back.status eq '1'}">
                                        <div>
                                            <div id="imgsDiv31">
                                                <c:if test="${not empty entry.columns.bpCardBack}">
                                                    <div class="bj-img imgSpan">
                                                            <%--                          <span class="layui-icon-close layui-icon" onclick="delImg(this,'uploader31')"></span>--%>
                                                        <img src="${commonStaticImgPath}${entry.columns.bpCardBack}" height="700" width="1200"/>
                                                        <input type="hidden" class="bpCardBack" value="${entry.columns.bpCardBack}"/>
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div class="upload-container <c:if test="${not empty entry.columns.bpCardBack}">hide</c:if>" id="uploader31">
                                                <img src="" alt="img placeholder" id="imgsAdd31">
                                            </div>
                                            <div style="width: 80px; text-align: center; color: #FF0000">反面</div>
                                        </div>
                                    </c:if>
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${info.columns.bp_file.status eq '1'}">
                            <div class="layui-col-lg4 layui-col-sm4">
                                <label class="layui-form-label w-120"><c:if test="${info.columns.bp_file.mustFillFlag eq '1'}"><i class="mark">*</i></c:if>子女证明材料：</label>
                                <div class="layui-input-block img-box ml-120">
                                    <div>
                                        <div id="imgsDiv32">
                                            <c:if test="${not empty entry.columns.bpFile}">
                                                <c:forEach var="quaim" items="${entry.columns.bpFile.split(',')}" varStatus="vs">
                                                    <div class="bj-img imgSpan">
                                                            <%--                          <span class="layui-icon-close layui-icon" onclick="delImg(this,'uploader32')"></span>--%>
                                                        <img src="${commonStaticImgPath}${quaim}" height="700" width="1200"/>
                                                        <input type="hidden" class="bpFile" value="${quaim}"/>
                                                    </div>
                                                </c:forEach>
                                            </c:if>
                                        </div>
                                        <div class="upload-container <c:if test="${not empty entry.columns.bpFile}">hide</c:if>" id="uploader32">
                                            <img src="" alt="img placeholder" id="imgsAdd32">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </c:if>
                    </div>
                </div>
            </div>
            </c:if>
            <%--勘测信息--%>
            <div class="layui-card">
                <blockquote class="layui-elem-quote">勘测信息</blockquote>
                <div class="layui-card-body ">
                    <div class="layui-row layui-col-space12 layui-form-item">
                            <div class="layui-col-lg9 layui-col-sm9">
                                <label class="layui-form-label"><i class="mark">*</i>安装地址：</label>
                                <div class="layui-input-block">
                                    <div class="layui-col-lg2 layui-col-sm2 pr-10">
                                        <select name="province" id="province" lay-verify="required" disabled
                                                lay-filter="province" lay-search>
                                            <option value="">请选择省</option>
                                            <c:forEach items="${pros}" var="pro">
                                                <option value="${pro.columns.ProvinceName}" rel="${pro.columns.traderId}"
                                                        title="${pro.columns.ProvinceID }"
                                                        <c:if test="${entry.columns.province eq pro.columns.ProvinceName}">selected</c:if>>${pro.columns.ProvinceName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="layui-col-lg2 layui-col-sm2 pr-10">
                                        <select name="city" id="city" lay-verify="required" lay-filter="city" disabled
                                                lay-search>
                                            <option value="">请选择市</option>
                                            <c:forEach items="${faccitys}" var="cit">
                                                <option value="${cit.columns.CityName}"
                                                        title="${cit.columns.CityID}" rel="${cit.columns.traderId}"
                                                        <c:if test="${entry.columns.city eq cit.columns.CityName}">selected</c:if>>${cit.columns.CityName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="layui-col-lg2 layui-col-sm2 pr-10">
                                        <select name="area" id="area" lay-verify="required" disabled lay-filter="area" lay-search>
                                            <option value="">请选择县/区</option>
                                            <c:forEach items="${areas}" var="ar">
                                                <option value="${ar.columns.DistrictName}"
                                                        title="${ar.columns.DistrictID}"
                                                        <c:if test="${entry.columns.area eq ar.columns.DistrictName}">selected</c:if>>${ar.columns.DistrictName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="layui-col-lg6 layui-col-sm6">
                                        <div class="layui-inline">
                                            <input type="text" name="customerAddress" lay-verify="required"
                                                   autocomplete="off" class="layui-input layui-col-lg2 "
                                                   value="${entry.columns.address}">
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-col-lg3 layui-col-sm4">
                                <label class="layui-form-label"><i class="mark">*</i>是否封屋顶：</label>
                                <div class="layui-input-block">
                                    <select name="sealRoof" id="sealRoof">
                                        <option value="">请选择</option>
                                        <option value="1" <c:if test="${surveyRecord.columns.sealRoof eq '1'}">selected</c:if>>是</option>
                                        <option value="2" <c:if test="${surveyRecord.columns.sealRoof eq '2'}">selected</c:if>>否</option>
                                    </select>
                                </div>
                            </div>

                            <div class="layui-col-lg3 layui-col-sm3" style="position:relative;">
                                <div>
                                    <label class="layui-form-label"><i class="mark">*</i>方位角：</label>
                                    <div class="layui-inline" style="width: 120px;">
                                        <select name="azimuth" id="azimuth" lay-filter="azimuth">
                                            <option value="">请选择</option>
                                            <option value="0" ${surveyRecord.columns.azimuth eq '0' ? 'selected' : ''}>正南</option>
                                            <option value="2" ${surveyRecord.columns.azimuth eq '2' ? 'selected' : ''}>南偏东</option>
                                            <option value="1" ${surveyRecord.columns.azimuth eq '1' ? 'selected' : ''}>南偏西</option>
                                        </select>
                                    </div>
                                    <div class="layui-inline" style="width: 112px">
                                        <c:if test="${surveyRecord.columns.azimuth ne '0'}">
                                            <input type="text" name="angle" id="angle" class="layui-input" maxlength="5"
                                                   value="${sur.columns.zj_direc_degree}" onchange="checkAngle()" />
                                        </c:if>
                                        <c:if test="${surveyRecord.columns.azimuth eq '0'}">
                                            <input type="text" name="angle" id="angle" class="layui-input layui-bg-gray" maxlength="5" readonly="readonly"
                                                   value="" onchange="checkAngle()" />
                                        </c:if>
                                        <span class="pos-a h-32 lh-32 layui-span-unit">度</span>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label w-120"><i class="mark">*</i>房屋建成年份：</label>
                                <div class="layui-input-block ml-120">
                                    <input type="text" class="layui-input" name="completionYear" id="completionYear"  autocomplete="off"
                                           value="${surveyRecord.columns.completionYear}">
                                </div>
                            </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>建筑高度：</label>
                            <div class="layui-input-block">
                                <input type="text" name="buildingHeight" id="buildingHeight"  class="layui-input" value="${surveyRecord.columns.buildingHeight}">
                                <span class="pos-a h-32 lh-32 layui-span-unit">米</span>
                            </div>
                        </div>
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>经度：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="longitude" id="longitude"  class="layui-input" value="${sur.columns.longitude}">
                                </div>
                            </div>
                            <div class="layui-col-lg3 layui-col-sm3">
                                <label class="layui-form-label"><i class="mark">*</i>纬度：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="latitude" id="latitude"  class="layui-input" value="${sur.columns.latitude}">
                                </div>
                            </div>
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label w-120"><i class="mark">*</i>屋顶防水情况：</label>
                            <div class="layui-input-block ml-120">
                                <select name="waterproof" id="waterproof" lay-verify="required">
                                    <option value="">请选择</option>
                                    <option value="1" ${surveyRecord.columns.waterproof eq '1' ? 'selected' : ''}>一般</option>
                                    <option value="2" ${surveyRecord.columns.waterproof eq '2' ? 'selected' : ''}>良好</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label w-120"><i class="mark">*</i>是否有污染源：</label>
                            <div class="layui-input-block ml-120">
                                <select name="sourcePollution" id="sourcePollution" lay-verify="required">
                                    <option value="">请选择</option>
                                    <option value="1" ${surveyRecord.columns.sourcePollution eq '1' ? 'selected' : ''}>有</option>
                                    <option value="2" ${surveyRecord.columns.sourcePollution eq '2' ? 'selected' : ''}>没有</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label" style="width: 140px"><i class="mark">*</i>是否具备运维空间：</label>
                            <div class="layui-input-block" style="margin-left: 140px">
                                <select name="opsCondition" id="opsCondition" lay-verify="required">
                                    <option value="">请选择</option>
                                    <option value="1" ${surveyRecord.columns.opsCondition eq '1' ? 'selected' : ''}>具备</option>
                                    <option value="2" ${surveyRecord.columns.opsCondition eq '2' ? 'selected' : ''}>不具备</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label w-120"><i class="mark">*</i>并网电压等级：</label>
                            <div class="layui-input-block ml-120">
                                <select name="voltageClasses" id="voltageClasses" lay-verify="required">
                                    <option value="">请选择</option>
                                    <option value="220" ${surveyRecord.columns.voltageClasses eq '220.00' ? 'selected' : ''}>220V</option>
                                    <option value="380" ${surveyRecord.columns.voltageClasses eq '380.00' ? 'selected' : ''}>380V</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>变压器容量：</label>
                            <div class="layui-input-block">
                                <input type="text" name="transformerCapacity" id="transformerCapacity"   class="layui-input" value="${surveyRecord.columns.transformerCapacity}">
                                <span class="pos-a h-32 lh-32 layui-span-unit">kVA</span>
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label" style="width: 210px"><i class="mark">*</i>是否符合变压器容量限制要求：</label>
                            <div class="layui-input-block" style="margin-left: 210px">
                                <select name="restrictFlag" id="restrictFlag" lay-verify="required">
                                    <option value="">请选择</option>
                                    <option value="1" ${surveyRecord.columns.restrictFlag eq '1' ? 'selected' : ''}>符合</option>
                                    <option value="2" ${surveyRecord.columns.restrictFlag eq '2' ? 'selected' : ''}>不符合</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>并网距离：</label>
                            <div class="layui-input-block">
                                <input type="text" name="distance" id="distance" class="layui-input" value="${surveyRecord.columns.distance}">
                                <span class="pos-a h-32 lh-32 layui-span-unit">米</span>
                            </div>
                        </div>
                        <div class="layui-col-lg12 layui-col-sm12"></div>
                        <div class="layui-tab-content">
                            <c:set var="indexNum" value="1"/>
                            <table class="layui-table" style="margin: 0 10px 0 0;">
                                <tr style="height: 100px">
                                    <td width="15%">${indexNum}<i class="mark">*</i>房屋屋顶照片</td>
                                    <td width="80%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoOneDiv">
                                                    <c:set var="roofPhotoOneCount" value="0"/>
                                                    <c:if test="${not empty surveyRecord.columns.roofPhotoOne}">
                                                        <c:forEach var="quaim"
                                                                   items="${surveyRecord.columns.roofPhotoOne.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <span class="layui-icon-close layui-icon"
                                                                      onclick="delImg(this,'roofPhotoOneUploader')"></span>
                                                                <img src="${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoOne"
                                                                       value="${quaim}">
                                                            </div>
                                                            <c:set var="roofPhotoOneCount" value="${vs.count}"/>
                                                        </c:forEach>
                                                    </c:if>
                                                </div>
                                                <div class="upload-container <c:if test="${roofPhotoOneCount >=9}">hide</c:if>"
                                                     id="roofPhotoOneUploader">
                                                    <img src="" alt="img placeholder" id="roofPhotoOne">
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                                <tr style="height: 100px">
                                    <td width="15%">${indexNum}<i class="mark">*</i>房屋周边照片（4张，4个方位角）</td>
                                    <td width="80%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="roofPhotoTwoDiv">
                                                    <c:set var="roofPhotoTwoCount" value="0"/>
                                                    <c:if test="${not empty surveyRecord.columns.roofPhotoTwo}">
                                                        <c:forEach var="quaim"
                                                                   items="${surveyRecord.columns.roofPhotoTwo.split(',')}"
                                                                   varStatus="vs">
                                                            <div class="bj-img imgSpan">
                                                                <span class="layui-icon-close layui-icon"
                                                                      onclick="delImg(this,'roofPhotoTwoUploader')"></span>
                                                                <img src="${quaim}" height="700"
                                                                     width="1200">
                                                                <input type="hidden" class="roofPhotoTwo"
                                                                       value="${quaim}">
                                                            </div>
                                                            <c:set var="roofPhotoTwoCount" value="${vs.count}"/>
                                                        </c:forEach>
                                                    </c:if>
                                                </div>
                                                <div class="upload-container <c:if test="${roofPhotoTwoCount >=4}">hide</c:if>"
                                                     id="roofPhotoTwoUploader">
                                                    <img src="" alt="img placeholder" id="roofPhotoTwo">
                                                </div>
                                            </div>
                                        </div>

                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                                <tr style="height: 100px">
                                     <td width="15%">${indexNum}<i class="mark">*</i>踏勘记录表</td>
                                        <td width="80%">
                                            <div class="layui-input-block img-box" style="margin-left: 20px;">
                                                <div style="display: flex;flex-wrap: wrap;">
                                                    <div id="surveyFilesDiv">
                                                        <div id="surveyFilesUploader"
                                                             <c:if test="${surveyFilesCount >= 4}">style="display: none"</c:if>>
                                                            <span style="color:blue;cursor: pointer" id="surveyFiles">上传</span>
                                                        </div>
                                                        <c:set var="surveyFilesCount" value="${surveyFilesCount}"/>
                                                        <c:if test="${not empty sur.columns.url}">
                                                            <c:forEach items="${sur.columns.url}" var="file"
                                                                       varStatus="vs">
                                                                <div style="margin-top: 5px">
                                                                      <span style="color: red" class="layui-icon-close layui-icon"  onclick="delImg(this,'surveyFilesUploader')"></span>
                                                                    <a style="color:#2890ac;" target="_blank" onclick="previewUrl('${file}')" class="download-link">${fns:substringAfterLast(file, '/')}</a>
                                                                    <input type="hidden" class="surveyFiles" value="${file}">
                                                                </div>
                                                            </c:forEach>
                                                        </c:if>
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>

                                <tr style="height: 100px">
                                    <td width="15%">${indexNum}<i class="mark">*</i>房产证明</td>
                                    <td width="80%">
                                        <div class="layui-input-block img-box" style="margin-left: 20px;">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div id="houseOwnershipDiv">
                                                    <div id="houseOwnershipUploader"
                                                         <c:if test="${houseOwnershipCount >= 4}">style="display: none"</c:if>>
                                                        <span style="color:blue;cursor: pointer" id="houseOwnership">上传</span>
                                                    </div>
                                                    <c:set var="houseOwnershipCount" value="${houseOwnershipCount}"/>
                                                    <c:if test="${not empty surveyRecord.columns.houseOwnership}">
                                                        <c:forEach items="${surveyRecord.columns.houseOwnership}" var="file"
                                                                   varStatus="vs">
                                                            <div style="margin-top: 5px">
                                                                <span style="color: red" class="layui-icon-close layui-icon"  onclick="delImg(this,'houseOwnershipUploader')"></span>
                                                                <a style="color:#2890ac;" target="_blank" onclick="previewUrl('${file}')" class="download-link">${fns:substringAfterLast(file, '/')}</a>
                                                                <input type="hidden" class="houseOwnership" value="${file}">
                                                            </div>
                                                        </c:forEach>
                                                    </c:if>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <c:set var="indexNum" value="${indexNum+1}"/>
                                </tr>
                            </table>
                        </div>
                        <div class="layui-card">
                            <blockquote class="layui-elem-quote">方案信息</blockquote>
                            <div class="layui-card-body">
                                <div class="layui-row layui-col-space12 layui-form-item">
                                    <div class="layui-row">
                                        <div class="layui-col-lg9 layui-col-sm9 ">
                                            <label class="layui-form-label"><i class="mark">*</i>设计图纸：</label>
                                            <div class="layui-input-block img-box ml-120">
                                                <div style="display: flex">
                                                    <div id="attachFilesDiv">
                                                        <div id="attachFilesUploader"
                                                             <c:if test="${attachFilesCount >= 4}">style="display: none"</c:if>>
                                                            <span style="color:blue;cursor: pointer"
                                                                  id="attachFiles">上传</span>
                                                        </div>
                                                        <c:set var="attachFilesCount" value="${attachFilesCount}"/>
                                                        <c:if test="${not empty report.columns.safety_disclose_doc_img}">
                                                            <c:forEach items="${report.columns.safety_disclose_doc_img}" var="file"
                                                                       varStatus="vs">
                                                                <div style="margin-top: 5px">
                                                                    <span style="color: red"
                                                                          class="layui-icon-close layui-icon"
                                                                          onclick="delImg(this,'attachFilesUploader')"></span>
                                                                    <a style="color:#2890ac;" target="_blank"
                                                                       onclick="previewUrl('${file}')"
                                                                       class="download-link">${fns:substringAfterLast(file, '/')}</a>
                                                                    <input type="hidden" class="attachFiles"
                                                                           value="${file}">
                                                                </div>
                                                            </c:forEach>
                                                        </c:if>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="layui-input-block pos-r"
                                                 style="display: flex; align-items: center">
                                                <span style="color:#B0B0BEFF;cursor: pointer">可上传1-4个附件，格式：pdf，要包含：组件排布图，组件走线图，支架侧视图，支架后视图</span>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="layui-col-lg3 layui-col-sm3 ">
                                        <label class="layui-form-label">设计容量：</label>
                                        <div class="layui-input-block pos-r">
                                            <input class="layui-input layui-bg-gray" name="designCapacity"
                                                   value="${report.columns.capacity}" disabled>
                                            <span class="pos-a h-32 lh-32 layui-span-unit">kW</span>
                                        </div>
                                    </div>
                                    <div class="assembly">
                                        <div class="layui-row assemblyDiv">
                                            <div class="layui-col-lg5 layui-col-sm7">
                                                <label class="layui-form-label"><i
                                                        class="mark">*</i>组件：</label>
                                                <div class="layui-input-block">
                                                    <div class="layui-inline layui-form-longwid">
                                                        <select lay-filter="assembly" name="assembly" class="assembly" disabled>
                                                            <option  value="${report.columns.component_spec}" selected>${report.columns.component_spec}</option>
                                                        </select>
                                                        <span class="pos-a h-32 lh-32 layui-span-unit"
                                                              style="right: 30px">Wp</span>
                                                    </div>
                                                    <span class="layui-inline">X </span>
                                                    <div class="layui-inline">
                                                        <input type="text" class="layui-input layui-bg-gray"
                                                               disabled
                                                               style="width: 85px;"
                                                               placeholder="数量" name="optionVal"
                                                               value="${report.columns.component_num}">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="inverter">
                                        <c:if test="${not empty inverterList}">
                                            <c:forEach var="inverter" items="${inverterList}" varStatus="vs">
                                                <div class="layui-row inverterDiv">
                                                    <div class="layui-col-lg5 layui-col-sm7">
                                                        <label class="layui-form-label"><i class="mark">*</i>逆变器：</label>
                                                        <div class="layui-input-block">
                                                            <div class="layui-inline">
                                                                <select lay-filter="inverter" name="inverter" disabled class="inverter" lay-search>
                                                                   <option value="${inverter.columns.spec}" selected >${inverter.columns.spec}</option>
                                                                </select>
                                                            </div>
                                                            <span class="layui-inline">X </span>
                                                            <div class="layui-inline">
                                                                <input type="text" class="layui-input" style="width: 85px;" disabled
                                                                       placeholder="数量" name="optionVal"
                                                                       value="${inverter.columns.amount}">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </c:forEach>
                                        </c:if>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="operate-footer">
                    <button type="button" class="layui-btn saveOrder">保存</button>
                    <button type="button" class="layui-btn layui-btn-primary" onclick="cancel()">取消</button>
                </div>
            </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 src="${ctxPlugin}/lib/xm-select.js"></script>
            <script>
                //图片查看效果
                var viewer = new Viewer(document.getElementById('LAY_app'));
                var number = /^[1-9]\d*$/;//非0正整数正则
                var number2 = /^[1-9]\d*(\.\d{1,2})?$/;
                layui.config({
                    base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
                }).extend({
                    index: 'lib/index' //主入口模块
                }).use(['index', 'form', 'layedit', 'laydate', 'jquery', 'upload', 'layer'], function () {
                    $ = layui.$
                        , element = layui.element
                        , form = layui.form
                        , layer = layui.layer
                        , laydate = layui.laydate;
                    var upload = layui.upload;

                    laydate.render({
                        elem: '#completionYear'
                        , trigger: 'click'
                        , max: '0'
                        , type: 'year'
                    });

                    upload.render({
                        elem: '#roofPhotoOneUploader' //绑定元素   整体照片
                        , url: '${ctx}/common/uploadFile' //上传接口
                        , before: function (obj) {
                            //预读本地文件示例，不支持ie8
                            obj.preview(function (index, file, result) {
                            });
                        }
                        , done: function (res) {
                            //上传完毕回调
                            addImg(res.path, "roofPhotoOneUploader", "roofPhotoOneDiv", "roofPhotoOne", 9);
                        }
                        , error: function () {
                            //请求异常回调
                        }
                    });

                    upload.render({
                        elem: '#roofPhotoTwoUploader' //绑定元素   东南角照片
                        , url: '${ctx}/common/uploadFile' //上传接口
                        , before: function (obj) {
                            //预读本地文件示例，不支持ie8
                            obj.preview(function (index, file, result) {
                            });
                        }
                        , done: function (res) {
                            //上传完毕回调
                            addImg(res.path, "roofPhotoTwoUploader", "roofPhotoTwoDiv", "roofPhotoTwo", 4);
                        }
                        , error: function () {
                            //请求异常回调
                        }
                    });

                    // 踏勘记录表
                    upload.render({
                        elem: '#surveyFilesUploader',
                        url: '${ctx}/common/uploadFile3',
                        accept: 'file',
                        exts: 'jpg|png|gif|doc|docx|ppt|pdf|xls|xlsx',
                        before: function (obj) {
                            //预读本地文件示例，不支持ie8
                            obj.preview(function (index, file, result) {
                            });
                        },
                        done: function (res) {
                            //上传完毕回调
                            let path = res.path;
                            let index = path.lastIndexOf('/');
                            let name = path.substring(index + 1);
                            let imgCount = $("#surveyFilesDiv").find(".surveyFiles").length;
                            if ((imgCount + 1) >= 4) {
                                $("#surveyFilesUploader").hide();
                            }
                            let html = '<div style="margin-top: 5px"><span style="color: red" class="layui-icon-close layui-icon" onclick="delImg(this,\'surveyFilesUploader\')"></span>';
                            html += '<a style="color:#2890ac;"  target="_blank" onclick="previewUrl(' + "\'" + '${commonStaticImgPath}' + path + "\'" + ')"    class="download-link">' + name + '</a>';
                            html += '<input type="hidden" class="surveyFiles" value="${commonStaticImgPath}'+path + '"/> </div>';
                            $("#surveyFilesDiv").append(html);
                        },
                        error: function () {
                            //请求异常回调
                        }
                    });
                    //房产证
                    upload.render({
                        elem: '#houseOwnershipUploader',
                        url: '${ctx}/common/uploadFile3',
                        accept: 'file',
                        exts: 'jpg|png|gif|doc|docx|ppt|pdf|xls|xlsx',
                        before: function (obj) {
                            //预读本地文件示例，不支持ie8
                            obj.preview(function (index, file, result) {
                            });
                        },
                        done: function (res) {
                            //上传完毕回调
                            let path = res.path;
                            let index = path.lastIndexOf('/');
                            let name = path.substring(index + 1);
                            let imgCount = $("#houseOwnershipDiv").find(".houseOwnership").length;
                            if ((imgCount + 1) >= 4) {
                                $("#houseOwnershipUploader").hide();
                            }
                            let html = '<div style="margin-top: 5px"><span style="color: red" class="layui-icon-close layui-icon" onclick="delImg(this,\'houseOwnershipUploader\')"></span>';
                            html += '<a style="color:#2890ac;"  target="_blank" onclick="previewUrl(' + "\'" + '${commonStaticImgPath}' + path + "\'" + ')"    class="download-link">' + name + '</a>';
                            html += '<input type="hidden" class="houseOwnership" value="${commonStaticImgPath}'+path + '"/> </div>';
                            $("#houseOwnershipDiv").append(html);
                        },
                        error: function () {
                            //请求异常回调
                        }
                    });
                    // 设计图纸
                    upload.render({
                        elem: '#attachFilesUploader',
                        url: '${ctx}/common/uploadFile3',
                        accept: 'file',
                        exts: 'pdf',
                        before: function (obj) {
                            //预读本地文件示例，不支持ie8
                            obj.preview(function (index, file, result) {
                            });
                        },
                        done: function (res) {
                            //上传完毕回调
                            let path = res.path;
                            let index = path.lastIndexOf('/');
                            let name = path.substring(index + 1);
                            let imgCount = $("#attachFilesDiv").find(".attachFiles").length;
                            if ((imgCount + 1) >= 4) {
                                $("#attachFilesUploader").hide();
                            }
                            let html = '<div style="margin-top: 5px"><span style="color:red;" class="layui-icon-close layui-icon" onclick="delImg(this,\'attachFilesUploader\')"></span>';
                            html += '<a style="color:#2890ac;" target="_blank"  onclick="previewUrl(' + "\'" + '${commonStaticImgPath}' + path + "\'" + ')"    class="download-link">' + name + '</a>';
                            html += '<input type="hidden" class="attachFiles" value="${commonStaticImgPath}'+path + '"/> </div>';
                            $("#attachFilesDiv").append(html);
                        },
                        error: function () {
                            //请求异常回调
                        }
                    });


                    function addImg(data, id, imgsDiv, classimg, count) {
                        var imgCount = $("#" + imgsDiv).find(".imgSpan").length;
                        if ((imgCount + 1) >= count) {
                            $("#" + id).hide();
                        }
                        var html = '<div class="bj-img imgSpan"><span class="layui-icon-close layui-icon" onclick="delImg(this,\'' + id + '\')"></span>';
                        html += '<img src="${commonStaticImgPath}' + data + '" height="700" width="1200"/>';
                        html += '<input type="hidden" class="' + classimg + '" value="${commonStaticImgPath}' + data + '"/> </div>';
                        $("#" + imgsDiv).append(html);
                        //图片查看效果
                        viewer.update();
                    }
                    form.on('select(azimuth)', function (data) {
                        var azimuth = data.value;
                        if (azimuth === '1') {
                            $('input[name=angle]').val('').addClass('layui-bg-gray').prop('readonly', true);
                        } else {
                            $('input[name=angle]').removeClass('layui-bg-gray').prop('readonly', false);
                        }
                    });

                    //提交审核
                    var saveFlag = false;
                    $(".saveOrder").click(function () {
                        if (saveFlag) {
                            return;
                        }

                        <%--var projectId = $("#projectId").val();  //产品名称--%>
                        <%--if (isBlank(projectId)) {--%>
                        <%--    layer.msg("请选择产品名称!", {icon: 2});--%>
                        <%--    return false;--%>
                        <%--}--%>
                        <%--var insuranceFlag = $("#insuranceFlag").val(); //保险购买情况--%>
                        <%--var leaseDate = $("#leaseDate").val(); //预计投放日--%>
                        <%--if (isBlank(leaseDate)) {--%>
                        <%--    leaseDate = getLeaseDate();--%>
                        <%--}--%>
                        <%--var bankName = $("#bankName").val(); //账户名称--%>
                        <%--if ((${'1' eq entry.columns.tenantType && info.columns.bank_name.mustFillFlag eq '1'}) && isBlank(bankName)) {--%>
                        <%--    layer.msg("账户名称不能为空!", {icon: 2});--%>
                        <%--    return;--%>
                        <%--}--%>
                        <%--var bankCode = $("#bankCode").val(); //银行账号--%>
                        <%--if ((${'1' eq entry.columns.tenantType && info.columns.bank_code.mustFillFlag eq '1'}) && isBlank(bankCode)) {--%>
                        <%--    layer.msg("银行账号不能为空!", {icon: 2});--%>
                        <%--    return;--%>
                        <%--}--%>
                        // var idCardFront = $('.idCardFront').val();//身份证正面
                        // var idCardBack = $('.idCardBack').val();//身份证反面
                        /* var residenceBooklet = $('.residenceBooklet').val();//户口本复印件*/
                        // var residenceBooklet;//户口本复印件
                        // $(".residenceBooklet").each(function () {
                        //     if (isBlank(residenceBooklet)) {
                        //         residenceBooklet = $(this).val();
                        //     } else {
                        //         residenceBooklet = residenceBooklet + "," + $(this).val();
                        //     }
                        // });
                        <%--if ((${'1' eq entry.columns.tenantType && info.columns.residence_booklet.mustFillFlag eq '1'}) && isBlank(residenceBooklet)) {--%>
                        <%--    layer.msg("户口本复印件不能为空!", {icon: 2});--%>
                        <%--    return;--%>
                        <%--}--%>
                        <%--var bankCard = $('.bankCard').val();//银行卡照片--%>
                        <%--if ((${'1' eq entry.columns.tenantType && info.columns.bank_card.mustFillFlag eq '1'}) && isBlank(bankCard)) {--%>
                        <%--    layer.msg("银行卡照片不能为空!", {icon: 2});--%>
                        <%--    return;--%>
                        <%--}--%>
                        // var bpName = $('#bpName').val();//共签人名称
                        // var bpIdCard = $('#bpIdCard').val();//共签人证件号码
                        // var bpMobile = $('#bpMobile').val();//共签人手机号
                        // var bpCardFront = $('.bpCardFront').val();//共签人身份证正面
                        // var bpCardBack = $('.bpCardBack').val();//共签人身份证反面
                        // var bpFile;//共签人子女证明材料
                        // $(".bpFile").each(function () {
                        //     if (isBlank(bpFile)) {
                        //         bpFile = $(this).val();
                        //     } else {
                        //         bpFile = bpFile + "," + $(this).val();
                        //     }
                        // });

                        var province = $("#province").find("option:selected").val();//省
                        var city = $("#city").find("option:selected").val();//市
                        var area = $("#area").find("option:selected").val();//区
                        var address = $("input[name=customerAddress]").val();//用户地址

                        if (isBlank(province) && isBlank(city) && isBlank(area) && isBlank(address)) {
                            layer.msg("请填写完整的安装地址", {icon: 2});
                            return;
                        }
                        if (isBlank(city)) {
                            layer.msg("请填写完整的安装地址", {icon: 2});
                            return;
                        }
                        if (isBlank(area)) {
                            layer.msg("请填写完整的安装地址", {icon: 2});
                            return;
                        }
                        if (isBlank(address)) {
                            layer.msg("请填写完整的安装地址", {icon: 2});
                            return;
                        }


                        // var roofType = $("#roofType").val(); //屋顶类型
                        var sealRoof = $("#sealRoof").val();  //是否封屋顶
                        var azimuth = $("#azimuth").val(); //方位角
                        var angle = $('input[name=angle]').val();
                        if ('1' != azimuth) {
                            if (isBlank(angle)) {
                                layer.msg("角度不能为空", {icon: 2});
                                return;
                            }
                            if (!number2.test(angle)) {
                                layer.msg("角度格式不正确", {icon: 2});
                                return;
                            }
                            if (parseInt(angle) >= 90) {
                                layer.msg("方位角角度,限制输入0-90", {icon: 2});
                                return;
                            }
                        }
                        var completionYear = $('#completionYear').val();  //房屋建成年份
                        var buildingHeight = $("#buildingHeight").val();  //建筑高度
                        if (!isBlank(buildingHeight) && !isNumber($.trim(buildingHeight))) {
                            layer.msg("建筑高度格式不正确", {icon: 2});
                            return;
                        }
                        var longitude = $("#longitude").val(); //经度
                        if (isBlank(longitude)) {
                            layer.msg("经度不能为空", {icon: 2});
                            return;
                        }
                        if (!isBlank(longitude) && !isNumber($.trim(longitude))){
                            layer.msg("经度格式不正确", {icon: 2});
                            return;
                        }
                        var latitude = $("#latitude").val(); //纬度
                        if (isBlank(latitude)) {
                            layer.msg("纬度不能为空", {icon: 2});
                            return;
                        }
                        if (!isBlank(latitude) && !isNumber($.trim(latitude))){
                            layer.msg("纬度格式不正确", {icon: 2});
                            return;
                        }
                        var waterproof = $("#waterproof").val(); //屋顶防水情况
                        var sourcePollution = $("#sourcePollution").val(); //是否有污染源
                        var opsCondition = $("#opsCondition").val();  //是否具备运维空间
                        var voltageClasses = $("#voltageClasses").val();  //并网电压等级
                        var transformerCapacity = $("#transformerCapacity").val();  //变压器容量
                        var restrictFlag = $("#restrictFlag").val();  //是否符合变压器容量限制要求

                        var distance = $("#distance").val(); // 并网距离
                        if (!isBlank(distance) && !isNumber($.trim(distance))) {
                            layer.msg("并网距离格式不正确", {icon: 2});
                            return;
                        }

                        var roofPhotoOne ="";   // 房屋屋顶照片
                        $(".roofPhotoOne").each(function () {
                            if (isBlank(roofPhotoOne)) {
                                roofPhotoOne = $(this).val();
                            } else {
                                roofPhotoOne = roofPhotoOne + "," + $(this).val();
                            }
                        });
                        if (isBlank(roofPhotoOne)) {
                            layer.msg('请上传房房屋屋顶照片', {icon: 2});
                            return;
                        }
                        var roofPhotoTwo = "";   // 房屋周边照片（4张，4个方位角）
                        $(".roofPhotoTwo").each(function () {
                            if (isBlank(roofPhotoTwo)) {
                                roofPhotoTwo = $(this).val();
                            } else {
                                roofPhotoTwo = roofPhotoTwo + "," + $(this).val();
                            }
                        });
                        if (isBlank(roofPhotoTwo)) {
                            layer.msg('请上传房屋周边照片', {icon: 2});
                            return;
                        }

                        // 踏勘记录表
                        let surveyFiles = "";
                        $(".surveyFiles").each(function () {
                            if (isBlank(surveyFiles)) {
                                surveyFiles = $(this).val();
                            } else {
                                surveyFiles = surveyFiles + "," + $(this).val();
                            }
                        });
                        if (isBlank(surveyFiles)) {
                            layer.msg('请上传踏勘记录表', {icon: 2});
                            return;
                        }

                        let houseOwnership = "";
                        $(".houseOwnership").each(function () {
                            if (isBlank(houseOwnership)) {
                                houseOwnership = $(this).val();
                            } else {
                                houseOwnership = houseOwnership + "," + $(this).val();
                            }
                        });
                        if (isBlank(houseOwnership)) {
                            layer.msg('请上传房产证明', {icon: 2});
                            return;
                        }
                        // 设计图纸
                        let attachFiles = "";
                        $(".attachFiles").each(function () {
                            if (isBlank(attachFiles)) {
                                attachFiles = $(this).val();
                            } else {
                                attachFiles = attachFiles + "," + $(this).val();
                            }
                        });
                        var designDrawings = attachFiles;
                        if (isBlank(designDrawings)) {
                            layer.msg('请上传设计图纸', {icon: 2});
                            return;
                        }
                        var order = {
                            id: '${entry.columns.id}',
                            province: province,
                            city: city,
                            area: area,
                            address: address,
                            // roofType: roofType,
                            sealRoof: sealRoof,
                            azimuth: azimuth,
                            angle: angle,
                            completionYear: completionYear,
                            buildingHeight: buildingHeight,
                            longitude: longitude,
                            latitude:latitude,
                            waterproof: waterproof,
                            sourcePollution: sourcePollution,
                            opsCondition: opsCondition,
                            voltageClasses: voltageClasses,
                            transformerCapacity: transformerCapacity,
                            restrictFlag: restrictFlag,
                            distance: distance,
                            roofPhotoOne: roofPhotoOne,
                            roofPhotoTwo: roofPhotoTwo,
                            surveyFiles: surveyFiles,
                            designDrawings: designDrawings,
                            houseOwnership:houseOwnership

                        };
                        saveFlag = true;
                        console.log(JSON.stringify(order))
                        $.ajax({
                            url: "${ctx}/nhPowerStation/updateSurveyRecordInfo",
                            type: "POST",
                            contentType: "application/json;charsetset=UTF-8",
                            data: JSON.stringify(order)
                            , success: function (result) {
                                if (result.code === '200') {
                                    var index = parent.layer.getFrameIndex(window.name);
                                    layer.msg("操作成功", {icon: 1, time: 1000}, function () {
                                        parent.layer.close(index);
                                        parent.table.reload('test');
                                    })
                                } else {
                                    layer.msg(result.errMsg, {icon: 2});
                                }
                                saveFlag = false;

                            }, error: function () {
                                layer.msg("操作失败", {icon: 2});
                                saveFlag = false;
                            }
                        })
                    })

                    //取消
                    $(".cancelorder").click(function () {
                        parent.layer.closeAll();
                        parent.searchOrder();

                    })

                    function isNumber(value) {
                        var z_reg = /^(([0-9])|([1-9]([0-9]+)))(.[0-9]+)?$/;
                        return z_reg.test(value);
                    };

                    let initBankData = [];
                    if (!isBlank(tssBankNumName) && !isBlank(tssBankNum)) {
                        initBankData = [{name: tssBankNumName, value: tssBankNum, selected: true}];
                    }


                });

                function isBlank(val) {
                    if (val == null || val == '' || val == undefined) {
                        return true;
                    }
                    return false;
                }

                function delImg(that, id) {
                    $("#" + id).show();
                    $(that).parent().remove();
                }

                // 关闭弹框
                function cancel() {
                    var index = parent.layer.getFrameIndex(window.name);//先得到当前iframe层的索引
                    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);
                    }
                }
            </script>
</body>
</html>
