|
@@ -1,6 +1,9 @@
|
|
|
var pageSize = 50;
|
|
|
var nbflag = false;//是否显示的是最新招标数据
|
|
|
var currentPage = 1;
|
|
|
+var submitflag = true;
|
|
|
+var searchvalue = "";
|
|
|
+var searchvalueArray = searchvalue.split("+");
|
|
|
|
|
|
$(function() {
|
|
|
$("#minprice").click(function(){
|
|
@@ -22,6 +25,7 @@ $(function() {
|
|
|
$(".Price-content").find("span:first-child").click(function(){
|
|
|
$(this).addClass("active");
|
|
|
$(".pricefat").removeClass("active");
|
|
|
+ beforeSubmit();
|
|
|
})
|
|
|
$(".timer").find("ul li:first-child").click(function(){
|
|
|
$(this).addClass("active");
|
|
@@ -42,6 +46,7 @@ $(function() {
|
|
|
$(".pricefat").addClass("active");
|
|
|
$(".Price-content").find("span:first-child").removeClass("active");
|
|
|
$(".pricefat").removeClass("customtime-active");
|
|
|
+ beforeSubmit()
|
|
|
})
|
|
|
//
|
|
|
$("#timebut").click(function(){
|
|
@@ -50,6 +55,7 @@ $(function() {
|
|
|
$(".timerInput").removeClass("customtime-active");
|
|
|
$(".timer").find("ul li:first-child").removeClass("active");
|
|
|
$(".release-time .timer li").removeClass("active");
|
|
|
+ beforeSubmit()
|
|
|
})
|
|
|
//
|
|
|
$(".nbprev").click(function(){
|
|
@@ -62,25 +68,39 @@ $(function() {
|
|
|
})
|
|
|
//筛选关闭和打开
|
|
|
//根据cookie值设置筛选是否显示
|
|
|
- var rsw = $.cookie("orshow");
|
|
|
- if(typeof(rsw)=="undefined"){
|
|
|
+ var rsw = localStorage.getItem("hideorshow");
|
|
|
+ if(rsw==null){
|
|
|
setTimeout(function(){
|
|
|
$(".searchTender").stop(false,true).slideDown(1000);
|
|
|
- $.cookie("orshow","T",{expires:360,path:"/" });
|
|
|
+ localStorage.setItem("hideorshow", "D");
|
|
|
},500);
|
|
|
+ }else{
|
|
|
+ if(rsw=="U"){
|
|
|
+ $("#screenBtn").addClass("down");
|
|
|
+ $(".searchTender").hide();
|
|
|
+ }else{
|
|
|
+ $("#screenBtn").removeClass("down");
|
|
|
+ $(".searchTender").show();
|
|
|
+ }
|
|
|
}
|
|
|
- /////////////////
|
|
|
-// $(".right-tabBtn button:nth-child(1)").click(function(){
|
|
|
-// tol="L"
|
|
|
-// getNewBiddings(1)
|
|
|
-// })
|
|
|
-// $(".right-tabBtn button:nth-child(2)").click(function(){
|
|
|
-// tol="T"
|
|
|
-// getNewBiddings(1)
|
|
|
-// })
|
|
|
+ //记录用户刷选按钮状态
|
|
|
+ $("#screenBtn").click(function(){
|
|
|
+ if($(this).attr("class").indexOf("down")>0){
|
|
|
+ localStorage.setItem("hideorshow", "U");
|
|
|
+ }else{
|
|
|
+ localStorage.setItem("hideorshow", "D");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //
|
|
|
+ $("#zbSeatchT input[type='button']").click(function(){
|
|
|
+ beforeSubmit()
|
|
|
+ })
|
|
|
})
|
|
|
//
|
|
|
function next(){
|
|
|
+ if($(".nbnext").hasClass("disabled")){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
var page = parseInt($(".pagination-inner").find("span").text())+parseInt(1)
|
|
|
if(!nbflag&&page<11){
|
|
|
if(page==10){
|
|
@@ -92,6 +112,9 @@ function next(){
|
|
|
}
|
|
|
}
|
|
|
function prev(){
|
|
|
+ if($(".nbprev").hasClass("disabled")){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
var page = parseInt($(".pagination-inner").find("span").text())-parseInt(1)
|
|
|
if(!nbflag&&page>0){
|
|
|
if(page==1){
|
|
@@ -104,11 +127,38 @@ function prev(){
|
|
|
}
|
|
|
////最新招标信息
|
|
|
function getNewBiddings(page){
|
|
|
- currentPage = page;
|
|
|
- $.post("/jylab/supsearch/getNewBids",{pageNumber: page},function(data){
|
|
|
- if(data&&data.list.length>0){
|
|
|
- $(".pagination-inner").find("span").text(page)
|
|
|
- appendDatas(data.list,false);
|
|
|
+ currentPage = page
|
|
|
+ if(page==1){
|
|
|
+ $(".nbprev").addClass("disabled");
|
|
|
+ }
|
|
|
+ var param = {
|
|
|
+ pageNumber: currentPage,
|
|
|
+ reqType: "lastNews",
|
|
|
+ searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
|
|
|
+ area: $("#zbSeatchT [name='area']").val(),
|
|
|
+ subtype: $("#zbSeatchT [name='subtype']").val(),
|
|
|
+ publishtime: $("#zbSeatchT [name='publishtime']").val(),
|
|
|
+ selectType : $("#zbSeatchT [name='selectType']").val(),
|
|
|
+ minprice : $("#zbSeatchT [name='minprice']").val(),
|
|
|
+ maxprice : $("#zbSeatchT [name='maxprice']").val(),
|
|
|
+ industry : $("#zbSeatchT [name='industry']").val(),
|
|
|
+ };
|
|
|
+ $.post("/front/pcAjaxReq",param,function(r){
|
|
|
+ if(r&&r.list!=null&&r.list.length>0){
|
|
|
+ $(".tabContainer").show();
|
|
|
+ $(".pagination").show();
|
|
|
+ $(".hasNoData").hide();
|
|
|
+ $(".pagination-inner").find("span").text(page);
|
|
|
+ if(r.list.length<pageSize||page==10){
|
|
|
+ $(".nbnext").addClass("disabled");
|
|
|
+ }else{
|
|
|
+ $(".nbnext").removeClass("disabled");
|
|
|
+ }
|
|
|
+ appendDatas(r.list,false);
|
|
|
+ }else{
|
|
|
+ $(".tabContainer").hide();
|
|
|
+ $(".pagination").hide();
|
|
|
+ $(".hasNoData").show();
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -152,6 +202,9 @@ function appendDatas(datas,flag){
|
|
|
if(!flag){
|
|
|
$("#allnews").hide();
|
|
|
$(".tabContainer-2").show();
|
|
|
+ }else{
|
|
|
+ $("#allnews").show();
|
|
|
+ $(".tabContainer-2").hide();
|
|
|
}
|
|
|
listHtml += '<li>'
|
|
|
+'<div class="liLuceneList">'
|
|
@@ -176,7 +229,12 @@ function appendDatas(datas,flag){
|
|
|
listHtml += '<a href="#" style="display:none;"></a>';
|
|
|
}
|
|
|
//
|
|
|
- listHtml += '<a href="/list/stype/'+datas[i].stypeadd+'.html">建筑工程</a>';
|
|
|
+ if(typeof(datas[i].industry) != "undefined" && datas[i].industry != null && datas[i].industry != ""){
|
|
|
+ listHtml += '<a href="#">'+datas[i].industry+'</a>';
|
|
|
+ }else{
|
|
|
+ listHtml += '<a href="#" style="display:none;"></a>';
|
|
|
+ }
|
|
|
+
|
|
|
//
|
|
|
if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
|
|
|
var diff = timeDiff(new Date(Number(datas[i].publishtime+"000")));
|
|
@@ -186,53 +244,66 @@ function appendDatas(datas,flag){
|
|
|
}
|
|
|
listHtml += '</div></li>';
|
|
|
tableHtml +='<tr>'
|
|
|
- +'<td>'+index+'</td>'
|
|
|
+ +'<td><div>'+index+'</div></td>'
|
|
|
if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
|
|
|
var diff = formatDate(Number(datas[i].publishtime),"s");
|
|
|
if(diff != null){
|
|
|
- tableHtml += '<td>'+diff+'</td>';
|
|
|
+ tableHtml += '<td><div>'+diff+'</div></td>';
|
|
|
}
|
|
|
}else{
|
|
|
- tableHtml += '<td></td>';
|
|
|
+ tableHtml += '<td><div></div></td>';
|
|
|
}
|
|
|
if(typeof(type) != "undefined" && type != null && type != ""){
|
|
|
- tableHtml += '<td>'+type+'公告</td>';
|
|
|
+ tableHtml += '<td><div>'+type+'公告</div></td>';
|
|
|
}else{
|
|
|
- tableHtml += '<td></td>';
|
|
|
+ tableHtml += '<td><div></div></td>';
|
|
|
}
|
|
|
if(typeof(datas[i].agency) != "undefined" && datas[i].agency != null && datas[i].agency != ""){
|
|
|
- tableHtml += '<td class="tt-l">'+datas[i].agency+'</td>';
|
|
|
+ tableHtml += '<td class="tt-l"><div>'+datas[i].agency+'</div></td>';
|
|
|
}else{
|
|
|
- tableHtml += '<td class="tt-l"></td>';
|
|
|
+ tableHtml += '<td class="tt-l"><div></div></td>';
|
|
|
}
|
|
|
if(typeof(datas[i].projectname) != "undefined" && datas[i].projectname != null && datas[i].projectname != ""){
|
|
|
- tableHtml += '<td class="tt-l">'+datas[i].projectname+'</td>';
|
|
|
+ tableHtml += '<td class="tt-l"><div>'+datas[i].projectname+'</div></td>';
|
|
|
}else{
|
|
|
- tableHtml += '<td class="tt-l"></td>';
|
|
|
+ tableHtml += '<td class="tt-l"><div></div></td>';
|
|
|
}
|
|
|
if(typeof(datas[i].budget) != "undefined" && datas[i].budget != null && datas[i].budget != ""){
|
|
|
var budget =parseInt(datas[i].budget)/10000
|
|
|
-
|
|
|
- tableHtml += '<td class="tt-r">'+budget+'</td>';
|
|
|
+ if(budget.toString().length>6){
|
|
|
+ if(budget.toString().indexOf(".")==5){
|
|
|
+ budget=budget.toString().substr(0,7)
|
|
|
+ }else{
|
|
|
+ budget=budget.toString().substr(0,6)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tableHtml += '<td class="tt-r"><div>'+budget+'</div></td>';
|
|
|
}else{
|
|
|
- tableHtml += '<td class="tt-r"></td>';
|
|
|
+ tableHtml += '<td class="tt-r"><div></div></td>';
|
|
|
}
|
|
|
if(typeof(datas[i].bidopentime) != "undefined" && datas[i].bidopentime != null && datas[i].bidopentime != ""){
|
|
|
var diff = formatDate(Number(datas[i].publishtime),"l");
|
|
|
- tableHtml += '<td>'+diff+'</td>';
|
|
|
+ tableHtml += '<td><div>'+diff+'</div></td>';
|
|
|
}else{
|
|
|
- tableHtml += '<td></td>';
|
|
|
+ tableHtml += '<td><div></div></td>';
|
|
|
}
|
|
|
if(typeof(datas[i].winner) != "undefined" && datas[i].winner != null && datas[i].winner != ""){
|
|
|
- tableHtml += '<td class="tt-l">'+datas[i].winner+'</td>';
|
|
|
+ tableHtml += '<td class="tt-l"><div>'+datas[i].winner+'</div></td>';
|
|
|
}else{
|
|
|
- tableHtml += '<td class="tt-l"></td>';
|
|
|
+ tableHtml += '<td class="tt-l"><div></div></td>';
|
|
|
}
|
|
|
if(typeof(datas[i].bidamount) != "undefined" && datas[i].bidamount != null && datas[i].bidamount != ""){
|
|
|
var bidamount = parseInt(datas[i].bidamount)/10000
|
|
|
- tableHtml += '<td class="tt-r">'+bidamount+'</td>';
|
|
|
+ if(bidamount.toString().length>6){
|
|
|
+ if(bidamount.toString().indexOf(".")==5){
|
|
|
+ bidamount=bidamount.toString().substr(0,7)
|
|
|
+ }else{
|
|
|
+ bidamount=bidamount.toString().substr(0,6)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tableHtml += '<td class="tt-r"><div>'+bidamount+'</div></td>';
|
|
|
}else{
|
|
|
- tableHtml += '<td class="tt-r"></td>';
|
|
|
+ tableHtml += '<td class="tt-r"><div></div></td>';
|
|
|
}
|
|
|
tableHtml+='</tr>'
|
|
|
}
|
|
@@ -302,4 +373,115 @@ function getInputTime(){
|
|
|
endtime = "";
|
|
|
}
|
|
|
return [starttime,endtime]
|
|
|
+}
|
|
|
+///
|
|
|
+function beforeSubmit(){
|
|
|
+ setTimeout(function(){
|
|
|
+ //时间
|
|
|
+ var publishtime = null;
|
|
|
+ var timeslot = getInputTime().join("_");
|
|
|
+ if($(".timerInput").hasClass("active")){
|
|
|
+ if(timeslot != "_"){
|
|
|
+ $("#zbSeatchT [name='publishtime']").val(timeslot);
|
|
|
+ }else{
|
|
|
+ $("#zbSeatchT [name='publishtime']").val("");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ publishtime = $(".timer .active").attr("data-value");
|
|
|
+ if(typeof(publishtime) != "undefined"){
|
|
|
+ $("#zbSeatchT [name='publishtime']").val(publishtime);
|
|
|
+ }else{
|
|
|
+ $("#zbSeatchT [name='publishtime']").val("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(timeslot != "_"){
|
|
|
+ $("#zbSeatchT [name='timeslot']").val(timeslot);
|
|
|
+ }else{
|
|
|
+ $("#zbSeatchT [name='timeslot']").val("");
|
|
|
+ }
|
|
|
+ //地区
|
|
|
+ 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 selectSubTypes = "";
|
|
|
+ $(".info-content .active:not(.parent-node)").each(function(){
|
|
|
+ if($(this).attr("id") == "whole"||$(this).attr("id") == "infoBtn"){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ var thisText = $(this).attr("data-value");
|
|
|
+ if(selectSubTypes != ""){
|
|
|
+ selectSubTypes += ",";
|
|
|
+ }
|
|
|
+ selectSubTypes += thisText;
|
|
|
+ });
|
|
|
+ $("#zbSeatchT [name='subtype']").val(selectSubTypes);
|
|
|
+ //行业
|
|
|
+ var selectIndustrys = "";
|
|
|
+ $(".industry-content .active:not(.parent-node)").each(function(){
|
|
|
+ if($(this).attr("id") == "induAll"){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ var thisText = $(this).attr("data-value");
|
|
|
+ if(selectIndustrys != ""){
|
|
|
+ selectIndustrys += ",";
|
|
|
+ }
|
|
|
+ selectIndustrys += thisText;
|
|
|
+ });
|
|
|
+ $("#zbSeatchT [name='industry']").val(selectIndustrys);
|
|
|
+ //价格
|
|
|
+ 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();
|
|
|
+ $("#zbSeatchT input[name='searchvalue']").val($.trim(searchname))
|
|
|
+ if(submitflag){
|
|
|
+ if($.trim(searchname)==""){
|
|
|
+ getNewBiddings(1)
|
|
|
+ nbflag = false;
|
|
|
+ console.log(nbflag+"-----")
|
|
|
+ }else{
|
|
|
+ searchOnsubmit();
|
|
|
+ nbflag = true;
|
|
|
+ console.log("2222")
|
|
|
+ }
|
|
|
+ submitflag=false;
|
|
|
+ }
|
|
|
+ setTimeout(function(){
|
|
|
+ submitflag=true
|
|
|
+ },200);
|
|
|
+ return true
|
|
|
+ },200)
|
|
|
+}
|
|
|
+//
|
|
|
+function searchOnsubmit(){
|
|
|
+ var param = {
|
|
|
+ pageNumber: currentPage,
|
|
|
+ reqType: "bidSearch",
|
|
|
+ searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
|
|
|
+ area: $("#zbSeatchT [name='area']").val(),
|
|
|
+ subtype: $("#zbSeatchT [name='subtype']").val(),
|
|
|
+ publishtime: $("#zbSeatchT [name='publishtime']").val(),
|
|
|
+ selectType : $("#zbSeatchT [name='selectType']").val(),
|
|
|
+ minprice : $("#zbSeatchT [name='minprice']").val(),
|
|
|
+ maxprice : $("#zbSeatchT [name='maxprice']").val(),
|
|
|
+ industry : $("#zbSeatchT [name='industry']").val(),
|
|
|
+ };
|
|
|
+ $.post("/front/pcAjaxReq",param,function(r){
|
|
|
+ if(r.list == null || r.list.length == 0){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ appendDatas(r.list,true)
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|