Przeglądaj źródła

产权交易

RongCheng
庞东旭 1 rok temu
rodzic
commit
2424c2100a
1 zmienionych plików z 56 dodań i 42 usunięć
  1. +56
    -42
      static/js/project/listingItems/items.js

+ 56
- 42
static/js/project/listingItems/items.js Wyświetl plik

@@ -10,7 +10,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
showImgInformationDetail:'',
loginNow:'',
timer:null,
biddinglistInformationDetailLength:1,
biddinglistInformationDetailLength:-1,
biddingTimeType:0,
biddinglistInformationDetail:[]
},
@@ -248,44 +248,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
if (data.code == 200) {
var content = data.data;
module.data.biddingStopTime = content.biddingStopTime;
//倒计时
module.data.timer = setInterval(function(){

//挂牌项目竞价记录
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);

let signupStartTime = content.signupStartTime;
let signupStopTime = content.signupStopTime;
let biddingStartTime = content.biddingStartTime;
let biddingStopTime = module.data.biddingStopTime;
// '2023-05-17 14:56:00'
var nowTime = Date.parse(new Date());
var difference = Date.parse(biddingStopTime)-nowTime;
var centerTime = 2 * 60 * 1000

if ( 0 < difference&&difference <= centerTime){
console.log("竞价最后两分钟")
//正在竞价
var m,s;
document.getElementById('biddingTitle').innerHTML = '竞价进行中...';
document.getElementById('swiperType').style.display = 'block';
m = Math.floor(difference/1000/60%60);
s = Math.floor(difference/1000%60);
$('#countType').html('竞价中')
$('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
//挂牌项目竞价记录
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformationNew,true);

if(module.data.outProjectInformationDetail.biddingType != '公开竞价' && module.data.biddingTimeType != 2){
document.getElementById('biddingTable').style.display = 'none';
document.getElementById('biddingTitle').style.display = 'block';
}
}else{
module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime);
}


},1000)
for(var i = 0 ; i < content.fileUrlList.length ; i++){
content.fileUrlList[i].fileUrl = serverApi+content.fileUrlList[i].fileUrl;
}
@@ -297,6 +260,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
},2000)

$("#know").html(module.data.know);

//挂牌项目竞价记录
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);

@@ -335,7 +299,44 @@ 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);

let signupStartTime = content.signupStartTime;
let signupStopTime = content.signupStopTime;
let biddingStartTime = content.biddingStartTime;
let biddingStopTime = module.data.biddingStopTime;
// '2023-05-17 14:56:00'
var nowTime = Date.parse(new Date());
var difference = Date.parse(biddingStopTime)-nowTime;
var centerTime = 2 * 60 * 1000

if ( 0 < difference&&difference <= centerTime){
console.log("竞价最后两分钟")
//正在竞价
var m,s;
document.getElementById('biddingTitle').innerHTML = '竞价进行中...';
document.getElementById('swiperType').style.display = 'block';
m = Math.floor(difference/1000/60%60);
s = Math.floor(difference/1000%60);
$('#countType').html('竞价中')
$('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
//挂牌项目竞价记录
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformationNew,true);

if(module.data.outProjectInformationDetail.biddingType != '公开竞价' && module.data.biddingTimeType != 2){
document.getElementById('biddingTable').style.display = 'none';
document.getElementById('biddingTitle').style.display = 'block';
}
}else{
module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime);
}


},1000)

if(module.data.loginNow){
//判断是否报名
@@ -363,16 +364,28 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
//竞价记录
module.biddinglistInformation = function (data) {
if (data.code == 200) {
console.log(data)
var content = data.rows;
if(module.data.biddinglistInformationDetailLength == content.length){
return;
}
console.log(module.data.outProjectInformationDetail.biddingDirect)
setTimeout(function(){
if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'||module.data.outProjectInformationDetail.biddingDirect == '2'){
if (content.length>0){
document.getElementById('money').value = parseInt(content[0].money) - parseInt(module.data.outProjectInformationDetail.ladderPrice);
}else{
document.getElementById('money').value = parseInt(parseInt(module.data.outProjectInformationDetail.price) - parseInt(module.data.outProjectInformationDetail.ladderPrice));
}
}else{

}
},2000)

module.data.biddinglistInformationDetail = content;
module.data.biddinglistInformationDetailLength = content.length;
var biddinglistInformationData = template('biddinglistInformationData', module.data);
$("#tabDetail4").html(biddinglistInformationData);
$("#nowMoney").html(content[0].money);
if (content.length>0){$("#nowMoney").html(content[0].money);}
}
}

@@ -686,7 +699,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
}
}else{
if (module.data.biddinglistInformationDetail.length<1){
if(module.data.outProjectInformationDetail.price>=$('#money').val()){
if(module.data.outProjectInformationDetail.price>$('#money').val()){
tools.initError('出价不能低于挂牌价格');
return;
}
@@ -701,6 +714,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
$('#money').val() == null||$('#money').val() == ''?$('#money').val(0):'';

console.log($('#money').val())

module.data.outProjectInformationDetail.ladderPrice?$('#money').val(parseInt($('#money').val())+parseInt(module.data.outProjectInformationDetail.ladderPrice)):document.getElementById('money').value += 1

}
@@ -709,7 +723,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
downMoney = function(){
if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'){
if (module.data.biddinglistInformationDetail.length<1){
if(module.data.outProjectInformationDetail.price<=$('#money').val()){
if(module.data.outProjectInformationDetail.price<$('#money').val()){
tools.initError('出价不能高于挂牌价格');
return;
}


Ładowanie…
Anuluj
Zapisz