wangchuanjin 9 rokov pred
rodič
commit
5ae9011d81

+ 12 - 1
core/src/qfw/search/searchService.go

@@ -502,13 +502,24 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 
 			EntName, _ := res[i]["EntName"].(string)
 			tmpNo := res[i]["EntType"]
+			res[i]["RegCapEntType"] = tmpNo
 			if tmpNo != nil {
 				switch tmpNo.(string) {
 				case "4500", "6800", "6810", "6820", "7100", "7110", "7120", "7130", "7190", "9200", "6840", "2100", "2110", "2120", "2121", "2122", "2123", "2130", "2140", "2150", "2151", "2152", "2190", "2200", "2210", "2211", "2212", "2213", "2219", "2220", "2221", "2222", "2223", "2229", "4000", "4300", "4310", "4320", "4330", "4340", "4550", "4551", "4552", "4553", "4560", "5800", "5810", "5820":
 					res[i]["EntType"] = "5810"
 				}
 			}
-
+			//处理分公司
+			if res[i]["RegCapEntType"] != nil && res[i]["RegCapEntType"].(string) != "" {
+				RegCapEntType := res[i]["RegCapEntType"].(string)
+				if RegCapEntType == "5810" || RegCapEntType == "6810" || RegCapEntType == "7310" || RegCapEntType == "3200" || RegCapEntType == "3100" {
+					res[i]["RegCapEntType"] = "5810"
+				} else if len(RegCapEntType) > 1 {
+					if RegCapEntType[:1] == "2" {
+						res[i]["RegCapEntType"] = "5810"
+					}
+				}
+			}
 			entlerp, _ := res[i]["LeRep"].(string)
 			tmpentno, _ := res[i]["RegNo"].(string)
 			if len(keyword) < 1 {

+ 10 - 7
core/src/qfw/yellowpage/yellowpagemanager.go

@@ -83,14 +83,17 @@ func GetEntInfo(id string) interface{} {
 		if OpFrom != nil {
 			(*res)["EstDate"] = FormatDate(&EstDate)
 		}
-		EntType, _ := (*res)["EntType"].(string)
-		//处理分公司
-		if EntType != "" {
-			if EntType == "5810" || EntType == "6810" || EntType == "7310" || EntType == "3200" || EntType == "3100" {
-				(*res)["EntType"] = "5810"
-			} else if len(EntType) > 1 {
-				if EntType[:1] == "2" {
+		var EntType string
+		if (*res)["EntType"] != nil && (*res)["EntType"].(string) != "" {
+			EntType = (*res)["EntType"].(string)
+			//处理分公司
+			if EntType != "" {
+				if EntType == "5810" || EntType == "6810" || EntType == "7310" || EntType == "3200" || EntType == "3100" {
 					(*res)["EntType"] = "5810"
+				} else if len(EntType) > 1 {
+					if EntType[:1] == "2" {
+						(*res)["EntType"] = "5810"
+					}
 				}
 			}
 		}

+ 2 - 1
core/src/web/staticres/css/entcommunity.css

@@ -116,7 +116,8 @@ a:focus, a:hover{
 	color: #16a086;
 }
 .entinfo-page .b-com-head .b-com-title{
-	font-size: 18px;
+	font-size: 20px;
+	color: #405e51;
 	font-weight: bold;
 	margin-right: 5px;
 }

+ 5 - 3
core/src/web/staticres/js/entportrait.js

@@ -4,7 +4,7 @@ var serviceList = null;
 //解析服务列表
 $(function(){
 	//联系地址
-	if(address){
+	if($address){
 		loadJS("/js/jquery.cxselect.js",function(){
 			$('#city_china').cxSelect({
 				selects: ['province', 'city', 'area'],
@@ -72,22 +72,24 @@ function b_afterLogin(flag){
 //加载关系网
 function initRelation(){
 	if(isLogined){
+		$(".entrelation").height(500);
 		$.post("/member/getRelation",{regNo:regNo,entName:entName},function(r){
 			if(r.flag == false){
 				$("#entrelation-nologin").addClass("hide");
 				$("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
 				$("#entrelation-infovis").hide();
+				$(".entrelation").css("height","auto");
 			}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)){
 				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
 				relation = "";
 				$("#entrelation-infovis").hide();
 				$("#entrelation-findnull").removeClass("hide");
+				$(".entrelation").css("height","auto");
 			}else{
+				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
 				loadJS("/js/d3.v3.min.js",function(){
 					loadJS("/js/geometry.js",function(){
 						loadJS("/js/relation.js",function(){
-							$("#entrelation-limit,#entrelation-nologin").addClass("hide");
-							$(".entrelation").height(500);
 							relation = new Relation(legcerNo,regNo,r.relation);
 							relation.init();
 						});

+ 1 - 1
core/src/web/staticres/js/relation.js

@@ -110,7 +110,7 @@ Relation.prototype.dataProcess = function(){
 			if(text.length > 2){//小于两个字符不生效
 				nodeObj.shortText = text;
 			}
-			if(nodeObj.name == this.regno){//先找本企业位置
+			if(nodeObj.name == this.regNo){//先找本企业位置
 				this.index = i;
 				nodeObj["regcap"] = (typeof(d1) == "undefined")?0:d1;
 				nodeObj["legcerno"] = this.legcerNo;

+ 1 - 1
core/src/web/templates/search/enterpriseList.html

@@ -114,7 +114,7 @@
 											{{end}}
 										{{end}}
 										{{if index $v "RegCap"}}
-											{{if and (ne $v.EntType "9600") (ne $v.EntType "5810")}}
+											{{if and (ne $v.RegCapEntType "9600") (ne $v.RegCapEntType "5810")}}
 												<span class="margin-l-15"><font class="b-disabled">注册资本:</font><font  class="lineb " ><script>var d1={{$v.RegCap}};d1=d1?d1:0; var lenD1=(d1+"").length ;if(lenD1>4&&(d1+"").indexOf(".")>-1&&(lenD1-(d1+"").indexOf("."))>4){document.write(d1.toFixed(4))}else{document.write(d1)}</script>万元</font></span>
 											{{end}}
 										{{end}}

+ 2 - 2
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -407,9 +407,9 @@ var province = {{.T.res.i_province}};
 var city = {{.T.res.i_city}};
 var area = {{.T.res.i_area}};
 var as1="{{.T.res.s_address}}";
-var address=false,$listent=false;
+var $address=false,$listent=false;
 {{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address}}
-	address = true;
+	$address = true;
 {{else if .T.res.Dom}}
 	initMap();
 {{end}}