<%@ 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;}
  </style>
</head>
<body>
<div class="layui-fluid pd-10">
  <div class="order-win layui-form">
    <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" autocomplete="off" disabled name="stationCode" lay-verify="stationCode" class="layui-input" value="">
            <input type="hidden"   id="stationId" lay-verify="stationCode" class="layui-input" value="">
            <a href="#" class="pos-a h-32 lh-32 layui-span-unit pl-10 layui-table-link" onclick="selectEntry('${partnerId}')"   style="font-size: 20px">+</a>
          </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="" 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="" 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="" 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="" 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="" disabled>
          </div>
        </div>
      </div>
    </div>
    <div class="clear-both">
      <p class="layui-elem-quote" style="margin: 0px 0px 0px 10px">产品信息</p>
      <div class="layui-form-item layui-row">
        <div class="layui-col-sm3 layui-col-md3">
          <label class="layui-form-label">备案类型：</label>
          <span class="form-span" id="filingType"></span>
        </div>
        <div class="layui-col-sm3 layui-col-md3">
          <label class="layui-form-label">项目公司：</label>
          <span class="form-span" id="projectCompanyName"></span>
        </div>
        <div class="layui-col-sm3 layui-col-md3">
          <label class="layui-form-label">业务属性：</label>
          <span class="form-span" id="productLine"></span>
        </div>
        <div class="layui-col-sm12 layui-col-md12">
          <table class="layui-table">
            <colgroup>
              <col width="25%">
              <col width="25%">
              <col width="25%">
              <col width="25%">
            </colgroup>
            <thead>
            <tr style="background: white">
              <th style="text-align: center">序号</th>
              <th style="text-align: center">产品编号</th>
              <th style="text-align: center">产品名称</th>
              <th style="text-align: center">屋顶类型</th>
            </tr>
            </thead>
            <tbody id="projectList">

            </tbody>
          </table>
        </div>
      </div>
      <div class="layui-inline layui-col-xs12 mb-10">
        <label class="layui-form-label w-130">变更原因：</label>
        <div class="layui-input-block ">
          <textarea name="reason" id="reason" placeholder="" class="layui-textarea"></textarea>
        </div>
      </div>
    </div>
    <div class="clear-both">
      <p class="layui-elem-quote" style="margin: 0px 0px 0px 10px">完工信息</p>
      <div class="layui-tab-content" style="padding: 0px">
        <table class="layui-table wgxx" 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>
          <tr id="filing_document_code"  class="change ">
            <td>2</td>
            <td id="filing_document_code_name">项目备案代码</td>
            <td id="filingDocumentCode" style="text-align: left">
            </td>
            <td style="text-align: left;">
              <input type="text" class="layui-input" name="filingDocumentCode" >
            </td>
          </tr>
            <tr id="filing_document_photo"  class="change ">
              <td>2</td>
              <td id="filing_document_photo_name">项目备案证(1-4张)</td>
              <td id="filingDocumentPhoto" style="text-align: left">
              </td>
              <td style="text-align: left;">
                <div class="hide imgSpan">

                </div>
                <div class="udFile" data-span-name="filingDocumentPhoto" style="cursor: pointer;color: #0a6597;text-align: left;">
                  上传
                </div>
                <input type="text" class="hide numMax" value="4">
              </td>
            </tr>
            <tr id="kg_condition_files"  class="change ">
              <td>3</td>
              <td id="kg_condition_files_name">安全防护措施合照照片(1-15张)</td>
              <td id="kgConditionFiles">

              </td>
              <td>
                <div class="hide moreDiv">

                </div>
                <div class="upload-container moreUpload" data-span-name="kgConditionFiles">
                  <img src="" alt="img placeholder">
                </div>
                <input type="text" class="hide numMin" value="1">
                <input type="text" class="hide numMax" value="15">
              </td>
            </tr>

            <tr class="change" id="safety_warning_img2">
              <td>4</td>
              <td id="safety_warning_img2_name">三级安全教育登记卡(1-15张)</td>
              <td id="safetyWarningImg2">
              </td>
              <td>
                <div class="hide moreDiv">

                </div>
                <div class="upload-container moreUpload" data-span-name="safetyWarningImg2">
                  <img src="" alt="img placeholder">
                </div>
                <input type="text" class="hide numMin" value="1">
                <input type="text" class="hide numMax" value="15">
              </td>
            </tr>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="layui-tab layui-tab-brief" id="surveyImgTab" lay-filter="docDemoTabBriefSurvey">
        <ul class="layui-tab-title" id="surveyImgUl"></ul>
      </div>
    </div>
  </div>
</div>
<div class="layui-form-item text-c operate-footer">
  <button type="button" class="layui-btn" id="save">提交</button>
  <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>
  //图片查看效果
  var viewer = new Viewer(document.getElementById('surveyImgTab'));
  var formSet = null;
  var partnerId = null;
  layui.config({
    base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'jquery', 'layer','upload'], function () {
    $ = layui.$;
    element = layui.element;
    upload = layui.upload;
    layer = layui.layer;

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



    $("#save").click(function(){
      commit();
    })
  })

  var opeRep = false;
  function commit() {
    if(opeRep){
      return;
    }
    var entryId = $("#stationId").val();
    if (isBlank(entryId)) {
      layer.msg("请选择电站");
      return;
    }
    var filingDocumentPhoto = [];//备案证
    $(".wgxx").find("input[name='filingDocumentPhoto']").each(function(){
      filingDocumentPhoto.push($(this).val());
    })

    var filingDocumentCode=$("input[name='filingDocumentCode']").val();

    var kgConditionFiles = [];//安全防护措施合照照片
    $(".wgxx").find("input[name='kgConditionFiles']").each(function(){
      kgConditionFiles.push($(this).val());
    })
    var safetyWarningImg2 = [];//三级安全教育登记卡
    $(".wgxx").find("input[name='safetyWarningImg2']").each(function(){
      safetyWarningImg2.push($(this).val());
    })

    var addEntryReqSurveyDetails = [];

    var projectTrs =$("#surveyImgUl li");
    var checkRe = true;
    projectTrs.each(function (index) {
      let projectId = $(this).attr("data-value");


      let imgTab = $("#surveyImgTab").find("#surveyImgDiv"+(index+1));

      //以下是单位的
      var otherImgs1 = [];//银行印鉴留样
      imgTab.find("input[name='otherImgs1']").each(function(){
        otherImgs1.push($(this).val());
      })
      var otherImgs2 = []; // 签约现场照片-法定代表人/负责人签字照
      imgTab.find("input[name='otherImgs2']").each(function(){
        otherImgs2.push($(this).val());
      })

      var otherImgs3 = [];  // 签约现场照片-正脸、持笔/持印、合同签署页同框
      imgTab.find("input[name='otherImgs3']").each(function(){
        otherImgs3.push($(this).val());
      })

      var otherImgs4 = [];  // 签署完成照片
      imgTab.find("input[name='otherImgs4']").each(function(){
        otherImgs4.push($(this).val());
      })
      //以上是单位的


      var dzjc1 = []; // 电站基础-主屋
      imgTab.find("input[name='dzjc1']").each(function(){
        dzjc1.push($(this).val());
      })

      var dzjc2 = []; //电站基础-副屋
      imgTab.find("input[name='dzjc2']").each(function(){
        dzjc2.push($(this).val());
      })

      var zjImg1 = [];  //支架正面照片
      imgTab.find("input[name='zjImg1']").each(function(){
        zjImg1.push($(this).val());
      })

      var zjImg2 = [];//支架侧视图
      imgTab.find("input[name='zjImg2']").each(function(){
        zjImg2.push($(this).val());
      })

      var zjImg3 = [];   //支架北侧图
      imgTab.find("input[name='zjImg3']").each(function(){
        zjImg3.push($(this).val());
      })

      var componentImg2 = [];//组件方位角照片
      imgTab.find("input[name='componentImg2']").each(function(){
        componentImg2.push($(this).val());
      })

      var dqsbAnImgOne = [];  // 逆变器注册截图照片
      imgTab.find("input[name='dqsbAnImgOne']").each(function(){
        dqsbAnImgOne.push($(this).val());
      })

      var zjPlateImg = [];   // 组件铭牌照片
      imgTab.find("input[name='zjPlateImg']").each(function(){
        zjPlateImg.push($(this).val());
      })

      var jdImg1 = [];//组件与组件之间接地照片
      imgTab.find("input[name='jdImg1']").each(function(){
        jdImg1.push($(this).val());
      })

      var jdImg2 = [];  // 组件与支架接地照片
      imgTab.find("input[name='jdImg2']").each(function(){
        jdImg2.push($(this).val());
      })

      var jdImg3 = [];   // 支架与接地扁铁连接照片
      imgTab.find("input[name='jdImg3']").each(function(){
        jdImg3.push($(this).val());
      })

      var safetyWarningImg3 = [];    // 施工安全图-开工前站班会
      imgTab.find("input[name='safetyWarningImg3']").each(function(){
        safetyWarningImg3.push($(this).val());
      })

      var safetyWarningImg = []; // 施工安全图-安全警示牌
      imgTab.find("input[name='safetyWarningImg']").each(function(){
        safetyWarningImg.push($(this).val());
      })

      var safetyDiscloseDocImg = [];   //施工安全图-安全技术交底书
      imgTab.find("input[name='safetyDiscloseDocImg']").each(function(){
        safetyDiscloseDocImg.push($(this).val());
      })

      var zjImg10 = [];   //基础安装-螺栓孔洞防水图
      imgTab.find("input[name='zjImg10']").each(function(){
        zjImg10.push($(this).val());
      })

      var zjImg11 = [];   //基础安装-柱脚防水完工
      imgTab.find("input[name='zjImg11']").each(function(){
        zjImg11.push($(this).val());
      })

      var zjImg5 = [];  //航拍图照片
      imgTab.find("input[name='zjImg5']").each(function(){
        zjImg5.push($(this).val());
      })

      var zjImg8 = [];   //支架安装图-支架方阵（东向西完工照）
      imgTab.find("input[name='zjImg8']").each(function(){
        zjImg8.push($(this).val());
      })

      var zjImg9 = [];   //支架安装图-支架方阵（北向南完工照）
      imgTab.find("input[name='zjImg9']").each(function(){
        zjImg9.push($(this).val());
      })


      var zjImg4 = [];   //支架型号照片
      imgTab.find("input[name='zjImg4']").each(function(){
        zjImg4.push($(this).val());
      })

      var zjImg12 = [];   //支架安装图-斜梁悬挑（南）
      imgTab.find("input[name='zjImg12']").each(function(){
        zjImg12.push($(this).val());
      })

      var zjImg13 = [];   //支架安装图-斜梁悬挑（北）
      imgTab.find("input[name='zjImg13']").each(function(){
        zjImg13.push($(this).val());
      })

      var zjImg14 = [];   //支架安装图-檀条悬挑（东）
      imgTab.find("input[name='zjImg14']").each(function(){
        zjImg14.push($(this).val());
      })

      var zjImg15 = [];  //支架安装图-檀条悬挑（西）
      imgTab.find("input[name='zjImg15']").each(function(){
        zjImg15.push($(this).val());
      })

      var jdImg4 = [];  //接地扁铁下墙照片
      imgTab.find("input[name='jdImg4']").each(function(){
        jdImg4.push($(this).val());
      })


      var componentImg3 = [];  //组件航拍俯视照片
      imgTab.find("input[name='componentImg3']").each(function(){
        componentImg3.push($(this).val());
      })

      //组件安装完成VR视图
      var componentImg4 = [];
      imgTab.find("input[name='componentImg4']").each(function(){
        componentImg4.push($(this).val());
      })

      var bkImg1 = [];  //边框接地图-边框与边框接地
      imgTab.find("input[name='bkImg1']").each(function(){
        bkImg1.push($(this).val());
      })

      var componentImg1 = [];  //组件倾角照片
      imgTab.find("input[name='componentImg1']").each(function(){
        componentImg1.push($(this).val());
      })

      var bkImg2 = [];  //边框接地图-边框与支架接地
      imgTab.find("input[name='bkImg2']").each(function(){
        bkImg2.push($(this).val());
      })

      var bkImg3 = [];  //边框接地图-其他图片
      imgTab.find("input[name='bkImg3']").each(function(){
        bkImg3.push($(this).val());
      })

      var ykImg1 = [];  //压块或背压板照片
      imgTab.find("input[name='ykImg1']").each(function(){
        ykImg1.push($(this).val());
      })

      var dcImgs = [];  //逆变器安装照片
      imgTab.find("input[name='dcImgs']").each(function(){
        dcImgs.push($(this).val());
      })

      var nbqPlateImg = [];  //逆变器铭牌照片
      imgTab.find("input[name='nbqPlateImg']").each(function(){
        nbqPlateImg.push($(this).val());
      })

      var totalImgs = [];  //逆变器组串接入照片
      imgTab.find("input[name='totalImgs']").each(function(){
        totalImgs.push($(this).val());
      })

      var nbqZlcImg = [];  //逆变器安装图-逆变器交流侧
      imgTab.find("input[name='nbqZlcImg']").each(function(){
        nbqZlcImg.push($(this).val());
      })

      var openWayVoltageImgs = [];  //开路电压图
      imgTab.find("input[name='openWayVoltageImgs']").each(function(){
        openWayVoltageImgs.push($(this).val());
      })

      var nbqZbImg = [];  //并网箱逆变器整体照片
      imgTab.find("input[name='nbqZbImg']").each(function(){
        nbqZbImg.push($(this).val());
      })

      var otherImgs8 = [];  //并网箱逆变器防雨罩照片
      imgTab.find("input[name='otherImgs8']").each(function(){
        otherImgs8.push($(this).val());
      })

        var bwInnerImg = [];  //并网箱内部照片
      imgTab.find("input[name='bwInnerImg']").each(function(){
        bwInnerImg.push($(this).val());
      })

      var fixOtherImg = [];  //线缆下墙照片
      imgTab.find("input[name='fixOtherImg']").each(function(){
        fixOtherImg.push($(this).val());
      })

      var sizeMeasureImgs = [];  //屋顶线缆安装照片
      imgTab.find("input[name='sizeMeasureImgs']").each(function(){
        sizeMeasureImgs.push($(this).val());
      })

      var jdImg8 = [];  //接地极图-并网箱、逆变器安装接地极
      imgTab.find("input[name='jdImg8']").each(function(){
        jdImg8.push($(this).val());
      })

      var jdImg5 = [];  //支架接地电阻照片
      imgTab.find("input[name='jdImg5']").each(function(){
        jdImg5.push($(this).val());
      })

      var jdImg11 = [];  //接地极图-支架接地电阻测量照片
      imgTab.find("input[name='jdImg11']").each(function(){
        jdImg11.push($(this).val());
      })

      var jdImg9 = [];  //接地极图-并网箱、逆变器安装接地电阻阻值
      imgTab.find("input[name='jdImg9']").each(function(){
        jdImg9.push($(this).val());
      })

      var jdImg6 = [];  //电气接地电阻照片
      imgTab.find("input[name='jdImg6']").each(function(){
        jdImg6.push($(this).val());
      })

      var otherImgs5 = [];  //水槽细节照片
      imgTab.find("input[name='otherImgs5']").each(function(){
        otherImgs5.push($(this).val());
      })

      var otherImgs6 = [];  //落水管照片
      imgTab.find("input[name='otherImgs6']").each(function(){
        otherImgs6.push($(this).val());
      })

      var otherImgs7 = [];  //假梁-斜梁方向照片
      imgTab.find("input[name='otherImgs7']").each(function(){
        otherImgs7.push($(this).val());
      })

      var zjReport = [];  //自检记录报告
      imgTab.find("input[name='zjReport']").each(function(){
        zjReport.push($(this).val());
      })

      var otherFiles = [];  //其他资料
      imgTab.find("input[name='otherFiles']").each(function(){
        otherFiles.push($(this).val());
      })

      var supplementVideoUrl = [];  //补充视频
      imgTab.find("input[name='supplementVideoUrl']").each(function(){
        supplementVideoUrl.push($(this).val());
      })

      var completeRemark=imgTab.find("input[name='completeRemark']").val();

      let addEntryReqSurveyDetail = {
        projectId:projectId,
        otherImgs1:otherImgs1.join(","),
        otherImgs2:otherImgs2.join(","),
        otherImgs3:otherImgs3.join(","),
        otherImgs4:otherImgs4.join(","),
        dzjc1:dzjc1.join(","),
        dzjc2:dzjc2.join(","),
        zjImg1:zjImg1.join(","),
        zjImg2:zjImg2.join(","),
        zjImg3:zjImg3.join(","),
        zjImg4:zjImg4.join(","),
        zjImg5:zjImg5.join(","),
        componentImg1:componentImg1.join(","),
        componentImg2:componentImg2.join(","),
        sizeMeasureImgs:sizeMeasureImgs.join(","),
        fixOtherImg:fixOtherImg.join(","),
        totalImgs:totalImgs.join(","),
        bwInnerImg:bwInnerImg.join(","),
        dcImgs:dcImgs.join(","),
        nbqZbImg:nbqZbImg.join(","),
        dqsbAnImgOne:dqsbAnImgOne.join(","),
        nbqPlateImg:nbqPlateImg.join(","),
        zjPlateImg:zjPlateImg.join(","),
        openWayVoltageImgs:openWayVoltageImgs.join(","),
        jdImg1:jdImg1.join(","),
        jdImg2:jdImg2.join(","),
        jdImg3:jdImg3.join(","),
        jdImg4:jdImg4.join(","),
        jdImg5:jdImg5.join(","),
        jdImg6:jdImg6.join(","),
        safetyWarningImg3:safetyWarningImg3.join(","),
        safetyWarningImg:safetyWarningImg.join(","),
        safetyDiscloseDocImg:safetyDiscloseDocImg.join(","),
        componentImg3:componentImg3.join(","),
        nbqZlcImg:nbqZlcImg.join(","),
        zjImg8:zjImg8.join(","),
        zjImg9:zjImg9.join(","),
        zjImg10:zjImg10.join(","),
        zjImg11:zjImg11.join(","),
        zjImg12:zjImg12.join(","),
        zjImg13:zjImg13.join(","),
        zjImg14:zjImg14.join(","),
        zjImg15:zjImg15.join(","),
        bkImg1:bkImg1.join(","),
        bkImg2:bkImg2.join(","),
        bkImg3:bkImg3.join(","),
        ykImg1:ykImg1.join(","),
        jdImg8:jdImg8.join(","),
        jdImg9:jdImg9.join(","),
        jdImg11:jdImg11.join(","),
        componentImg4:componentImg4.join(","),
        otherImgs5:otherImgs5.join(","),
        otherImgs6:otherImgs6.join(","),
        otherImgs7:otherImgs7.join(","),
        otherImgs8:otherImgs8.join(","),
        zjReport:zjReport.join(","),
        otherFiles:otherFiles.join(","),
        supplementVideoUrl:supplementVideoUrl.join(","),
        kgConditionFiles:kgConditionFiles.join(","),
        safetyWarningImg2:safetyWarningImg2.join(","),
        filingDocumentPhoto:filingDocumentPhoto.join(","),
        completeRemark:completeRemark,
        filingDocumentCode:filingDocumentCode,
      }

      addEntryReqSurveyDetails.push(addEntryReqSurveyDetail);
    })


    if(!checkRe){
      return;
    }
    var reason = $("#reason").val();
    var changeRecord={
      entryId: entryId,
      status: status,
      completeList:addEntryReqSurveyDetails,
      completeRemark: reason,
      filingDocumentPhoto:filingDocumentPhoto.join(","),
      kgConditionFiles:kgConditionFiles.join(","),
      safetyWarningImg2:safetyWarningImg2.join(","),
      filingDocumentCode:filingDocumentCode
    }

    opeRep = true;
    $.ajax({
      url: '${ctx}/completion/change/addHRChangeRecord',
      type: "POST",
      contentType: "application/json;charsetset=UTF-8",
      data: JSON.stringify(changeRecord),
      success: function(data){
        if (data.code == "200") {
          top.layer.msg("操作成功");
          closeSelf();
          parent.location.reload();
        } else {
          layer.msg(data.errMsg);
        }
      },
      complete: function(){
        opeRep = false;
      }
    });
  }

  function selectEntry(partnerId){
    layer.open({
      type: 2,
      title: '选择电站',
      content: '${ctx}/completion/change/toSelectEntry?partnerId='+partnerId,
      area: ['80%','80%']
    });
  }


  function searchCode(stationCode){
    if (isBlank(stationCode)) {
      return;
    }
    $("input[name='stationCode']").val(stationCode);
    $.ajax({
      type: 'post',
      url: '${ctx}/completion/change/selectNumber/' + stationCode,
      dataType: 'json',
      data: {
        stationCode: stationCode
      },
      success: function(res){
        clearHtml();
        if (res.code == "200") {
           var surveyRecord = res.data.surveyRecord;
          var customerEntry = res.data.customerEntry;
          var projectList = res.data.projectList;
          var projectDetailList = res.data.projectList;
          formSet = res.data.formSet;
          partnerId = res.data.customerEntry.partnerId;


          $("#stationId").val(customerEntry.id);
          $("input[name='status']").val(getStatus(customerEntry));
          $("input[name='traderName']").val(customerEntry.createTraderName);
          $("#projectCompanyName").text(customerEntry.projectCompanyName);
          $("input[name='tenantName']").val(customerEntry.tenantName);
          $("input[name='partnerName']").val(customerEntry.partnerName);
          if ("1"==customerEntry.filingType){
            $("#filingType").text("农户备案");
          }else if ("2"==customerEntry.filingType){
            $("#filingType").text("项目公司备案");
          }
          let productLine = "";
          if (customerEntry.productLine == "1"){
            productLine="纯租25年业务";
          }else if (customerEntry.productLine == "2"){
            productLine="经营性租赁";
          }else if (customerEntry.productLine == "3"){
            productLine="融资租赁";
          }else if (customerEntry.productLine == "4"){
            productLine="光伏贷";
          }else if (customerEntry.productLine == "5"){
            productLine="全款";
          }else if (customerEntry.productLine == "6"){
            productLine="其他";
          }else {
            productLine="其他";
          }
          $("#productLine").text(productLine);
          $("input[name='idCode']").val(customerEntry.idCode);
          $("input[name='address']").val(customerEntry.province + customerEntry.city + customerEntry.area + customerEntry.address);
          let html = "";
          // 产品信息
          let index = 1;
          for (let i = 0; i < projectList.length; i++) {
            let projectId = projectList[i].columns.projectId;
            let projectCode = projectList[i].columns.projectCode;
            let projectName = projectList[i].columns.projectName;
            let roofType = projectList[i].columns.roofType;
            html += '<tr style="text-align: center" data-id="'+projectId+'" class="projectTr" >';
            html += '<td>'+index+'</td>';
            html += '<td>'+projectCode+'</td>';
            html += '<td>'+projectName+'</td>';
            html += '<td>'+roofType+'</td>';
            html += '</tr>';
            index++;
          }
          $("#projectList").empty();
          $("#projectList").append(html);

          var surveyData=projectList[0].columns.acceptReport;

          //备案证
          if (!isBlank(surveyRecord.filingDocumentPhoto)) {
            var imgsArr = surveyRecord.filingDocumentPhoto.split(",");
            var htmlFill = '';
            var h2='';
            for (var i = 0; i < imgsArr.length; i++) {
              var fileName = imgsArr[i].substring(imgsArr[i].lastIndexOf("/") + 1, imgsArr[i].length);
              htmlFill += '<div>';
              htmlFill += '<a href="${commonStaticImgPath}' + imgsArr[i] + '" target="_blank">' + fileName + '</a>';
              htmlFill += '</div>';

              h2 += '<div>';
              h2 += '<a href="${commonStaticImgPath}' + imgsArr[i] + '" target="_blank" class="fileH">' + fileName+ '</a>';
              h2 += '<span onclick="delMoreImg(this)" style="cursor:pointer;"><i class="layui-icon">&#xe640;</i></span>';
              h2 += '<input name="filingDocumentPhoto" class="hide" value="' + imgsArr[i] + '">';
              h2 += '</div>';
            }
            $("#filingDocumentPhoto").empty().append(htmlFill);
            $("#filingDocumentPhoto").next().find(".imgSpan").show();
            $("#filingDocumentPhoto").next().find(".imgSpan").empty().append(h2);
            var maxNum = $("#filingDocumentPhoto").next().find(".numMax").val();
            if (imgsArr.length == maxNum) {
              $("#filingDocumentPhoto").next().find(".udFile").hide();
            }
          }

          if (!isBlank(surveyData.kgConditionFiles)) {
            var imgsArr = surveyData.kgConditionFiles.split(",");
            var htmlkg = '';
            var h2='';
            for (var i = 0; i < imgsArr.length; i++) {
              htmlkg += '<div class="bj-img">';
              htmlkg += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
              htmlkg += '</div>';

              h2 += '<div class="bj-img imgSpan">';
              h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
              h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
              h2 += '<input type="hidden" class="data-input" name="kgConditionFiles" value="' + imgsArr[i] + '"/>';
              h2 += '</div>';
            }
            $("#kgConditionFiles").empty().append(htmlkg);
            $("#kgConditionFiles").next().find(".moreDiv").show();
            $("#kgConditionFiles").next().find(".moreDiv").empty().append(h2);
            var maxNum = $("#kgConditionFiles").next().find(".numMax").val();
            if (imgsArr.length == maxNum) {
              $("#kgConditionFiles").next().find(".moreUpload").hide();
            }
          }

          if (!isBlank(surveyData.safetyWarningImg2)) {
            var imgsArr = surveyData.safetyWarningImg2.split(",");
            var htmlSaf = '';
            var h2='';
            for (var i = 0; i < imgsArr.length; i++) {
              htmlSaf += '<div class="bj-img">';
              htmlSaf += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
              htmlSaf += '</div>';


              h2 += '<div class="bj-img imgSpan">';
              h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
              h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
              h2 += '<input type="hidden" class="data-input" name="safetyWarningImg2" value="' + imgsArr[i] + '"/>';
              h2 += '</div>';
            }
            $("#safetyWarningImg2").empty().append(htmlSaf);
            $("#safetyWarningImg2").next().find(".moreDiv").show();
            $("#safetyWarningImg2").next().find(".moreDiv").empty().append(h2);
            var maxNum = $("#safetyWarningImg2").next().find(".numMax").val();
            if (imgsArr.length == maxNum) {
              $("#safetyWarningImg2").next().find(".moreUpload").hide();
            }
          }

          if(!isBlank(surveyRecord.filingDocumentCode)){
               $("#filingDocumentCode").text(surveyRecord.filingDocumentCode);
            $("input[name='filingDocumentCode']").val(surveyRecord.filingDocumentCode);
          }

          //勘测图片信息
          let html1 = "";
          for (let i = 0; i <projectDetailList.length; i++) {
            let projectCode = projectDetailList[i].columns.projectCode;
            let roofType = projectDetailList[i].columns.roofType;
            let projectName = projectDetailList[i].columns.projectName;
            let projectId=projectDetailList[i].columns.projectId;
            if (i == 0){
              html1 += '<li class="layui-this" id="'+projectCode+'" data-value="'+projectId+'">';
            }else {
              html1 += '<li id="'+projectCode+'" data-value="'+projectId+'">';
            }
            if (!isBlank(roofType)){
              html1 += roofType;
            }else {
              html1 += projectName;
            }
            html1 += '</li>';
          }
          $("#surveyImgUl").empty();
          $("#surveyImgUl").append(html1);
          let html2 = "";
          let j = 1;
          for (let i = 0; i <projectDetailList.length; i++) {
            if (i==0){
              html2+= '<div class="layui-tab-content surveyTabContent " id="surveyImgDiv'+j+'" style="padding: 0px"> ';
            }else {
              html2+= '<div class="layui-tab-content surveyTabContent  layui-hide " id="surveyImgDiv'+j+'" style="padding: 0px"> ';
            }
            html2 += '<table class="layui-table" style="text-align: center;">'
            html2+='<thead>';
            html2+='<tr>';
            html2+='<th width="5%">序号</th>';
            html2+='<th width="15%">文件名称</th>';
            html2+='<th width="40%">变更前信息</th>';
            html2+='<th width="40%">变更后信息</th>';
            html2+='</tr>';
            html2+='</thead>';
            html2+='<tbody id="contentBody'+i+'">';
            let contentBody=``;
            if(customerEntry.tenantType == '2'){
              contentBody+=`<tr id="other_imgs1" class="change hide">
                                                <td>1</td>
                                                <td id="other_imgs1_name">银行印鉴留样(1-4张)</td>
                                                <td id="otherImgs1">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs1">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="4">
                                                </td>
                                            </tr>
                                            <tr id="other_imgs2" class="change hide">
                                                <td>2</td>
                                                <td id="other_imgs2_name">签约现场照片-法定代表人/负责人签字照(1-4张)</td>
                                                <td id="otherImgs2">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs2">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="4">
                                                </td>
                                            </tr>
                                            <tr id="other_imgs3" class="change hide">
                                                <td>3</td>
                                                <td id="other_imgs3_name">签约现场照片-正脸、持笔/持印、合同签署页同框(1-4张)</td>
                                                <td id="otherImgs3">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs3">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="4">
                                                </td>
                                            </tr>
                                            <tr id="other_imgs4" class="change hide">
                                                <td>5</td>
                                                <td id="other_imgs4_name">签署完成照片(1-4张)</td>
                                                <td id="otherImgs4">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs4">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="4">
                                                </td>
                                            </tr>`;
            }

             contentBody += `
                                            <tr id="dzjc1_div" class="change hide">
                                                <td>4</td>
                                                <td id="dzjc1_name">电站基础-主屋(1-15张)</td>
                                                <td id="dzjc1">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="dzjc1">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>
                                             <tr id="dzjc2_div" class="change hide">
                                                <td>5</td>
                                                <td id="dzjc2_name">电站基础-副屋(1-15张)</td>
                                                <td id="dzjc2">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="dzjc2">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>
                                            <tr id="zj_img1" class="change hide">
                                                <td>10</td>
                                                <td id="zj_img1_name">支架正面照片(1-15张)</td>
                                                <td id="zjImg1">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg1">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img2" class="change hide">
                                                <td>10</td>
                                                <td id="zj_img2_name">支架侧视图(1-15张)</td>
                                                <td id="zjImg2">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg2">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                     <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>
                                           <tr id="zj_img3" class="change hide">
                                                <td>6</td>
                                                <td id="zj_img3_name">支架北侧图(1-15张)</td>
                                                <td id="zjImg3">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg3">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                          <tr id="component_img2" class="change hide">
                                                <td>9</td>
                                                <td id="component_img2_name">组件方位角照片(1-15张)</td>
                                                <td id="componentImg2">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload"  data-span-name="componentImg2">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="dqsb_an_img_one" class="change hide">
                                                <td>8</td>
                                                <td id="dqsb_an_img_one_name">逆变器注册截图照片(1-15张)</td>
                                                <td id="dqsbAnImgOne">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload"  data-span-name="dqsbAnImgOne">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_plate_img" class="change hide">
                                                <td>4</td>
                                                <td id="zj_plate_img_name">组件铭牌照片(1-15张)</td>
                                                <td id="zjPlateImg">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">
                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjPlateImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>



                                            <tr id="jd_img1" class="change hide">
                                                <td>7</td>
                                                <td id="jd_img1_name">组件与组件之间接地照片(1-15张)</td>
                                                <td id="jdImg1">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg1">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>
                                            <tr id="jd_img2" class="change hide">
                                                <td>10</td>
                                                <td id="jd_img2_name">组件与支架接地照片(1-15张)</td>
                                                <td id="jdImg2">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg2">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                     <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>
                                            <tr id="jd_img3" class="change hide">
                                                <td>11</td>
                                                <td id="jd_img3_name">支架与接地扁铁连接照片(1-15张)</td>
                                                <td id="jdImg3">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload"  data-span-name="jdImg3">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>
                                            <tr id="safety_warning_img3" class="change hide">
                                                <td>11</td>
                                                <td id="safety_warning_img3_name">施工安全图-开工前站班会（施工安全用品：安全帽、安全绳、反光衣、工作鞋）(1-15张)</td>
                                                <td id="safetyWarningImg3">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload"  data-span-name="safetyWarningImg3">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                     <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                            <tr id="safety_warning_img" class="change hide">
                                                <td>7</td>
                                                <td id="safety_warning_img_name">施工安全图-安全警示牌(1-15张)</td>
                                                <td id="safetyWarningImg">
                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="safetyWarningImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                           <tr id="safety_disclose_doc_img" class="change hide">
                                                <td>7</td>
                                                <td id="safety_disclose_doc_img_name">施工安全图-安全技术交底书(1-15张)</td>
                                                <td id="safetyDiscloseDocImg">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="safetyDiscloseDocImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img10" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img10_name">基础安装-螺栓孔洞防水图(3-15张)</td>
                                                <td id="zjImg10">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg10">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="3">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                           <tr id="zj_img11" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img11_name">基础安装-柱脚防水完工图(1-15张)</td>
                                                <td id="zjImg11">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg11">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img5" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img5_name">航拍图照片(1-15张)</td>
                                                <td id="zjImg5">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg5">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img8" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img8_name">支架安装图-支架方阵（东向西完工照）(1-15张)</td>
                                                <td id="zjImg8">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg8">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img9" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img9_name">支架安装图-支架方阵（北向南完工照）(1-15张)<</td>
                                                <td id="zjImg9">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg9">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img4" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img4_name">支架型号照片(1-15张)</td>
                                                <td id="zjImg4">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg4">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img12" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img12_name">支架安装图-斜梁悬挑（南）(1-15张)</td>
                                                <td id="zjImg12">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg12">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                            <tr id="zj_img13" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img13_name">支架安装图-斜梁悬挑（北）(1-15张)</td>
                                                <td id="zjImg13">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg13">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img14" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img14_name">支架安装图-檀条悬挑（东）(1-15张)</td>
                                                <td id="zjImg14">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg14">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_img15" class="change hide">
                                                <td>7</td>
                                                <td id="zj_img15_name">支架安装图-檀条悬挑（西）(1-15张)</td>
                                                <td id="zjImg15">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjImg15">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                           <tr id="jd_img4" class="change hide">
                                                <td>7</td>
                                                <td id="jd_img4_name">接地扁铁下墙照片(1-15张)</td>
                                                <td id="jdImg4">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg4">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="component_img3" class="change hide">
                                                <td>7</td>
                                                <td id="component_img3_name">组件航拍俯视照片(1-15张)</td>
                                                <td id="componentImg3">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="componentImg3">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                           <tr id="component_img4" class="change hide">
                                                <td>7</td>
                                                <td id="component_img4_name">组件安装完成VR视图(1-15张)</td>
                                                <td id="componentImg4">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="componentImg4">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                           <tr id="bk_img1" class="change hide">
                                                <td>7</td>
                                                <td id="bk_img1_name">边框接地图-边框与边框接地(1-15张)</td>
                                                <td id="bkImg1">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="bkImg1">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="component_img1" class="change hide">
                                                <td>7</td>
                                                <td id="component_img1_name">组件倾角照片(1-15张)</td>
                                                <td id="componentImg1">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="componentImg1">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="bk_img2" class="change hide">
                                                <td>7</td>
                                                <td id="bk_img2_name">边框接地图-边框与支架接地(1-15张)</td>
                                                <td id="bkImg2">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="bkImg2">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                             <tr id="bk_img3" class="change hide">
                                                <td>7</td>
                                                <td id="bk_img3_name">边框接地图-其他图片(1-15张)</td>
                                                <td id="bkImg3">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="bkImg3">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="yk_img1" class="change hide">
                                                <td>7</td>
                                                <td id="yk_img1_name">压块或背压板照片(1-15张)</td>
                                                <td id="ykImg1">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="ykImg1">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                           <tr id="dc_imgs" class="change hide">
                                                <td>7</td>
                                                <td id="dc_imgs_name">逆变器安装照片(1-15张)</td>
                                                <td id="dcImgs">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="dcImgs">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="nbq_plate_img" class="change hide">
                                                <td>7</td>
                                                <td id="nbq_plate_img_name"> 逆变器铭牌照片(1-15张)</td>
                                                <td id="nbqPlateImg">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="nbqPlateImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                             <tr id="total_imgs" class="change hide">
                                                <td>7</td>
                                                <td id="total_imgs_name">逆变器组串接入照片(1-15张)</td>
                                                <td id="totalImgs">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="totalImgs">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="nbq_zlc_img" class="change hide">
                                                <td>7</td>
                                                <td id="nbq_zlc_img_name">逆变器安装图-逆变器交流侧(1-15张)</td>
                                                <td id="nbqZlcImg">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="nbqZlcImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                           <tr id="open_way_voltage_imgs" class="change hide">
                                                <td>7</td>
                                                <td id="open_way_voltage_imgs_name">开路电压图(1-15张)</td>
                                                <td id="openWayVoltageImgs">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="openWayVoltageImgs">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                            <tr id="nbq_zb_img" class="change hide">
                                                <td>7</td>
                                                <td id="nbq_zb_img_name">并网箱逆变器整体照片(1-15张)</td>
                                                <td id="nbqZbImg">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="nbqZbImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="other_imgs8" class="change hide">
                                                <td>7</td>
                                                <td id="other_imgs8_name">并网箱逆变器防雨罩照片</td>
                                                <td id="otherImgs8">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs8">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                           <tr id="bw_inner_img" class="change hide">
                                                <td>7</td>
                                                <td id="bw_inner_img_name">并网箱内部照片(1-15张)</td>
                                                <td id="bwInnerImg">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="bwInnerImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                            <tr id="fix_other_img" class="change hide">
                                                <td>7</td>
                                                <td id="fix_other_img_name">线缆下墙照片(1-15张)</td>
                                                <td id="fixOtherImg">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="fixOtherImg">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="size_measure_imgs" class="change hide">
                                                <td>7</td>
                                                <td id="size_measure_imgs_name">屋顶线缆安装照片(1-15张)</td>
                                                <td id="sizeMeasureImgs">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="sizeMeasureImgs">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                            <tr id="jd_img8" class="change hide">
                                                <td>7</td>
                                                <td id="jd_img8_name">接地极图-并网箱、逆变器安装接地极(1-15张)</td>
                                                <td id="jdImg8">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg8">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="jd_img5" class="change hide">
                                                <td>7</td>
                                                <td id="jd_img5_name">支架接地电阻照片(1-15张)</td>
                                                <td id="jdImg5">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg5">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                             <tr id="jd_img11" class="change hide">
                                                <td>7</td>
                                                <td id="jd_img11_name">接地极图-支架接地电阻测量照片（远景）(1-15张)</td>
                                                <td id="jdImg11">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg11">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="jd_img9" class="change hide">
                                                <td>7</td>
                                                <td id="jd_img9_name">接地极图-并网箱、逆变器安装接地电阻阻值（近景）(1-15张)</td>
                                                <td id="jdImg9">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg9">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="jd_img6" class="change hide">
                                                <td>7</td>
                                                <td id="jd_img6_name">电气接地电阻照片(1-15张)</td>
                                                <td id="jdImg6">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="jdImg6">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                            <tr id="other_imgs5" class="change hide">
                                                <td>7</td>
                                                <td id="other_imgs5_name">水槽细节照片(1-15张)</td>
                                                <td id="otherImgs5">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs5">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>


                                             <tr id="other_imgs6" class="change hide">
                                                <td>7</td>
                                                <td id="other_imgs6_name">落水管照片(1-15张)</td>
                                                <td id="otherImgs6">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs6">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                             <tr id="other_imgs7" class="change hide">
                                                <td>7</td>
                                                <td id="other_imgs7_name">假梁-斜梁方向照片</td>
                                                <td id="otherImgs7">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="otherImgs7">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMax" value="15">
                                                </td>
                                            </tr>

                                            <tr id="zj_report" class="change hide">
                                                <td>7</td>
                                                <td id="zj_report_name">自检记录报告(1张)</td>
                                                <td id="zjReport">

                                                </td>
                                                <td>
                                                    <div class="hide moreDiv">

                                                    </div>
                                                    <div class="upload-container moreUpload" data-span-name="zjReport">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="1">
                                                </td>
                                            </tr>

                                            <tr id="other_files" class="change hide">
                                                <td>12</td>
                                                <td id="other_files_name">其他资料(1-2张)</td>
                                                <td id="otherFiles" style="text-align: left">

                                                </td>
                                                <td style="text-align: left">
                                                    <div class="imgSpan hide" style="text-align: left;">

                                                    </div>
                                                    <div class="udFile"  data-span-name="otherFiles" style="cursor: pointer;color: #0a6597;">
                                                        上传
                                                    </div>
                                                     <input type="text" class="hide numMin" value="1">
                                                    <input type="text" class="hide numMax" value="2">
                                                </td>
                                            </tr>


                                           <tr id="supplement_video_url" class="change hide">
                                                <td>11</td>
                                                <td id="supplement_video_url_name">补充视频（1~5）</td>
                                                <td id="supplementVideoUrl">
                                                </td>
                                                <td>
                                                    <div class="hide videoDiv">

                                                    </div>
                                                    <div class="upload-container videoUpload"  data-span-name="supplementVideoUrl">
                                                        <img src="" alt="img placeholder">
                                                    </div>
                                                    <input type="text" class="hide numMax" value="5">
                                                </td>
                                            </tr>

                                           <tr id="complete_remark"  class="change hide">
                                                  <td>33</td>
                                                  <td id="complete_remark_name">完工备注</td>
                                                  <td id="completeRemark" style="text-align: left">

                                                  </td>
                                                  <td style="text-align: left;">
                                                      <input type="text" name="completeRemark" autocomplete="off"  class="layui-input">
                                                  </td>
                                              </tr>

                                            </tbody>`;
            html2+= contentBody;
            html2 += '</table>';
            html2 += '</div>';
            j++;
          }
          $("#surveyImgTab").append(html2);

          if (!isBlank(projectDetailList)) {
            appendHtml(projectDetailList,customerEntry);
            hideOrShowHtml(formSet,customerEntry.partnerId,projectDetailList);
          }


          upload.render({
            elem: '.moreUpload' //绑定元素
            , url: '${ctx}/common/uploadFile' //上传接口
            ,multiple:true
            ,before: function(obj){
              //预读本地文件示例，不支持ie8
              obj.preview(function (index, file, result) {

              });
            }
            , done: function (res, index, upload) {
              var titleName = $(this.item).attr("data-span-name");
              var html='';
              html+='<div class="bj-img imgSpan">';
              html+=' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
              html += '<img src="${commonStaticImgPath}' + res.path + '">';
              html += '<input type="hidden" class="data-input" name="' + titleName + '" value="' + res.path + '"/>';
              html+='</div>';
              $(this.item).parent("td").find(".moreDiv").append(html);
              $(this.item).parent("td").find(".moreDiv").show();
              var maxNum = $(this.item).parent("td").find(".numMax").val();
              if ($(this.item).parent("td").find(".moreDiv").find(".imgSpan").length == maxNum) {
                $(this.item).hide();
              }
              viewer.update();
            }
            , error: function () {
              //请求异常回调
            }
          });

          upload.render({
            elem: '.videoUpload' //绑定元素
            ,accept: 'video'
            ,multiple:true
            , url: '${ctx}/common/uploadFile' //上传接口
            ,before: function(obj){
              //预读本地文件示例，不支持ie8
              obj.preview(function (index, file, result) {

              });
            }
            , done: function (res, index, upload) {
              $(this.item).parent("td").find(".videoDiv").show();
              var html = '';
              html += '<div class="bj-img videoSpan" style="width: 150px;">';
              html += '<span  class="layui-icon-close layui-icon" style="z-index: 9;"  onClick="delVideoImg(this)"></span>';
              html += '<video class="showVideo" controls width="150px" height="78px" src="${commonStaticImgPath}' + res.path + '"/>';
              html += '<input type="hidden" class="data-input" name="supplementVideoUrl" value="' + res.path + '"/>';
              html += '</div>';
              $(this.item).parent("td").find(".videoDiv").append(html);
              var maxNum = $(this.item).parent("td").find(".numMax").val();
              if ($(this.item).parent("td").find(".supplementVideoUrl").length == maxNum) {
                $(this.item).hide();
              }
            }
            , error: function () {
              //请求异常回调
            }
          });

          upload.render({
            elem: '.udFile' //绑定元素
            , accept: 'file'
            ,multiple:true
            , url: '${ctx}/common/uploadFileKeepName' //上传接口
            , before: function (obj) {
              //预读本地文件示例，不支持ie8
              obj.preview(function (index, file, result) {
              });
            }
            , done: function (res, index, upload) {
              var titleName = $(this.item).attr("data-span-name");
              $(this.item).parent("td").find(".imgSpan").show();
              var html='';
              html += '<div>';
              html += '<a href="${commonStaticImgPath}' + res.path + '" target="_blank" class="fileH">' + res.filename + '</a>';
              html += '<span onclick="delFile(this)" style="cursor:pointer;"><i class="layui-icon">&#xe640;</i></span>';
              html += '<input name="' + titleName + '" class="hide" value="' + res.path + '">';
              html += '</div>';
              $(this.item).parent("td").find(".imgSpan").append(html);
              var maxNum = $(this.item).parent("td").find(".numMax").val();
              if ($(this.item).parent("td").find(".fileH").length == maxNum) {
                $(this.item).hide();
              }
            }
            , error: function () {
              //请求异常回调
            }
          });

        } else {
          formSet = null;
          clearHtml();
          layer.msg(res.errMsg);
        }
      }
    });
  }

  function clearHtml(){
    $("#stationId").val("");
    $("input[name='status']").val("");
    $("input[name='traderName']").val("");
    $("#projectCompanyName").text("");
    $("input[name='tenantName']").val("");
    $("input[name='partnerName']").val("");
    $("#filingType").text("");
    $("#productLine").text("");
    $("input[name='idCode']").val("");
    $("input[name='address']").val("");
    $("#surveyImgTab").empty();
    let surveyImgTabHtml = `<ul class="layui-tab-title" id="surveyImgUl"></ul>`;
    $("#surveyImgTab").append(surveyImgTabHtml);
  }

  function hideOrShowHtml(setData,partnerId,projectDetailList) {
    for (var i = 0; i < setData.length; i++) {
      let columnKey = setData[i].columnKey;
      if (setData[i].useFlag == '0') {//不启用
        for (let j = 0; j < projectDetailList.length; j++) {
          $("#contentBody"+j+" #" + columnKey).addClass("hide");
          if(columnKey=='dzjc1' || columnKey=='dzjc2'){
            $("#contentBody"+j+" #" + columnKey+"_div").addClass("hide");
          }
        }

      } else {
        if (columnKey.includes(partnerId)) {
          columnKey = columnKey.substring(0, columnKey.indexOf(partnerId)-1);
        }
        for (let j = 0; j < projectDetailList.length; j++) {
          $("#contentBody"+j+" #" + columnKey).removeClass('hide');
           if(columnKey=='dzjc1' || columnKey=='dzjc2'){
             $("#contentBody"+j+" #" + columnKey+"_div").removeClass('hide');
           }
          //$("#contentBody"+j+" #" + columnKey+'_name').text(setData[i].columnName);
        }

      }
    }
    resetSort(projectDetailList);
  }

  function appendHtml(data, entryData) {
    for (let a = 0; a <data.length; a++) {
      var completionDetail=data[a].columns.acceptReport;
      if(entryData.tenantType =='2'){
        if (!isBlank(completionDetail.otherImgs1)) {
          var imgsArr = completionDetail.otherImgs1.split(",");
          var html = '';
          var h2 = '';
          for (var i = 0; i < imgsArr.length; i++) {
            html += '<div class="bj-img">';
            html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
            html += '</div>';

            h2 += '<div class="bj-img imgSpan">';
            h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
            h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
            h2 += '<input type="hidden" class="data-input" name="otherImgs1" value="' + imgsArr[i] + '"/>';
            h2 += '</div>';
          }
          $("#contentBody"+a+" #otherImgs1").empty().append(html);
          $("#contentBody"+a+" #otherImgs1").next().find(".moreDiv").show();
          $("#contentBody"+a+" #otherImgs1").next().find(".moreDiv").empty().append(h2);
          var maxNum = $("#contentBody"+a+" #otherImgs1").next().find(".numMax").val();
          if (imgsArr.length == maxNum) {
            $("#contentBody"+a+" #otherImgs1").next().find(".moreUpload").hide();
          }
        }
      }
      if (!isBlank(completionDetail.dzjc1)) {
        var imgsArr = completionDetail.dzjc1.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="dzjc1" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #dzjc1").empty().append(html);
        $("#contentBody"+a+" #dzjc1").next().find(".moreDiv").show();
        $("#contentBody"+a+" #dzjc1").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #dzjc1").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #dzjc1").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.dzjc2)) {
        var imgsArr = completionDetail.dzjc2.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="dzjc2" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #dzjc2").empty().append(html);
        $("#contentBody"+a+" #dzjc2").next().find(".moreDiv").show();
        $("#contentBody"+a+" #dzjc2").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #dzjc2").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #dzjc2").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg1)) {
        var imgs = completionDetail.zjImg1.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgs.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgs[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgs[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg1" value="' + imgs[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg1").empty().append(html);
        $("#contentBody"+a+" #zjImg1").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg1").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg1").next().find(".numMax").val();
        if (imgs.length == maxNum) {
          $("#contentBody"+a+" #zjImg1").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.zjImg2)) {
        var imgs = completionDetail.zjImg2.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgs.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgs[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgs[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg2" value="' + imgs[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg2").empty().append(html);
        $("#contentBody"+a+" #zjImg2").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg2").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg2").next().find(".numMax").val();
        if (imgs.length == maxNum) {
          $("#contentBody"+a+" #zjImg2").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.zjImg3)) {
        var imgsArr = completionDetail.zjImg3.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg3" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg3").empty().append(html);
        $("#contentBody"+a+" #zjImg3").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg3").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg3").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg3").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.componentImg2)) {
        var imgsArr = completionDetail.componentImg2.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="componentImg2" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #componentImg2").empty().append(html);

        $("#contentBody"+a+" #componentImg2").next().find(".moreDiv").show();
        $("#contentBody"+a+" #componentImg2").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #componentImg2").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #componentImg2").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.dqsbAnImgOne)) {
        var imgsArr = completionDetail.dqsbAnImgOne.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="dqsbAnImgOne" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #dqsbAnImgOne").empty().append(html);
        $("#contentBody"+a+" #dqsbAnImgOne").next().find(".moreDiv").show();
        $("#contentBody"+a+" #dqsbAnImgOne").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #dqsbAnImgOne").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #dqsbAnImgOne").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjPlateImg)) {
        var imgsArr = completionDetail.zjPlateImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjPlateImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjPlateImg").empty().append(html);
        $("#contentBody"+a+" #zjPlateImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjPlateImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjPlateImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjPlateImg").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.jdImg1)) {
        var imgsArr = completionDetail.jdImg1.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg1" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg1").empty().append(html);
        $("#contentBody"+a+" #jdImg1").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg1").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg1").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg1").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.jdImg2)) {
        var flyImgsArr = completionDetail.jdImg2.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < flyImgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + flyImgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + flyImgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg2" value="' + flyImgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg2").empty().append(html);
        $("#contentBody"+a+" #jdImg2").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg2").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg2").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg2").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.jdImg3)) {
        var imgsArr = completionDetail.jdImg3.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg3" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg3").empty().append(html);
        $("#contentBody"+a+" #jdImg3").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg3").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg3").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg3").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.safetyWarningImg3)) {
        var imgsArr =completionDetail.safetyWarningImg3.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="safetyWarningImg3" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #safetyWarningImg3").empty().append(html);
        $("#contentBody"+a+" #safetyWarningImg3").next().find(".moreDiv").show();
        $("#contentBody"+a+" #safetyWarningImg3").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #safetyWarningImg3").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #safetyWarningImg3").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.safetyWarningImg)) {
        var imgsArr = completionDetail.safetyWarningImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="safetyWarningImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #safetyWarningImg").empty().append(html);
        $("#contentBody"+a+" #safetyWarningImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #safetyWarningImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #safetyWarningImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #safetyWarningImg").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.safetyDiscloseDocImg)) {
        var imgsArr = completionDetail.safetyDiscloseDocImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="safetyDiscloseDocImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #safetyDiscloseDocImg").empty().append(html);
        $("#contentBody"+a+" #safetyDiscloseDocImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #safetyDiscloseDocImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #safetyDiscloseDocImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #safetyDiscloseDocImg").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg10)) {
        var imgsArr = completionDetail.zjImg10.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg10" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg10").empty().append(html);
        $("#contentBody"+a+" #zjImg10").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg10").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg10").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg10").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg11)) {
        var imgsArr = completionDetail.zjImg11.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg11" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg11").empty().append(html);
        $("#contentBody"+a+" #zjImg11").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg11").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg11").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg11").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg5)) {
        var imgsArr = completionDetail.zjImg5.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg5" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg5").empty().append(html);
        $("#contentBody"+a+" #zjImg5").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg5").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg5").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg5").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg8)) {
        var imgsArr = completionDetail.zjImg8.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg8" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg8").empty().append(html);
        $("#contentBody"+a+" #zjImg8").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg8").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg8").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg8").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg9)) {
        var imgsArr = completionDetail.zjImg9.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg9" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg9").empty().append(html);
        $("#contentBody"+a+" #zjImg9").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg9").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg9").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg9").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg4)) {
        var imgsArr = completionDetail.zjImg4.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg4" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg4").empty().append(html);
        $("#contentBody"+a+" #zjImg4").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg4").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg4").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg4").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg12)) {
        var imgsArr = completionDetail.zjImg12.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg12" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg12").empty().append(html);
        $("#contentBody"+a+" #zjImg12").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg12").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg12").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg12").next().find(".moreUpload").hide();
        }
      }
      if (!isBlank(completionDetail.zjImg13)) {
        var imgsArr = completionDetail.zjImg13.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg13" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg13").empty().append(html);
        $("#contentBody"+a+" #zjImg13").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg13").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg13").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg13").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.zjImg14)) {
        var imgsArr = completionDetail.zjImg14.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg14" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg14").empty().append(html);
        $("#contentBody"+a+" #zjImg14").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg14").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg14").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg14").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.zjImg15)) {
        var imgsArr = completionDetail.zjImg15.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjImg15" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjImg15").empty().append(html);
        $("#contentBody"+a+" #zjImg15").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjImg15").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjImg15").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjImg15").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.jdImg4)) {
        var imgsArr = completionDetail.jdImg4.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg4" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg4").empty().append(html);
        $("#contentBody"+a+" #jdImg4").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg4").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg4").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg4").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.componentImg3)) {
        var imgsArr = completionDetail.componentImg3.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="componentImg3" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #componentImg3").empty().append(html);
        $("#contentBody"+a+" #componentImg3").next().find(".moreDiv").show();
        $("#contentBody"+a+" #componentImg3").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #componentImg3").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #componentImg3").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.componentImg4)) {
        var imgsArr = completionDetail.componentImg4.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="componentImg4" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #componentImg4").empty().append(html);
        $("#contentBody"+a+" #componentImg4").next().find(".moreDiv").show();
        $("#contentBody"+a+" #componentImg4").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #componentImg4").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #componentImg4").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.bkImg1)) {
        var imgsArr = completionDetail.bkImg1.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="bkImg1" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #bkImg1").empty().append(html);
        $("#contentBody"+a+" #bkImg1").next().find(".moreDiv").show();
        $("#contentBody"+a+" #bkImg1").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #bkImg1").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #bkImg1").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.componentImg1)) {
        var imgsArr = completionDetail.componentImg1.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="componentImg1" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #componentImg1").empty().append(html);
        $("#contentBody"+a+" #componentImg1").next().find(".moreDiv").show();
        $("#contentBody"+a+" #componentImg1").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #componentImg1").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #componentImg1").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.bkImg2)) {
        var imgsArr = completionDetail.bkImg2.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="bkImg2" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #bkImg2").empty().append(html);
        $("#contentBody"+a+" #bkImg2").next().find(".moreDiv").show();
        $("#contentBody"+a+" #bkImg2").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #bkImg2").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #bkImg2").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.bkImg3)) {
        var imgsArr = completionDetail.bkImg3.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="bkImg3" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #bkImg3").empty().append(html);
        $("#contentBody"+a+" #bkImg3").next().find(".moreDiv").show();
        $("#contentBody"+a+" #bkImg3").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #bkImg3").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #bkImg3").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.ykImg1)) {
        var imgsArr = completionDetail.ykImg1.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="ykImg1" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #ykImg1").empty().append(html);
        $("#contentBody"+a+" #ykImg1").next().find(".moreDiv").show();
        $("#contentBody"+a+" #ykImg1").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #ykImg1").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #ykImg1").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.dcImgs)) {
        var imgsArr = completionDetail.dcImgs.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="dcImgs" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #dcImgs").empty().append(html);
        $("#contentBody"+a+" #dcImgs").next().find(".moreDiv").show();
        $("#contentBody"+a+" #dcImgs").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #dcImgs").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #dcImgs").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.nbqPlateImg)) {
        var imgsArr = completionDetail.nbqPlateImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="nbqPlateImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #nbqPlateImg").empty().append(html);
        $("#contentBody"+a+" #nbqPlateImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #nbqPlateImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #nbqPlateImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #nbqPlateImg").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.totalImgs)) {
        var imgsArr = completionDetail.totalImgs.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="totalImgs" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #totalImgs").empty().append(html);
        $("#contentBody"+a+" #totalImgs").next().find(".moreDiv").show();
        $("#contentBody"+a+" #totalImgs").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #totalImgs").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #totalImgs").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.nbqZlcImg)) {
        var imgsArr = completionDetail.nbqZlcImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="nbqZlcImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #nbqZlcImg").empty().append(html);
        $("#contentBody"+a+" #nbqZlcImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #nbqZlcImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #nbqZlcImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #nbqZlcImg").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.openWayVoltageImgs)) {
        var imgsArr = completionDetail.openWayVoltageImgs.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="openWayVoltageImgs" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #openWayVoltageImgs").empty().append(html);
        $("#contentBody"+a+" #openWayVoltageImgs").next().find(".moreDiv").show();
        $("#contentBody"+a+" #openWayVoltageImgs").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #openWayVoltageImgs").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #openWayVoltageImgs").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.nbqZbImg)) {
        var imgsArr = completionDetail.nbqZbImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="nbqZbImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #nbqZbImg").empty().append(html);
        $("#contentBody"+a+" #nbqZbImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #nbqZbImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #nbqZbImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #nbqZbImg").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.otherImgs8)) {
        var imgsArr = completionDetail.otherImgs8.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="otherImgs8" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #otherImgs8").empty().append(html);
        $("#contentBody"+a+" #otherImgs8").next().find(".moreDiv").show();
        $("#contentBody"+a+" #otherImgs8").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #otherImgs8").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #otherImgs8").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.bwInnerImg)) {
        var imgsArr = completionDetail.bwInnerImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="bwInnerImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #bwInnerImg").empty().append(html);
        $("#contentBody"+a+" #bwInnerImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #bwInnerImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #bwInnerImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #bwInnerImg").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.fixOtherImg)) {
        var imgsArr = completionDetail.fixOtherImg.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="fixOtherImg" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #fixOtherImg").empty().append(html);
        $("#contentBody"+a+" #fixOtherImg").next().find(".moreDiv").show();
        $("#contentBody"+a+" #fixOtherImg").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #fixOtherImg").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #fixOtherImg").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.sizeMeasureImgs)) {
        var imgsArr = completionDetail.sizeMeasureImgs.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="sizeMeasureImgs" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #sizeMeasureImgs").empty().append(html);
        $("#contentBody"+a+" #sizeMeasureImgs").next().find(".moreDiv").show();
        $("#contentBody"+a+" #sizeMeasureImgs").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #sizeMeasureImgs").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #sizeMeasureImgs").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.jdImg8)) {
        var imgsArr = completionDetail.jdImg8.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg8" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg8").empty().append(html);
        $("#contentBody"+a+" #jdImg8").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg8").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg8").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg8").next().find(".moreUpload").hide();
        }
      }

      if (!isBlank(completionDetail.jdImg5)) {
        var imgsArr = completionDetail.jdImg5.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg5" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg5").empty().append(html);
        $("#contentBody"+a+" #jdImg5").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg5").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg5").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg5").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.jdImg11)) {
        var imgsArr = completionDetail.jdImg11.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg11" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg11").empty().append(html);
        $("#contentBody"+a+" #jdImg11").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg11").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg11").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg11").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.jdImg9)) {
        var imgsArr = completionDetail.jdImg9.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg9" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg9").empty().append(html);
        $("#contentBody"+a+" #jdImg9").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg9").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg9").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg9").next().find(".moreUpload").hide();
        }
      }



      if (!isBlank(completionDetail.jdImg6)) {
        var imgsArr = completionDetail.jdImg6.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="jdImg6" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #jdImg6").empty().append(html);
        $("#contentBody"+a+" #jdImg6").next().find(".moreDiv").show();
        $("#contentBody"+a+" #jdImg6").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #jdImg6").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #jdImg6").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.otherImgs5)) {
        var imgsArr = completionDetail.otherImgs5.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="otherImgs5" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #otherImgs5").empty().append(html);
        $("#contentBody"+a+" #otherImgs5").next().find(".moreDiv").show();
        $("#contentBody"+a+" #otherImgs5").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #otherImgs5").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #otherImgs5").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.otherImgs6)) {
        var imgsArr = completionDetail.otherImgs6.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="otherImgs6" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #otherImgs6").empty().append(html);
        $("#contentBody"+a+" #otherImgs6").next().find(".moreDiv").show();
        $("#contentBody"+a+" #otherImgs6").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #otherImgs6").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #otherImgs6").next().find(".moreUpload").hide();
        }
      }



      if (!isBlank(completionDetail.otherImgs7)) {
        var imgsArr = completionDetail.otherImgs7.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="otherImgs7" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #otherImgs7").empty().append(html);
        $("#contentBody"+a+" #otherImgs7").next().find(".moreDiv").show();
        $("#contentBody"+a+" #otherImgs7").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #otherImgs7").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #otherImgs7").next().find(".moreUpload").hide();
        }
      }


      if (!isBlank(completionDetail.zjReport)) {
        var imgsArr = completionDetail.zjReport.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img">';
          html += '   <img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          html += '</div>';

          h2 += '<div class="bj-img imgSpan">';
          h2 += ' <span class="layui-icon-close layui-icon" onclick="delMoreImg(this)"></span>';
          h2 += '<img src="${commonStaticImgPath}' + imgsArr[i] + '">';
          h2 += '<input type="hidden" class="data-input" name="zjReport" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #zjReport").empty().append(html);
        $("#contentBody"+a+" #zjReport").next().find(".moreDiv").show();
        $("#contentBody"+a+" #zjReport").next().find(".moreDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #zjReport").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #zjReport").next().find(".moreUpload").hide();
        }
      }



      if (!isBlank(completionDetail.supplementVideoUrl)) {
        var imgsArr = completionDetail.supplementVideoUrl.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          html += '<div class="bj-img videoSpan" style="width: 150px;">';
          html += '<video class="showVideo" controls width="150px" height="78px" src="${commonStaticImgPath}' + imgsArr[i] + '"/>';
          html += '</div>';
          h2 += '<div class="bj-img videoSpan" style="width: 150px;">';
          h2 += '<span  class="layui-icon-close layui-icon" style="z-index: 9;" onClick="delVideoImg(this)"></span>';
          h2 += '<video class="showVideo" controls width="150px" height="78px" src="${commonStaticImgPath}' + imgsArr[i] + '"/>';
          h2 += '<input type="hidden" className="data-input" name="supplementVideoUrl" value="' + imgsArr[i] + '"/>';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #supplementVideoUrl").empty().append(html);
        $("#contentBody"+a+" #supplementVideoUrl").next().find(".videoDiv").show();
        $("#contentBody"+a+" #supplementVideoUrl").next().find(".videoDiv").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #supplementVideoUrl").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #supplementVideoUrl").next().find(".videoUpload").hide();
        }
      }
      if (!isBlank(completionDetail.otherFiles)) {
        var imgsArr = completionDetail.otherFiles.split(",");
        var html = '';
        var h2 = '';
        for (var i = 0; i < imgsArr.length; i++) {
          var fileName = imgsArr[i].substring(imgsArr[i].lastIndexOf("/") + 1, imgsArr[i].length);
          html += '<div>';
          html += '<a href="${commonStaticImgPath}' + imgsArr[i] + '" target="_blank">' + fileName + '</a>';
          html += '</div>';

          var fname = imgsArr[i].substring(imgsArr[i].lastIndexOf("/") + 1, imgsArr[i].length);
          h2 += '<div>';
          h2 += '<a href="${commonStaticImgPath}' + imgsArr[i] + '" target="_blank" class="fileH">' + fname + '</a>';
          h2 += '<span onclick="delFile(this)" style="cursor:pointer;"><i class="layui-icon">&#xe640;</i></span>';
          h2 += '<input name="otherFiles" class="hide" value="' + imgsArr[i] + '">';
          h2 += '</div>';
        }
        $("#contentBody"+a+" #otherFiles").empty().append(html);

        $("#contentBody"+a+" #otherFiles").next().find(".imgSpan").show();
        $("#contentBody"+a+" #otherFiles").next().find(".imgSpan").empty().append(h2);
        var maxNum = $("#contentBody"+a+" #otherFiles").next().find(".numMax").val();
        if (imgsArr.length == maxNum) {
          $("#contentBody"+a+" #otherFiles").next().find(".udFile").hide();
        }
      }

      if(!isBlank(completionDetail.completeRemark)){
        $("#contentBody"+a+" #completeRemark").html(completionDetail.completeRemark);
        $("#contentBody"+a).find("input[name='completeRemark']").val(completionDetail.completeRemark);
      }

    }
    viewer.update();
  }

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

  }

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

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

  function delMoreImg(that){
    $(that).parent("div").parent("div").parent("td").find(".moreUpload").show();
    $(that).parent("div").remove();
  }

  function delVideoImg(that){
    $(that).parent("div").parent("div").parent("td").find(".videoUpload").show();
    $(that).parent("div").remove();
  }

  function delFile(that){
    $(that).hide();
    $(that).parent("div").parent("div").parent("td").find(".udFile").show();
    $(that).parent("div").remove();
    // $(that).parent("div").parent("div").parent("td").find(".udFile").show();
  }

  function isBlank(val) {
    if (val == null || val == '' || val == undefined) {
      return true;
    }
    return false;
  }
  // window.addEventListener('beforeunload', function (event) {
  //     console.log("进来了没有")
  //     // 这里可以执行一些清理工作或者发送数据给服务器
  //     event.preventDefault(); // 阻止默认行为
  //     // 可以返回一个提示信息或设置 `return` 值
  //     return '您确定要离开吗？';
  // });
</script>
</body>
</html>


