var entType = "企业"; var relationEntity = null; var copyrightEntity = null; //var servicePaging = null; //var dishonestyPaging = null; var hasLoadPagingJs = false; var relationFlag = false; var identWayFlag = false; //解析服务列表 $(function(){ $(".ent-tab-content.b-left").css("min-height",$(".b-right").height()); //失信信息如果没有数据,选项卡不可点 if(dishonesty.count > 0){ DishonestyPaging(); } //企业黄页如果没有数据,选项卡不可点 if(service.count > 0){ ServicePaging(); } //主要人员 if(typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0){ 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"); } //联系地址 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(); }else if($(this).index() == 3 && copyrightEntity == null){ //加载服务列表 copyrightEntity = new CopyrightEntity(); }/*else if($(this).index() == 4 && dishonestyPaging == null){ //加载服务列表 dishonestyPaging = new DishonestyPaging(); }else if($(this).index() == 5 && 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; } relationFlag = flag && identWayFlag && (relation == null || typeof(relation) == "undefined" || typeof(relation.links) == "undefined" || relation.links == null || relation.links.length == 0 || typeof(relation.nodes) == "undefined" || relation.nodes == null || relation.nodes.length <= 1); 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"); $(".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,relation); relationEntity.init(); }); }); }); }); } }else{ $("#entrelation-nologin").addClass("hide"); $("#entrelation-limit,#entrelation-noauthe").removeClass("hide"); $("#entrelation-infovis").hide(); } /*$.ajax({ url: "/member/getRelation", method: "post", data: {regNo:regNo,entName:entName}, success: function(r){ if(r.flag == false){ $("#entrelation-nologin").addClass("hide"); $("#entrelation-limit,#entrelation-noauthe").removeClass("hide"); $("#entrelation-infovis").hide(); }else if(r.flag == true && (r == null || typeof(r) == "undefined" || typeof(r.relation.links) == "undefined" || r.relation.links.length == 0 || typeof(r.relation.nodes) == "undefined" || r.relation.nodes.length <= 1)){ relationNoData(); }else if(r.flag == true){ $("#entrelation-limit,#entrelation-nologin").addClass("hide"); $(".entrelation").height(500); loadJS("/js/d3.v3.min.js",function(){ loadJS("/js/geometry.js",function(){ loadJS("/js/relation.js",function(){ relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation); relationEntity.init(); }); }); }); }else{ relationNoData(); } }, error: function(){ relationNoData(); } });*/ }else{ $("#entrelation-limit,#entrelation-nologin").removeClass("hide"); } } function CopyrightEntity(){ //著作权 if(typeof(copyright) != "undefined" && copyright != null){ loadJS(cdn+"/js/frontpaging.js",function(){ var workCopyRight = copyright.WorkCopyRight; if(typeof(workCopyRight) != "undefined" && workCopyRight != null){ 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); }); } var computerSoftCopyRight = copyright.ComputerSoftCopyRight; if(typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null){ 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); }); } var patent = copyright.Patent; if(typeof(patent) != "undefined" && patent != null){ 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(); }); } }