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

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

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

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

        .download-link:hover {
            color: #0056b3;
        }
    </style>
</head>
<body>
<div class="layui-fluid pd-10">
    <div class="order-win layui-form">
        <button class="layui-btn" style="margin-left: 94.5%;" onclick="approvalRecord()">审批记录</button>
        <div class="layui-card-body pt-20 pb-40">
            <div class="layui-col-xs12 form-box">
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">电站编码：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="stationCode" lay-verify="stationCode" class="layui-input" value="${customerEntry.powerStationCode}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">电站状态：</label>
                    <div class="layui-input-block ">
                        <input type="text"  name="status" class="layui-input" value="" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">代理商：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="traderName" class="layui-input" value="${customerEntry.createTraderName}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">产品名称：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="projectName"  class="layui-input" value="${project.name}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">项目公司：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="projectCompanyName" class="layui-input" value="${customerEntry.projectCompanyName}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">所属资方：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="partnerName" class="layui-input" value="${customerEntry.partnerName}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">业主姓名：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="tenantName"  class="layui-input" value="${customerEntry.tenantName}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs3">
                    <label class="layui-form-label w-130">身份证号：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="idCode" class="layui-input" value="${customerEntry.idCode}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs9">
                    <label class="layui-form-label w-130">安装地址：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="address" class="layui-input" value="${customerEntry.province}${customerEntry.city}${customerEntry.area}${customerEntry.address}" disabled>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs12">
                    <label class="layui-form-label w-130">变更原因：</label>
                    <div class="layui-input-block ">
                        <textarea name="reason" id="reason" disabled class="layui-textarea">${change.reason}</textarea>
<%--                        <input type="text" name="reason" class="layui-input" value="${change.reason}" disabled>--%>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear-both">
            <p class="layui-elem-quote" style="margin: 0px 0px 0px 10px">勘测信息</p>
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" id="LAY_app">
                <div class="layui-tab-content" style="padding: 0px">
                    <table class="layui-table" style="text-align: center;">
                        <thead>
                        <tr>
                            <th width="5%">序号</th>
                            <th width="15%">文件名称</th>
                            <th width="40%">变更前信息</th>
                            <th width="40%">变更后信息</th>
                        </tr>
                        </thead>
                        <tbody id="contentBody">
                        <tr id="fly_imgs" class="hide">
                            <td>1</td>
                            <td id="fly_imgs_name">无人机航拍图</td>
                            <td id="flyImgs">
                                <c:if test="${not empty oldChange.flyImgs}">
                                    <c:forEach items="${fn:split(oldChange.flyImgs,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.flyImgs}">
                                    <c:forEach items="${fn:split(change.flyImgs,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="roof_photo_one" class="hide">
                            <td>2</td>
                            <td id="roof_photo_one_name">安装区域整体照片</td>
                            <td id="roofPhotoOne">
                                <c:if test="${not empty oldChange.roofPhotoOne}">
                                    <c:forEach items="${fn:split(oldChange.roofPhotoOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.roofPhotoOne }">
                                    <c:forEach items="${fn:split(change.roofPhotoOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="roof_photo_two" class="hide">
                            <td>3</td>
                            <td id="roof_photo_two_name">安装区域东南角照片</td>
                            <td id="roofPhotoTwo">
                                <c:if test="${not empty oldChange.roofPhotoTwo}">
                                    <c:forEach items="${fn:split(oldChange.roofPhotoTwo,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.roofPhotoTwo}">
                                    <c:forEach items="${fn:split(change.roofPhotoTwo,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="roof_photo_four" class="hide">
                            <td>5</td>
                            <td id="roof_photo_four_name">安装区域正南照片</td>
                            <td id="roofPhotoFour">
                                <c:if test="${not empty oldChange.roofPhotoFour}">
                                    <c:forEach items="${fn:split(oldChange.roofPhotoFour,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.roofPhotoFour}">
                                    <c:forEach items="${fn:split(change.roofPhotoFour,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="roof_photo_three" class="hide">
                            <td>4</td>
                            <td id="roof_photo_three_name">安装区域西南角照片</td>
                            <td id="roofPhotoThree">
                                <c:if test="${not empty oldChange.roofPhotoThree}">
                                    <c:forEach items="${fn:split(oldChange.roofPhotoThree,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.roofPhotoThree }">
                                    <c:forEach items="${fn:split(change.roofPhotoThree,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="house_outline_photo" class="hide">
                            <td>4</td>
                            <td id="house_outline_photo_name">房屋轮廓照片</td>
                            <td id="houseOutlinePhoto">
                                <c:if test="${not empty oldChange.houseOutlinePhoto}">
                                    <c:forEach items="${fn:split(oldChange.houseOutlinePhoto,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.houseOutlinePhoto}">
                                    <c:forEach items="${fn:split(change.houseOutlinePhoto,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>

                        </tr>
                        <tr id="roof_photo_five" class="hide">
                            <td>6</td>
                            <td id="roof_photo_five_name">安装区域细节照片</td>
                            <td id="roofPhotoFive">
                                <c:if test="${not empty oldChange.roofPhotoFive}">
                                    <c:forEach items="${fn:split(oldChange.roofPhotoFive,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.roofPhotoFive}">
                                    <c:forEach items="${fn:split(change.roofPhotoFive,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="roof_photo_interior" class="hide">
                            <td>10</td>
                            <td id="roof_photo_interior_name">房屋内部环境照片</td>
                            <td id="roofPhotoInterior">
                                <c:if test="${not empty oldChange.roofPhotoInterior}">
                                    <c:forEach items="${fn:split(oldChange.roofPhotoInterior,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.roofPhotoInterior}">
                                    <c:forEach items="${fn:split(change.roofPhotoInterior,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="roof_photo_facade" class="hide">
                            <td>9</td>
                            <td id="roof_photo_facade_name">房屋内部结构照片</td>
                            <td id="roofPhotoFacade">
                                <c:if test="${not empty oldChange.roofPhotoFacade}">
                                    <c:forEach items="${fn:split(oldChange.roofPhotoFacade,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.roofPhotoFacade}">
                                    <c:forEach items="${fn:split(change.roofPhotoFacade,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="detail_supplement_one" class="hide">
                            <td>7</td>
                            <td id="detail_supplement_one_name">逆变器、配电箱预安装位置照片</td>
                            <td id="detailSupplementOne">
                                <c:if test="${not empty oldChange.detailSupplementOne}">
                                    <c:forEach items="${fn:split(oldChange.detailSupplementOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.detailSupplementOne }">
                                    <c:forEach items="${fn:split(change.detailSupplementOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>

                        <tr id="house_supplement_one" class="hide">
                            <td>11</td>
                            <td id="house_supplement_one_name">其他障碍物照片</td>
                            <td id="houseSupplementOne">
                                <c:if test="${not empty oldChange.houseSupplementOne}">
                                    <c:forEach items="${fn:split(oldChange.houseSupplementOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.houseSupplementOne}">
                                    <c:forEach items="${fn:split(change.houseSupplementOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="survey_video" class="hide">
                            <td>12</td>
                            <td id="survey_video_name">踏勘补充证明视频</td>
                            <td id="surveyVideo">
                                <c:if test="${not empty oldChange.surveyVideo}">
                                    <c:forEach items="${fn:split(oldChange.surveyVideo,',')}" var="img">
                                        <div class="bj-img imgSpan" style="width: 150px;">
                                            <video controls src="${commonStaticImgPath}${img}" width="150" height="78"/>
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.surveyVideo }">
                                    <c:forEach items="${fn:split(change.surveyVideo,',')}" var="img">
                                        <div class="bj-img imgSpan" style="width: 150px;">
                                            <video controls src="${commonStaticImgPath}${img}" width="150" height="80"/>
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="survey_files" class="hide">
                            <td>13</td>
                            <td id="survey_files_name">踏勘记录表</td>
                            <td id="surveyFiles" style="text-align: left">
                                <c:if test="${not empty oldChange.surveyFiles}">
                                    <c:forEach items="${fn:split(oldChange.surveyFiles,',')}" var="img">
                                        <div class="imgSpan">
                                            <a href="${commonStaticImgPath}${img}" target="_blank">${fn:substring(img,img.lastIndexOf("/")+1 ,img.length() )}</a>
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td style="text-align: left">
                                <c:if test="${not empty change.surveyFiles }">
                                    <c:forEach items="${fn:split(change.surveyFiles,',')}" var="img">
                                        <div class="imgSpan">
                                            <a class="download-link" href="${commonStaticImgPath}${img}" target="_blank">${fn:substring(img,img.lastIndexOf("/")+1 ,img.length() )}</a>
                                            <a onclick="previewUrl('${commonStaticImgPath}${img}')" class="download-link">查看</a>
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="vr_roof_one" class="hide">
                            <td>10</td>
                            <td id="vr_roof_one_name"></td>
                            <td id="vrRoofOne">
                                <c:if test="${not empty oldChange.vrRoofOne}">
                                    <c:forEach items="${fn:split(oldChange.vrRoofOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.vrRoofOne}">
                                    <c:forEach items="${fn:split(change.vrRoofOne,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="vr_roof_two" class="hide">
                            <td>10</td>
                            <td id="vr_roof_two_name"></td>
                            <td id="vrRoofTwo">
                                <c:if test="${not empty oldChange.vrRoofTwo}">
                                    <c:forEach items="${fn:split(oldChange.vrRoofTwo,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.vrRoofTwo}">
                                    <c:forEach items="${fn:split(change.vrRoofTwo,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="vr_roof_three" class="hide">
                            <td>10</td>
                            <td id="vr_roof_three_name"></td>
                            <td id="vrRoofThree">
                                <c:if test="${not empty oldChange.vrRoofThree}">
                                    <c:forEach items="${fn:split(oldChange.vrRoofThree,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.vrRoofThree}">
                                    <c:forEach items="${fn:split(change.vrRoofThree,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="vr_roof_four" class="hide">
                            <td>10</td>
                            <td id="vr_roof_four_name"></td>
                            <td id="vrRoofFour">
                                <c:if test="${not empty oldChange.vrRoofFour}">
                                    <c:forEach items="${fn:split(oldChange.vrRoofFour,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.vrRoofFour}">
                                    <c:forEach items="${fn:split(change.vrRoofFour,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="fw_img1" class="hide">
                            <td>10</td>
                            <td id="fw_img1_name"></td>
                            <td id="fwImg1">
                                <c:if test="${not empty oldChange.fwImg1}">
                                    <c:forEach items="${fn:split(oldChange.fwImg1,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.fwImg1}">
                                    <c:forEach items="${fn:split(change.fwImg1,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="fw_img2" class="hide">
                            <td>10</td>
                            <td id="fw_img2_name"></td>
                            <td id="fwImg2">
                                <c:if test="${not empty oldChange.fwImg2}">
                                    <c:forEach items="${fn:split(oldChange.fwImg2,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.fwImg2}">
                                    <c:forEach items="${fn:split(change.fwImg2,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="fw_img3" class="hide">
                            <td>10</td>
                            <td id="fw_img3_name"></td>
                            <td id="fwImg3">
                                <c:if test="${not empty oldChange.fwImg3}">
                                    <c:forEach items="${fn:split(oldChange.fwImg3,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.fwImg3}">
                                    <c:forEach items="${fn:split(change.fwImg3,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="fw_img4" class="hide">
                            <td>10</td>
                            <td id="fw_img4_name"></td>
                            <td id="fwImg4">
                                <c:if test="${not empty oldChange.fwImg4}">
                                    <c:forEach items="${fn:split(oldChange.fwImg4,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.fwImg4}">
                                    <c:forEach items="${fn:split(change.fwImg4,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        <tr id="fw_img5" class="hide">
                            <td>10</td>
                            <td id="fw_img5_name"></td>
                            <td id="fwImg5">
                                <c:if test="${not empty oldChange.fwImg5}">
                                    <c:forEach items="${fn:split(oldChange.fwImg5,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                            <td>
                                <c:if test="${not empty change.fwImg5}">
                                    <c:forEach items="${fn:split(change.fwImg5,',')}" var="img">
                                        <div class="bj-img imgSpan">
                                            <img src="${commonStaticImgPath}${img}">
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-inline layui-col-xs12">
                <label class="layui-form-label w-130">审核备注：</label>
                <div class="layui-input-block ">
                    <input type="text" name="auditRemarks" disabled class="layui-input" value="${change.auditRemark}">
                </div>
            </div>
        </div>
    </div>
</div>
<div class="layui-form-item text-c operate-footer">
    <button class="layui-btn layui-btn-primary" onclick="closeSelf()">关闭</button>
</div>

<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.js"></script>
<script src="${ctxPlugin}/lib/base64.js"></script>
<script>
    //图片查看效果
    var viewer = new Viewer(document.getElementById('LAY_app'));
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'jquery', 'layer'], function () {
        $ = layui.$;
        layer = layui.layer;
        $(function(){
            $("input[name='status']").val(getStatus('${customerEntry.status}','${customerEntry.credit}','${customerEntry.designAuditFlag}','${customerEntry.installFlag}'));
            hideOrShowHtml();
        })
    })

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

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

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

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

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

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


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

