var entType = "企业"; var relationEntity = null;//关系网 var copyrightEntity = null;//著作权 var servicePaging = null;//服务列表 var staffinfoEntity = null;//主要人员 var dishonestyPaging = null;//失信 var hasLoadPagingJs = false;//是否已经加载过js var identWayFlag = false;//认证状态 var relationFlag = false; var staffinfoFlag = false; /**************著作权**************/ var copyrightFlag = false; //作品 var workCopyRight = null; var workCopyRightFlag = false; //软件 var computerSoftCopyRight = null; var computerSoftCopyRightFlag = false; //专利 var patent = null; var patentFlag = false; //解析服务列表 $(function(){ staffinfoFlag = typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0; copyrightFlag = typeof(copyright) != "undefined" && copyright != null; if(copyrightFlag){ //作品 workCopyRight = copyright.WorkCopyRight; workCopyRightFlag = typeof(workCopyRight) != "undefined" && workCopyRight != null; //软件 computerSoftCopyRight = copyright.ComputerSoftCopyRight; computerSoftCopyRightFlag = typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null; //专利 patent = copyright.Patent; patentFlag = typeof(patent) != "undefined" && patent != null; } if($(".b-right").height() >= 500){ $(".ent-tab-content.b-left").css("min-height",$(".b-right").height()); } //显示著作权数量 if(copyrightFlag){ var copyrightCount = 0; if(workCopyRightFlag){ copyrightCount += workCopyRight.length; } if(computerSoftCopyRightFlag){ copyrightCount += computerSoftCopyRight.length; } if(patentFlag){ copyrightCount += patent.length; } $("#ent-tab-copyright").text(copyrightCount); }else{ $("#ent-tab-copyright").addClass("disabled"); } //显示失信数量 if(dishonesty.count > 0){ $("#ent-tab-dishonesty").text(dishonesty.count); }else{ $("#ent-tab-dishonesty").addClass("disabled"); } //显示变更数量 if(staffinfoFlag){ $("#ent-tab-staffinfo").text(staffinfo.length); }else{ $("#ent-tab-staffinfo").addClass("disabled"); } //联系地址 if($address){ loadJS(cdn+"/js/jquery.cxselect.js",function(){ $('#city_china').cxSelect({ selects: ['province', 'city', 'area'], required:0 }); $.cxSelect.setVal(province,city,area); var pt=province?($("#provincesel option[value="+province+"]").text()):""; var ct=city?($("#citysel option[value="+city+"]").text()):""; var at=area?($("#areasel option[value="+area+"]").text()):""; //设置地图上显示的位置 $("#location").attr("value",as1); $("#cityname").attr("value",pt.trim()+ct.trim()+at.trim()); initMap(); $("#city_china").text(pt+ct+at+as1); }); } //隐藏地图 $("#fade").click(closeMap); //分享 $(".entinfo-share").click(function(){ $(".bdsharebuttonbox").show(); }); //切换 $(".ent-tab>li").click(function(){ if($(this).hasClass("disabled")){ return; } var index = $(this).index(); $(".ent-tab>li").removeClass("ent-active"); $(this).addClass("ent-active"); $(".ent-tab-content>div").addClass("hide"); $(".ent-tab-content>div:eq("+$(this).index()+")").removeClass("hide"); if(index != 0){ //企业概况如果没有数据,选项卡不可点 if((!gs || typeof(gs) == "undefined" || gs == null || gs.length == 0) && (typeof(investor) == "undefined" || investor == null || investor.length == 0) && (typeof(OpScope) == "undefined" || OpScope == null || OpScope.length == 0)){ $(".ent-tab>li:eq(0)").addClass("disabled"); } } if(index != 1){ //关系网如果没有数据,选项卡不可点 if(relationFlag){ $(".ent-tab>li:eq(1)").addClass("disabled"); } } if(index == 1){ b_afterLogin(isLogined); }else if($(this).index() == 2 && staffinfoEntity == null){ //加载服务列表 staffinfoEntity = new StaffinfoEntity(); }else if($(this).index() == 3 && copyrightEntity == null){ //加载服务列表 copyrightEntity = new CopyrightEntity(); }else if($(this).index() == 5 && dishonestyPaging == null){ //加载失信列表 dishonestyPaging = new DishonestyPaging(); }else if($(this).index() == 6 && servicePaging == null){ //加载服务列表 servicePaging = new ServicePaging(); } }); pcShare(); }); function initMap(){ //获取地图的经纬度 loadJS("http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217",function(){ loadJS(cdn+"/js/geocoder.js",function(){ doOptions(); }); }); } //显示地图 function showMap(){ document.getElementById('mapshowdiv').style.display = 'block'; document.getElementById('closeshowmap').style.display = 'block'; document.getElementById('fade').style.display = 'block'; $("html,body").addClass("overflow-hidden"); } //关闭地图 function closeMap(){ document.getElementById('mapshowdiv').style.display = 'none'; document.getElementById('closeshowmap').style.display = 'none'; document.getElementById('fade').style.display = 'none'; $("html,body").removeClass("overflow-hidden"); } function b_afterLogin(flag,result){ //关系网如果没有数据,选项卡不可点 if(typeof(result) != "undefined"){ identWayFlag = result.identWay == 1; } //identWayFlag = true;//暂时把认证权限放开 relationFlag = flag && identWayFlag && !relFlag; if(!$(".ent-tab>li:eq(1)").hasClass("ent-active") && relationFlag){ $(".ent-tab>li:eq(1)").addClass("disabled"); } if($(".ent-tab>li:eq(1)").hasClass("ent-active") && relationEntity == null){ initRelation(); } } //加载关系网 function initRelation(){ if(isLogined){ /*if($("#entrelation-limit").hasClass("hide")){ $(".entrelation").height($(".ent-tab-content").height()); }*/ var relationNoData = function(){ $("#entrelation-limit,#entrelation-nologin").addClass("hide"); relationEntity = ""; $("#entrelation-infovis").hide(); $("#entrelation-findnull").removeClass("hide"); } if(identWayFlag){ if(relationFlag){ relationNoData(); }else{ $("#entrelation-limit,#entrelation-nologin").addClass("hide"); $.ajax({ url: "/member/getRelation", method: "post", data: {regNo:regNo,entName:entName}, success: function(r){ if(!r || !r.flag || !r.relation || !r.relation.links || r.relation.links.length == 0 || !r.relation.nodes || r.relation.nodes.length <= 1){ relationNoData(); }else{ $(".entrelation").height($(".ent-tab-content").height()); loadJS(cdn+"/js/d3.v3.min.js",function(){ loadJS(cdn+"/js/geometry.js",function(){ loadJS(cdn+"/js/provinceData.min.js",function(){ loadJS(cdn+"/js/relation.js",function(){ relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation,r.relation.nodes.length>15); relationEntity.init(); }); }); }); }); } }, error: function(){ relationNoData(); } }); } }else{ $("#entrelation-nologin").addClass("hide"); $("#entrelation-limit,#entrelation-noauthe").removeClass("hide"); $("#entrelation-infovis").hide(); } }else{ $("#entrelation-limit,#entrelation-nologin").removeClass("hide"); } } function StaffinfoEntity(){ //主要人员 if(staffinfoFlag){ var staffinfos1 = [],staffinfos2 = [],staffinfos3 = [],staffinfos4 = []; for(var i=0;i'; if(verticalFlag){ hm+=''; } } verticalFlag = true; hm+='
' +''+obj[i].Name+''+positionName+'
'; //竖线 if(tmp == maxCout && i != obj.length-1){ hm+=''; } //横线 if(i != obj.length-1){ if(tmp <= maxCout-1){ hm+=''; }else{ tmp = 0; } } if(i==obj.length-1){ hm+=''; } } } appendStaffinfo(staffinfos1,1); appendStaffinfo(staffinfos2,2); appendStaffinfo(staffinfos3,3); appendStaffinfo(staffinfos4,4); hm+=''; $(".ent-mainperson").html(hm); }else{ $(".ent-mainperson .ent-findnull").removeClass("hide"); } } function CopyrightEntity(){ //著作权 if(copyrightFlag){ loadJS(cdn+"/js/frontpaging.js",function(){ if(workCopyRightFlag){ $("#workCopyRightList .badge").text(workCopyRight.length); workCopyRight.sort(function(a,b){ if(a.FirstPublishDate' +'
' +'登记号:'+(r[i].RegNo?r[i].RegNo:"")+'' +'登记日期:'+(r[i].RegDate?r[i].RegDate:"")+'' +'
作品类别:'+(r[i].WorkType?r[i].WorkType:"")+'' +'创作完成日期:'+(r[i].FinishedDate?r[i].FinishedDate:"")+'' +'首次发表日期:'+(r[i].FirstPublishDate?r[i].FirstPublishDate:"")+'' +'
'; } $("#workCopyRightListPaging").parent().prevAll().remove(); $("#workCopyRightListPaging").parent().before(hm); }); } if(computerSoftCopyRightFlag){ $("#computerSoftCopyRightList .badge").text(computerSoftCopyRight.length); computerSoftCopyRight.sort(function(a,b){ if(a.FirstPublishDate' +'
' +'登记号:'+(r[i].RegNo?r[i].RegNo:"")+'' +'分类号:'+(r[i].SortNo?r[i].SortNo:"")+'' +'简称:'+(r[i].SoftSimpleName?r[i].SoftSimpleName:"")+'' +'
版本号:'+(r[i].Version?r[i].Version:"")+'' +'登记日期:'+(r[i].RegDate?r[i].RegDate:"")+'' +'首次发表日期:'+(r[i].FirstPublishDate?r[i].FirstPublishDate:"")+'' +'
'; } $("#computerSoftCopyRightListPaging").parent().prevAll().remove(); $("#computerSoftCopyRightListPaging").parent().before(hm); }); } if(patentFlag){ $("#patentList .badge").text(patent.length); patent.sort(function(a,b){ if(a.PublicDate' +'
' +'申请人:'+(r[i].ApplyPerson?r[i].ApplyPerson:"")+'' +'申请号:'+(r[i].ApplyNo?r[i].ApplyNo:"")+'' +'申请日期:'+(r[i].ApplyDate?r[i].ApplyDate.replace(/\./g,"-"):"")+'' +'
分类号:'+(r[i].IpcTypeNo?r[i].IpcTypeNo:"")+'' +'公开号:'+(r[i].PublicNo?r[i].PublicNo:"")+'' +'公开日期:'+(r[i].PublicDate?r[i].PublicDate.replace(/\./g,"-"):"")+'' +'
'; } $("#patentListPaging").parent().prevAll().remove(); $("#patentListPaging").parent().before(hm); }); } }); }else{ $("#copyright .ent-findnull").removeClass("hide"); } } //服务列表 function ServicePaging(){ this.initServiceList = function(){ var paging = new Paging("serviceListPaging","/front/findServiceByEntId",{entId:entId},service.pageSize,function(r){ if((typeof(synopsis) == "undefined" || synopsis == null || synopsis == "") && r.length == 0){ $(".ent-yellowpage .ent-findnull").removeClass("hide"); $(".ent-yellowpage .ent-layout-down").remove(); return; } $(".serviceList-layout").removeClass("hide"); var html = ''; for(var i=0;i-1; html += '' +'' +''; if(flag){ html += ''; } html += r[i].s_name; if(flag){ html += ''; } html += ''; if(flag){ html += '报价:'+(r[i].s_pricemy==1?"面议":f_price+"元")+'' +'成交:'+i_sales+'|评价:'+i_comments+''; }else{ html += '  '; } html += '' +'
'+r[i].s_introduction+'
' +''; } $("#serviceListPaging").parent().prevAll().remove(); $("#serviceListPaging").parent().before(html); $(".ent-serviceintroduction").each(function(){ var text = $(this).text(); if(text.length > 200){ text = text.substring(0,150)+"..."; } $(this).html(text); }); },service); paging.firstPageDatas = null; } if(hasLoadPagingJs){ this.initServiceList(); }else{ var thisClass = this; loadJS(cdn+"/js/paging.js",function(){ hasLoadPagingJs = true; thisClass.initServiceList(); }); } } //失信信息 function DishonestyPaging(){ this.initDishonesty = function(){ var paging = new Paging("dishonestyListPaging","/front/getDishonesty",{legcerNo:legcerNo},dishonesty.pageSize,function(r){ if(r.length == 0){ $(".ent-dishonesty .ent-findnull").removeClass("hide"); $(".ent-dishonesty .ent-layout-up").remove(); return; } var html = ''; for(var i=0;i'+r[i].iname+'' +'
案号:'+r[i].case_code+'
' +'
' +'法院:'+r[i].court_name+'' +'状态:'+r[i].performance+'' +'立案日期:'+new Date(Number(r[i].l_date+"000")).Format("yyyy-MM-dd")+'' +'
' +'';; } $("#dishonestyListPaging").parent().prevAll().remove(); $("#dishonestyListPaging").parent().before(html); },dishonesty); paging.firstPageDatas = null; } if(hasLoadPagingJs){ this.initDishonesty(); }else{ var thisClass = this; loadJS(cdn+"/js/paging.js",function(){ hasLoadPagingJs = true; thisClass.initDishonesty(); }); } }