|
|
@@ -11,7 +11,7 @@ |
|
|
|
<van-tab title="竞拍信息" title-style="font-size:12px;"> |
|
|
|
<van-swipe class="my-swipe" height="235" indicator-color="white" @change="onChange"> |
|
|
|
<template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0"> |
|
|
|
<van-swipe-item v-for="(item,index) in detail.fileUrlList"><van-image :src="item?item:'../../static/images/index/banner.png'" height="235" /></van-swipe-item> |
|
|
|
<van-swipe-item v-for="(item,index) in detail.fileUrlList"><van-image :src="item.fileUrl?''+item.fileUrl:'../../static/images/index/banner.png'" height="235" /></van-swipe-item> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<van-swipe-item><van-image src="../../static/images/index/banner.png" height="235" /></van-swipe-item> |
|
|
@@ -128,7 +128,7 @@ |
|
|
|
<van-col span="10"><span>拟转出面积/数量</span> {{detail.allCount}}{{detail.allCountUnit}} </van-col> |
|
|
|
</van-row> |
|
|
|
<van-row> |
|
|
|
<van-col span="24"><span>拟转出期限</span>{{detail.outStartTime}}至{{detail.outStopTime}}共{{detail.outYearNum}}年</van-col> |
|
|
|
<van-col span="24"><span>拟转出期限</span>{{detail.outStartTime}} 至 {{detail.outStopTime}}     共{{detail.outYearNum}}年</van-col> |
|
|
|
</van-row> |
|
|
|
<van-row> |
|
|
|
<van-col span="24"><span>涉及农户数</span>{{ detail.peasantNum }}</van-col> |
|
|
@@ -150,7 +150,7 @@ |
|
|
|
<van-tab title="标的物图片" title-style="font-size:12px;"> |
|
|
|
<p class="delTitle">标的物图片</p> |
|
|
|
<template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0"> |
|
|
|
<van-image v-for="(item,index) in detail.fileUrlList" :src="item?item:'../../static/images/index/detailImg.png'" style="vertical-align: text-top;" /> |
|
|
|
<van-image v-for="(item,index) in detail.fileUrlList" :src="item.fileUrl?''+item.fileUrl:'../../static/images/index/detailImg.png'" style="vertical-align: text-top;" /> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<van-image src="../../static/images/index/detailImg.png" style="vertical-align: text-top;" /> |
|
|
@@ -189,31 +189,31 @@ |
|
|
|
</van-tab> |
|
|
|
</van-tabs> |
|
|
|
<div style="height: 2rem;"></div> |
|
|
|
<div class="bottomBtn"> |
|
|
|
<van-row> |
|
|
|
<div class="bottomBtn" v-if=""> |
|
|
|
<van-row v-if="!showBtn"> |
|
|
|
<van-col span="8" style="margin-top: 4px;" @click="showPopup"> |
|
|
|
<van-image src="../../static/images/icon/clock.png" style="vertical-align: text-bottom;" /> |
|
|
|
<p style="line-height: 0.2rem;color: #999999">提醒</p> |
|
|
|
</van-col> |
|
|
|
<van-col span="16"> |
|
|
|
<van-button round color="#C21F3A" block :to="{path:'signUp',query:{id:detail.id}}"> |
|
|
|
<van-button round color="#C21F3A" block :disabled="isSignup" :to="{path:'signUp',query:{projectId:detail.id,deposit:detail.deposit,projectName:detail.projectName}}"> |
|
|
|
{{ btnMsg }}<br/> |
|
|
|
<span style="font-size: 10px">保证金¥{{detail.deposit}}</span> |
|
|
|
</van-button> |
|
|
|
</van-col> |
|
|
|
</van-row> |
|
|
|
<van-row style="display: none;"> |
|
|
|
<van-col span="3" style="text-align: center;line-height: 1rem"> |
|
|
|
<van-button color="#e2e2e2" icon="plus" size="mini"></van-button> |
|
|
|
<van-row v-if="showBtn"> |
|
|
|
<van-col span="4" style="text-align: center;line-height: 1rem"> |
|
|
|
<van-button color="#e2e2e2" icon="minus" size="small" @click="sub"></van-button> |
|
|
|
</van-col> |
|
|
|
<van-col span="18"> |
|
|
|
<van-button round color="#C21F3A" block> |
|
|
|
<van-col span="16"> |
|
|
|
<van-button round color="#C21F3A" block @click="offer"> |
|
|
|
<p>出价</p> |
|
|
|
<p>434,000</p> |
|
|
|
<p>{{price}}元</p> |
|
|
|
</van-button> |
|
|
|
</van-col> |
|
|
|
<van-col span="3" style="text-align: center;line-height: 1rem"> |
|
|
|
<van-button color="#e2e2e2" icon="minus" size="mini"></van-button> |
|
|
|
<van-col span="4" style="text-align: center;line-height: 1rem"> |
|
|
|
<van-button color="#e2e2e2" icon="plus" size="small" @click="add"></van-button> |
|
|
|
</van-col> |
|
|
|
</van-row> |
|
|
|
</div> |
|
|
@@ -230,10 +230,23 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {getBiddingList, getOutProjectDetail, getWebConfig} from "../../api/project"; |
|
|
|
import { |
|
|
|
biddingSubmit, |
|
|
|
getBiddingList, |
|
|
|
getMember, |
|
|
|
getOutProjectDetail, |
|
|
|
getSignup, |
|
|
|
getWebConfig |
|
|
|
} from "../../api/project"; |
|
|
|
import {getInfo} from "../../api/login"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "projectDetail", |
|
|
|
provide(){ |
|
|
|
return{ |
|
|
|
reload:this.reload |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
current: 0, |
|
|
@@ -247,86 +260,48 @@ export default { |
|
|
|
tip:"", |
|
|
|
btnMsg:"", |
|
|
|
time:0, |
|
|
|
timeMsg:"" |
|
|
|
timeMsg:"", |
|
|
|
isSignup:false, |
|
|
|
showBtn:false, |
|
|
|
price:0, |
|
|
|
userAccount:"", |
|
|
|
userName:"", |
|
|
|
userId:"" |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|
|
|
|
computed: { |
|
|
|
getNowFormatDate:function(){ |
|
|
|
let date = new Date(); |
|
|
|
let seperator1 = "-"; |
|
|
|
let seperator2 = ":"; |
|
|
|
let month = date.getMonth() + 1; |
|
|
|
let day = date.getDate(); |
|
|
|
let hours = date.getHours(); |
|
|
|
let minutes = date.getMinutes(); |
|
|
|
let 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; |
|
|
|
} |
|
|
|
let currentdate = date.getFullYear() + seperator1 + month + seperator1 + day + " " + hours + seperator2 + minutes + seperator2 + seconds; |
|
|
|
console.log(currentdate) |
|
|
|
return currentdate; |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
getOutProjectDetail(this.id).then(response =>{ |
|
|
|
this.detail=response.data |
|
|
|
this.getDicts("rollout_type").then(res =>{ |
|
|
|
this.detail.rollout = this.selectDictLabel(res.data,response.data.rollout); |
|
|
|
if(this.detail.oneout==0){ |
|
|
|
this.detail.oneout = "无" |
|
|
|
}else{ |
|
|
|
this.detail.oneout = this.selectDictLabel(res.data,response.data.oneout); |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getDicts("project_type").then(res => { |
|
|
|
this.detail.projectNumber = this.selectDictLabel(res.data,response.data.projectNumber); |
|
|
|
}); |
|
|
|
this.getDicts("sub_object_type").then(res => { |
|
|
|
this.detail.projectType = this.selectDictLabel(res.data,response.data.projectType); |
|
|
|
}); |
|
|
|
this.getDicts("economic_type").then(res => { |
|
|
|
this.detail.economicType = this.selectDictLabel(res.data,response.data.economicType); |
|
|
|
}); |
|
|
|
this.getDicts("area_unit").then(res => { |
|
|
|
this.detail.allCountUnit = this.selectDictLabel(res.data,response.data.allCountUnit); |
|
|
|
}); |
|
|
|
this.getDicts("bidding_type").then(res => { |
|
|
|
this.detail.biddingType = this.selectDictLabel(res.data,response.data.biddingType); |
|
|
|
}); |
|
|
|
let biddingStartTime = Date.parse(this.detail.biddingStartTime); |
|
|
|
let biddingStopTime = Date.parse(this.detail.biddingStopTime); |
|
|
|
let signupStartTime = Date.parse(this.detail.signupStartTime); |
|
|
|
let signupStopTime = Date.parse(this.detail.signupStopTime); |
|
|
|
let nowDate = Date.parse(new Date()); |
|
|
|
if(signupStartTime>nowDate){ |
|
|
|
this.process= "报名未开始" |
|
|
|
this.tip=this.detail.signupStartTime+"开始报名" |
|
|
|
this.btnMsg="立即报名" |
|
|
|
this.timeMsg="距报名开始" |
|
|
|
this.time = signupStartTime-nowDate |
|
|
|
}else if(signupStopTime>nowDate>signupStartTime){ |
|
|
|
this.process= "报名中" |
|
|
|
this.tip=this.detail.signupStopTime+"报名截止" |
|
|
|
this.btnMsg="立即报名" |
|
|
|
this.timeMsg="距报名截止" |
|
|
|
this.time = signupStopTime-nowDate |
|
|
|
}else if(biddingStartTime>nowDate>signupStopTime){ |
|
|
|
this.process= "竞价未开始" |
|
|
|
this.tip=this.detail.biddingStartTime+"开始竞价" |
|
|
|
this.btnMsg="立即竞价" |
|
|
|
this.timeMsg="距竞价开始" |
|
|
|
this.time = biddingStartTime-nowDate |
|
|
|
}else if(biddingStopTime>nowDate>biddingStartTime){ |
|
|
|
this.process= "竞价中" |
|
|
|
this.tip=this.detail.biddingStopTime+"结束竞价" |
|
|
|
this.btnMsg="立即竞价" |
|
|
|
this.timeMsg="距竞价结束" |
|
|
|
this.time = biddingStopTime-nowDate |
|
|
|
}else if(nowDate>biddingStopTime){ |
|
|
|
this.process= "竞价结束" |
|
|
|
this.tip=this.detail.biddingStopTime+"结束竞价" |
|
|
|
this.btnMsg="立即竞价" |
|
|
|
this.timeMsg="竞价结束" |
|
|
|
this.time = 0 |
|
|
|
} |
|
|
|
}); |
|
|
|
getWebConfig().then(response =>{ |
|
|
|
response.data.map(item =>{ |
|
|
|
if(item.configKey=="cqjy.website.bidInfo"){ |
|
|
|
this.webConfig += item.configValue |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
getBiddingList(this.id).then(response =>{ |
|
|
|
this.biddinglistInformation = response.rows |
|
|
|
}); |
|
|
|
|
|
|
|
this.reload(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onChange(index) { |
|
|
@@ -335,6 +310,195 @@ export default { |
|
|
|
showPopup() { |
|
|
|
this.show = true; |
|
|
|
}, |
|
|
|
reload(){ |
|
|
|
getOutProjectDetail(this.id).then(response =>{ |
|
|
|
this.detail=response.data |
|
|
|
this.getDicts("rollout_type").then(res =>{ |
|
|
|
this.detail.rollout = this.selectDictLabel(res.data,response.data.rollout); |
|
|
|
if(this.detail.oneout==0){ |
|
|
|
this.detail.oneout = "无" |
|
|
|
}else{ |
|
|
|
this.detail.oneout = this.selectDictLabel(res.data,response.data.oneout); |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getDicts("project_type").then(res => { |
|
|
|
this.detail.projectNumber = this.selectDictLabel(res.data,response.data.projectNumber); |
|
|
|
}); |
|
|
|
this.getDicts("sub_object_type").then(res => { |
|
|
|
this.detail.projectType = this.selectDictLabel(res.data,response.data.projectType); |
|
|
|
}); |
|
|
|
this.getDicts("economic_type").then(res => { |
|
|
|
this.detail.economicType = this.selectDictLabel(res.data,response.data.economicType); |
|
|
|
}); |
|
|
|
this.getDicts("area_unit").then(res => { |
|
|
|
this.detail.allCountUnit = this.selectDictLabel(res.data,response.data.allCountUnit); |
|
|
|
}); |
|
|
|
this.getDicts("bidding_type").then(res => { |
|
|
|
this.detail.biddingType = this.selectDictLabel(res.data,response.data.biddingType); |
|
|
|
}); |
|
|
|
for(let i of this.detail.subjectList){ |
|
|
|
this.getDicts("area_unit").then(res => { |
|
|
|
i.areaUnit = this.selectDictLabel(res.data,i.areaUnit); |
|
|
|
}); |
|
|
|
} |
|
|
|
let biddingStartTime = Date.parse(this.detail.biddingStartTime)+0 |
|
|
|
let biddingStopTime = Date.parse(this.detail.biddingStopTime)+0 |
|
|
|
let signupStartTime = Date.parse(this.detail.signupStartTime)+0 |
|
|
|
let signupStopTime = Date.parse(this.detail.signupStopTime)+0 |
|
|
|
let nowDate = Date.parse(new Date()); |
|
|
|
if(signupStartTime>nowDate){ |
|
|
|
this.process= "报名未开始" |
|
|
|
this.tip=this.detail.signupStartTime+"开始报名" |
|
|
|
this.btnMsg="立即报名" |
|
|
|
this.timeMsg="距报名开始" |
|
|
|
this.time = signupStartTime-nowDate |
|
|
|
this.isSignup=true |
|
|
|
}else if(signupStopTime>nowDate&&signupStopTime>signupStartTime){ |
|
|
|
this.process= "报名中" |
|
|
|
this.tip=this.detail.signupStopTime+"报名截止" |
|
|
|
this.btnMsg="立即报名" |
|
|
|
this.timeMsg="距报名截止" |
|
|
|
this.time = signupStopTime-nowDate |
|
|
|
getInfo().then(response => { |
|
|
|
let _this = this |
|
|
|
getMember(response.user.userId).then(res => { |
|
|
|
console.log(res) |
|
|
|
let data= { |
|
|
|
projectId:this.id, |
|
|
|
memberId:res.data.id, |
|
|
|
}; |
|
|
|
getSignup(data).then(r =>{ |
|
|
|
if(r.data=="1"){ |
|
|
|
_this.isSignup=true |
|
|
|
this.btnMsg="已报名" |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else if(biddingStartTime>nowDate&&nowDate>signupStopTime){ |
|
|
|
this.process= "竞价未开始" |
|
|
|
this.tip=this.detail.biddingStartTime+"开始竞价" |
|
|
|
this.timeMsg="距竞价开始" |
|
|
|
this.time = biddingStartTime-nowDate |
|
|
|
getInfo().then(response => { |
|
|
|
let _this = this |
|
|
|
getMember(response.user.userId).then(res => { |
|
|
|
let data= { |
|
|
|
projectId:this.id, |
|
|
|
memberId:res.data.id, |
|
|
|
}; |
|
|
|
getSignup(data).then(r =>{ |
|
|
|
if(r.data=="1"){ |
|
|
|
_this.isSignup=true |
|
|
|
this.btnMsg="立即竞价" |
|
|
|
this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1 |
|
|
|
}else{ |
|
|
|
this.btnMsg="未报名" |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else if(biddingStopTime>nowDate&&nowDate>biddingStartTime){ |
|
|
|
this.process= "竞价中" |
|
|
|
this.tip=this.detail.biddingStopTime+"结束竞价" |
|
|
|
this.timeMsg="距竞价结束" |
|
|
|
this.time = biddingStopTime-nowDate |
|
|
|
getInfo().then(response => { |
|
|
|
let _this = this |
|
|
|
this.userId=response.user.userId |
|
|
|
getMember(response.user.userId).then(res => { |
|
|
|
this.userAccount=res.data.phone |
|
|
|
this.userName=res.data.realname |
|
|
|
this.memberId=res.data.id |
|
|
|
let data= { |
|
|
|
projectId:this.id, |
|
|
|
memberId:res.data.id, |
|
|
|
}; |
|
|
|
getSignup(data).then(r =>{ |
|
|
|
if(r.data=="1"){ |
|
|
|
_this.isSignup=true |
|
|
|
this.btnMsg="立即竞价" |
|
|
|
this.showBtn=true |
|
|
|
this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1 |
|
|
|
}else{ |
|
|
|
this.btnMsg="未报名" |
|
|
|
_this.isSignup=true |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else if(nowDate>biddingStopTime){ |
|
|
|
this.process= "竞价结束" |
|
|
|
this.tip=this.detail.biddingStopTime+"结束竞价" |
|
|
|
this.btnMsg="竞价结束" |
|
|
|
this.timeMsg="竞价结束" |
|
|
|
this.time = 0 |
|
|
|
this.isSignup = true |
|
|
|
} |
|
|
|
}); |
|
|
|
getWebConfig().then(response =>{ |
|
|
|
response.data.map(item =>{ |
|
|
|
if(item.configKey=="cqjy.website.bidInfo"){ |
|
|
|
this.webConfig += item.configValue |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
getBiddingList(this.id).then(response =>{ |
|
|
|
this.biddinglistInformation = response.rows |
|
|
|
}); |
|
|
|
}, |
|
|
|
offer(){ |
|
|
|
let data= { |
|
|
|
projectId:this.id, |
|
|
|
memberId:this.memberId, |
|
|
|
userId:this.userId, |
|
|
|
userAccount:this.userAccount, |
|
|
|
userName:this.userName, |
|
|
|
money:this.price, |
|
|
|
loginTime:this.getNowFormatDate |
|
|
|
}; |
|
|
|
console.log(data) |
|
|
|
biddingSubmit(data).then(response =>{ |
|
|
|
let _this = this |
|
|
|
if(response){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'success', // 找到自己需要的图标 |
|
|
|
message: '出价成功', |
|
|
|
duration:"1000", |
|
|
|
onClose:function(){ |
|
|
|
_this.reload() |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
add(){ |
|
|
|
this.detail.ladderPrice?this.price=this.price+this.detail.ladderPrice:this.price+=1 |
|
|
|
}, |
|
|
|
sub(){ |
|
|
|
if(this.detail.ladderPrice){ |
|
|
|
if((this.price-this.detail.ladderPrice)>this.biddinglistInformation[0].money){ |
|
|
|
this.price-=this.detail.ladderPrice |
|
|
|
}else{ |
|
|
|
this.$toast({ |
|
|
|
icon: 'error', // 找到自己需要的图标 |
|
|
|
message: '出价不能低于当前最高价', |
|
|
|
duration:"1000", |
|
|
|
}) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if((this.price-1)>this.biddinglistInformation[0].money){ |
|
|
|
this.price-=1 |
|
|
|
}else{ |
|
|
|
this.$toast({ |
|
|
|
icon: 'error', // 找到自己需要的图标 |
|
|
|
message: '出价不能低于当前最高价', |
|
|
|
duration:"1000", |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|