|
@@ -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(){
|
|
@@ -93,6 +98,9 @@ $(function() {
|
|
|
})
|
|
|
//
|
|
|
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){
|
|
@@ -104,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){
|
|
@@ -116,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();
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -164,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">'
|
|
@@ -203,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>'
|
|
|
}
|
|
@@ -322,79 +376,112 @@ function getInputTime(){
|
|
|
}
|
|
|
///
|
|
|
function beforeSubmit(){
|
|
|
- //时间
|
|
|
- var publishtime = null;
|
|
|
- var timeslot = getInputTime().join("_");
|
|
|
- if($(".timerInput").hasClass("active")){
|
|
|
- if(timeslot != "_"){
|
|
|
- $("#zbSeatchT [name='publishtime']").val(timeslot);
|
|
|
+ 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{
|
|
|
- $("#zbSeatchT [name='publishtime']").val("");
|
|
|
+ publishtime = $(".timer .active").attr("data-value");
|
|
|
+ if(typeof(publishtime) != "undefined"){
|
|
|
+ $("#zbSeatchT [name='publishtime']").val(publishtime);
|
|
|
+ }else{
|
|
|
+ $("#zbSeatchT [name='publishtime']").val("");
|
|
|
+ }
|
|
|
}
|
|
|
- }else{
|
|
|
- publishtime = $(".timer .active").attr("data-value");
|
|
|
- if(typeof(publishtime) != "undefined"){
|
|
|
- $("#zbSeatchT [name='publishtime']").val(publishtime);
|
|
|
+ if(timeslot != "_"){
|
|
|
+ $("#zbSeatchT [name='timeslot']").val(timeslot);
|
|
|
}else{
|
|
|
- $("#zbSeatchT [name='publishtime']").val("");
|
|
|
+ $("#zbSeatchT [name='timeslot']").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 += ",";
|
|
|
+ //地区
|
|
|
+ var selectAreas = "";
|
|
|
+ $(".region-content .active:not(.parent-node)").each(function(){
|
|
|
+ var thisText = $(this).text();
|
|
|
+ if(thisText != "全国"){
|
|
|
+ if(selectAreas != ""){
|
|
|
+ selectAreas += ",";
|
|
|
+ }
|
|
|
+ selectAreas += thisText;
|
|
|
}
|
|
|
- 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();
|
|
|
- console.log("----"+searchname)
|
|
|
- $("#zbSeatchT input[name='searchvalue']").val($.trim(searchname))
|
|
|
- searchOnsubmit();
|
|
|
- return true
|
|
|
+ });
|
|
|
+ $("#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)
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|