maxiaoshan 8 年之前
父節點
當前提交
4dfc4bf057
共有 2 個文件被更改,包括 122 次插入45 次删除
  1. 4 9
      src/jfw/front/entsearch.go
  2. 118 36
      src/web/templates/pc/biddingsearch_enterprise.html

+ 4 - 9
src/jfw/front/entsearch.go

@@ -17,15 +17,14 @@ import (
 	//"sync"
 
 	"github.com/go-xweb/xweb"
+
 	//. "github.com/thinxer/go-word2vec"
 	//"gopkg.in/mgo.v2/bson"
-
 )
 
 type Entsearch struct {
 	*xweb.Action
 	bidsearchforent xweb.Mapper `xweb:"/jylab/bidsearchforent"`
-	supsearch       xweb.Mapper `xweb:"/jylab/supsearch"`
 }
 
 func init() {
@@ -36,10 +35,10 @@ func (e *Entsearch) Bidsearchforent() error {
 	log.Println("-------中标企业搜索:")
 
 	list := []map[string]interface{}{}
-	list = jylabutil.GetProjectByEntName("","",0,0,1,10)
-	jyutil.BidListConvert("",&list)
+	list = jylabutil.GetProjectByEntName("", "", 0, 0, 1, 10)
+	jyutil.BidListConvert("", &list)
 
-	for k,v := range list{
+	for k, v := range list {
 		v["k"] = k + 1
 		t1 := time.Unix(util.Int64All(v["createtime"]), 0)
 		v["time1"] = util.TimeDiff(t1)
@@ -55,7 +54,3 @@ func (e *Entsearch) Bidsearchforent() error {
 	e.T["list"] = list
 	return e.Render("/pc/biddingsearch_enterprise.html", &e.T)
 }
-
-func (e *Entsearch)Supsearch() error{
-	return e.Render("/pc/supsearch.html", &e.T)
-}

+ 118 - 36
src/web/templates/pc/biddingsearch_enterprise.html

@@ -1,13 +1,27 @@
-<!doctype html>
-<html lang="zh-cn">
 
+<html lang="zh-cn">
 	<head>
-		<meta charset="UTF-8" />
-		<link rel="stylesheet" type="text/css" href="/css/dev2/reset_pc.css" />
-		<link rel="stylesheet" type="text/css" href="/css/dev2/biddingSearch.css" />
-		<title>招标搜索</title>
+		<title>{{Msg "seo" "qfw.swordfishsl.title"}}</title>
+		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
+		<meta name="Keywords" content="{{Msg "seo" "qfw.swordfishsl.key"}}"/>
+		<meta name="Description" content="{{Msg "seo" "qfw.swordfishsl.description"}}"/>
+		<meta name="renderer" content="webkit">
+		<meta content="telephone=no" name="format-detection"/>
 		{{include "/common/pnc.html"}}
 		<link href="/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<link href="/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<link href="/css/dev2/biddingSearch.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<link href="/css/dev2/biddingSearch1.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<script src="/js/jquery.cookie.js"></script>
+		<script src="/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
+		<script src="/js/biddingSearch.js?v={{Msg "seo" "version"}}"></script>
+		<script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>
+		
+		<style type="text/css">
+			a{
+				text-decoration: none !important;
+			}
+		</style>
 	</head>
 
 	<body>
@@ -23,11 +37,11 @@
 					</div>
 					<!--搜索-->
 					<div class="searchInput clearfix">
-						<form action="" method="" class="clearfix">
-							<input  autocomplete="off" type="search" name="" id="search" value="" placeholder="高速公路" />
+						<form action="" method="post" id="zbSeatchT" class="clearfix" onsubmit="return true">
+							<input class="searchname" autocomplete="off" type="search" name="keywords" id="searchinput" value="" placeholder="高速公路" />
 
-							<input type="submit" value="搜索" />
-							<div class="searchSlideText">
+							<input type="button" value="搜索" />
+							<!--<div class="searchSlideText">
 								<ul>
 									<li>大连<i>万达集团</i>股份有限公司北京投资管理分公司</li>
 									<li>滁州市<i>万达集团</i>公司</li>
@@ -42,7 +56,11 @@
 									<li>大连<i>万达集团</i>股份有限公司天津共享服务分公司</li>
 									<li>大连<i>万达集团</i>股份有限公司北京投资管理分公司</li>
 								</ul>
-							</div>
+							</div>-->
+							<input type="hidden" name="searchvalue" value="{{.T.searchvalue}}">
+							<input type="hidden" name="area" value="{{.T.area}}">
+							<input type="hidden" name="minprice" value="">
+							<input type="hidden" name="maxprice" value="">
 						</form>
 						<!--筛选-->
 						<div id="screenBtn" class="screen up">
@@ -72,12 +90,14 @@
 						</div>
 						<div class="Price-content clearfix">
 							<span class="active">全部</span>
-							<div class="PriceInput">
-								<input type="text" name="lowerPrice" id="lower" value="{{.T.lower}}" placeholder="最低价             万元" />
-								<span></span>
-								<input type="text" name="upperPrice" id="upper" value="{{.T.upper}}" placeholder="最高价             万元" />
+							<div class="pricefat">
+								<div class="PriceInput">
+									<input type="text" name="minprice" id="minprice" value="{{.T.lower}}" placeholder="最低价             万元" />
+									<span></span>
+									<input type="text" name="maxprice" id="maxprice" value="{{.T.upper}}" placeholder="最高价             万元" />
+								</div>
+								<button class="pricebut" style="display:none;">确定</button>
 							</div>
-							<button id="priceBtn">确定</button>
 						</div>
 					</div>
 					<!--项目地区-->
@@ -86,7 +106,7 @@
 							项目地区:
 						</div>
 						<div class="region-content">
-							<font id="regionBtn" class="active">全国</font>
+							<span id="regionBtn" class="active">全国</span>
 							<i class="diver"></i>
 							<font class="parent-node">华北地区</font>
 							<font>北京</font>
@@ -211,38 +231,100 @@
 			<!--招标搜索页面 END-->
 		</section>
 		<script type="text/javascript">
-			$(function(){
+//			$(function(){
 				//价格
-				$("#lower").click(function(){
-					if(!$(".PriceInput").hasClass("price-active")){
-						$(".PriceInput").addClass("price-active");
-					}
-				})
-				$("#upper").click(function(){
-					if(!$(".PriceInput").hasClass("price-active")){
-						$(".PriceInput").addClass("price-active");
-					}
-				})
-				$("#priceBtn").click(function(){
-					var lower = $("#lower").val();
-					var upper = $("#upper").val();	
-				})
+//				$("#lower").click(function(){
+//					if(!$(".PriceInput").hasClass("price-active")){
+//						$(".PriceInput").addClass("price-active");
+//					}
+//				})
+//				$("#upper").click(function(){
+//					if(!$(".PriceInput").hasClass("price-active")){
+//						$(".PriceInput").addClass("price-active");
+//					}
+//				})
+//				$("#priceBtn").click(function(){
+//					var lower = $("#lower").val();
+//					var upper = $("#upper").val();	
+//				})
 				
 				
-			})
+//			)
 		</script>
-		<script type="text/javascript" src="/js/jquery-3.2.1.min.js"></script>
-		<script type="text/javascript" src="/js/biddingSearch.js"></script>
+
 	{{include "/common/pcbottom.html"}}
 	{{include "/common/baiducc.html"}}
 	<script>
 		var mainList = {{.T.list}};
-		$(function () {
+		$(function(){
+			haslogin({{.T.logid}});
+			//价格
+			$("#minprice").click(function(){
+				$(".pricebut").show();
+				$(".pricefat").addClass("customtime-active");
+			})
+			$("#maxprice").click(function(){
+				$(".pricebut").show();
+				$(".pricefat").addClass("customtime-active");
+			})
+			$(".Price-content").find("span:first-child").click(function(){
+				$(this).addClass("active");
+				$(".pricefat").removeClass("active");
+			})
+			$(".pricebut").click(function(){
+				var minp = $("#minprice").val();
+				var maxp = $("#maxprice").val();
+				if (minp==""||maxp==""){
+					return false;
+				}
+				if (minp>maxp){
+					$("#minprice").val(maxp);
+					$("#maxprice").val(minp);
+				}
+				$(this).hide();
+				$(".pricefat").addClass("active");
+				$(".Price-content").find("span:first-child").removeClass("active");
+				$(".pricefat").removeClass("customtime-active");
+			})
+			
+			
+			
+			
 //		    for(var i=0;i<mainList.length;i++){
 //		        alert(mainList[i])
 //			}
 
         });
+		function beforeSubmit(){			
+			//地区
+			var selectAreas = "";
+			$(".region-content .active:not(.parent-node)").each(function(){
+				var thisText = $(this).text();
+				if(thisText != "全国"){
+					if(selectAreas != ""){
+						selectAreas += ",";
+					}
+					selectAreas += thisText;
+				}
+			});
+			$("#zbSeatchT [name='area']").val(selectAreas);
+			
+			//价格
+			var selectMinPrices = $(".PriceInput [name='minprice']").val();
+			var selectMaxPrices =  $(".PriceInput [name='maxprice']").val();
+			$("#zbSeatchT [name='minprice']").val(selectMinPrices);
+			$("#zbSeatchT [name='maxprice']").val(selectMaxPrices);
+			//搜索关键词
+			var searchname = $("#zbSeatchT input[name='keywords']").val();
+			console.log("----"+searchname)
+			$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname))
+			searchOnsubmit();
+			return true
+		}
+//
+function searchOnsubmit(){
+	$("#zbSeatchT").submit();
+}
 	</script>
 	</body>