|
|
@@ -145,6 +145,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){ |
|
|
|
//正在竞价 |
|
|
|
module.data.biddingTimeType = 1; |
|
|
|
|
|
|
|
document.getElementById('biddingTitle').innerHTML = '竞价进行中...'; |
|
|
|
document.getElementById('swiperType').style.display = 'block'; |
|
|
|
d = Math.floor(leftTime/1000/60/60/24); |
|
|
@@ -257,12 +258,30 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
setTimeout(function(){ |
|
|
|
var outProjectInformationData = template('outProjectInformationData', module.data); |
|
|
|
$("#outProjectInformationContent").html(outProjectInformationData); |
|
|
|
var timName = document.getElementById('timeDown'); |
|
|
|
if(timName){ |
|
|
|
var t = 10; |
|
|
|
module.data.timeDown = setInterval(function(){ |
|
|
|
timName.innerHTML = t+'<b style="color: #666666">秒后自动刷新</b>'; |
|
|
|
t--; |
|
|
|
document.getElementById('timeDown').style.display = 'inline-block'; |
|
|
|
if(t<0){ |
|
|
|
t = 10; |
|
|
|
let biddingStartTime = content.biddingStartTime; |
|
|
|
let biddingStopTime = content.biddingStopTime; |
|
|
|
var nowTime = Date.parse(new Date()); |
|
|
|
if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){ |
|
|
|
//正在竞价 |
|
|
|
//挂牌项目竞价记录 |
|
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); |
|
|
|
} |
|
|
|
} |
|
|
|
}, 1000) |
|
|
|
} |
|
|
|
},2000) |
|
|
|
|
|
|
|
$("#know").html(module.data.know); |
|
|
|
|
|
|
|
//挂牌项目竞价记录 |
|
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); |
|
|
|
|
|
|
|
//挂牌价格字典 |
|
|
|
tools.doGet(Dictionaries+'/price_unit', {}, module.unitDictionaries,true); |
|
|
@@ -299,21 +318,24 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
|
|
|
|
//期满处理字典 |
|
|
|
tools.doGet(Dictionaries+'/bidding_direct', {}, module.biddingDirectDictionaries,true); |
|
|
|
//倒计时 |
|
|
|
module.data.timer = setInterval(function(){ |
|
|
|
|
|
|
|
//挂牌项目竞价记录 |
|
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); |
|
|
|
//挂牌项目竞价记录 |
|
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//倒计时 |
|
|
|
module.data.timer = setInterval(function(){ |
|
|
|
// '2023-05-17 14:56:00' |
|
|
|
let signupStartTime = content.signupStartTime; |
|
|
|
let signupStopTime = content.signupStopTime; |
|
|
|
let biddingStartTime = content.biddingStartTime; |
|
|
|
let biddingStopTime = module.data.biddingStopTime; |
|
|
|
// '2023-05-17 14:56:00' |
|
|
|
let biddingStopTime = content.biddingStopTime; |
|
|
|
var nowTime = Date.parse(new Date()); |
|
|
|
var difference = Date.parse(biddingStopTime)-nowTime; |
|
|
|
var centerTime = 2 * 60 * 1000 |
|
|
|
|
|
|
|
if ( 0 < difference&&difference <= centerTime){ |
|
|
|
console.log("竞价最后两分钟") |
|
|
|
//正在竞价 |
|
|
@@ -334,8 +356,6 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
}else{ |
|
|
|
module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
},1000) |
|
|
|
|
|
|
|
if(module.data.loginNow){ |
|
|
@@ -386,6 +406,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
var biddinglistInformationData = template('biddinglistInformationData', module.data); |
|
|
|
$("#tabDetail4").html(biddinglistInformationData); |
|
|
|
if (content.length>0){$("#nowMoney").html(content[0].money);} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -481,7 +504,15 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
} |
|
|
|
|
|
|
|
//出价 |
|
|
|
biddingSubmitMethod = function (data) { |
|
|
|
module.biddingSubmitMethod = function (data) { |
|
|
|
let newMoney; |
|
|
|
if (data.msg&&data.code==200){ |
|
|
|
console.log(data) |
|
|
|
newMoney = data.msg; |
|
|
|
}else{ |
|
|
|
newMoney = module.data.outProjectInformationDetail.price; |
|
|
|
} |
|
|
|
|
|
|
|
if ($('#money').val()<=0){ |
|
|
|
tools.initError('请正常出价!'); |
|
|
|
return; |
|
|
@@ -495,9 +526,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
//判断当前竞价方式 |
|
|
|
if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){ |
|
|
|
//判断当前是否有人出价 |
|
|
|
if (module.data.biddinglistInformationDetail.length>1){ |
|
|
|
if (data.msg){ |
|
|
|
//判断用户出价不能高于当前出价最低价格 |
|
|
|
if(module.data.biddinglistInformationDetail[0].money < $('#money').val()){ |
|
|
|
if(newMoney < $('#money').val()){ |
|
|
|
tools.initError('出价不能高于当前出价最低价格'); |
|
|
|
return; |
|
|
|
} |
|
|
@@ -512,9 +543,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
//判断当前竞价方式 |
|
|
|
if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){ |
|
|
|
//判断当前是否有人出价 |
|
|
|
if (module.data.biddinglistInformationDetail.length>1){ |
|
|
|
if (data.msg){ |
|
|
|
//判断用户出价不能低于当前出价最高价格 |
|
|
|
if(module.data.biddinglistInformationDetail[0].money > $('#money').val()){ |
|
|
|
if(newMoney > $('#money').val()){ |
|
|
|
tools.initError('出价不能低于当前出价最高价格'); |
|
|
|
return; |
|
|
|
} |
|
|
@@ -682,6 +713,10 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
changeProMoney = function(){ |
|
|
|
tools.doGet(projectNewBidMoney+getQueryVariable('id'), {}, module.biddingSubmitMethod); |
|
|
|
} |
|
|
|
|
|
|
|
//向上加价 |
|
|
|
upMoney = function(){ |
|
|
|
if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'){ |
|
|
@@ -691,7 +726,6 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
return; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
|
|
|
|
if(module.data.biddinglistInformationDetail[0].money <= (parseInt($('#money').val())+parseInt(module.data.outProjectInformationDetail.ladderPrice))){ |
|
|
|
tools.initError('出价不能高于当前出价最低价格'); |
|
|
|
return; |
|
|
|