Browse Source

产权交易问题修改

rongxin_prod
庞东旭 2 years ago
parent
commit
f06dd4daf5
4 changed files with 80 additions and 19 deletions
  1. +1
    -1
      src/api/project/index.js
  2. +58
    -13
      src/views/project/projectDetail.vue
  3. +13
    -4
      src/views/project/signUp.vue
  4. +8
    -1
      src/views/register/userRegister.vue

+ 1
- 1
src/api/project/index.js View File

@@ -78,7 +78,7 @@ export function getSignup (params) {
// 出价 // 出价
export function biddingSubmit (params) { export function biddingSubmit (params) {
return request({ return request({
url:'/transaction/bidding',
url:'/transaction/bidding/add',
method: 'post', method: 'post',
data:params data:params
}) })


+ 58
- 13
src/views/project/projectDetail.vue View File

@@ -191,7 +191,7 @@
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<div style="height: 2rem;"></div>
<div style="height: 3rem;"></div>
<div class="bottomBtn" v-if=""> <div class="bottomBtn" v-if="">
<van-row v-if="!showBtn"> <van-row v-if="!showBtn">
<van-col span="8" style="margin-top: 4px;" @click="showPopup"> <van-col span="8" style="margin-top: 4px;" @click="showPopup">
@@ -205,6 +205,7 @@
</van-button> </van-button>
</van-col> </van-col>
</van-row> </van-row>
<van-field v-if="showBtn" v-model="price" type="number" input-align="center" placeholder="请输入出价金额" />
<van-row v-if="showBtn"> <van-row v-if="showBtn">
<van-col span="4" style="text-align: center;line-height: 1rem"> <van-col span="4" style="text-align: center;line-height: 1rem">
<van-button color="#e2e2e2" icon="minus" size="small" @click="sub"></van-button> <van-button color="#e2e2e2" icon="minus" size="small" @click="sub"></van-button>
@@ -212,7 +213,7 @@
<van-col span="16"> <van-col span="16">
<van-button round color="#C21F3A" block @click="offer"> <van-button round color="#C21F3A" block @click="offer">
<p>出价</p> <p>出价</p>
<p>{{price}}元</p>
<!-- <p>{{price}}元</p>-->
</van-button> </van-button>
</van-col> </van-col>
<van-col span="4" style="text-align: center;line-height: 1rem"> <van-col span="4" style="text-align: center;line-height: 1rem">
@@ -266,7 +267,7 @@ export default {
timeMsg:"", timeMsg:"",
isSignup:false, isSignup:false,
showBtn:false, showBtn:false,
price:0,
price:null,
userAccount:"", userAccount:"",
userName:"", userName:"",
userId:"" userId:""
@@ -353,19 +354,23 @@ export default {
let signupStopTime = Date.parse(this.detail.signupStopTime)+0 let signupStopTime = Date.parse(this.detail.signupStopTime)+0
let nowDate = Date.parse(new Date()); let nowDate = Date.parse(new Date());


console.log('biddingStartTime'+biddingStartTime)
console.log('biddingStopTime'+biddingStopTime)
console.log('signupStartTime'+signupStartTime)
console.log('signupStopTime'+signupStopTime)
console.log('竞价开始时间'+biddingStartTime)
console.log('竞价截止时间'+biddingStopTime)
console.log('报名开始时间'+signupStartTime)
console.log('报名截止时间'+signupStopTime)
console.log('当前时间'+nowDate)


if(signupStartTime>nowDate){ if(signupStartTime>nowDate){
console.log('未开始')
this.process= "报名未开始" this.process= "报名未开始"
this.tip=this.detail.signupStartTime+"开始报名" this.tip=this.detail.signupStartTime+"开始报名"
this.btnMsg="立即报名" this.btnMsg="立即报名"
this.timeMsg="距报名开始" this.timeMsg="距报名开始"
this.time = signupStartTime-nowDate this.time = signupStartTime-nowDate
this.isSignup=true this.isSignup=true
}else if(signupStopTime>nowDate&&signupStopTime>signupStartTime){
}
if(signupStopTime>nowDate&&signupStopTime>signupStartTime){
console.log('报名中')
this.process= "报名中" this.process= "报名中"
this.tip=this.detail.signupStopTime+"报名截止" this.tip=this.detail.signupStopTime+"报名截止"
this.btnMsg="立即报名" this.btnMsg="立即报名"
@@ -387,7 +392,9 @@ export default {
}) })
}) })
}) })
}else if(biddingStartTime>nowDate&&nowDate>signupStopTime){
}
if(biddingStartTime>nowDate&&nowDate>signupStopTime){
console.log('竞价未开始')
this.process= "竞价未开始" this.process= "竞价未开始"
this.tip=this.detail.biddingStartTime+"开始竞价" this.tip=this.detail.biddingStartTime+"开始竞价"
this.timeMsg="距竞价开始" this.timeMsg="距竞价开始"
@@ -403,14 +410,16 @@ export default {
if(r.data=="1"){ if(r.data=="1"){
_this.isSignup=true _this.isSignup=true
this.btnMsg="立即竞价" this.btnMsg="立即竞价"
this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
// this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
}else{ }else{
this.btnMsg="未报名" this.btnMsg="未报名"
} }
}) })
}) })
}) })
}else if(biddingStopTime>nowDate&&nowDate>biddingStartTime){
}
if(biddingStopTime>nowDate&&nowDate>biddingStartTime){
console.log('竞价中')
this.process= "竞价中" this.process= "竞价中"
this.tip=this.detail.biddingStopTime+"结束竞价" this.tip=this.detail.biddingStopTime+"结束竞价"
this.timeMsg="距竞价结束" this.timeMsg="距竞价结束"
@@ -431,7 +440,7 @@ export default {
_this.isSignup=true _this.isSignup=true
this.btnMsg="立即竞价" this.btnMsg="立即竞价"
this.showBtn=true this.showBtn=true
this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
// this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
}else{ }else{
this.btnMsg="未报名" this.btnMsg="未报名"
_this.isSignup=true _this.isSignup=true
@@ -439,7 +448,9 @@ export default {
}) })
}) })
}) })
}else if(nowDate>biddingStopTime){
}
if(nowDate>biddingStopTime){
console.log('竞价结束')
this.process= "竞价结束" this.process= "竞价结束"
this.tip=this.detail.biddingStopTime+"结束竞价" this.tip=this.detail.biddingStopTime+"结束竞价"
this.btnMsg="竞价结束" this.btnMsg="竞价结束"
@@ -460,6 +471,40 @@ export default {
}); });
}, },
offer(){ offer(){

if (this.price==''||this.price<1||this.price == null){
this.$toast({
icon: 'fail', // 找到自己需要的图标
message: '请输入出价金额',
duration:"1000",
onClose:function(){
}
})
return;
}
if (this.detail.biddingDirect == '递减竞价'){
if(this.detail.price<this.price||this.price == null){
this.$toast({
icon: 'fail', // 找到自己需要的图标
message: '出价不能高于挂牌价',
duration:"1000",
onClose:function(){
}
})
return;
}
}else{
if(this.detail.price>this.price){
this.$toast({
icon: 'fail', // 找到自己需要的图标
message: '出价不能低于挂牌价',
duration:"1000",
onClose:function(){
}
})
return;
}
}
let data= { let data= {
projectId:this.id, projectId:this.id,
memberId:this.memberId, memberId:this.memberId,


+ 13
- 4
src/views/project/signUp.vue View File

@@ -30,8 +30,8 @@
<h2 style="margin-bottom:10px;padding:0 10px">2.竞买人身份确认</h2> <h2 style="margin-bottom:10px;padding:0 10px">2.竞买人身份确认</h2>
<van-form @submit="onSubmit"> <van-form @submit="onSubmit">
<van-field <van-field
v-model="nickName"
name="nickName"
v-model="realname"
name="realname"
label="姓名" label="姓名"
placeholder="姓名" placeholder="姓名"
required required
@@ -46,8 +46,16 @@
:rules="[{ required: true, message: '请填写会员账号' }]" :rules="[{ required: true, message: '请填写会员账号' }]"
/> />
<van-field <van-field
v-model="bankAddress"
v-model="bankCardName"
name="bankCardName" name="bankCardName"
label="开户姓名"
placeholder="开户姓名"
required
:rules="[{ required: true, message: '请填写开户姓名' }]"
/>
<van-field
v-model="bankAddress"
name="bankAddress"
label="开户银行" label="开户银行"
placeholder="开户银行" placeholder="开户银行"
required required
@@ -128,7 +136,8 @@ export default {
created() { created() {
getInfo().then(response => { getInfo().then(response => {
getMember(response.user.userId).then(res => { getMember(response.user.userId).then(res => {
this.nickName = res.data.realname
this.realname = res.data.realname
this.bankCardName = res.data.bankCardName
this.idCardNum = res.data.idCardNum this.idCardNum = res.data.idCardNum
this.bankAddress = res.data.bankAddress this.bankAddress = res.data.bankAddress
this.bankCardNum = res.data.bankCardNum this.bankCardNum = res.data.bankCardNum


+ 8
- 1
src/views/register/userRegister.vue View File

@@ -85,7 +85,14 @@ export default {
getSubmit(){ getSubmit(){
console.log(this.form) console.log(this.form)
userRegister(this.form).then((res) => { userRegister(this.form).then((res) => {
console.log(res)
this.$toast({
icon: 'success', // 找到自己需要的图标
message: '注册成功',
duration:"2000",
onClose:function(){
this.$router.push({path: '/login'})
}
})
}); });
} }
}, },


Loading…
Cancel
Save