Browse Source

产权交易问题修改

RongCheng
庞东旭 1 year ago
parent
commit
931ce160bf
2 changed files with 25 additions and 10 deletions
  1. +6
    -0
      static/js/api/items.js
  2. +19
    -10
      static/js/project/listingItems/items.js

+ 6
- 0
static/js/api/items.js View File

@@ -123,3 +123,9 @@ var userMember = '/transaction/member/userId' //用户信息类接口
@param @param
*/ */
var projectNewBidMoney = '/transaction/website/projectNewBidMoney/' //用户信息类接口 var projectNewBidMoney = '/transaction/website/projectNewBidMoney/' //用户信息类接口

/*
@purl /outproject/getBiddingStopTime/id/
@param
*/
var getBiddingStopTime = '/transaction/website/outproject/getBiddingStopTime/id/' //用户信息类接口

+ 19
- 10
static/js/project/listingItems/items.js View File

@@ -12,7 +12,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
isFirst:'', isFirst:'',
timer:null, timer:null,
biddinglistInformationDetailLength:-1, biddinglistInformationDetailLength:-1,
biddingTimeType:0,
biddingTimeType:1,
biddinglistInformationDetail:[], biddinglistInformationDetail:[],
timeConfig:0.00 timeConfig:0.00
}, },
@@ -289,11 +289,12 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
if(t<0){ if(t<0){
t = 10; t = 10;
let biddingStartTime = content.biddingStartTime; let biddingStartTime = content.biddingStartTime;
let biddingStopTime = content.biddingStopTime;
let biddingStopTime = module.data.biddingStopTime;
var nowTime = Date.parse(new Date()); var nowTime = Date.parse(new Date());
if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){ if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
//正在竞价 //正在竞价
//交易项目竞价记录 //交易项目竞价记录
console.log('aaaaaaaaaaaaaaaaaaaa')
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
} }
} }
@@ -353,26 +354,27 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
let signupStartTime = content.signupStartTime; let signupStartTime = content.signupStartTime;
let signupStopTime = content.signupStopTime; let signupStopTime = content.signupStopTime;
let biddingStartTime = content.biddingStartTime; let biddingStartTime = content.biddingStartTime;
let biddingStopTime = content.biddingStopTime;
let biddingStopTime = module.data.biddingStopTime;
var nowTime = Date.parse(new Date()); var nowTime = Date.parse(new Date());
var difference = Date.parse(biddingStopTime)-nowTime; var difference = Date.parse(biddingStopTime)-nowTime;
var centerTime = module.data.timeConfig * 60 * 1000 var centerTime = module.data.timeConfig * 60 * 1000
if ( 0 < difference&&difference <= centerTime){ if ( 0 < difference&&difference <= centerTime){
console.log("竞价最后两分钟")
// console.log("竞价最后两分钟")
//正在竞价 //正在竞价
var m,s; var m,s;
document.getElementById('biddingTitle').innerHTML = '竞价进行中...';
document.getElementById('swiperType').style.display = 'block'; document.getElementById('swiperType').style.display = 'block';
m = Math.floor(difference/1000/60%60); m = Math.floor(difference/1000/60%60);
s = Math.floor(difference/1000%60); s = Math.floor(difference/1000%60);
$('#countType').html('竞价中') $('#countType').html('竞价中')
$('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') $('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
// console.log('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
//交易项目竞价记录 //交易项目竞价记录
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformationNew,true); tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformationNew,true);


if(module.data.outProjectInformationDetail.biddingType != '公开竞价' && module.data.biddingTimeType != 2){
if(module.data.outProjectInformationDetail.biddingType == '自由竞价' && module.data.biddingTimeType != 2){
document.getElementById('biddingTable').style.display = 'none'; document.getElementById('biddingTable').style.display = 'none';
document.getElementById('biddingTitle').style.display = 'block'; document.getElementById('biddingTitle').style.display = 'block';
document.getElementById('biddingTitle').innerHTML = '竞价进行中...';
} }
}else{ }else{
if (!signupStartTime){console.log('缺失报名开始时间');return;} if (!signupStartTime){console.log('缺失报名开始时间');return;}
@@ -417,9 +419,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.biddinglistInformation = function (data) { module.biddinglistInformation = function (data) {
if (data.code == 200) { if (data.code == 200) {
var content = data.rows; var content = data.rows;
if(module.data.biddinglistInformationDetailLength == content.length){
return;
}
// if(module.data.biddinglistInformationDetailLength == content.length){
// return;
// }
console.log(module.data.outProjectInformationDetail.biddingDirect) console.log(module.data.outProjectInformationDetail.biddingDirect)
setTimeout(function(){ setTimeout(function(){


@@ -433,8 +435,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
} }
}else{ }else{
if (content.length>0){ if (content.length>0){
console.log('11111111111111111111111')
document.getElementById('money').value = parseFloat(parseFloat(content[0].money) + parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2); document.getElementById('money').value = parseFloat(parseFloat(content[0].money) + parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2);

console.log(document.getElementById('money').value)
console.log(content[0].money)
console.log(parseFloat(parseFloat(content[0].money) + parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2))
}else{ }else{
console.log('2222222222222222222222222')
document.getElementById('money').value = parseFloat(parseFloat(module.data.outProjectInformationDetail.price)).toFixed(2); document.getElementById('money').value = parseFloat(parseFloat(module.data.outProjectInformationDetail.price)).toFixed(2);
// + parseFloat(module.data.outProjectInformationDetail.ladderPrice) // + parseFloat(module.data.outProjectInformationDetail.ladderPrice)
} }
@@ -458,7 +466,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.biddinglistInformationNew = function (data) { module.biddinglistInformationNew = function (data) {
if (data.code == 200) { if (data.code == 200) {
var content = data.rows; var content = data.rows;
console.log(module.data.biddinglistInformationDetail.length+'----------------------'+content.length)
console.log(module.data.biddinglistInformationDetailLength+'----------------------'+content.length)
if (module.data.biddinglistInformationDetailLength<content.length){ if (module.data.biddinglistInformationDetailLength<content.length){
let time = new Date(Date.parse(new Date())+(2 * 60 * 1000)); let time = new Date(Date.parse(new Date())+(2 * 60 * 1000));
const Y = time.getFullYear() const Y = time.getFullYear()
@@ -468,6 +476,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
const m = time.getMinutes() // 分钟 const m = time.getMinutes() // 分钟
const S = time.getSeconds() // 秒 const S = time.getSeconds() // 秒
module.data.biddingStopTime = Y+'-'+M+'-'+D+' '+H+':'+m+':'+S; module.data.biddingStopTime = Y+'-'+M+'-'+D+' '+H+':'+m+':'+S;
console.log(module.data.biddingStopTime)
module.data.biddinglistInformationDetailLength = content.length; module.data.biddinglistInformationDetailLength = content.length;


} }


Loading…
Cancel
Save