|
@@ -218,6 +218,9 @@
|
|
|
.PriceInput{
|
|
|
position:relative;
|
|
|
}
|
|
|
+ .j-clearicon {
|
|
|
+ right: 118px !important;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
@@ -283,10 +286,11 @@
|
|
|
</div>
|
|
|
<!--搜索-->
|
|
|
<div class="searchInput clearfix">
|
|
|
- <form action="/jylab/bidsearchforent/list.html" method="post" id="zbSeatchT" class="clearfix" onsubmit="return true">
|
|
|
+ <form action="/jylab/bidsearchforent/index.html" method="post" id="zbSeatchT" class="clearfix" onsubmit="return true">
|
|
|
<input class="searchname" autocomplete="off" type="search" name="keywords" id="searchinput" value="{{.T.searchvalue}}" placeholder="高速公路" />
|
|
|
|
|
|
<input type="submit" class="searchBtn" value="搜索"/>
|
|
|
+ <img src="/images/pc_20.png" id="t-clear" class="j-clearicon" style="display:none;">
|
|
|
<div class="searchSlideText">
|
|
|
<ul>
|
|
|
</ul>
|
|
@@ -422,37 +426,7 @@
|
|
|
<!--全文搜索 列表-->
|
|
|
<div class="lucene">
|
|
|
<ul id="ul_list">
|
|
|
- {{range $k,$v:= .T.list}}
|
|
|
- <li>
|
|
|
- <div class="liLuceneList">
|
|
|
- <div class="luce-left">
|
|
|
- <div class="left-title">
|
|
|
- <em>{{$v.k}}.</em>
|
|
|
- <!--<a href="/article/content/{{$v.linkid}}.html" dataid="{{$v.linkid}}" dataindustry="{{$v.industry}}" target="_blank"> {{$v.projectname}}</a>-->
|
|
|
- <a onclick="noIn(this)" dataid="{{$v.linkid}}" dataindustry="{{$v.industry}}" target="_blank"> {{$v.projectname}}</a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="luce-right">
|
|
|
- {{if $v.area }}
|
|
|
- {{if and (ne $v.area "") (ne $v.area "A") (ne $v.area "全国")}}
|
|
|
- <a href="/list/area/{{$v.areaadd}}.html">{{$v.area}}</a>
|
|
|
- {{end}}
|
|
|
- {{end}}
|
|
|
- {{if $v.bidtype }}
|
|
|
- {{if ne $v.bidtype ""}}
|
|
|
- <a href="/list/stype/{{$v.stypeadd}}.html">{{$v.bidtype}}</a>
|
|
|
- {{end}}
|
|
|
- {{end}}
|
|
|
- {{if $v.industry }}
|
|
|
- {{if ne $v.industry ""}}
|
|
|
- <a href="/list/stype/{{$v.stypeadd}}.html">{{$v.industry}}</a>
|
|
|
- {{end}}
|
|
|
- {{end}}
|
|
|
- <span>{{$v.time1}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- {{end}}
|
|
|
+
|
|
|
</ul>
|
|
|
</div>
|
|
|
<!--全文搜索 表格-->
|
|
@@ -460,24 +434,26 @@
|
|
|
<table>
|
|
|
<thead>
|
|
|
<tr>
|
|
|
+ {{if .T.searchvalue}}
|
|
|
<td>序号</td>
|
|
|
<td width="150">中标日期</td>
|
|
|
<td width="830">项目名称</td>
|
|
|
<td>中标金额(万元)</td>
|
|
|
+ {{else}}
|
|
|
+ <td width="47">序号</td>
|
|
|
+ <td width="320">项目名称</td>
|
|
|
+ <td width="83">公告类型</td>
|
|
|
+ <td width="65">预算<br>(万元)</td>
|
|
|
+ <td width="180">招标单位</td>
|
|
|
+ <td width="100">开标时间</td>
|
|
|
+ <td width="180">中标单位</td>
|
|
|
+ <td>中标金额<br>(万元)</td>
|
|
|
+ <td width="100">发布时间</td>
|
|
|
+ {{end}}
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody class="formTable" id="formTable">
|
|
|
- {{range $k,$v:= .T.list}}
|
|
|
- <tr>
|
|
|
- <td>{{$v.k}}</td>
|
|
|
- <td>{{$v.time2}} </td>
|
|
|
- <td class="tt-l">
|
|
|
- <!--<a href="/article/content/{{$v.linkid}}.html">{{$v.projectname}}</a>-->
|
|
|
- <a onclick="noIn(this)" dataid="{{$v.linkid}}" dataindustry="{{$v.industry}}" target="_blank"> {{$v.projectname}}</a>
|
|
|
- </td>
|
|
|
- <td class="tt-r">{{$v.bidamount}}</td>
|
|
|
- </tr>
|
|
|
- {{end}}
|
|
|
+
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
@@ -506,29 +482,25 @@
|
|
|
$(function() {
|
|
|
$("#searchinput").on("input propertychange",function(){
|
|
|
var searchInput = $("#searchinput").val();
|
|
|
- if(searchInput.length > 0){
|
|
|
+ if($.trim(searchInput).length > 0){
|
|
|
+ $("#t-clear").show();
|
|
|
getRecList(searchInput);
|
|
|
}else{
|
|
|
+ $("#t-clear").hide();
|
|
|
$(".searchSlideText").hide();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ $("#t-clear").click(function(){
|
|
|
+ $("#t-clear").hide();
|
|
|
+ $("#searchinput").val("").focus();
|
|
|
+ })
|
|
|
//隐藏企业推荐列表
|
|
|
$("body").on("click",function (e) {
|
|
|
if(e.target.id != "searchinput") {
|
|
|
$(".searchSlideText").hide();
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- //行数不满一页,"下一页"按钮不可用
|
|
|
- var tab = document.getElementById("formTable") ;
|
|
|
- var tabRows = tab.rows.length;
|
|
|
- var listRows = document.getElementById("ul_list").getElementsByTagName("li").length;
|
|
|
- if(listRows < 50 && tabRows < 50){
|
|
|
- $(".nbnext").addClass("disabled");
|
|
|
- }else {
|
|
|
- $(".nbnext").removeClass("disabled");
|
|
|
- }
|
|
|
});
|
|
|
|
|
|
//企业推荐列表
|
|
@@ -573,9 +545,13 @@
|
|
|
var areas = {{.T.area}};
|
|
|
var searchvalue = {{.T.searchvalue}};
|
|
|
var currentPage = 1;//当前页
|
|
|
+ var pageSize = 50;
|
|
|
|
|
|
$(function(){
|
|
|
haslogin({{.T.logid}});
|
|
|
+ if(mainList != "" && mainList != null){
|
|
|
+ getSearchTable(mainList);
|
|
|
+ }
|
|
|
$(".j-nav .j-nav-link:eq(2)").addClass("active");
|
|
|
$(window).scroll(function(){
|
|
|
if($(this).scrollTop() > 0){
|
|
@@ -587,6 +563,7 @@
|
|
|
|
|
|
//判断用户是否搜索中标企业,调整二维码样式
|
|
|
if(searchvalue != "" && searchvalue.length > 0){
|
|
|
+ $("#t-clear").show();
|
|
|
$(".wx-inner-title").html("扫码关注企业");
|
|
|
$(".wx-inner-bottom").html('扫码即可实时接收<span style="color:#2cb7ca">'+'"'+searchvalue+'"'+'</span>的中标信息!');
|
|
|
}
|
|
@@ -722,19 +699,85 @@
|
|
|
})
|
|
|
|
|
|
//设置输入价格的格式
|
|
|
+ //
|
|
|
+ var reg = /^[\u4e00-\u9fa5]+$/;
|
|
|
+ var minnum = "";
|
|
|
$("#minprice").on("input propertychange",function(){
|
|
|
- var minp = $(this).val()
|
|
|
+ var minp = $.trim($(this).val()).replace(/\s/g,"");
|
|
|
+ $(this).val(minp)
|
|
|
if(!/^[\d]{1,9}([.][\d]{0,2})?$/.test(minp)){
|
|
|
- minp = minp.substr(0,minp.length-1);
|
|
|
- $(this).val(minp)
|
|
|
+ if((reg.test(minp)||isNaN(minp))&&minp.indexOf(".")<0){
|
|
|
+ $(this).val(minnum)
|
|
|
+ }else{
|
|
|
+ minp = minp.substr(0,minp.length-1);
|
|
|
+ if(reg.test(minp)||isNaN(minp)){
|
|
|
+ $(this).val(minnum)
|
|
|
+ }else{
|
|
|
+ if(minp.indexOf(".")>0){
|
|
|
+ var offront = minp.split(".")[0];
|
|
|
+ var ofafter = minp.split(".")[1];
|
|
|
+ if(offront.length>9||ofafter.length>2){
|
|
|
+ if(offront.length>9){
|
|
|
+ $(this).val(offront.substr(0,9)+"."+ minnum.split(".")[1].substr(0,2))
|
|
|
+ minnum = offront.substr(0,9)+"."+ minnum.split(".")[1].substr(0,2);
|
|
|
+ }else{
|
|
|
+ $(this).val(offront.substr(0,9)+"."+ofafter.substr(0,2))
|
|
|
+ minnum = offront.substr(0,9)+"."+ofafter.substr(0,2);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $(this).val(minp)
|
|
|
+ minnum = minp;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $(this).val(minp)
|
|
|
+ minnum = minp;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ minnum = minp;
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
+
|
|
|
//
|
|
|
+ var maxnum = "";
|
|
|
$("#maxprice").on("input propertychange",function(){
|
|
|
- var maxp = $(this).val()
|
|
|
+ var maxp = $.trim($(this).val()).replace(/\s/g,"");
|
|
|
+ $(this).val(maxp)
|
|
|
if(!/^[\d]{1,9}([.][\d]{0,2})?$/.test(maxp)){
|
|
|
- maxp = maxp.substr(0,maxp.length-1);
|
|
|
- $(this).val(maxp)
|
|
|
+ if((reg.test(maxp)||isNaN(maxp))&&maxp.indexOf(".")<0){
|
|
|
+ $(this).val(maxnum)
|
|
|
+ }else{
|
|
|
+ maxp = maxp.substr(0,maxp.length-1);
|
|
|
+ if(reg.test(maxp)||isNaN(maxp)){
|
|
|
+ $(this).val(maxnum)
|
|
|
+ }else{
|
|
|
+ if(maxp.indexOf(".")>0){
|
|
|
+ var offront = maxp.split(".")[0];
|
|
|
+ var ofafter = maxp.split(".")[1];
|
|
|
+ if(offront.length>9||ofafter.length>2){
|
|
|
+ if(offront.length>9){
|
|
|
+ $(this).val(offront.substr(0,9)+"."+ maxnum.split(".")[1].substr(0,2))
|
|
|
+ maxnum = offront.substr(0,9)+"."+ maxnum.split(".")[1].substr(0,2);
|
|
|
+ }else{
|
|
|
+ $(this).val(offront.substr(0,9)+"."+ofafter.substr(0,2))
|
|
|
+ maxnum = offront.substr(0,9)+"."+ofafter.substr(0,2);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $(this).val(maxp)
|
|
|
+ maxnum = maxp;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $(this).val(maxp)
|
|
|
+ maxnum = maxp;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ maxnum = maxp;
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -952,6 +995,7 @@
|
|
|
}
|
|
|
//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");
|
|
@@ -970,7 +1014,7 @@
|
|
|
//currentPage = parseInt($(".pagination-inner").find("span").text())-parseInt(1)
|
|
|
if(currentPage==1){
|
|
|
$(".nbprev").addClass("disabled");
|
|
|
- }else if(currentPage==9){
|
|
|
+ }else if(currentPage<10){
|
|
|
$(".nbnext").removeClass("disabled");
|
|
|
}
|
|
|
$(".currentPage").text(currentPage);
|
|
@@ -996,31 +1040,150 @@
|
|
|
$(".tabContainer").show();
|
|
|
$(".pagination").show();
|
|
|
$(".hasNoData").hide();
|
|
|
- getSearchTable(r);
|
|
|
+ getSearchTable(r.list);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- function getSearchTable(r) {
|
|
|
- if(r.list.length < 50){
|
|
|
+ function getSearchTable(datas) {
|
|
|
+ if(datas.length < 50){
|
|
|
$(".nbnext").addClass("disabled");
|
|
|
- }else{
|
|
|
- $(".nbnext").removeClass("disabled");
|
|
|
}
|
|
|
var listItem = "";
|
|
|
var formItem = "";
|
|
|
+ var tableHtml = "";
|
|
|
listItem += '<ul>';
|
|
|
- for(var i=0; i<r.list.length; i++){
|
|
|
- if(r.list[i].bidtype != "" && r.list[i].bidtype != null){
|
|
|
- listItem += '<li><div class="liLuceneList"><div class="luce-left"><div class="left-title"><em>'+r.list[i].k+'.</em><a href="/article/content/'+r.list[i].linkid+'.html">'+r.list[i].projectname+'</a></div></div><div class="luce-right"><a href="#">'+r.list[i].area+'</a><a href="#">'+r.list[i].bidtype+'</a><span>'+r.list[i].time1+'</span></div></div></li>';
|
|
|
- }else {
|
|
|
- listItem += '<li><div class="liLuceneList"><div class="luce-left"><div class="left-title"><em>'+r.list[i].k+'.</em><a href="/article/content/'+r.list[i].linkid+'.html">'+r.list[i].projectname+'</a></div></div><div class="luce-right"><a href="#">'+r.list[i].area+'</a><span>'+r.list[i].time1+'</span></div></div></li>';
|
|
|
- }
|
|
|
- formItem += '<tr><td>'+r.list[i].k+'</td><td>'+r.list[i].time2+'</td><td class="tt-l"><a href="/article/content/'+r.list[i].linkid+'.html">'+r.list[i].projectname+'</a></td><td class="tt-r">'+r.list[i].bidamount+'</td></tr>'
|
|
|
+ for(var i=0; i<datas.length; i++){
|
|
|
+ var index = (currentPage - 1) * pageSize + i + 1;
|
|
|
+ if(searchvalue==""){
|
|
|
+ listItem +='<li>'
|
|
|
+ +'<div class="liLuceneList">'
|
|
|
+ +'<div class="luce-left">'
|
|
|
+ +'<div class="left-title">'
|
|
|
+ +'<em>'+index+'.</em>'
|
|
|
+ +'<a onclick="noIn(this)" dataid="'+datas[i]._id+'" target="_blank">'+datas[i].title+'</a>'
|
|
|
+ +'</div>'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="luce-right">'
|
|
|
+ if(typeof(datas[i].area) != "undefined" &&datas[i].area != "" && datas[i].area != null&&datas[i].area != "A" ){
|
|
|
+ listItem +='<a href="/list/area/'+datas[i].areaadd+'.html">'+datas[i].area+'</a>'
|
|
|
+ }else{
|
|
|
+ listItem +='<a href="javascript:volid(0);" style="display:none;"></a>'
|
|
|
+ }
|
|
|
+ //
|
|
|
+ var stype = datas[i].subtype
|
|
|
+ if(stype==""){
|
|
|
+ stype==datas[i].toptype
|
|
|
+ }
|
|
|
+ if(stype==""){
|
|
|
+ if(datas[i].bidtype == "bid"){
|
|
|
+ stype = "中标";
|
|
|
+ datas[i].stypeadd="ZHB"
|
|
|
+ }else if(datas[i].bidtype == "tender"){
|
|
|
+ datas[i].stypeadd="ZB"
|
|
|
+ stype = "招标";
|
|
|
+ }else{
|
|
|
+ stype = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(typeof(stype) != "undefined" &&stype != "" && stype != null){
|
|
|
+ listItem +='<a href="/list/stype/'+datas[i].stypeadd+'.html">'+stype+'</a>'
|
|
|
+ }else{
|
|
|
+ listItem +='<a href="javascript:volid(0);" style="display:none;"></a>'
|
|
|
+ }
|
|
|
+ //
|
|
|
+ if(typeof(datas[i].industry) != "undefined" && datas[i].industry != null && datas[i].industry != ""){
|
|
|
+ listItem += '<a href="/list/industry/'+datas[i].indadd+'.html">'+datas[i].industry+'</a>';
|
|
|
+ }else{
|
|
|
+ listItem += '<a href="javascript:volid(0);" 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")));
|
|
|
+ if(diff != null){
|
|
|
+ listItem += '<span class="com-time">'+diff+'</span>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ listItem+='</div></div></li>'
|
|
|
+ tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank">'
|
|
|
+ +'<td><div>'+index+'</div></td>'
|
|
|
+
|
|
|
+ if(typeof(datas[i].projectname) != "undefined" && datas[i].projectname != null && datas[i].projectname != ""){
|
|
|
+ tableHtml += '<td class="tt-l"><div>'+datas[i].projectname+'</div></td>';
|
|
|
+ }else{
|
|
|
+ tableHtml += '<td class="tt-l"><div>'+datas[i].title+'</div></td>';
|
|
|
+ }
|
|
|
+
|
|
|
+ if(typeof(stype) != "undefined" && stype != null && stype != ""){
|
|
|
+ tableHtml += '<td><div>'+stype+'公告</div></td>';
|
|
|
+ }else{
|
|
|
+ tableHtml += '<td><div></div></td>';
|
|
|
+ }
|
|
|
+
|
|
|
+ if(typeof(datas[i].budget) != "undefined" && datas[i].budget != null && datas[i].budget != ""){
|
|
|
+ var budget =parseInt(datas[i].budget)/10000
|
|
|
+ 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"><div></div></td>';
|
|
|
+ }
|
|
|
+ if(typeof(datas[i].buyer) != "undefined" && datas[i].buyer != null && datas[i].buyer != ""){
|
|
|
+ tableHtml += '<td class="tt-l"><div>'+datas[i].buyer+'</div></td>';
|
|
|
+ }else{
|
|
|
+ tableHtml += '<td class="tt-l"><div></div></td>';
|
|
|
+ }
|
|
|
+ if(typeof(datas[i].bidopentime) != "undefined" && datas[i].bidopentime != null && datas[i].bidopentime != ""){
|
|
|
+ var diff = formatDate(Number(datas[i].bidopentime),"l");
|
|
|
+ tableHtml += '<td><div>'+diff+'</div></td>';
|
|
|
+ }else{
|
|
|
+ tableHtml += '<td><div></div></td>';
|
|
|
+ }
|
|
|
+ if(typeof(datas[i].winner) != "undefined" && datas[i].winner != null && datas[i].winner != ""){
|
|
|
+ tableHtml += '<td class="tt-l"><div>'+datas[i].winner+'</div></td>';
|
|
|
+ }else{
|
|
|
+ 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;
|
|
|
+ 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"><div></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><div>'+diff+'</div></td>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ tableHtml += '<td><div></div></td>';
|
|
|
+ }
|
|
|
+ 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>'
|
|
|
+ }
|
|
|
}
|
|
|
listItem += '</ul>';
|
|
|
$(".lucene").html(listItem);
|
|
|
- $(".formTable").html(formItem);
|
|
|
+ if(searchvalue==""){
|
|
|
+ $(".formTable").html(tableHtml);
|
|
|
+ }else{
|
|
|
+ $(".formTable").html(formItem);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//关闭超级搜索遮罩层
|
|
@@ -1033,6 +1196,26 @@
|
|
|
$("#welcome").modal("hide");
|
|
|
}
|
|
|
|
|
|
+ //
|
|
|
+ function formatDate(date,sl) {
|
|
|
+ var myDate = new Date(date*1000);
|
|
|
+ var year=myDate.getFullYear();
|
|
|
+ var month=myDate.getMonth()+1;
|
|
|
+ var date=myDate.getDate();
|
|
|
+ var hour = myDate.getHours()
|
|
|
+ var min = myDate.getMinutes()
|
|
|
+ if(sl=="l"){
|
|
|
+ if(hour<10){
|
|
|
+ hour="0"+hour
|
|
|
+ }
|
|
|
+ if(min<10){
|
|
|
+ min="0"+min
|
|
|
+ }
|
|
|
+ return year+"-"+month+"-"+date+"<br>"+hour+":"+min;
|
|
|
+ }else{
|
|
|
+ return year+"-"+month+"-"+date;
|
|
|
+ }
|
|
|
+ }
|
|
|
//未登录
|
|
|
function noIn(p){
|
|
|
var thisId = $(p).attr("dataId");
|