|
@@ -31,7 +31,7 @@ import OrderMargin from './components/confirm/order-margin'; |
|
@@ -31,7 +31,7 @@ import OrderMargin from './components/confirm/order-margin'; |
31
|
import OrderFee from './components/confirm/order-fee';
|
31
|
import OrderFee from './components/confirm/order-fee';
|
32
|
import OrderAgree from './components/confirm/agree';
|
32
|
import OrderAgree from './components/confirm/agree';
|
33
|
import { Types, UserType } from 'store/order/order-confirm';
|
33
|
import { Types, UserType } from 'store/order/order-confirm';
|
34
|
-import { get, inRange } from 'lodash';
|
34
|
+import { get } from 'lodash';
|
35
|
|
35
|
|
36
|
import { createNamespacedHelpers, mapState } from 'vuex';
|
36
|
import { createNamespacedHelpers, mapState } from 'vuex';
|
37
|
|
37
|
|
|
@@ -56,6 +56,7 @@ export default { |
|
@@ -56,6 +56,7 @@ export default { |
56
|
agreeDesc: '有货卖家协议',
|
56
|
agreeDesc: '有货卖家协议',
|
57
|
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',
|
57
|
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',
|
58
|
superSell: false,
|
58
|
superSell: false,
|
|
|
59
|
+ addNumError: false
|
59
|
};
|
60
|
};
|
60
|
},
|
61
|
},
|
61
|
activated() {
|
62
|
activated() {
|
|
@@ -111,13 +112,15 @@ export default { |
|
@@ -111,13 +112,15 @@ export default { |
111
|
productName: get(state.product.selectedProductInfo, 'product.product_name', ''),
|
112
|
productName: get(state.product.selectedProductInfo, 'product.product_name', ''),
|
112
|
colorName: get(state.product.selectedProductInfo, 'product.goods_list[0].color_name', ''),
|
113
|
colorName: get(state.product.selectedProductInfo, 'product.goods_list[0].color_name', ''),
|
113
|
sizeName: get(state.product.selectedProductInfo, 'size.size_name', ''),
|
114
|
sizeName: get(state.product.selectedProductInfo, 'size.size_name', ''),
|
|
|
115
|
+ skup: get(state.product.selectedProductInfo, 'size.skup', ''),
|
114
|
goodPrice,
|
116
|
goodPrice,
|
115
|
priceType,
|
117
|
priceType,
|
116
|
goodBidPrice,
|
118
|
goodBidPrice,
|
117
|
priceBidType,
|
119
|
priceBidType,
|
118
|
isSuggest: suggestHighPrice && suggestLowPrice,
|
120
|
isSuggest: suggestHighPrice && suggestLowPrice,
|
119
|
suggestHighPrice,
|
121
|
suggestHighPrice,
|
120
|
- suggestLowPrice
|
122
|
+ suggestLowPrice,
|
|
|
123
|
+ bidPrice
|
121
|
};
|
124
|
};
|
122
|
}
|
125
|
}
|
123
|
})
|
126
|
})
|
|
@@ -130,6 +133,34 @@ export default { |
|
@@ -130,6 +133,34 @@ export default { |
130
|
this.submit();
|
133
|
this.submit();
|
131
|
},
|
134
|
},
|
132
|
compute() {
|
135
|
compute() {
|
|
|
136
|
+ if (this.productDetail.bidPrice && (Number(this.price) >= this.productDetail.bidPrice)) {
|
|
|
137
|
+ this.$createDialog({
|
|
|
138
|
+ type: 'confirm',
|
|
|
139
|
+ title: `最高求购价${this.productDetail.bidPrice}`,
|
|
|
140
|
+ content: '已有求购高于您的出价,可直接变现',
|
|
|
141
|
+ confirmBtn: {
|
|
|
142
|
+ text: '我再想想',
|
|
|
143
|
+ active: true,
|
|
|
144
|
+ disabled: false,
|
|
|
145
|
+ },
|
|
|
146
|
+ cancelBtn: {
|
|
|
147
|
+ text: '确定变现',
|
|
|
148
|
+ active: false,
|
|
|
149
|
+ disabled: false
|
|
|
150
|
+ },
|
|
|
151
|
+ onCancel: () => {
|
|
|
152
|
+ this.$router.replace({
|
|
|
153
|
+ name: 'sellAskOrder',
|
|
|
154
|
+ query: {
|
|
|
155
|
+ skup: this.productDetail.skup,
|
|
|
156
|
+ price: this.productDetail.bidPrice
|
|
|
157
|
+ }
|
|
|
158
|
+ });
|
|
|
159
|
+ }
|
|
|
160
|
+ }).show();
|
|
|
161
|
+ return;
|
|
|
162
|
+ }
|
|
|
163
|
+
|
133
|
return this.fetchOrderPrice({
|
164
|
return this.fetchOrderPrice({
|
134
|
address_id: this.address?.address_id,
|
165
|
address_id: this.address?.address_id,
|
135
|
num: this.num,
|
166
|
num: this.num,
|
|
@@ -138,14 +169,21 @@ export default { |
|
@@ -138,14 +169,21 @@ export default { |
138
|
}).then(result => {
|
169
|
}).then(result => {
|
139
|
if (result.error) {
|
170
|
if (result.error) {
|
140
|
this.error = result.error;
|
171
|
this.error = result.error;
|
|
|
172
|
+
|
141
|
this.$createToast({
|
173
|
this.$createToast({
|
142
|
time: 1500,
|
174
|
time: 1500,
|
143
|
txt: result.error,
|
175
|
txt: result.error,
|
144
|
type: 'txt'
|
176
|
type: 'txt'
|
145
|
}).show();
|
177
|
}).show();
|
|
|
178
|
+
|
|
|
179
|
+ if (result.code === 438) {
|
|
|
180
|
+ this.addNumError = true;
|
|
|
181
|
+ }
|
|
|
182
|
+
|
146
|
return;
|
183
|
return;
|
147
|
}
|
184
|
}
|
148
|
this.error = false;
|
185
|
this.error = false;
|
|
|
186
|
+ this.addNumError = false;
|
149
|
});
|
187
|
});
|
150
|
},
|
188
|
},
|
151
|
changePrice(val) {
|
189
|
changePrice(val) {
|
|
@@ -276,7 +314,12 @@ export default { |
|
@@ -276,7 +314,12 @@ export default { |
276
|
}
|
314
|
}
|
277
|
});
|
315
|
});
|
278
|
},
|
316
|
},
|
279
|
- onNumChange(count) {
|
317
|
+ onNumChange({ count, type }) {
|
|
|
318
|
+ console.log(count, type, this.addNumError);
|
|
|
319
|
+ if (type === 'add' && this.addNumError) {
|
|
|
320
|
+ return;
|
|
|
321
|
+ }
|
|
|
322
|
+
|
280
|
this[Types.CHANGE_SELL_NUM](count);
|
323
|
this[Types.CHANGE_SELL_NUM](count);
|
281
|
this.compute();
|
324
|
this.compute();
|
282
|
},
|
325
|
},
|