123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- var c_hfl=[["不限行业","0"],["农、林、牧、渔业","A"],["采矿业","B"],["制造业","C"],["住宿和餐饮业","H"],["信息传输、软件和信息技术服务业","I"],["金融业","J"],["房地产业","K"],["租赁和商务服务业","L"],["科学研究和技术服务业","M"],["水利、环境和公共设施管理业","N"],["居民服务、修理和其他服务业","O"],["教育","P"],["卫生和社会工作","Q"],["文化、体育和娱乐业","R"],["公共管理、社会保障和社会组织","S"],["电力、热力、燃气及水生产和供应业","D"],["建筑业","E"],["批发和零售业","F"],["交通运输、仓储和邮政业","G"]]
- var c_zb=[["不限金额","0"],["10W以下","0-10"],["10w-100w","10-100"],["100w-1000w","100-1000"],["1000万-1亿","1000-10000"],["1亿以上","10000"]]
- var c_qfl=[["全部","0"],["股份有限公司分公司(上市、外商投资企业投资)","2211"],["普通合伙企业","4531"],["农民专业合作经济组织","9100"],["个体工商户","9600"],["有限责任公司(自然人投资或控股)","1130"]]
- new FastClick(document.body);
- var mCommunity=function(){
- return new mCommunity.prototype.init();
- };
- mCommunity.prototype={
- tabtarget:null,
- init:function(){
- return this;
- },
- initIndex:function(){
- changeSearchBorder();
- $(window).resize(function(){
- changeSearchBorder();
- });
- $("#query").keyup(function(){
- imFind(this);
- if($("#immediately").children().length>0){
- $("#immediately").show();
- }
- });
- $("#query").focus(function(){
- if($("#immediately").children().length>0){
- $("#immediately").show();
- }
- });
- $("#query").blur(function(){
- //$("#immediately").hide();
- });
- //高级搜索
- $(".searchlink").click(function(){
- n=$(".nav-bar");
- if(n.is(":visible")){
- $(".nav-bar").slideUp(200);
- $(".bottom").show();
- }else{
- $(".nav-bar").slideDown(200);
- }
-
- });
- var me=this;
- $("div.nav-bar ul.nav li").each(function(i,n){
- n=$(n);
- var target=$("#"+n.attr("id").replace("t-",""));
- target.height(window.screen.height-88);
- if(target.attr("id")=="location"){
- target.find("div").height(window.screen.height-88);
- }
- });
- //初始化筛选
- var obj=$.cxSelect.defaults.url;
- var province=$("#province ul");
- var provincetpl="<li data-id='$id'>$name</li>";
- for(var i=0;i<obj.length;i++){
- var node=provincetpl.replace("$id",obj[i].k).replace("$name",obj[i].n);
- province.append(node);
- var child=obj[i].s;
- var ulchild=$("<ul></ul>");
- ulchild.attr("id","city_"+obj[i].k);
- ulchild.append("<li></li><li data-id="+obj[i].k+">全部</li>");
- ulchild.addClass("hides");
- for(var k=0;k<child.length;k++){
- var lichild=$("<li></li>")
- lichild.text(child[k].n);
- lichild.attr("data-id",child[k].k);
- ulchild.append(lichild);
- }
- $("#city").append(ulchild);
- }
-
-
- for(var i=0;i<c_zb.length;i++){
- var li=$("<li></li>");
- li.text(c_zb[i][0]);
- li.attr("value",c_zb[i][1]);
- $("#reg ul").append(li);
- }
-
- for(var i=0;i<c_hfl.length;i++){
- var li=$("<li></li>");
- li.text(c_hfl[i][0]);
- li.attr("value",c_hfl[i][1]);
- $("#category ul").append(li);
- }
-
- //初始化监听
- $("div.nav-bar ul.nav li").click(function(n){
- n=$(n.target);
- var target=$("#"+n.attr("id").replace("t-",""));
- if(target.attr("id")!=me.tabtarget){
- if(me.tabtarget!=null){
- $("#"+me.tabtarget).hide();
- }
- me.tabtarget=target.attr("id");
- }
- if(target.is(":visible")){
- target.hide();
- $(".bottom").show();
- }else{
- target.show();
- if (target.attr("id")=="location"){
- var index=$("#province li.hover").index()-1;
- if (index>9){
- $("#province").scrollTop(index*34);
- }
- var index=$("#city li.hover").index()-1;
- if(index>9){
- $("#city").scrollTop(index*34);
- }else{
- $("#city").scrollTop(10);
- }
- }
- $(".bottom").hide();
- }
- });
- $("#city li").on("click",function(i){
- var node=$(i.target);
- $("#city li[class='hover']").attr("class","");
- node.attr("class","hover");
- $("#citys").val(node.attr("data-id"));
- $("#queryform").submit();
- });
- $("#province ul li").on("click",function(i){
- var node=$(i.target);
- if(node.text()=="全国" || node.text()==""){
- $("#citys").val("0");
- $("#queryform").submit();
- }
- $("#province ul li[class='hover']").attr("class","");
- node.attr("class","hover");
- target=$("#city #city_"+node.attr("data-id"));
- if(target.is(":hidden")){
- $("#city ul:visible").attr("class","hides");
- target.attr("class","shows");
- }
- });
- $("#category li").click(function(n){
- //这里处理行业筛选
- var node=$(n.target);
- $("#c_hfl").val(node.attr("value"));
- $("#queryform").submit();
- });
- $("#reg li").click(function(n){
- //这里处理注册资本筛选
- var node=$(n.target);
- $("#c_zb").val(node.attr("value"));
- $("#queryform").submit();
- });
- //初始化筛选状态
- var citycode=$("#citys").val();
- var c_hflx=$("#c_hfl").val();
- var c_zbx=$("#c_zb").val();
- $("#category li[value="+c_hflx+"]").css("background","#FFF");
- $("#reg li[value="+c_zbx+"]").css("background","#FFF");
- if(citycode=="0" || citycode==""){
- $("#province li[data-id="+citycode+"]").addClass("hover");
- }else{
- var p=$("#province li[data-id="+citycode.substr(0,2)+"]");
- if(p){
- p.addClass("hover");
- $("#city li[data-id="+citycode+"]").parent().addClass("shows");
- $("#city li[data-id="+citycode+"]").addClass("hover");
- }
- }
- return this;
- },
- initmemer:function(){
- if(typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0){
- var staffinfos1 = [],staffinfos2 = [],staffinfos3 = [],staffinfos4 = [];
- for(var i=0;i<staffinfo.length;i++){
- switch(staffinfo[i].Position){
- case "410A":
- case "410B":
- case "410C":
- case "431A":
- case "431B":
- staffinfos1.push(staffinfo[i]);
- break;
- case "432A":
- case "432K":
- staffinfos2.push(staffinfo[i]);
- break;
- case "434Q":
- case "434R":
- case "436A":
- staffinfos3.push(staffinfo[i]);
- break;
- default:
- staffinfos4.push(staffinfo[i]);
- break;
- }
- }
- staffinfos1.sort(function(a,b){return a.Position-b.Position});
- staffinfos2.sort(function(a,b){return a.Position-b.Position});
- staffinfos3.sort(function(a,b){return a.Position-b.Position});
- staffinfos4.sort(function(a,b){return a.Position-b.Position});
- var hm = '<div class="ent-mainpersons">';
- //计算出一行可以放几个
- var maxCout = parseInt($(".ent-tab-content").width() / (207+20));
- var verticalFlag = false;
- var appendStaffinfo = function(obj,index){
- var tmp = 0;
- for(var i=0;i<obj.length;i++){
- var positionName = obj[i].PositionName;
- if(typeof(positionName) == "undefined" || positionName == null || positionName == ""){
- positionName = "监事";
- }
- tmp++;
- if(i==0){
- hm+='<div class="staffinfo-level-'+index+'">';
- if(verticalFlag){
- hm+='<a class="staffinfo-vertical"></a>';
- }
- }
- verticalFlag = true;
- hm+='<div><img src="'+cdn+'/images/entcommunity/mainperson'+index+'.png">'
- +'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+positionName+'</font></span></div>';
- if (i%2==0){
- hm+="<div class='sp'> </div>";
- }
- //竖线
- if(tmp == maxCout && i != obj.length-1){
- hm+='<a class="staffinfo-vertical"></a>';
- }
- //横线
- if(i != obj.length-1){
- if(tmp <= maxCout-1){
- hm+='<a class="staffinfo-horizontal"></a>';
- }else{
- tmp = 0;
- }
- }
- if(i==obj.length-1){
- hm+='</div>';
- }
- }
- }
- appendStaffinfo(staffinfos1,1);
- appendStaffinfo(staffinfos2,2);
- appendStaffinfo(staffinfos3,3);
- appendStaffinfo(staffinfos4,4);
- hm+='</div>';
- $(".ent-mainperson").html(hm);
- for(var i=0;i<5;i++){
- var node=$(".staffinfo-level-"+i).children().last();
- var node1=$(".staffinfo-level-"+i).children().first();
- if(node.attr("class")=="sp"){
- node.remove();
- }
- node1.css("margin-bottom","-5px");
- }
- }
- else{
- $(".memberinfo").show();
- }
- }
- }
- mCommunity.prototype.init.prototype = mCommunity.prototype;
- function changeSearchBorder(){
- var width=$("#query").css("width");
- width=width.substr(0,width.indexOf("p"))-45+"px";
- $("#immediately").css("width",width);
- $("#immediately").css("margin-left",$("#query").offset().left);
- }
- function viewcontent(n){
- var node=$(n);
- $(".modal-backdrop").show();
- $(".creditrules").show();
- var p=node.parent().find("div").text();
- p=p.replace(new RegExp(/(变)/g),'<br/>变');
- p=p.replace(new RegExp(/(;)/g),';<br/>');
- $(".creditrules .content").html(p);
- }
- hasLoadPagingJs=false
- //失信信息
- function DishonestyPaging(){
- this.initDishonesty = function(){
- var paging = new Paging("dishonestyListPaging","/front/getDishonesty",{legcerNo:legcerNo},dishonesty.pageSize,function(r){
- var html = '';
- for(var i=0;i<r.length;i++){
- html += '<tr><td>'
- +'<div style="height:10px;"></div>'
- +'<div class="b-com-first">'+r[i].iname+'</div>'
- +'<div class="b-com-second"><span>案号:'+r[i].case_code+'</span> <span>法院:'+r[i].court_name+'</span>'+'</div>'
- +'<div class="b-com-third">'
- +'<span>状态:'+r[i].performance+'</span>'
- +'<span>立案日期:'+new Date(Number(r[i].l_date+"000")).Format("yyyy-MM-dd")+'</span>'
- +'</div>'
- +'</td></tr>';;
- }
- $("#dishonestyListPaging").append(html);
- },dishonesty);
- paging.firstPageDatas = null;
- }
- if(hasLoadPagingJs){
- this.initDishonesty();
- }else{
- var thisClass = this;
- loadJS(cdn+"/js/paging.js",function(){
- hasLoadPagingJs = true;
- thisClass.initDishonesty();
- });
- }
- }
- var identWayFlag = true;
- var isLogined=true;
- var relationFlag=false;
- //加载关系网
- function initRelation(){
- $.ajax({
- url: "/member/getRelation",
- method: "post",
- data: {regNo:regNo,entName:entName},
- success: function(r){
- console.log(r);
- if(!r || !r.flag || !r.relation || !r.relation.links || r.relation.links.length == 0 || !r.relation.nodes || r.relation.nodes.length <= 1){
-
- }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,true);
- relationEntity.init();
- });
- });
- });
- });
- }
- },
- error: function(){
- $("div[data-id=c_relation]").addClass("disabled");
- }
- });
- }
|