소스 검색

产权交易问题修改

RongCheng
庞东旭 1 년 전
부모
커밋
7e4b1e6b66
3개의 변경된 파일94개의 추가작업 그리고 13개의 파일을 삭제
  1. +32
    -0
      static/js/common/tools.js
  2. +61
    -12
      static/js/project/listingItems/items2.js
  3. +1
    -1
      view/listingItems/itemsDetail.html

+ 32
- 0
static/js/common/tools.js 파일 보기

@@ -468,6 +468,38 @@ define(['jquery', 'dialog','jsencrypt'], function ($, dialog,JSEncrypt) {
console.log(currentdate) console.log(currentdate)
return currentdate; return currentdate;
}, },
/**
* getNowFormatDateNew 获取时间
* @param
*/
getNowFormatDateNew: function (data) {
var date = data;
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var day = date.getDate();
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (day >= 0 && day <= 9) {
day = "0" + day;
}
if (hours >= 0 && hours <= 9) {
hours = "0" + hours;
}
if (minutes >= 0 && minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds >= 0 && seconds <= 9) {
seconds = "0" + seconds;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + day + " " + hours + seperator2 + minutes + seperator2 + seconds;
console.log(currentdate)
return currentdate;
},
/** /**
* getWebConfig 网站配置信息 * getWebConfig 网站配置信息
* @param * @param


+ 61
- 12
static/js/project/listingItems/items2.js 파일 보기

@@ -120,14 +120,13 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
} }
} }
module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){
console.log('aaaaaaaaaaa')
// console.log('aaaaaaaaaaa')
var signupStartTime = signupStartTime; var signupStartTime = signupStartTime;
var signupStopTime = signupStopTime; var signupStopTime = signupStopTime;
var biddingStartTime = biddingStartTime; var biddingStartTime = biddingStartTime;
var biddingStopTime = biddingStopTime; var biddingStopTime = biddingStopTime;
var nowTime = Date.parse(new Date());


var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
// console.log(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")))
var beginTimes=signupStartTime.substring(0,10).split('-'); var beginTimes=signupStartTime.substring(0,10).split('-');
var endTimes=signupStopTime.substring(0,10).split('-'); var endTimes=signupStopTime.substring(0,10).split('-');


@@ -148,8 +147,10 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
var signDownLeftTime = Date.parse(signupStopTime)-nowTime; var signDownLeftTime = Date.parse(signupStopTime)-nowTime;
//定义变量 d,h,m,s保存倒计时的时间 //定义变量 d,h,m,s保存倒计时的时间
var d,h,m,s; var d,h,m,s;

if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){ if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
//正在竞价 //正在竞价
// console.log('正在竞价')
module.data.biddingTimeType = 1; module.data.biddingTimeType = 1;
if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){ if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){
document.getElementById('biddingTable').style.display = 'none'; document.getElementById('biddingTable').style.display = 'none';
@@ -161,6 +162,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
h = Math.floor(leftTime/1000/60/60%24); h = Math.floor(leftTime/1000/60/60%24);
m = Math.floor(leftTime/1000/60%60); m = Math.floor(leftTime/1000/60%60);
s = Math.floor(leftTime/1000%60); s = Math.floor(leftTime/1000%60);
// console.log('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
$('#countType').html('竞价中') $('#countType').html('竞价中')
$('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') $('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
}else if (nowTime>Date.parse(biddingStopTime)){ }else if (nowTime>Date.parse(biddingStopTime)){
@@ -278,7 +280,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
var t = 10; var t = 10;


module.data.timeDown = setInterval(function(){ module.data.timeDown = setInterval(function(){
console.log($('#countType').html())
// console.log($('#countType').html())
if ($('#countType').html()!='竞价中'){ if ($('#countType').html()!='竞价中'){
clearInterval(module.data.timeDown) clearInterval(module.data.timeDown)
document.getElementById('timeDown').style.display = 'none'; document.getElementById('timeDown').style.display = 'none';
@@ -345,9 +347,6 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);







//倒计时 //倒计时
module.data.timer = setInterval(function(){ module.data.timer = setInterval(function(){
// '2023-05-17 14:56:00' // '2023-05-17 14:56:00'
@@ -356,13 +355,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime; let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime;
let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime; let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;


var nowTime = Date.parse(new Date());
var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("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
var centerTime = content.delayPeriod * 1000 var centerTime = content.delayPeriod * 1000


if ( 0 < difference&&difference <= centerTime){
console.log("竞价最后两分钟")
if ( 0 <= difference&&difference <= centerTime){
// console.log("竞价最后两分钟")
//正在竞价 //正在竞价
var m,s; var m,s;
if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){ if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){
@@ -376,7 +376,33 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
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>秒')
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, module.getBiddingStopTime,true);
console.log(s+'-------------'+m)
if (s < 1 && m < 1){
console.log("竞价结束22222222222")
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){
if (data.code == 200) {
var nowDate = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
module.data.outProjectInformationDetail.biddingStopTime = data.data

let timeNew = Date.parse(data.data) + 0 - nowDate;
if (timeNew > 0) {
module.data.outProjectInformationDetail.biddingStopTime = data.data;
// module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,data.data);
}else{
$('#countType').html('')
$('#countDown').html('竞价结束')
document.getElementById('swiperType').style.display = 'none';
document.getElementById('biddingTable').style.display = 'table-block';
document.getElementById('biddingTitle').style.display = 'none';
module.data.biddingTimeType = 2;
return;
}
}
},true);

}else{
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, module.getBiddingStopTime,true);
}
}else{ }else{
if (!signupStartTime){console.log('缺失报名开始时间');return;} if (!signupStartTime){console.log('缺失报名开始时间');return;}
if (!signupStopTime){console.log('缺失报名结束时间');return;} if (!signupStopTime){console.log('缺失报名结束时间');return;}
@@ -408,6 +434,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function


module.getBiddingStopTime = function(data){ module.getBiddingStopTime = function(data){
if (data.code == 200) { if (data.code == 200) {
$('#stopTime').html(data.data)
module.data.outProjectInformationDetail.biddingStopTime = data.data module.data.outProjectInformationDetail.biddingStopTime = data.data
} }
} }
@@ -638,6 +665,28 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
} }


module.biddingSubmitOpen = function(){ module.biddingSubmitOpen = function(){
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){
if (data.code == 200) {
var nowDate = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
module.data.outProjectInformationDetail.biddingStopTime = data.data
let timeNew = Date.parse(data.data) + 0 - nowDate;
if (timeNew > 0) {
module.data.outProjectInformationDetail.biddingStopTime = data.data;
module.dataCompare(
module.data.outProjectInformationDetail.signupStartTime,
module.data.outProjectInformationDetail.signupStopTime,
module.data.outProjectInformationDetail.biddingStartTime,data.data);
}else{
$('#countType').html('')
$('#countDown').html('竞价结束')
document.getElementById('swiperType').style.display = 'none';
document.getElementById('biddingTable').style.display = 'table-block';
document.getElementById('biddingTitle').style.display = 'none';
module.data.biddingTimeType = 2;
return;
}
}
},true);
tools.initError('出价成功'); tools.initError('出价成功');
// $('#money').val(0) // $('#money').val(0)
} }


+ 1
- 1
view/listingItems/itemsDetail.html 파일 보기

@@ -315,7 +315,7 @@
</tr> </tr>
<tr> <tr>
<td>竞价开始时间:{{outProjectInformationDetail.biddingStartTime}}</td> <td>竞价开始时间:{{outProjectInformationDetail.biddingStartTime}}</td>
<td>竞价截止时间(含延期):{{outProjectInformationDetail.biddingStopTime}}</td>
<td>竞价截止时间(含延期):<span id="stopTime">{{outProjectInformationDetail.biddingStopTime}}</span></td>
</tr> </tr>
<tr> <tr>
<td>竞价方式:{{outProjectInformationDetail.biddingType}}<i title="友情提示:非拍卖竞价方式下,竞价过程中不显示竞价记录!" class="wh">?</i></td> <td>竞价方式:{{outProjectInformationDetail.biddingType}}<i title="友情提示:非拍卖竞价方式下,竞价过程中不显示竞价记录!" class="wh">?</i></td>


불러오는 중...
취소
저장