|
|
@@ -502,14 +502,28 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
getBiddingList(this.id).then(response =>{ |
|
|
|
this.biddinglistInformation = response.rows |
|
|
|
this.biddinglistInformationLength = response.total |
|
|
|
if (response.rows.length>0&&this.detail.ladderPrice){ |
|
|
|
this.price = response.rows[0].money+this.detail.ladderPrice |
|
|
|
} |
|
|
|
var that = this; |
|
|
|
getBiddingList(that.id).then(response =>{ |
|
|
|
that.biddinglistInformation = response.rows |
|
|
|
that.biddinglistInformationLength = response.total |
|
|
|
if (response.rows.length>0&&that.detail.ladderPrice){ |
|
|
|
console.log(that.detail.biddingDirect) |
|
|
|
if (that.price == 0){return;} |
|
|
|
if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { |
|
|
|
that.price = response.rows[0].money - that.detail.ladderPrice |
|
|
|
}else{ |
|
|
|
that.price = response.rows[0].money + that.detail.ladderPrice |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
setInterval(function () { |
|
|
|
getBiddingList(that.id).then(response =>{ |
|
|
|
that.biddinglistInformation = response.rows |
|
|
|
that.biddinglistInformationLength = response.total |
|
|
|
}); |
|
|
|
},1000) |
|
|
|
|
|
|
|
}, |
|
|
|
offer(){ |
|
|
|
|
|
|
@@ -539,7 +553,7 @@ export default { |
|
|
|
if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){ |
|
|
|
if (this.biddinglistInformation.length>1){ |
|
|
|
//判断用户出价不能高于当前出价最低价格 |
|
|
|
if(this.biddinglistInformation[0].money < this.price){ |
|
|
|
if(this.biddinglistInformation[0].money <= this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能高于当前出价最低价格', |
|
|
@@ -567,7 +581,7 @@ export default { |
|
|
|
if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){ |
|
|
|
if (this.biddinglistInformation.length>1){ |
|
|
|
//判断用户出价不能高于当前出价最低价格 |
|
|
|
if(this.biddinglistInformation[0].money > this.price){ |
|
|
|
if(this.biddinglistInformation[0].money >= this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能低于当前出价最高价格', |
|
|
@@ -598,7 +612,7 @@ export default { |
|
|
|
message: '出价成功', |
|
|
|
duration:"1000", |
|
|
|
onClose:function(){ |
|
|
|
// _this.reload() |
|
|
|
_this.reload() |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
@@ -607,8 +621,8 @@ export default { |
|
|
|
}, |
|
|
|
add(){ |
|
|
|
if (this.detail.biddingDirect == '反向竞价'){ |
|
|
|
if (this.biddinglistInformation.length<=1){ |
|
|
|
if(this.detail.price<this.price){ |
|
|
|
if (this.biddinglistInformation.length<1){ |
|
|
|
if(this.detail.price <= this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能高于挂牌价格', |
|
|
@@ -619,7 +633,8 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if(this.biddinglistInformation[0].money<=this.price){ |
|
|
|
|
|
|
|
if(this.biddinglistInformation[0].money <= this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能高于当前出价最低价格', |
|
|
@@ -655,30 +670,85 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.price == null) |
|
|
|
this.price == null?this.price = 0:this.price = this.price; |
|
|
|
this.detail.ladderPrice?this.price=parseInt(this.price)+parseInt(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 |
|
|
|
if (this.detail.biddingDirect == '反向竞价'){ |
|
|
|
if (this.biddinglistInformation.length<1){ |
|
|
|
if(this.detail.price<=this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能高于挂牌价格', |
|
|
|
duration:"1000", |
|
|
|
onClose:function(){ |
|
|
|
} |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.$toast({ |
|
|
|
icon: 'error', // 找到自己需要的图标 |
|
|
|
message: '出价不能低于当前最高价', |
|
|
|
duration:"1000", |
|
|
|
}) |
|
|
|
if(this.biddinglistInformation[0].money<this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能高于当前出价最低价格', |
|
|
|
duration:"1000", |
|
|
|
onClose:function(){ |
|
|
|
} |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if((this.price-1)>this.biddinglistInformation[0].money){ |
|
|
|
this.price-=1 |
|
|
|
if (this.biddinglistInformation.length<1){ |
|
|
|
if(this.detail.price>=this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能低于挂牌价格', |
|
|
|
duration:"1000", |
|
|
|
onClose:function(){ |
|
|
|
} |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.$toast({ |
|
|
|
icon: 'error', // 找到自己需要的图标 |
|
|
|
message: '出价不能低于当前最高价', |
|
|
|
duration:"1000", |
|
|
|
}) |
|
|
|
if(this.biddinglistInformation[0].money>=this.price){ |
|
|
|
this.$toast({ |
|
|
|
icon: 'fail', // 找到自己需要的图标 |
|
|
|
message: '出价不能低于当前出价最高价格', |
|
|
|
duration:"1000", |
|
|
|
onClose:function(){ |
|
|
|
} |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.price == null?this.price = 0:this.price = this.price; |
|
|
|
if (this.price == 0)return; |
|
|
|
this.detail.ladderPrice?this.price=parseInt(this.price)-parseInt(this.detail.ladderPrice):this.price -= 1 |
|
|
|
// 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", |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// } |
|
|
|
}, |
|
|
|
timerChange(value){ |
|
|
|
let d = value.days; |
|
|
|