...
|
...
|
@@ -31,7 +31,7 @@ import OrderMargin from './components/confirm/order-margin'; |
|
|
import OrderFee from './components/confirm/order-fee';
|
|
|
import OrderAgree from './components/confirm/agree';
|
|
|
import { Types, UserType } from 'store/order/order-confirm';
|
|
|
import { get, inRange } from 'lodash';
|
|
|
import { get } from 'lodash';
|
|
|
|
|
|
import { createNamespacedHelpers, mapState } from 'vuex';
|
|
|
|
...
|
...
|
@@ -56,6 +56,7 @@ export default { |
|
|
agreeDesc: '有货卖家协议',
|
|
|
url: 'https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE',
|
|
|
superSell: false,
|
|
|
addNumError: false
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
...
|
...
|
@@ -111,13 +112,15 @@ export default { |
|
|
productName: get(state.product.selectedProductInfo, 'product.product_name', ''),
|
|
|
colorName: get(state.product.selectedProductInfo, 'product.goods_list[0].color_name', ''),
|
|
|
sizeName: get(state.product.selectedProductInfo, 'size.size_name', ''),
|
|
|
skup: get(state.product.selectedProductInfo, 'size.skup', ''),
|
|
|
goodPrice,
|
|
|
priceType,
|
|
|
goodBidPrice,
|
|
|
priceBidType,
|
|
|
isSuggest: suggestHighPrice && suggestLowPrice,
|
|
|
suggestHighPrice,
|
|
|
suggestLowPrice
|
|
|
suggestLowPrice,
|
|
|
bidPrice
|
|
|
};
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -130,6 +133,34 @@ export default { |
|
|
this.submit();
|
|
|
},
|
|
|
compute() {
|
|
|
if (this.productDetail.bidPrice && (Number(this.price) >= this.productDetail.bidPrice)) {
|
|
|
this.$createDialog({
|
|
|
type: 'confirm',
|
|
|
title: `最高求购价${this.productDetail.bidPrice}`,
|
|
|
content: '已有求购高于您的出价,可直接变现',
|
|
|
confirmBtn: {
|
|
|
text: '我再想想',
|
|
|
active: true,
|
|
|
disabled: false,
|
|
|
},
|
|
|
cancelBtn: {
|
|
|
text: '确定变现',
|
|
|
active: false,
|
|
|
disabled: false
|
|
|
},
|
|
|
onCancel: () => {
|
|
|
this.$router.replace({
|
|
|
name: 'sellAskOrder',
|
|
|
query: {
|
|
|
skup: this.productDetail.skup,
|
|
|
price: this.productDetail.bidPrice
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}).show();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
return this.fetchOrderPrice({
|
|
|
address_id: this.address?.address_id,
|
|
|
num: this.num,
|
...
|
...
|
@@ -138,14 +169,21 @@ export default { |
|
|
}).then(result => {
|
|
|
if (result.error) {
|
|
|
this.error = result.error;
|
|
|
|
|
|
this.$createToast({
|
|
|
time: 1500,
|
|
|
txt: result.error,
|
|
|
type: 'txt'
|
|
|
}).show();
|
|
|
|
|
|
if (result.code === 438) {
|
|
|
this.addNumError = true;
|
|
|
}
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
this.error = false;
|
|
|
this.addNumError = false;
|
|
|
});
|
|
|
},
|
|
|
changePrice(val) {
|
...
|
...
|
@@ -276,7 +314,12 @@ export default { |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
onNumChange(count) {
|
|
|
onNumChange({ count, type }) {
|
|
|
console.log(count, type, this.addNumError);
|
|
|
if (type === 'add' && this.addNumError) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
this[Types.CHANGE_SELL_NUM](count);
|
|
|
this.compute();
|
|
|
},
|
...
|
...
|
|