...
|
...
|
@@ -14,9 +14,15 @@ |
|
|
<div class="productPrice">
|
|
|
<span class="size">{{sizeInfo}}</span>
|
|
|
<div class="pricedetail">
|
|
|
<div>
|
|
|
<span class="priceTitle">最低售价: </span>
|
|
|
<span class="price">{{originProductData.least_price || '-'}}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="priceTitle">最高求购价: </span>
|
|
|
<span class="price">{{originProductData.bid_moster_price || '-'}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="inputView">
|
...
|
...
|
@@ -97,7 +103,7 @@ export default { |
|
|
return {
|
|
|
inputPrice: '',
|
|
|
isAgreeTerms: false,
|
|
|
url: `http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3189.html?title=买家协议&promiseV="}}`,
|
|
|
url: 'http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3189.html?title=买家协议&promiseV="}}',
|
|
|
agreeDesc: '有货买家协议'
|
|
|
};
|
|
|
},
|
...
|
...
|
@@ -128,14 +134,24 @@ export default { |
|
|
|
|
|
},
|
|
|
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
|
|
|
next(vm => {
|
|
|
// 通过 `vm` 访问组件实例
|
|
|
vm.inputPrice = '';
|
|
|
vm.BUYER_ASK_RESET_DATA();
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
this.BUYER_ASK_RESET_DATA();
|
|
|
|
|
|
this.BUYER_ASK_SET_STORAGEID(this.storageId);
|
|
|
this.fetchBuyerOrderCount({ tabType: 'buy'});
|
|
|
this.fetchConfig();
|
|
|
this.$on("addressinfo", function (address) {
|
|
|
console.log(address)
|
|
|
})
|
|
|
this.$on('addressinfo', function(address) {
|
|
|
console.log(address);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
watch: {
|
...
|
...
|
@@ -150,6 +166,14 @@ export default { |
|
|
if (val) {
|
|
|
this.showDialog();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
addressInfo(val) {
|
|
|
|
|
|
if (this.inputPrice && val) {
|
|
|
this.computePrice();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -173,7 +197,7 @@ export default { |
|
|
if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
|
|
|
this.showBuyDialog();
|
|
|
} else {
|
|
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId });
|
|
|
this.computePrice();
|
|
|
}
|
|
|
}, 500, {leading: false, trailing: true}),
|
|
|
|
...
|
...
|
@@ -214,7 +238,7 @@ export default { |
|
|
});
|
|
|
},
|
|
|
onCancel: () => {
|
|
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId });
|
|
|
this.computePrice();
|
|
|
}
|
|
|
}).show();
|
|
|
},
|
...
|
...
|
@@ -241,7 +265,7 @@ export default { |
|
|
},
|
|
|
|
|
|
onConfirm: () => {
|
|
|
this.publishProduct()
|
|
|
this.publishProduct();
|
|
|
},
|
|
|
|
|
|
onCancel: () => {
|
...
|
...
|
@@ -250,7 +274,7 @@ export default { |
|
|
|
|
|
}).show();
|
|
|
} else {
|
|
|
this.publishProduct()
|
|
|
this.publishProduct();
|
|
|
}
|
|
|
|
|
|
},
|
...
|
...
|
@@ -265,8 +289,17 @@ export default { |
|
|
});
|
|
|
},
|
|
|
|
|
|
computePrice() {
|
|
|
if (!this.inputPrice) {
|
|
|
console.log('inputPrice is null')
|
|
|
return;
|
|
|
}
|
|
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' });
|
|
|
},
|
|
|
|
|
|
payOrder() {
|
|
|
let vm = this;
|
|
|
|
|
|
this.$createOrderPayType({
|
|
|
price: get(this.publishresult, 'depositAmount', ''),
|
|
|
desc: '保证金',
|
...
|
...
|
@@ -372,11 +405,8 @@ export default { |
|
|
}
|
|
|
|
|
|
.pricedetail {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
height: 30*2px;
|
|
|
margin-top: 5*2px;
|
|
|
align-items: flex-end;
|
|
|
}
|
|
|
|
|
|
.priceTitle {
|
...
|
...
|
|