wangshan 8 lat temu
rodzic
commit
b8bca2688e

+ 28 - 36
src/jfw/front/entsearch.go

@@ -66,7 +66,6 @@ func (e *Entsearch) Bidsearchforentindex() error {
 				v["area"] = ""
 			}
 			t1 := time.Unix(util.Int64All(v["publishtime"]), 0)
-			//v["timetemp"] = fmt.Sprint(util.Int64All(v["publishtime"]))
 			v["time1"] = util.TimeDiff(t1)
 			if v["jgtime"] != "" && v["jgtime"] != nil {
 				t2 := time.Unix(util.Int64All(v["jgtime"]), 0)
@@ -212,7 +211,6 @@ func (e *Entsearch) PcSearchZbqyAjax() error {
 		})
 	} else {
 		if area == "" && minprice == 0 && maxprice == 0 {
-			log.Println("----2222222222", currentPage)
 			data := redis.Get("other", "index_bidentlist").([]interface{})
 			e.ServeJson(map[string]interface{}{
 				"list": data[currentPage-1],
@@ -306,42 +304,36 @@ func (e *Entsearch) Bidsearchforent() error {
 		list := []map[string]interface{}{}
 		list = jylabutil.GetProjectByEntName(searchvalue, area, minprice, maxprice, 1, 50)
 		//jyutil.BidListConvert("", &list)
-
-		for k, v := range list {
-			v["k"] = k + 1
-			if v["area"] == "A" {
-				v["area"] = "全国"
-			}
-			t1 := time.Unix(util.Int64All(v["publishtime"]), 0)
-			//v["timetemp"] = fmt.Sprint(util.Int64All(v["publishtime"]))
-			v["time1"] = util.TimeDiff(t1)
-			if v["jgtime"] != "" && v["jgtime"] != nil {
-				t2 := time.Unix(util.Int64All(v["jgtime"]), 0)
-				timeStr := t2.Format("2006-01-02")
-				v["time2"] = timeStr
-			} else {
-				v["time2"] = ""
-			}
-			if v["bidamount"] != nil {
-				v["bidamount"] = fmt.Sprintf("%.2f", v["bidamount"])
-			}
-			itemList := v["list"].([]interface{})
-			var subtypeid string
-			var bidstatusid string
-			for _, j := range itemList {
-				z := j.(map[string]interface{})
-				if z["subtype"] == "中标" || z["subtype"] == "成交" {
-					subtypeid = util.EncodeArticleId2ByCheck(util.ObjToString(z["infoid"]))
-				} else if z["bidstatus"] == "中标" || z["bidstatus"] == "成交" {
-					bidstatusid = util.EncodeArticleId2ByCheck(util.ObjToString(z["infoid"]))
+		if len(list) > 0 {
+			for _, v := range list {
+				v["_id"] = util.DecodeArticleId2ByCheck(util.ObjToString(v["_id"]))
+				//				if v["jgtime"] != "" && v["jgtime"] != nil {
+				//					v["jgtime"] = util.FormatDateWithObj(v["jgtime"], util.Date_Short_Layout)
+				//				} else {
+				//					v["jgtime"] = ""
+				//				}
+				//				if v["bidamount"] != nil {
+				//					v["bidamount"] = fmt.Sprintf("%.2f", v["bidamount"]/10000)
+				//				}
+				itemList := v["list"].([]interface{})
+				var subtypeid string
+				var bidstatusid string
+				for _, j := range itemList {
+					z := j.(map[string]interface{})
+					if z["subtype"] == "中标" || z["subtype"] == "成交" {
+						subtypeid = util.EncodeArticleId2ByCheck(util.ObjToString(z["infoid"]))
+					} else if z["bidstatus"] == "中标" || z["bidstatus"] == "成交" {
+						bidstatusid = util.EncodeArticleId2ByCheck(util.ObjToString(z["infoid"]))
+					}
+					v["linkid"] = util.EncodeArticleId2ByCheck(util.ObjToString(z["infoid"]))
+				}
+				if subtypeid != "" {
+					v["linkid"] = util.DecodeArticleId2ByCheck(subtypeid)
+				} else if bidstatusid != "" {
+					v["linkid"] = util.DecodeArticleId2ByCheck(bidstatusid)
 				}
-				v["linkid"] = util.EncodeArticleId2ByCheck(util.ObjToString(z["infoid"]))
-			}
-			if subtypeid != "" {
-				v["linkid"] = subtypeid
-			} else if bidstatusid != "" {
-				v["linkid"] = bidstatusid
 			}
+
 		}
 		e.T["list"] = list
 	} else {

+ 1 - 1
src/web/staticres/css/dev2/superSearch.css

@@ -48,7 +48,7 @@
 	width:63px;
 }
 .lucene-table tbody>tr>td:nth-child(9) div{
-	width:88px;
+	width:90px;
 }
 .com-highlight{
 	color: #2cb7ca;

+ 3 - 12
src/web/staticres/js/proproject.js

@@ -183,7 +183,7 @@ function appendDatas(datas){
 			}
 		}
 		listHtml += '</div></li>';
-		tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank">'
+		tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" target="_blank">'
 				+'<td><div>'+index+'</div></td>'
 		//
 		var proinfo = datas[i].projectinfo;
@@ -241,22 +241,13 @@ function layerClose(){
 //
 function noIn(p){
 	var thisId = $(p).attr("dataId");
-	var dataindustry = $(p).attr("dataindustry");
 	dataId = thisId;
 	if(loginflag){
 		var aHref = "";
 		if(searchvalue != ""){
-			if(dataindustry!=""&&dataindustry!="undefined"){
-				aHref += '.html?kds='+searchvalue+'&industry='+dataindustry;
-			}else{
-				aHref += '.html?kds='+searchvalue;
-			}
+			aHref += '.html?kds='+searchvalue;
 		}else{
-			if(dataindustry!=""&&dataindustry!="undefined"){
-				aHref += '.html?industry='+dataindustry;
-			}else{
-				aHref += '.html';
-			}
+			aHref += '.html';
 		}
 		window.open("/article/content/"+thisId+aHref);
 	}else{

+ 2 - 2
src/web/staticres/js/superSearch.js

@@ -432,13 +432,13 @@ function noIn(p){
 	if(loginflag){
 		var aHref = "";
 		if(searchvalue != ""){
-			if(dataindustry!=""&&dataindustry!="undefined"){
+			if(dataindustry!=""&&dataindustry!=undefined){
 				aHref += '.html?kds='+searchvalue+'&industry='+dataindustry;
 			}else{
 				aHref += '.html?kds='+searchvalue;
 			}
 		}else{
-			if(dataindustry!=""&&dataindustry!="undefined"){
+			if(dataindustry!=""&&dataindustry!=undefined){
 				aHref += '.html?industry='+dataindustry;
 			}else{
 				aHref += '.html';

+ 33 - 6
src/web/templates/pc/biddingsearch_enterprise.html

@@ -221,6 +221,9 @@
 			.j-clearicon {
 			    right: 118px !important;
 			}
+			.lucene-table tr{
+				cursor: pointer;
+			}
 		</style>
 	</head>
 
@@ -954,8 +957,8 @@
 					}
 				}else{
 					$(".tabTitle").removeClass("hidden");
-					$(".lucene").attr("style","display:block");
-					$(".lucene-table").attr("style","display:none");
+					//$(".lucene").attr("style","display:block");
+					//$(".lucene-table").attr("style","display:none");
 					$(".wx-inner-title").html("扫码关注剑鱼招标订阅");
 					$(".wx-inner-bottom").html("微信扫一扫<br>随时随地掌握招标信息");
                     currentPage = 1;
@@ -995,7 +998,6 @@
 		}
         //currentPage = parseInt($(".pagination-inner").find("span").text())+parseInt(1)
         if(currentPage==10){
-			console.log(currentPage+"---------")
             $(".nbnext").addClass("disabled");
         }else if(currentPage==2){
             $(".nbprev").removeClass("disabled");
@@ -1173,7 +1175,32 @@
 				}
 					tableHtml+='</tr>'
 			}else{
-				 formItem += '<tr><td>'+index+'</td><td>'+datas[i].time2+'</td><td class="tt-l"><a href="/article/content/'+datas[i]._id+'.html">'+datas[i].projectname+'</a></td><td class="tt-r">'+datas[i].bidamount+'</td></tr>'
+				 formItem += '<tr onclick="noIn(this)" dataid="'+datas[i].linkid+'">'+
+							'<td>'+index+'</td>'
+				//
+				if(typeof(datas[i].jgtime) != "undefined" && datas[i].jgtime != null && datas[i].jgtime != ""){
+					var diff = formatDate(Number(datas[i].jgtime),"s");
+					if(diff != null){
+						formItem += '<td>'+diff+'</td>';
+					}else{
+						formItem += '<td></td>';
+					}
+				}else{
+					formItem += '<td></td>';
+				}
+				formItem +='<td class="tt-l">'+datas[i].projectname+'</td>'
+				//
+				if(typeof(datas[i].bidamount) != "undefined" && datas[i].bidamount != null && datas[i].bidamount != ""){
+					var bidamount = datas[i].bidamount/10000;
+					if(diff != null){
+						formItem += '<td class="tt-r">'+bidamount+'</td>';
+					}else{
+						formItem += '<td></td>';
+					}
+				}else{
+					formItem += '<td></td>';
+				}
+				formItem +='</tr>'
 			}
 		}
 		listItem += '</ul>';
@@ -1224,13 +1251,13 @@
 		if(loginflag){
 			var aHref = "";
 			if(searchvalue != ""){
-				if(dataindustry!=""&&dataindustry!="undefined"){
+				if(dataindustry!=""&&dataindustry!=undefined){
 					aHref += '.html?kds='+searchvalue+'&industry='+dataindustry;
 				}else{
 					aHref += '.html?kds='+searchvalue;
 				}
 			}else{
-				if(dataindustry!=""&&dataindustry!="undefined"){
+				if(dataindustry!=""&&dataindustry!=undefined){
 					aHref += '.html?industry='+dataindustry;
 				}else{
 					aHref += '.html';