//静态字段-待办处理的方法
//wait-deal-with页面


//输入元素的HTML代码拼接
var staticElement=''
//左侧标题名字
var titleName = '';
//文件的文件名变量
var Elementname=''
//文件路径变量
var ElementPath=''
//储存所有静态字段的初始值,若没有改变则直接传送后台
var uploadJson={};
var flagtoSelectRadio ;
// var staticUploadjson={};
// function downloadUtil(parm,info) {
//     window.location.href = util.interfaceUrl+interfacenName.fileDown + "?fileName="+info +"&&filePath=" + parm;
// }
//获取输入框标题
function jsontoStatic(staticData,ifthiscanEditor){
    var dataInfo = JSON.parse(staticData)
    var ifCanEditorthis = ifthiscanEditor == 1?'':'disabled'//是否可编写,若不可编写则置为disabled
        //判断input框的显示与隐藏
    var ifthisshoworHide = ifthiscanEditor == 1?'':'display:none'
       //判断span标签的隐藏与显示
    var ifthisHideorShow = ifthiscanEditor == 0?'display:inline':'display:none'
    //判断是否为必填项,若是则在前面加红星
    //注意:所有静态字段均为必填项,所以无需判断是否为必填,只需判断是否可编写,即判断是否为驳回状态还是审核状态
    var ifHaveredStar = ifthiscanEditor == 1?'*':''
       //控制layui是否渲染
    flagtoSelectRadio = ifthiscanEditor ==1?true:false;
    var flagtoFind;
      for (let key in dataInfo ){
          flagtoFind = true;
        var staticTempJson={};
        var Staticinputinfo ='';
        //根据静态字段的值来输出相应的元素
        switch (key) {
            case "jzMatintain":
                var staticAutoelement=''
                var trafficSelect = ''
                util.ajax({
                    type:"get",
                    dataType:'json',
                    async: false,
                    url:util.interfaceUrl+interfacenName.getMaintainPerson,
                    success:function (res) {
                        if(res.code==200) {
                            var selectInfodata = res.data
                            for(let i=0;i<selectInfodata.length;i++){
                                var ifSelecttmaintain = selectInfodata[i].name == dataInfo[key].maintainername?'selected':'';
                                staticAutoelement +='<option '+ifSelecttmaintain+' name="'+selectInfodata[i].deptId+'" value="'+selectInfodata[i].businessId+'">'+selectInfodata[i].name+'</option>';
                                if(selectInfodata[i].name == dataInfo[key].maintainername){
                                    trafficSelect =  '<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(selectInfodata[i].name,20,true)+'</span>'
                                }
                            }
                        }
                        else {
                            layer.msg(res.message)
                        }
                    },
                    error:function () {
                        layer.msg('获取交维人员失败')
                    }
                });
                staticElement=trafficSelect+'<select style="'+ifthisshoworHide+'" '+ifCanEditorthis+' id="trafficName" class="layui-input">' + staticAutoelement+ '</select>'
                uploadJson[key] =dataInfo[key]
                titleName="维护人员";
                break;
            case "jzProspectlist":
                staticTempJson[key+'Name']=dataInfo[key].jzProspectlistName;
                staticTempJson[key+'Path']=dataInfo[key].jzProspectlistPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzProspectlistName
                ElementPath = dataInfo[key].jzProspectlistPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'" style="'+ifthisshoworHide+';margin-right: 8px" >'+
                               '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none" >'+
                               '<a  target="_parent" style="color:#01AAED;position: relative;"     id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" +ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzProspectlistName,15,true)+'</a>'
                 titleName="勘查单";
                break;
            case "jzDesigndrawing":
                staticTempJson[key+'Name']=dataInfo[key].jzDesigndrawingName;
                staticTempJson[key+'Path']=dataInfo[key].jzDesigndrawingPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzDesigndrawingName
                ElementPath =  dataInfo[key].jzDesigndrawingPath
                staticElement= '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px">'+
                               '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                               '<a  target="_parent" style="color:#01AAED;position: relative;"    id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'"  >'+util.dealWithFormatTextByLen(dataInfo[key].jzDesigndrawingName,15,true)+'</a>'
                titleName="设计图";
                break;
            case "jzElementlist":
                staticTempJson[key+'Name']=dataInfo[key].jzElementlistName;
                staticTempJson[key+'Path']=dataInfo[key].jzElementlistPath;
                uploadJson[key] = staticTempJson;
                Elementname=dataInfo[key].jzElementlistName
                ElementPath = dataInfo[key].jzElementlistPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                              '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                               '<a  target="_parent" style="color:#01AAED;position: relative;"     id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzElementlistName,15,true)+'</a>'
                titleName="要素表";
                break;
            case "jzOutboundlist":
                staticTempJson[key+'Name']=dataInfo[key].jzOutboundlistName;
                staticTempJson[key+'Path']=dataInfo[key].jzOutboundlistPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzOutboundlistName
                ElementPath = dataInfo[key].jzOutboundlistPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                               '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                               '<a  target="_parent" style="color:#01AAED;position: relative;"     id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzOutboundlistName,15,true)+'</a>'
                titleName="出库单";
                break;
            case "jzOperatoracceptlist":
                staticTempJson[key+'Name']=dataInfo[key].jzOperatoracceptlistName;
                staticTempJson[key+'Path']=dataInfo[key].jzOperatoracceptlistPath;
                uploadJson[key] = staticTempJson;
                Elementname=dataInfo[key].jzOperatoracceptlistName
                ElementPath = dataInfo[key].jzOperatoracceptlistPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                              '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                '<a  target="_parent" style="color:#01AAED;position: relative;"    id="href_'+key+'"   href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzOperatoracceptlistName,15,true)+'</a>'
                titleName="运营商验收单";
                break;
            case "jzRoutedrawing":
                staticTempJson[key+'Name']=dataInfo[key].jzRoutedrawingName;
                staticTempJson[key+'Path']=dataInfo[key].jzRoutedrawingPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzRoutedrawingName
                ElementPath = dataInfo[key].jzRoutedrawingPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                              '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                '<a  target="_parent" style="color:#01AAED;position: relative;"    id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzRoutedrawingName,15,true)+'</a>'
                titleName="路由图";
                break;
            case "jzCompletedacceptlist":
                staticTempJson[key+'Name']=dataInfo[key].jzCompletedacceptlistName;
                staticTempJson[key+'Path']=dataInfo[key].jzCompletedacceptlistPath;
                uploadJson[key] = staticTempJson;
                Elementname=dataInfo[key].jzCompletedacceptlistName
                ElementPath = dataInfo[key].jzCompletedacceptlistPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                '<a  target="_parent" style="color:#01AAED;position: relative;"    id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzCompletedacceptlistName,15,true)+'</a>'
                titleName="竣工验收单";
                break;
            case "jzBudgetofelectic":
                staticTempJson[key+'Name']=dataInfo[key].jzBudgetofelecticName;
                staticTempJson[key+'Path']=dataInfo[key].jzBudgetofelecticPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzBudgetofelecticName
                ElementPath =  dataInfo[key].jzBudgetofelecticPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                    '<a  target="_parent" style="color:#01AAED;position: relative;"   id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzBudgetofelecticName,15,true)+'</a>'
                titleName="电力预算清单";
                break;
            case "jzMatterlist":
                staticTempJson[key+'Name']=dataInfo[key].jzMatterlistName;
                staticTempJson[key+'Path']=dataInfo[key].jzMatterlistPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzMatterlistName
                ElementPath =  dataInfo[key].jzMatterlistPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                '<a  target="_parent" style="color:#01AAED;position: relative;"    id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzMatterlistName,15,true)+'</a>'
                titleName="立项物资清单";
                break;
            case "jzConstructprocept":
                staticTempJson[key+'Name']=dataInfo[key].jzConstructproceptName;
                staticTempJson[key+'Path']=dataInfo[key].jzConstructproceptPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzConstructproceptName
                ElementPath =  dataInfo[key].jzConstructproceptPath ;
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                    '<a  target="_parent" style="color:#01AAED;position: relative;"   id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzConstructproceptName,15,true)+'</a>'
                titleName="施工组织方案";
                break;
            case "jzOpenrepory":
                staticTempJson[key+'Name']=dataInfo[key].jzOpenreporyName;
                staticTempJson[key+'Path']=dataInfo[key].jzOpenreporyPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzOpenreporyName
                ElementPath = dataInfo[key].jzOpenreporyPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                '<a  target="_parent" style="color:#01AAED;position: relative;"   id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzOpenreporyName,15,true)+'</a>'
                titleName="开工报告";
                break;
       /*     case "jzUppermachineroomname":
                staticElement='<input  style="width: 150%"  '+ifCanEditorthis+'  value="'+dataInfo[key]+'" id="'+key+'" class="layui-input submitInput"/>'
                titleName="上联机房名称";
                uploadJson[key] =dataInfo[key]
                break;*/
            case "jzRentdrawing":
                staticTempJson[key+'Name']=dataInfo[key].jzRentdrawingName;
                staticTempJson[key+'Path']=dataInfo[key].jzRentdrawingPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzRentdrawingName
                ElementPath = dataInfo[key].jzRentdrawingPath
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                    '<a  target="_parent" style="color:#01AAED;position: relative;"   id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzRentdrawingName,15,true)+'</a>'
                titleName="起租截图";
                break;

            case "jzUppermachineroomplace":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'" >'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input  '+ifCanEditorthis+' style="'+ifthisshoworHide+'" onmouseover="this.title=this.value" value="'+dataInfo[key]+'" id="'+key+'"   lay-verify="required" class="layui-input submitInput" / >'
                titleName="上联机房位置";
                uploadJson[key] =dataInfo[key]
                break;
            case "jzCompletedreport":
                staticTempJson[key+'Name']=dataInfo[key].jzCompletedreportName;
                staticTempJson[key+'Path']=dataInfo[key].jzCompletedreportPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzCompletedreportName
                ElementPath = dataInfo[key].jzCompletedreportPath ;
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                    '<a  target="_parent" style="color:#01AAED;position: relative;"    id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzCompletedreportName,15,true)+'</a>'
                titleName="完工报告";
                break;
            case "jzCompletedphoto":
                staticTempJson[key+'Name']=dataInfo[key].jzCompletedphotoName;
                staticTempJson[key+'Path']=dataInfo[key].jzCompletedphotoPath;
                uploadJson[key] = staticTempJson;
                Elementname=dataInfo[key].jzCompletedphotoName
                ElementPath = dataInfo[key].jzCompletedphotoPath;
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';margin-right: 8px"  >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                    '<a  target="_parent" style="color:#01AAED;position: relative;"     id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzCompletedphotoName,15,true)+'</a>'
                titleName="完工照片";
                break;
            case "jzOpendrawing":
                staticTempJson[key+'Name']=dataInfo[key].jzOpendrawingName;
                staticTempJson[key+'Path']=dataInfo[key].jzOpendrawingPath;
                uploadJson[key] = staticTempJson;
                Elementname = dataInfo[key].jzOpendrawingName
                ElementPath =  dataInfo[key].jzOpendrawingPath ;
                staticElement= ' <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="upload_'+key+'"  style="'+ifthisshoworHide+';" >'+
                    '<i class="layui-icon">&#xe67c;</i>上传' + '</button>'+'<input id="uploadinfo_'+key+'" value="" style="display: none;" >'+
                    '<a  target="_parent" style="color:#01AAED;position: relative;"   id="href_'+key+'"  href="'+util.interfaceUrl+interfacenName.fileDown + "?fileName="+Elementname +"&filePath=" + ElementPath+'" >'+util.dealWithFormatTextByLen(dataInfo[key].jzOpendrawingName,15,true)+'</a>'
                titleName="开通截图";
                break;
            case "jzNeId":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'" >'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input  '+ifCanEditorthis+' style="'+ifthisshoworHide+'" onmouseover="this.title=this.value" value="'+dataInfo[key]+'" id="'+key+'"   lay-verify="required" class="layui-input submitInput" / >'
                uploadJson[key] =dataInfo[key]
                titleName="网元id";
                break;
            case "jzPropertycode":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'" >'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input  '+ifCanEditorthis+' style="'+ifthisshoworHide+'" onmouseover="this.title=this.value" value="'+dataInfo[key]+'" id="'+key+'"   lay-verify="required" class="layui-input submitInput" / >'
                uploadJson[key] =dataInfo[key]
                titleName="资产编码";
                break;
            case "jzIsconnectwithowner":
                let selectYes ='';
                let selectNo = '';
                  if(dataInfo[key] == "是"){
                      selectYes = 'checked';
                  }else{
                      selectNo = 'checked';
                  }
                staticElement='<span id="'+key+'" style="'+ifthisHideorShow+';line-height: 20px">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                               '<input style="'+ifthisshoworHide+'" type="radio" '+ifCanEditorthis+' class="jz_isconnectwithowner" '+selectYes+' name="jz_isconnectwithowner" value="是" title="是">'+
                               '<input style="'+ifthisshoworHide+'" type="radio"'+ifCanEditorthis+' class="jz_isconnectwithowner" '+selectNo+' name="jz_isconnectwithowner" value="否" title="否">'
                uploadJson[key] =dataInfo[key]
                titleName="是否与业务主交接";
                break;
            case "jzPropertyname":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input placeholder="请输入" style="'+ifthisshoworHide+'"  '+ifCanEditorthis+' value="'+dataInfo[key]+'"id="'+key+'" lay-verify="required" class="layui-input submitInput" />'
                uploadJson[key] =dataInfo[key]
                titleName="接维物业名称";
                break;
            case "jzOwnercontactinfo":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input placeholder="请输入" style="'+ifthisshoworHide+'" onmouseover="this.title=this.value"   '+ifCanEditorthis+' value="'+dataInfo[key]+'" id="'+key+'" lay-verify="required|phone"  class="layui-input submitInput"  />'
                uploadJson[key] =dataInfo[key]
                titleName="业务主联系方式";
                break;
            case "jzCode":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input placeholder="请输入" style="'+ifthisshoworHide+'" onmouseover="this.title=this.value"  '+ifCanEditorthis+' value="'+dataInfo[key]+'" id="'+key+'" lay-verify="required" class="layui-input submitInput" />'
                uploadJson[key] =dataInfo[key]
                titleName="基站号";
                break;
            case "jzName":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input placeholder="请输入" style="'+ifthisshoworHide+'" onmouseover="this.title=this.value"  '+ifCanEditorthis+' value="'+dataInfo[key]+'" id="'+key+'" lay-verify="required" class="layui-input submitInput" />'
                uploadJson[key] =dataInfo[key]
                titleName="基站名";
                break;
            case "jzRequire":
                if(dataInfo[key]==""){
                       return false;
                }
                else{
                    staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                        '<input placeholder="请输入" style="'+ifthisshoworHide+'" onmouseover="this.title=this.value"  '+ifCanEditorthis+' value="'+dataInfo[key]+'"id="'+key+'" lay-verify="required" class="layui-input submitInput" />'
                    uploadJson[key] =dataInfo[key]
                    titleName="需求号";

                }
                break;
            case "projectCode":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input placeholder="请输入" style="'+ifthisshoworHide+'" onmouseover="this.title=this.value"  '+ifCanEditorthis+' value="'+dataInfo[key]+'"id="'+key+'" lay-verify="required" class="layui-input submitInput" />'
                uploadJson[key] =dataInfo[key]
                titleName="项目编号";
                break;
            case "businessLine":
                var staticAutoelement=''
                var staticAutospan = ''
                util.ajax({
                    url:util.interfaceUrl+ interfacenName.getDic +'/'+ "JZ_YWX",
                    type:"get",
                    dataType:"json",
                    data:{type:'JZ_YWX'},
                    async:false,
                    success:function (res) {
                        if(res.code==200) {
                            var  selectInfodata =  res.data
                            for(let i=0;i<selectInfodata.length;i++){
                                var ifSelecttmaintain = selectInfodata[i].value == dataInfo[key]?'selected':'';
                                staticAutoelement +='<option '+ifSelecttmaintain+' value="'+selectInfodata[i].value+'">'+selectInfodata[i].name+'</option>';
                                if(selectInfodata[i].value == dataInfo[key]){
                                    staticAutospan = '<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(selectInfodata[i].name,20,true)+'</span>'
                                }
                            }
                        }
                        else {
                            layer.msg("业务线获取失败")
                        }
                    },
                    error:function () {
                        layer.msg('获取业务线失败')
                    }
                });
                staticElement= staticAutospan+ '<select   '+ifCanEditorthis+' style="'+ifthisshoworHide+'" id="businessLineDeal" id="'+key+'" lay-verify="required">' + staticAutoelement+ '</select>'
                uploadJson[key] =dataInfo[key]
                titleName="业务线";
                break;
            case "jzLatitude":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input onmouseover="this.title=this.value" style="'+ifthisshoworHide+'"  '+ifCanEditorthis+' value="'+dataInfo[key]+'"id="'+key+'" lay-verify="latitude" class="layui-input submitInput" />'
                uploadJson[key] =dataInfo[key]
                titleName="纬度";
                break;
            case "jzLongitude":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input onmouseover="this.title=this.value" style="'+ifthisshoworHide+'"  '+ifCanEditorthis+' value="'+dataInfo[key]+'"id="'+key+'" lay-verify="longitude" class="layui-input submitInput" />'
                uploadJson[key] =dataInfo[key]
                titleName="经度";
                break;
            case "projectAddress":
                staticElement='<span class="span_dealwith" style="'+ifthisHideorShow+'">'+util.dealWithFormatTextByLen(dataInfo[key],20,true)+'</span>'+
                    '<input onmouseover="this.title=this.value" style="'+ifthisshoworHide+'"  '+ifCanEditorthis+' value="'+dataInfo[key]+'"id="'+key+'" lay-verify="required" class="layui-input submitInput" />'
                uploadJson[key] =dataInfo[key]
                titleName="基站地址";
                break;
            // case "resourcePoint":
            //     staticElement='<input  style="width: 150%" '+ifCanEditorthis+' value="'+dataInfo[key]+'" id="'+key+'" lay-verify="required" class="layui-input submitInput" />'
            //     uploadJson[key] =dataInfo[key]
            //     titleName="资源点";
            //     break;
            // case "resourcePointewm":
            //     staticElement='<input  style="width: 150%" '+ifCanEditorthis+' value="'+dataInfo[key]+'" id="'+key+'" lay-verify="required"  class="layui-input submitInput" />'
            //     uploadJson[key] =dataInfo[key]
            //     titleName="资源点标签二维码";
            //     break;
            case "changeSalesman":
                var resultperosn = '';
                var spantoperson = '';
                getUser(dataInfo[key]);

                getUserName(dataInfo[key],function(rs){

                    $("#"+key+"").text(rs)
                });

                $("#changeSalesman").text()

                $("#"+key+"").text($('#businessAll').text())

                uploadJson[key] = dataInfo[key];
                staticElement=spantoperson+'<select '+ifCanEditorthis+'  id="businessAll" style="'+ifthisshoworHide+'" name="businessAll" required="" lay-verify="required" autocomplete="off" class="layui-select">'+resultperosn+' </select>';
                titleName="更换阶段负责人为";

                break;
            case "oldSalesman":
                console.log(key)
                // var userName = "wu";
                 getUserName(dataInfo[key],function(rs){
                    // console.log('qweqweqweqwe',rs)
                    // userName = rs;
                     $("#"+key+"").text(rs)
                });
                // staticElement='<input  disabled  id="'+key+'" class="layui-input"/>'
                staticElement='<span class="span_dealwith" id="'+key+'" style="display:inline">'+'</span>'
                uploadJson[key] =dataInfo[key];
                titleName="原阶段负责人";

                break;
            default:
                uploadJson[key] = dataInfo[key];
                flagtoFind = false;
                break;

        }

        if (key !== 'msgRemarks' && key!== 'submitMsg' &&flagtoFind){
        let title = '<label style="white-space: nowrap;min-width: 120px;padding: 16px 15px;margin: 8px 0px" class="layui-form-label"><span class="x-red">'+ifHaveredStar+'</span>'+ titleName+ ':</label>'
        let StaticinfoDiv = '<div class="layui-form-item"  style="margin-bottom: 5px;display: inline-block"><div class="layui-inline controllstyle" style="text-align: start;white-space: nowrap;line-height: 37px;margin-bottom: 0">' +
            title + '<div class="layui-input-inline " style="white-space: nowrap;width: 278px;margin-top: 4.6px">' + staticElement + '</div>'
        '</div></div>';
        $('#StaticElementinfo').append(StaticinfoDiv);
        }
       let upload = layui.upload
        var form = layui.form;
        upload.render({
            elem:'#upload_'+key
            , url: util.interfaceUrl+ interfacenName.fileUpload
            , accept: "file"
            , size: 102400
            ,headers:{
                'Authorization': util.authorization? util.authorization: '',
            },
            before: function (){
                $("#href_"+key).removeAttr('href');
                $("#href_"+key).html('<span style="color: #000000">正在上传...<i class="layui-icon layui-icon-loading layui-icon layui-anim layui-anim-rotate layui-anim-loop"></i></span>')
                let businessIdUpload=decodeURI(window.location.href.split('jzBusinessKey=')[1].split('&&')[0]);
                this.data = {
                    businessId: businessIdUpload,
                }
            },

            done:function(res) {
                if(res.code==200){
                    layer.msg("上传成功")
                    let tempJson={};
                    tempJson[key+'Name']=res.data.fileName;
                    tempJson[key+'Path']=res.data.filePath;
                    uploadJson[key] =tempJson
                    var DownFileName = res.data.fileName
                    var DownFilePath = res.data.filePath;
                    $("#href_"+key).attr("href",util.interfaceUrl+interfacenName.fileDown+'?fileName='+DownFileName+'&filePath='+DownFilePath)
                    $("#href_"+key).html(util.dealWithFormatTextByLen(res.data.fileName,15,true));
                }
                else{
                    layer.msg("上传失败")
                }

            }
        })


    }
    // subStatic.Json = function () {
    //     for (let key in dataInfo) {
    //         uploadJson[key] = $("#" + dataInfo[key]).val();
    //
    //     }
    // }
    function getUser(userId){

        // console.log("获取全部用户",userId)

        util.ajax({
            type: "get",
            url: util.interfaceUrl+interfacenName.getUser,
            async: false,
            success: (res) => {
                // console.log(res);
                // console.log(res.data)
                // 判断是否成功,成功返回templateId
                if (res.code === 200) {
                    addOption(res.data,userId);

                    // form.render()
                    console.log("成功");
                } else {
                    layer.msg(res.message);
                }
            },
            error: function err(err) {
                console.log("错误信息:" + err)
            }


        });
    }
    function addOption(data,userid) {
        var optionDiv =''
        $.each(data, function (index) {
            var ifSelected = userid==data[index].businessId?'selected':''
            optionDiv += '<option value="' + data[index].businessId + '"  '+ifSelected+'>' + data[index].name + '</option>';
            if(userid == data[index].businessId){
                spantoperson = '<span id="span'+userid+'" style="'+ifthisHideorShow+'">'+data[index].name+'</span>'
            }
        });
        resultperosn =optionDiv
        // $("#businessAll").append(optionDiv);
    }

    // 获得当前业务员姓名
    function getUserName(userId,callback){

        util.ajax({
            type: "get",
            url: util.interfaceUrl+interfacenName.getUserNameById+"/"+userId,
            success: (res) => {

                if (res.code === 200) {
                    // return res.data;
                    // console.log("---->",res.data);
                    // console.log("---->",res.data.name);
                    var userName = res.data.name;
                    callback(userName)
                } else {
                    layer.msg(res.message);
                }
            },
            error: function err(err) {
                console.log("错误信息:" + err)
            }

        });

    }
}