浏览代码

产权交易出价

RongCheng
庞东旭 2 年前
父节点
当前提交
eb6162cad0
共有 4 个文件被更改,包括 102 次插入54 次删除
  1. +5
    -0
      static/css/listingItems/items.css
  2. +6
    -0
      static/js/api/items.js
  3. +51
    -17
      static/js/project/listingItems/items.js
  4. +40
    -37
      view/listingItems/itemsDetail.html

+ 5
- 0
static/css/listingItems/items.css 查看文件

@@ -663,4 +663,9 @@ input::-webkit-inner-spin-button {
color: #ffffff;
margin: 0 auto;
border-radius: 50px;
}

#timeDown{
font-size: 14px;
margin-left: 15px;
}

+ 6
- 0
static/js/api/items.js 查看文件

@@ -117,3 +117,9 @@ var userData = '/getInfo' //修改用户信息类接口
@param
*/
var userMember = '/transaction/member/userId' //用户信息类接口

/*
@purl /transaction/website/member/{id}
@param
*/
var projectNewBidMoney = '/transaction/website/projectNewBidMoney/' //用户信息类接口

+ 51
- 17
static/js/project/listingItems/items.js 查看文件

@@ -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;


+ 40
- 37
view/listingItems/itemsDetail.html 查看文件

@@ -226,7 +226,10 @@
{{if outProjectInformationDetail.biddingType != '自由竞价' && biddinglistInformationDetail.length>0}}
<tr>
<td>当前价格</td>
<td><span id="nowMoney">{{biddinglistInformationDetail[0].money}}</span> 元</td>
<td>
<span id="nowMoney">{{biddinglistInformationDetail[0].money}}</span> 元
<span style="display: none;" id="timeDown"></span>
</td>
</tr>
{{/if}}
</table>
@@ -256,7 +259,7 @@
{{if loginNow != ''}}
{{if signup == 1}}
{{if biddingTimeType == 1}}
<div class="sign" id="signBtnYes" onclick="biddingSubmitMethod()">
<div class="sign" id="signBtnYes" onclick="changeProMoney()">
<p>立即出价</p>
</div>
{{/if}}
@@ -401,7 +404,7 @@
<td colspan="6">{{outProjectInformationDetail.email}}</td>
</tr>
<tr>
<td rowspan="{{29+outProjectInformationDetail.subjectList.length}}">转出项目<br/>基本情况</td>
<td rowspan="{{25+outProjectInformationDetail.subjectList.length}}">转出项目<br/>基本情况</td>
<td colspan="10">项目类型<span class="red">*</span></td>
<td colspan="17">{{outProjectInformationDetail.projectNumber}}</td>
</tr>
@@ -417,20 +420,20 @@
<td colspan="10">坐落</td>
<td colspan="17">{{outProjectInformationDetail.locationName}}</td>
</tr>
<tr>
<td colspan="10">是否属再次转出<span class="red">*</span></td>
<td colspan="17">
{{if outProjectInformationDetail.twoout == 'N'}}
{{else}}
{{/if}}
</td>
</tr>
<tr>
<td colspan="10">前次转出方式</td>
<td colspan="17">{{outProjectInformationDetail.oneout}}</td>
</tr>
<!-- <tr>-->
<!-- <td colspan="10">是否属再次转出<span class="red">*</span></td>-->
<!-- <td colspan="17">-->
<!-- {{if outProjectInformationDetail.twoout == 'N'}}-->
<!---->
<!-- {{else}}-->
<!---->
<!-- {{/if}}-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td colspan="10">前次转出方式</td>-->
<!-- <td colspan="17">{{outProjectInformationDetail.oneout}}</td>-->
<!-- </tr>-->
<tr>
<td colspan="10">拟转出方式<span class="red">*</span></td>
<td colspan="17">{{outProjectInformationDetail.rollout}}</td>
@@ -488,26 +491,26 @@
<td colspan="10">拟流转土地用途</td>
<td colspan="17">{{outProjectInformationDetail.contractPurpose}}</td>
</tr>
<tr>
<td colspan="10">其他农户是否放弃行使优先权</td>
<td colspan="17">
{{if outProjectInformationDetail.otherPeasant == 'N'}}
{{else}}
{{/if}}
</td>
</tr>
<tr>
<td colspan="10">是否优先本村集体内部成员</td>
<td colspan="17">
{{if outProjectInformationDetail.isOwnFirst == 'N'}}
{{else}}
{{/if}}
</td>
</tr>
<!-- <tr>-->
<!-- <td colspan="10">其他农户是否放弃行使优先权</td>-->
<!-- <td colspan="17">-->
<!-- {{if outProjectInformationDetail.otherPeasant == 'N'}}-->
<!---->
<!-- {{else}}-->
<!---->
<!-- {{/if}}-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td colspan="10">是否优先本村集体内部成员</td>-->
<!-- <td colspan="17">-->
<!-- {{if outProjectInformationDetail.isOwnFirst == 'N'}}-->
<!---->
<!-- {{else}}-->
<!---->
<!-- {{/if}}-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td colspan="10">受让方应当具备的条件</td>
<td colspan="17">{{outProjectInformationDetail.condition}}</td>


正在加载...
取消
保存