<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
    <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;
        }
        .form-span {
            display: inline-block;
            padding: 8px 0;
        }

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

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

        .layui-tab-title{
            margin: 0 0 0 20px;
        }
        .layui-tab-content{
            margin: 0 0 0 20px;
        }
        .bj-img {
            margin-right: 0px;
        }
        .blank-img {
            background: url('${ctxPlugin}/static/imgs/blankImg.png') center center no-repeat;
            width: 80px;
            height: 80px;
            display: inline-block;
        }
    </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="projectCode" disabled class="layui-input " value="${entry.projectCode}"
                                       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">
                                <select name="projectId" id="projectId" lay-filter="projectId" disabled>
                                    <option value="">请选择</option>
                                    <c:forEach items="${project}" var="ject">
                                        <option value="${ject.columns.id}" title="${ject.columns.code}" <c:if
                                                test="${ject.columns.id eq entry.projectId}"> selected</c:if>
                                                >${ject.columns.name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="layui-card jibenxinxi ">
                <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" name="tenantName" id="tenantName" lay-verify="required"
                                       placeholder=""
                                       autocomplete="off" class="layui-input " value="${entry.tenantName}" disabled>
                            </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" id="mobile" lay-verify="recevierMobile"
                                           class="layui-input" autocomplete="off" value="${entry.mobile}" disabled>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm3">
                            <label class="layui-form-label">身份证号：</label>
                            <div class="layui-input-block">
                                <input type="text" name="idCode" id="idCode" lay-verify="identity"
                                       autocomplete="off" class="layui-input " value="${entry.idCode}" 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">
                                <select name="roofType" id="roofType" lay-verify="required" disabled>
                                    <option value="">请选择</option>
                                    <option value="平屋顶" <c:if test="${entry.roofType eq '平屋顶'}">selected</c:if>>平屋顶</option>
                                    <option value="斜屋顶" <c:if test="${entry.roofType eq '斜屋顶'}">selected</c:if>>斜屋顶
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-col-lg12 layui-col-sm12">
                            <label class="layui-form-label"><i class="mark">*</i>安装地址：</label>
                            <div class="layui-input-block">
                                <%--<div class="layui-col-lg2 layui-col-sm2 pr-30">
                                    <select name="province" id="province" lay-verify="required" lay-filter="province"
                                            disabled>
                                        <option value="${entry.province}" selected>${entry.province}</option>
                                    </select>
                                </div>
                                <div class="layui-col-lg2 layui-col-sm2 pr-30">
                                    <select name="city" id="city" lay-verify="required" lay-filter="city" disabled>
                                        <option value="">请选择市</option>
                                        <c:forEach items="${faccitys}" var="city">
                                            <option value="${city.columns.CityName}"
                                                    <c:if test="${entry.city eq city.columns.CityName}">selected</c:if>
                                                    title="${city.columns.CityID}">${city.columns.CityName}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <div class="layui-col-lg2 layui-col-sm2 pr-30">
                                    <select name="area" id="area" lay-verify="required" disabled>
                                        <option value="">请选择县/区</option>
                                        <c:forEach items="${areas}" var="area">
                                            <option value="${area.columns.DistrictName}"
                                                    <c:if test="${entry.area eq area.columns.DistrictName}">selected</c:if>
                                                    title="${area.columns.DistrictID}">${area.columns.DistrictName}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <div class="layui-col-lg6 layui-col-sm5">
                                    <input type="text" name="customerAddress" lay-verify="required" placeholder=""
                                           disabled
                                           autocomplete="off" class="layui-input layui-col-lg2 "
                                           value="${entry.address}">
                                </div>--%>
                                <input type="text" name="province" id="province"
                                       autocomplete="off" class="layui-input "
                                       value="${entry.province}${entry.city}${entry.area}${entry.street}${entry.address}"
                                       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="distance" id="distance" placeholder=""
                                       autocomplete="off" class="layui-input " value="${entry.distance}" disabled>
                                <span class="pos-a h-32 lh-32 layui-span-unit">米</span>
                            </div>
                        </div>


                        <%--  <div class="layui-col-lg8">--%>

                        <%-- </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: 100px;">
                                    <select name="azimuth" id="azimuth" lay-verify="required" disabled>
                                        <option value="">请选择</option>
                                        <option value="1" ${entry.azimuth eq '1' ? 'selected' : ''}>正南</option>
                                        <option value="2" ${entry.azimuth eq '2' ? 'selected' : ''}>南偏东</option>
                                        <option value="3" ${entry.azimuth eq '3' ? 'selected' : ''}>南偏西</option>
                                    </select>
                                </div>
                                <div class="layui-inline" style="width: 90px">
                                    <input type="text" name="angle" class="layui-input" maxlength="2"
                                           oninput="value=value.replace(/[^\d]/g,'')" value="${entry.angle}" disabled/>
                                    <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"><i class="mark">*</i>建筑高度：</label>
                            <div class="layui-input-block">
                                <input type="text" name="buildingHeight" id="buildingHeight" autocomplete="off"
                                       class="layui-input" value="${entry.buildingHeight}" disabled/>
                                <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">
                                <select name="repaymentMethod" id="repaymentMethod" lay-verify="required" disabled>
                                    <option value="">请选择</option>
                                    <option value="1" ${entry.repaymentMethod eq '1' ? 'selected' : ''}>二类卡</option>
                                    <option value="2" ${entry.repaymentMethod eq '2' ? 'selected' : ''}>光E宝</option>
                                    <option value="0" ${entry.repaymentMethod eq '0' ? '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="bankName" id="bankName" lay-verify="required"
                                       disabled class="layui-input" value="${entry.bankName}">
                            </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"
                                       disabled class="layui-input" value="${entry.bankCode}">
                            </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="shootType" lay-filter="shootType" title="无人机拍摄"
                                       value="1" ${entry.shootType eq '1' ? 'checked' : ''} disabled/>
                                <input type="radio" name="shootType" lay-filter="shootType" title="手机拍摄"
                                       value="2" ${entry.shootType eq '2' ? 'checked' : ''} disabled/>
                            </div>
                        </div>
                        <div class="layui-col-xs12">
                            <label class="layui-form-label" id="changeDescribe">备注：</label>
                            <div class="layui-input-block">
                                <textarea name="remarks" id="remarks" disabled class="layui-textarea"
                                          lay-verify="required">${entry.remarks}</textarea>
                            </div>
                        </div>

                        <div class="layui-col-lg11 layui-col-sm11 ${entry.shootType eq '1' ? 'block-hide' : ''}" id="jfwj">
                            <label class="layui-form-label"><i class="mark">*</i>禁飞文件：</label>
                            <div class="layui-input-block img-box">
                                <c:if test="${not empty noFlyImgList}">
                                    <c:forEach items="${noFlyImgList}" var="noFlyImg">
                                        <div>
                                            <div>
                                                <div class="bj-img imgSpan">
                                                    <img src="${commonStaticImgPath}${noFlyImg}" height="700" width="1200"/>
                                                    <input type="hidden" class="pic5" value="${noFlyImg}"/>
                                                </div>
                                            </div>
                                            <div style="width: 80px; text-align: center;">上限8张</div>
                                        </div>
                                    </c:forEach>
                                </c:if>
                                <c:if test="${empty noFlyImgList}">
                                    <div>
                                        <div class="upload-container ">
                                            <img src="" alt="img placeholder">
                                        </div>
                                        <div style="width: 80px; text-align: center;">上限8张</div>
                                    </div>
                                </c:if>

                            </div>
                        </div>
                        <div class="layui-col-lg11 layui-col-sm11">
                            <label class="layui-form-label" id="changeImgName"><i class="mark">*</i>房屋照片：</label>
                            <div class="layui-input-block img-box ${entry.shootType eq '2' ? 'block-hide' : ''}"
                                 id="wrjps">
                                <div>
                                    <div id="imgsDiv1">
                                        <c:if test="${entry.shootType eq '1' && not empty entry.roofPhotoOne}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.roofPhotoOne}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="pic1" value="${entry.roofPhotoOne}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '1' && not empty entry.roofPhotoOne ? 'hide' : ''}"
                                         id="uploaderone">
                                        <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="${entry.shootType eq '1' && not empty entry.roofPhotoTwo}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.roofPhotoTwo}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="pic2" value="${entry.roofPhotoTwo}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '1' && not empty entry.roofPhotoTwo ? 'hide' : ''}"
                                         id="uploader2">
                                        <img src="" alt="img placeholder" id="imgsAdd2">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">角度南</div>
                                </div>
                                <div>
                                    <div id="imgsDiv18">
                                        <c:if test="${entry.shootType eq '1' && not empty entry.roofPhotoInterior}">
                                            <div class="bj-img imgSpan">
                                                <img src="${commonStaticImgPath}${entry.roofPhotoInterior}" height="700" width="1200"/>
                                                <input type="hidden" class="pic18 roof-photo-interior-01" value="${entry.roofPhotoInterior}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '1' && not empty entry.roofPhotoInterior ? 'hide' : ''}" id="uploader18">
                                        <img src="" alt="img placeholder" id="imgsAdd18">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">房屋内部</div>
                                </div>
                                <div class="dimensionsPhotoThickness ${entry.roofType eq '斜屋顶' ? 'hide' : ''}">
                                    <div id="imgsDiv19">
                                        <c:if test="${entry.shootType eq '1' && not empty entry.dimensionsPhotoThickness}">
                                            <div class="bj-img imgSpan">
                                                <img src="${commonStaticImgPath}${entry.dimensionsPhotoThickness}"
                                                     height="700" width="1200"/>
                                                <input type="hidden" class="pic19 dimensions-photo-thickness-01"
                                                       value="${entry.dimensionsPhotoThickness}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container
                                    ${entry.shootType eq '1' && not empty entry.dimensionsPhotoThickness ? 'hide' : ''}" id="uploader19">
                                        <img src="" alt="img placeholder" id="imgsAdd19">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">楼顶厚度</div>
                                </div>
                                <div>
                                    <div id="imgsDiv20">
                                        <c:if test="${entry.shootType eq '1' && not empty entry.roofValue}">
                                            <div class="bj-img imgSpan">
                                                <video controls width="80px" height="80px" id="videoId20" src="${commonStaticImgPath}${entry.roofValue}"></video>
                                                <input type="hidden" class="pic20 roof-value20" value="${entry.roofValue}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '1' && not empty entry.roofValue ? 'hide' : ''}" id="uploader20">
                                        <img src="" alt="img placeholder" id="imgsAdd20">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">屋顶视频</div>
                                </div>
                                <div>
                                    <div id="imgsDiv3">
                                        <c:if test="${entry.shootType eq '1'}">
                                            <div class="bj-img imgSpan">
                                                <c:if test="${not empty entry.roofPhotoFive}">
                                                    <img src="${commonStaticImgPath}${entry.roofPhotoFive}" height="700" width="1200"/>
                                                    <input type="hidden" class="pic3" value="${entry.roofPhotoFive}"/>
                                                </c:if>
                                                <c:if test="${empty entry.roofPhotoFive}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </c:if>
                                    </div>
                                    <%--<div class="upload-container ${entry.shootType eq '1' && not empty entry.roofPhotoFive ? 'hide' : ''}"
                                         id="uploader3">
                                        <img src="" alt="img placeholder" id="imgsAdd3">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center; color: #144856">补充图片1</div>
                                </div>
                                <div>
                                    <div id="imgsDiv4">
                                        <c:if test="${entry.shootType eq '1'}">
                                            <div class="bj-img imgSpan">
                                                <c:if test="${not empty entry.roofPhotoSix}">
                                                    <img src="${commonStaticImgPath}${entry.roofPhotoSix}" height="700" width="1200"/>
                                                    <input type="hidden" class="pic4" value="${entry.roofPhotoSix}"/>
                                                </c:if>
                                                <c:if test="${empty entry.roofPhotoSix}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </c:if>
                                    </div>
                                    <%--<div class="upload-container ${entry.shootType eq '1' && not empty entry.roofPhotoSix ? 'hide' : ''}"
                                         id="uploader4">
                                        <img src="" alt="img placeholder" id="imgsAdd4">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center; color: #144856">补充图片2</div>
                                </div>
                                <div class="roofPhotoSeven ${entry.roofType eq '平屋顶' ? 'hide' : ''}">
                                    <div>
                                        <c:if test="${entry.shootType eq '1'}">
                                            <div class="bj-img imgSpan">
                                                <c:if test="${not empty entry.roofPhotoSeven}">
                                                    <img src="${commonStaticImgPath}${entry.roofPhotoSeven}" height="700" width="1200"/>
                                                    <input type="hidden" class="pic4" value="${entry.roofPhotoSeven}"/>
                                                </c:if>
                                                <c:if test="${empty entry.roofPhotoSeven}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </c:if>
                                    </div>
                                   <%-- <div class="upload-container ${entry.shootType eq '1' && not empty entry.roofPhotoSeven ? 'hide' : ''}">
                                        <img src="" alt="img placeholder" >
                                    </div>--%>
                                    <div style="width: 80px; text-align: center; color: #144856">补充图片3</div>
                                </div>
                            </div>
                            <div class="layui-input-block img-box ${entry.shootType eq '1' ? 'block-hide' : ''}"
                                 id="sjps">
                                <div>
                                    <div id="imgsDiv5">
                                        <c:if test="${entry.shootType eq '2' && not empty entry.roofPhotoOne}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.roofPhotoOne}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="pic5" value="${entry.roofPhotoOne}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '2' && not empty entry.roofPhotoOne ? 'hide' : ''}"
                                         id="uploader5">
                                        <img src="" alt="img placeholder" id="imgsAdd5">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">正大门</div>
                                </div>
                                <div>
                                    <div id="imgsDiv6">
                                        <c:if test="${entry.shootType eq '2' && not empty entry.roofPhotoTwo}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.roofPhotoTwo}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="pic6" value="${entry.roofPhotoTwo}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '2' && not empty entry.roofPhotoTwo ? 'hide' : ''}"
                                         id="uploader6">
                                        <img src="" alt="img placeholder" id="imgsAdd6">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">东南</div>
                                </div>
                                <div>
                                    <div id="imgsDiv7">
                                        <c:if test="${entry.shootType eq '2' && not empty entry.roofPhotoThree}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.roofPhotoThree}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="pic7" value="${entry.roofPhotoThree}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '2' && not empty entry.roofPhotoThree ? 'hide' : ''}"
                                         id="uploader7">
                                        <img src="" alt="img placeholder" id="imgsAdd7">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">正南</div>
                                </div>
                                <div>
                                    <div >
                                        <c:if test="${entry.shootType eq '2' && not empty entry.roofPhotoFour}">
                                            <div class="bj-img imgSpan">
                                                <img src="${commonStaticImgPath}${entry.roofPhotoFour}" height="700" width="1200"/>
                                                <input type="hidden" class="pic7" value="${entry.roofPhotoFour}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '2' && not empty entry.roofPhotoFour ? 'hide' : ''}" >
                                        <img src="" alt="img placeholder" >
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">西南</div>
                                </div>

                                <div>
                                    <div id="imgsDiv22">
                                        <c:if test="${entry.shootType eq '2' && not empty entry.roofPhotoInterior}">
                                            <div class="bj-img imgSpan">
                                                <img src="${commonStaticImgPath}${entry.roofPhotoInterior}" height="700" width="1200"/>
                                                <input type="hidden" class="pic22 roof-photo-interior-02" value="${entry.roofPhotoInterior}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container
                                    ${entry.shootType eq '2' && not empty entry.roofPhotoInterior ? 'hide' : ''}" id="uploader22">
                                        <img src="" alt="img placeholder" id="imgsAdd22">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">房屋内部</div>
                                </div>
                                <div class="dimensionsPhotoThickness ${entry.roofType eq '斜屋顶' ? 'hide' : ''}">
                                    <div id="imgsDiv23">
                                        <c:if test="${entry.shootType eq '2' && not empty entry.dimensionsPhotoThickness}">
                                            <div class="bj-img imgSpan">
                                                <img src="${commonStaticImgPath}${entry.dimensionsPhotoThickness}"
                                                     height="700" width="1200"/>
                                                <input type="hidden" class="pic23 dimensions-photo-thickness-02"
                                                       value="${entry.dimensionsPhotoThickness}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container
                                    ${entry.shootType eq '2' && not empty entry.dimensionsPhotoThickness ? 'hide' : ''}" id="uploader23">
                                        <img src="" alt="img placeholder" id="imgsAdd23">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">楼顶厚度</div>
                                </div>
                                <div>
                                    <div id="imgsDiv9">
                                        <c:if test="${entry.shootType eq '2' && not empty entry.roofValue}">
                                            <div class="bj-img imgSpan">
                                                <video controls width="80px" height="80px" id="videoId" src="${commonStaticImgPath}${entry.roofValue}"></video>
                                                <input type="hidden" class="pic9" value="${entry.roofValue}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container ${entry.shootType eq '2' && not empty entry.roofValue ? 'hide' : ''}" id="uploader9">
                                        <img src="" alt="img placeholder" id="imgsAdd9">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #ff0000">屋顶视频</div>
                                </div>
                                <div>
                                    <div id="imgsDiv10">
                                        <c:if test="${entry.shootType eq '2'}">
                                            <div class="bj-img imgSpan">
                                                <c:if test="${not empty entry.roofPhotoFive}">
                                                    <img src="${commonStaticImgPath}${entry.roofPhotoFive}" height="700" width="1200"/>
                                                    <input type="hidden" class="pic10" value="${entry.roofPhotoFive}"/>
                                                </c:if>
                                                <c:if test="${empty entry.roofPhotoFive}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </c:if>
                                    </div>
                                    <%--<div class="upload-container ${entry.shootType eq '2' && not empty entry.roofPhotoFive ? 'hide' : ''}" id="uploader10">
                                        <img src="" alt="img placeholder" id="imgsAdd10">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center; color: #144856">补充图片1</div>
                                </div>
                                <div>
                                    <div id="imgsDiv11">
                                        <c:if test="${entry.shootType eq '2'}">
                                            <div class="bj-img imgSpan">
                                                <c:if test="${not empty entry.roofPhotoSix}">
                                                    <img src="${commonStaticImgPath}${entry.roofPhotoSix}" height="700" width="1200"/>
                                                    <input type="hidden" class="pic11" value="${entry.roofPhotoSix}"/>
                                                </c:if>
                                                <c:if test="${empty entry.roofPhotoSix}">
                                                    <i class="blank-img"></i>
                                                </c:if>
                                            </div>
                                        </c:if>
                                    </div>
                                   <%-- <div class="upload-container ${entry.shootType eq '2' && not empty entry.roofPhotoSix ? 'hide' : ''}" id="uploader11">
                                        <img src="" alt="img placeholder" id="imgsAdd11">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center; color: #144856">补充图片2</div>
                                </div>
                            </div>
                        </div>
                        <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="imgsDiv12">
                                        <c:if test="${not empty entry.surveyRecord}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.surveyRecord}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="survey-record"
                                                       value="${entry.surveyRecord}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container <c:if test="${not empty entry.surveyRecord}">hide</c:if>"
                                         id="uploader12">
                                        <img src="" alt="img placeholder" id="imgsAdd12">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #FF0000">记录表1</div>
                                </div>
                                <div>
                                    <div id="imgsDiv13">
                                        <c:if test="${not empty entry.surveyRecord2}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.surveyRecord2}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="survey-record2"
                                                       value="${entry.surveyRecord2}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container <c:if test="${not empty entry.surveyRecord2}">hide</c:if>"
                                         id="uploader13">
                                        <img src="" alt="img placeholder" id="imgsAdd13">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #FF0000">记录表2</div>
                                </div>
                                <div>
                                    <div>
                                        <div class="bj-img imgSpan">
                                            <c:if test="${not empty entry.surveyRecord3}">
                                                <img src="${commonStaticImgPath}${entry.surveyRecord3}" height="700" width="1200"/>
                                                <input type="hidden" class="survey-record2" value="${entry.surveyRecord3}"/>
                                            </c:if>
                                            <c:if test="${empty entry.surveyRecord3}">
                                                <i class="blank-img"></i>
                                            </c:if>
                                        </div>
                                    </div>
                                    <%--<div class="upload-container <c:if test="${not empty entry.surveyRecord3}">hide</c:if>">
                                        <img src="" alt="img placeholder">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center;">补充</div>
                                </div>
                            </div>
                        </div>
                        <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="imgsDiv">
                                        <c:if test="${not empty entry.houseOwnership}">
                                            <div class="bj-img imgSpan">
                                                    <%--<span class="layui-icon-close layui-icon" onclick="delImg(this,'uploader')"></span>--%>
                                                <img src="${commonStaticImgPath}${entry.houseOwnership}" height="700" width="1200"/>
                                                <input type="hidden" class="house-ownership" value="${entry.houseOwnership}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container <c:if test="${not empty entry.houseOwnership}">hide</c:if>" id="uploader">
                                        <img src="" alt="img placeholder" id="imgsAdd">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #FF0000">房产证</div>
                                </div>
                                <div>
                                    <div>
                                        <div class="bj-img imgSpan">
                                            <c:if test="${not empty entry.houseOwnershipOne}">
                                                <img src="${commonStaticImgPath}${entry.houseOwnershipOne}" height="700" width="1200"/>
                                                <input type="hidden" class="house-ownership" value="${entry.houseOwnershipOne}"/>
                                            </c:if>
                                            <c:if test="${empty entry.houseOwnershipOne}">
                                                <i class="blank-img"></i>
                                            </c:if>
                                        </div>
                                    </div>
                                    <%--<div class="upload-container <c:if test="${not empty entry.houseOwnershipOne}">hide</c:if>">
                                        <img src="" alt="img placeholder">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center;">补充1</div>
                                </div>
                                <div>
                                    <div>
                                        <div class="bj-img imgSpan">
                                            <c:if test="${not empty entry.houseOwnershipTwo}">
                                                <img src="${commonStaticImgPath}${entry.houseOwnershipTwo}" height="700" width="1200"/>
                                                <input type="hidden" class="house-ownership" value="${entry.houseOwnershipTwo}"/>
                                            </c:if>
                                            <c:if test="${empty entry.houseOwnershipTwo}">
                                                <i class="blank-img"></i>
                                            </c:if>
                                        </div>
                                    </div>
                                   <%-- <div class="upload-container <c:if test="${not empty entry.houseOwnershipTwo}">hide</c:if>">
                                        <img src="" alt="img placeholder">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center;">补充2</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-lg4 layui-col-sm4">
                            <label class="layui-form-label">备案文件：</label>
                            <div class="layui-input-block img-box">
                                <div>
                                    <div id="imgsDiv16">
                                        <div class="bj-img imgSpan">
                                            <c:if test="${not empty entry.filingDocumentPhoto}">
                                                <img src="${commonStaticImgPath}${entry.filingDocumentPhoto}" height="700" width="1200"/>
                                                <input type="hidden" class="filing-document-photo" value="${entry.filingDocumentPhoto}"/>
                                            </c:if>
                                            <c:if test="${empty entry.filingDocumentPhoto}">
                                                <i class="blank-img"></i>
                                            </c:if>
                                        </div>
                                    </div>
                                    <%--<div class="upload-container <c:if test="${not empty entry.filingDocumentPhoto}">hide</c:if>" id="uploader16">
                                        <img src="" alt="img placeholder" id="imgsAdd16">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center;">补充1</div>
                                </div>
                                <div>
                                    <div>
                                        <div class="bj-img imgSpan">
                                            <c:if test="${not empty entry.filingDocumentPhoto2}">
                                                <img src="${commonStaticImgPath}${entry.filingDocumentPhoto2}" height="700" width="1200"/>
                                                <input type="hidden" class="filing-document-photo" value="${entry.filingDocumentPhoto2}"/>
                                            </c:if>
                                            <c:if test="${empty entry.filingDocumentPhoto2}">
                                                <i class="blank-img"></i>
                                            </c:if>
                                        </div>
                                    </div>
                                    <%--<div class="upload-container <c:if test="${not empty entry.filingDocumentPhoto2}">hide</c:if>">
                                        <img src="" alt="img placeholder">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center;">补充2</div>
                                </div>
                                <div>
                                    <div>
                                        <div class="bj-img imgSpan">
                                            <c:if test="${not empty entry.filingDocumentPhoto3}">
                                                <img src="${commonStaticImgPath}${entry.filingDocumentPhoto3}" height="700" width="1200"/>
                                                <input type="hidden" class="filing-document-photo" value="${entry.filingDocumentPhoto3}"/>
                                            </c:if>
                                            <c:if test="${empty entry.filingDocumentPhoto3}">
                                                <i class="blank-img"></i>
                                            </c:if>
                                        </div>
                                    </div>
                                    <%--<div class="upload-container <c:if test="${not empty entry.filingDocumentPhoto3}">hide</c:if>">
                                        <img src="" alt="img placeholder">
                                    </div>--%>
                                    <div style="width: 80px; text-align: center;">补充3</div>
                                </div>
                            </div>
                        </div>
                       <%-- <div class="layui-col-lg5 layui-col-sm5">
                            <label class="layui-form-label"><i class="mark">*</i>身份证：</label>
                            <div class="layui-input-block img-box">
                                <div>
                                    <div id="imgsDiv14">
                                        <c:if test="${not empty entry.idCardFront}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.idCardFront}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="id-card-front"
                                                       value="${entry.idCardFront}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container <c:if test="${not empty entry.idCardFront}">hide</c:if>"
                                         id="uploader14">
                                        <img src="" alt="img placeholder" id="imgsAdd14">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #FF0000">正面</div>
                                </div>
                                <div>
                                    <div id="imgsDiv15">
                                        <c:if test="${not empty entry.idCardBack}">
                                            <div class="bj-img imgSpan">

                                                <img src="${commonStaticImgPath}${entry.idCardBack}" height="700"
                                                     width="1200"/>
                                                <input type="hidden" class="id-card-back" value="${entry.idCardBack}"/>
                                            </div>
                                        </c:if>
                                    </div>
                                    <div class="upload-container <c:if test="${not empty entry.idCardBack}">hide</c:if>"
                                         id="uploader15">
                                        <img src="" alt="img placeholder" id="imgsAdd15">
                                    </div>
                                    <div style="width: 80px; text-align: center; color: #FF0000">反面</div>
                                </div>
                            </div>
                        </div>--%>
                    </div>
                </div>

            </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-col-lg12 layui-col-sm12">
                            <label class="layui-form-label"><i class="mark">*</i>匹配方式：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="schemeType" value="2" title="组合方案" checked
                                       lay-filter="schemeType" ${entry.schemeType eq '2' ? 'checked' : ''}>
                                <input type="radio" name="schemeType" value="1" title="标准方案"
                                       lay-filter="schemeType" ${entry.schemeType eq '1' ? 'checked' : ''}>
                            </div>
                        </div>
                        <div class="${entry.schemeType eq '2' ? 'layui-hide' : ''}" id="showSchemeId">
                            <div class="layui-row planLie" data-scheme-type-name="${entry.schemeTypeName}"
                                 data-plan-id="${entry.schemeId}">
                                <div class="planbiao">
                                    <div class="layui-col-lg3 layui-col-sm3">
                                        <label class="layui-form-label"><i class="mark">*</i>方案类型：</label>
                                        <div class="layui-input-block">
                                            <select lay-filter="planType" name="planType" class="planType layui-bg-gray" lay-search disabled>
                                                <option value="">请选择</option>
                                                <c:forEach items="${insta}" var="ins">
                                                    <option value="${ins.columns.id}" <c:if test="${fn:contains(entry.schemeTypeId,ins.columns.id)}">selected</c:if>>${ins.columns.name}</option>
                                                </c:forEach>
                                            </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 pos-r">
                                            <select lay-filter="planName" name="planName" class="planName layui-bg-gray" lay-search disabled>
                                                <option value="">请选择</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 pos-r view-attachment">
                                            <span class="h-32 lh-32 ml-5 layui-span-unit">查看</span>
                                        </div>
                                    </div>
                                    <div class="layui-col-lg3 layui-col-sm3" style="text-align: center">
                                        <input type="hidden" class="planId">
                                        <input type="hidden" class="planCode">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="zuhefangan" class="zuhefangan ${entry.schemeType eq '1' ? 'layui-hide' : ''}">

                                <c:forEach varStatus="vs" items="${compose}" var="item">
                                    <div class="layui-row planLie" data-scheme-type-name="${item.planType}"
                                         data-plan-id="${item.planId}">
                                        <div class="planbiao">
                                            <div class="layui-col-lg3 layui-col-sm3">
                                                <label class="layui-form-label"><i class="mark">*</i>方案类型：</label>
                                                <div class="layui-input-block">
                                                    <select lay-filter="planType" name="planType" class="planType layui-bg-gray" disabled
                                                            lay-search>
                                                        <option value="">请选择</option>
                                                        <c:forEach items="${insta}" var="ins">
                                                            <option value="${ins.columns.id}" <c:if test="${item.planType eq ins.columns.name}">selected</c:if>>${ins.columns.name}</option>
                                                        </c:forEach>
                                                    </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 pos-r">
                                                    <select lay-filter="planName" name="planName" class="planName layui-bg-gray" disabled
                                                            lay-search>
                                                        <option value="">请选择</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 pos-r view-attachment">
                                                    <span class="h-32 lh-32 ml-5 layui-span-unit">查看</span>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </c:forEach>

                        </div>
                        <div class="layui-row">
                            <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="${entry.designCapacity}" disabled>
                                    <span class="pos-a h-32 lh-32 layui-span-unit">W</span>
                                </div>
                            </div>
                            <div class="layui-col-lg9 layui-col-sm9 ">
                                <label class="layui-form-label"><i class="mark">*</i>设计图纸：</label>
                                <div class="layui-input-block pos-r" style="display: flex; align-items: center">
                                    <div id="attachFile">
                                        <c:if test="${not empty entry.designDrawings}">
                                            <c:forEach var="imgStr" items="${fn:split(entry.designDrawings,',')}">
                                                <c:choose>
                                                    <c:when test="${fns:checkIfImg(imgStr)}">
                                                        <div class="bj-img imgSpan">
                                                            <%--<span class="layui-icon-close layui-icon" onclick="delImg(this)"></span>--%>
                                                            <img src="${commonStaticImgPath}${imgStr}" height="700" width="1200"/>
                                                            <input type="hidden" class="attachFileImg" value="${imgStr}"/>
                                                        </div>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <a class="h-32 lh-32 layui-span-unit lookBtn" href="${commonStaticImgPath}${imgStr}">查看</a>
                                                        <input type="hidden" class="attachFileImg" value="${imgStr}"/>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:forEach>
                                        </c:if>
                                    </div>


                                </div>
                            </div>

                        </div>
                        <div class="assembly">

                                <c:forEach var="assembly" items="${assemblyList}" varStatus="vs">
                                    <div class="layui-row">
                                        <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-bg-gray">
                                                    <select lay-filter="assembly" name="assembly" class="assembly" disabled
                                                            lay-search>
                                                        <option value="">请选择</option>
                                                        <c:forEach varStatus="" items="${sysAssemblyList}"
                                                                   var="sysAssembly">
                                                            <option value="${sysAssembly.columns.id}"
                                                                    data-power="${sysAssembly.columns.model}" ${sysAssembly.columns.id eq assembly.columns.item_id ? 'selected' : ''}>${sysAssembly.columns.model}</option>
                                                        </c:forEach>
                                                    </select>
                                                    <span class="pos-a h-32 lh-32 layui-span-unit" style="right: 30px">W</span>
                                                </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="${assembly.columns.num}">
                                                </div>
                                                    <%--                                    <i class="layui-icon layui-icon-add-circle" style="float: right;position: absolute;right: 0px;top: 3px;color: #1b6073;font-size: 25px;" onclick="add1(this)"></i>--%>
                                            </div>
                                        </div>
                                    </div>
                                </c:forEach>

                        </div>
                        <div class="inverter">

                                <c:forEach var="inverter" items="${inverterList}" varStatus="vs">
                                    <div class="layui-row">
                                        <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" class="inverter" disabled
                                                            lay-search>
                                                        <option value="">请选择</option>
                                                        <c:forEach varStatus="" items="${sysInverterList}"
                                                                   var="sysInverter">
                                                            <option value="${sysInverter.columns.id}" ${sysInverter.columns.id eq inverter.columns.item_id ? 'selected' : ''}>${sysInverter.columns.model}</option>
                                                        </c:forEach>
                                                    </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.num}">
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                </c:forEach>


                        </div>
                        <div class="grid-connection">

                                <c:forEach var="gridConnection" items="${gridConnectionList}" varStatus="vs">
                                    <div class="layui-row">
                                        <div class="layui-col-lg5 layui-col-sm7">
                                            <label class="layui-form-label">并网箱：</label>
                                            <div class="layui-input-block">
                                                <div class="layui-inline">
                                                    <select lay-filter="grid-connection" name="gridConnection"
                                                            class="grid-connection" lay-search disabled>
                                                        <option value="">请选择</option>
                                                        <c:forEach varStatus="" items="${sysGridConnectionList}"
                                                                   var="sysGridConnection">
                                                            <option value="${sysGridConnection.columns.id}" ${sysGridConnection.columns.id eq gridConnection.columns.item_id ? 'selected' : ''}>${sysGridConnection.columns.model}</option>
                                                        </c:forEach>
                                                    </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="${gridConnection.columns.num}">
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                </c:forEach>
                        </div>
                        <div class="grid-support">

                                <c:forEach var="gridSupport" items="${gridSupportList}" varStatus="vs">
                                    <div class="layui-row">
                                        <div class="layui-col-lg5 layui-col-sm7">
                                            <label class="layui-form-label">支架：</label>
                                            <div class="layui-input-block">
                                                <div class="layui-inline">
                                                    <select lay-filter="grid-support" name="gridSupport" disabled
                                                            class="gridSupport" lay-search>
                                                        <option value="">请选择</option>
                                                        <c:forEach varStatus="" items="${sysGridSupportList}" var="sysGridSupport">
                                                            <option value="${sysGridSupport.columns.id}" ${sysGridSupport.columns.id eq gridSupport.columns.item_id ? 'selected' : ''}>${sysGridSupport.columns.model}</option>
                                                        </c:forEach>
                                                    </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="${gridSupport.columns.num}">
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                </c:forEach>
                        </div>

                       <%-- <div class="layui-col-xs12">
                            <label class="layui-form-label">方案备注：</label>
                            <div class="layui-input-block">
                                    <textarea name="schemeRemarks" id="schemeRemarks" class="layui-textarea" lay-verify="required" disabled>${entry.schemeRemarks}</textarea>
                            </div>
                        </div>--%>
                        <div class="layui-col-xs12">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <textarea name="examineRemarks" id="examineRemarks" class="layui-textarea" lay-verify="required"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="operate-footer">
        <input type="button" class="layui-btn toExamine" value="同意">
        <input type="button" class="layui-btn Failed" value="驳回">
        <input type="button" class="layui-btn layui-btn-primary" value="取消" onclick="cancel()">
    </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>
    //图片查看效果
    var viewer = new Viewer(document.getElementById('LAY_app'));
    var imgsCount = 0;
    var serviceType = '${order.serviceType}';
    var reg = /^(?:[1-9]\d*|0)(?:\.\d+)?$/;
    var number = /^[1-9]\d*$/;//非0正整数正则
    var plan_html = "<option value=''>请选择</option>";
    var plan_type_html = "<option value=''>请选择</option>";
    var currentPlanTypeHtml = '';
    var assemblyOptionHtml = '';// 组件下拉选html
    var inverterOptionHtml = '';// 逆变器下拉选html
    var gridConnectionOptionHtml = '';// 并网箱下拉选html
    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;

        initElectricSelect();
        initSchemeData();

        //执行实例
        form.render(null, 'component-form-element');
        //自定义验证规则
        form.verify({
            title: function (value) {
                if (value.length < 5) {
                    return '标题至少得5个字符啊';
                }
            }
            , pass: [
                /^[\S]{6,12}$/
                , '密码必须6到12位，且不能出现空格'
            ]
            , recevierMobile: [/^((0\d{2,3}-\d{7,8})|([1][3,4,5,7,8,8,9][0-9]{9}))$/
                , '请输入正确格式的联系电话！'
            ]
            , content: function (value) {
                layedit.sync(editIndex);
            }
        });


        //驳回
        var saveFlag = false;
        $(".Failed").click(function () {
            if (saveFlag) {
                return;
            }

            //验证不必填项的值格式
            var examineRemarks = $("#examineRemarks").val();
            var id = "${entry.id}";

            if (isBlank(examineRemarks)) {
                layer.msg("请输入备注!", {icon: 2});
                return false;
            }
            saveFlag = true;
            $.ajax({
                url: "${ctx}/customerEntry/gdtToExamine",
                type: "POST",
                data: {
                    id: id,
                    remarks: examineRemarks,
                    type:'2'
                }
                , success: function (result) {

                    if (result.code === "202") {
                        layer.msg("必填信息为空", {icon: 2});
                    }
                    if (result.code === "505") {
                        layer.msg("保存失败", {icon: 2});
                    }
                    if (result.code === '200') {
                        var index = parent.layer.getFrameIndex(window.name);
                        layer.msg("保存成功", {icon: 1, time: 1000}, function () {
                            parent.layer.close(index);
                            parent.searchOrder(); //刷新父页面
                        })
                    } else {
                        layer.msg("保存失败", {icon: 2});
                    }
                    saveFlag = false;
                }, error: function () {
                    layer.msg("保存失败", {icon: 2});
                    saveFlag = false;
                }
            })
        })


        //审核通过
        var examineFlag = false;
        $(".toExamine").click(function () {
            if (examineFlag) {
                return;
            }
            //验证不必填项的值格式
            var id = "${entry.id}";
            var examineRemarks = $("#examineRemarks").val();// 审核意见
            var data = {
                id: id,
                remarks: examineRemarks,
                type:'1'
            }
            examineFlag = true;
            $.ajax({
                url: "${ctx}/customerEntry/gdtToExamine",
                type: "POST",
                data: data
                , success: function (result) {

                    if (result.code === "202") {
                        layer.msg("必填信息为空", {icon: 2});
                    }
                    if (result.code === "505") {
                        layer.msg("保存失败", {icon: 2});
                    }
                    if (result.code === '200') {
                        var index = parent.layer.getFrameIndex(window.name);
                        layer.msg("保存成功", {icon: 1, time: 1000}, function () {
                            parent.layer.close(index);
                            parent.searchOrder(); //刷新父页面
                        })
                    } else {
                        layer.msg("保存失败", {icon: 2});
                    }
                    saveFlag = false;

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



        if ("2" === ${entry.schemeType} && !isBlank(${entry.componentSpec})) {
            $.ajax({
                url: "${ctx}/planManage/findPlanByAssembly",
                type: "POST",
                data: {
                    assembly: "${entry.componentSpec}",
                    projectId: "${entry.projectId}"
                }
                , success: function (result) {
                    var length = result.length;
                    for (var i = 0; i < length; i++) {
                        plan_type_html += "<option value='" + result[i].columns.id + "' title='" + result[i].columns.assembly_count + "' date='" + result[i].columns.code + "'>" + result[i].columns.plan_type + "</option>";
                    }

                }
            })
        }

        //重新计算组件块数
        function componentNum() {
            var numco = 0;
            $(".componentNum").each(function () {
                if (!isBlank($(this).val())) {
                    numco = numco + parseInt($(this).val());
                }
            });
            $("#componentCount").val(parseInt(numco));
        }

        // 组件数量输入框值改变事件
        $(document).on('change', '.assembly input[name=optionVal]', function () {
            if (isBlank($(this).val())) {
                return;
            }
            statisticsCapacity();
        });

        // 验证手机号
        function isPhoneNo(phone) {
            var tel = /(^1\d{10}$)|(^(\d{3,4}\-)?\d{5,9}$)/;
            return tel.test($.trim(phone));
        }
    });


    function electric_plan(numco) {
        var va = $("#componentSpec").val();
        $.ajax({
            url: "${ctx}/planManage/findElectricPlan",
            type: "POST",
            data: {
                assembly: va,
                assemblyNum: numco
            }
            , success: function (result) {
                console.log(result)
                if (isBlank(result)) {
                    $("#cageOne").val('');
                    $("#cageTwo").val('');
                    $("#cageThree").val('');
                    $("#inverterOne").val('');
                    $("#inverterTwo").val('');
                    $("#inverterThree").val('');
                    //  layer.msg("暂无电气配置信息",{icon:2})
                    form.render('select');
                    return
                }
                if (result.code === '2004') {
                    layer.msg("请求参数为空", {icon: 2})
                    return
                }
                $("#cageOne").val(result.columns.box1);
                $("#cageTwo").val(result.columns.box2);
                $("#cageThree").val(result.columns.box3);
                $("#inverterOne").val(result.columns.inverter1);
                $("#inverterTwo").val(result.columns.inverter2);
                $("#inverterThree").val(result.columns.inverter3);

                form.render('select');
            }
        })
    }

    function deletePlan(that) {
        $(that).closest(".layui-row").remove();
        var numco = 0;
        $(".componentNum").each(function () {
            if (!isBlank($(this).val())) {
                numco = numco + parseInt($(this).val());
            }
        });
        $("#componentCount").val(parseInt(numco));

    }



    // 初始化电器材料下拉选
    function initElectricSelect() {
        $.get('${ctx}/planManage/findAllElectric', function(result){
            if (result.code === '200') {
                var electricArray = result.data;
                assemblyOptionHtml += '<option value="">请选择</option>';
                inverterOptionHtml += '<option value="">请选择</option>';
                gridConnectionOptionHtml += '<option value="">请选择</option>';
                for (var i = 0; i < electricArray.length; i++) {
                    var electric = electricArray[i];
                    var type = electric.columns.type;
                    var id = electric.columns.id;
                    var model = electric.columns.model;
                    if (type === '1') {
                        inverterOptionHtml += '<option value="'+id+'">'+model+'</option>';
                    } else if (type === '2') {
                        gridConnectionOptionHtml += '<option value="'+id+'">'+model+'</option>';
                    } else {
                        assemblyOptionHtml += '<option value="'+id+'" data-power="'+model+'">'+model+'</option>';
                    }
                }
            }
        });

    }

    // 初始化方案类型下拉选
    function initSchemeTypeSelectData(selectedId, optionData) {
        var html = '<option>请选择</option>';
        for (var j = 0; j < optionData.length; j ++) {
            var data = optionData[j];
            var selectedFlag = data.name === selectedId ? 'selected' : '';
            html += '<option value="'+data.id+'" '+selectedFlag+'>'+data.name+'</option>';
        }
        return html;
    }

    // 初始化方案数据，下拉选回显
    function initSchemeData() {
        var schemeType = '${entry.schemeType}';
        // var planTypeData = [];
        // var projectId = $('select[name=projectId]').val();
        // if (isBlank(projectId)) {
        //     return;
        // }
        // console.log(projectId);
        // var planTypeId = $('select[name=projectId]').find('option:selected').data('key');
        // var planTypeName = $('select[name=projectId]').find('option:selected').data('type');
        // console.log(planTypeId);
        // console.log(planTypeName);
        // var planTypeIdArray = planTypeId.split(',');
        // var planTypeNameArray = planTypeName.split(',');
        // for (let i = 0; i < planTypeIdArray.length; i++) {
        //     var data = {
        //         id: planTypeIdArray[i],
        //         name: planTypeNameArray[i]
        //     }
        //     planTypeData.push(data);
        // }
        var $rowNode;
        if (schemeType === '1') {
            // 标准方案
            $rowNode = $('#showSchemeId').find('.layui-row');
            // $('#zuhefangan').find('.layui-row').each(function (index, that) {
            //     var html = initSchemeTypeSelectData('', planTypeData);
            //     $(that).find('select[name=planType]').empty().append(html);
            // });
        } else {
            // 组合方案
            $rowNode = $('#zuhefangan').find('.layui-row');
            // $('#showSchemeId').find('.layui-row').each(function (index, that) {
            //     var html = initSchemeTypeSelectData('', planTypeData);
            //     $(that).find('select[name=planType]').empty().append(html);
            // });
        }
        $($rowNode).each(function (index, that) {
            var selectedPlanTypeName = $(that).data('scheme-type-name');
            var selectedPlanId = $(that).data('plan-id');
            // var html = initSchemeTypeSelectData(selectedPlanTypeName, planTypeData);
            // $(that).find('select[name=planType]').empty().append(html);
            if (!isBlank(selectedPlanTypeName)) {
                $.ajax({
                    url: "${ctx}/planManage/findPlanByAssembly",
                    type: "POST",
                    data: {
                        planType: selectedPlanTypeName
                    }
                    , success: function (result) {
                        $(that).find(".planName").empty();
                        var plan_name_html = "<option value=''>请选择</option>";
                        var viewAttachHtml = '';
                        for (var k = 0; k < result.length; k++) {

                            var selectedFlag = result[k].columns.id === selectedPlanId ? 'selected' : '';
                            if (result[k].columns.id === selectedPlanId) {
                                if (!isBlank(result[k].columns.attach)) {
                                    viewAttachHtml += '<a class="h-32 lh-32 ml-5 layui-span-unit" href="${commonStaticImgPath}'+result[k].columns.attach+'" style="color:#2890ac;">查看</a>';
                                }
                                if (!isBlank(result[k].columns.attach2)) {
                                    viewAttachHtml += '<a class="h-32 lh-32 ml-5 layui-span-unit" href="${commonStaticImgPath}'+result[k].columns.attach2+'" style="color:#2890ac;">查看</a>';
                                }
                            }
                            plan_name_html += "<option value='" + result[k].columns.id + "' title='" + result[k].columns.assembly_count + "' date='" + result[k].columns.code + "' "+selectedFlag+">" + result[k].columns.name + "</option>";
                        }
                        $(that).find('.planId').val(selectedPlanId)
                        $(that).find(".planName").append(plan_name_html);
                        $(that).closest('.layui-row').find('.view-attachment').empty().append(viewAttachHtml);
                        form.render('select');
                        var code = $(that).find(".planName").find("option:selected").attr("date");
                        $(that).find(".planCode").val(code);
                    }
                })
            }
        });
        form.render('select');
    }

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

    // 关闭弹框
    function cancel() {
        var index = parent.layer.getFrameIndex(window.name);//先得到当前iframe层的索引
        parent.layer.close(index); //再执行关闭
    }


</script>
</body>
</html>
