...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
<LayoutApp :show-back="true">
|
|
|
<div class="body">
|
|
|
<TitleComp txt="出售"></TitleComp>
|
|
|
<ProductInfo :data="{}" class="product-info"></ProductInfo>
|
|
|
<ProductInfo :data="productDetail" class="product-info"></ProductInfo>
|
|
|
<InputPrice @input="changePrice" :value="price" class="input-price" @on-blur="compute"></InputPrice>
|
|
|
<OrderMargin class="order-item order-margin" :data="fee"></OrderMargin>
|
|
|
<OrderFee class="order-item" :data="fee"></OrderFee>
|
...
|
...
|
@@ -25,10 +25,11 @@ import OrderMargin from './components/confirm/order-margin'; |
|
|
import OrderFee from './components/confirm/order-fee';
|
|
|
import OrderAgree from './components/confirm/agree';
|
|
|
import { Types } from 'store/order/order-confirm';
|
|
|
import { get } from 'lodash';
|
|
|
|
|
|
import { createNamespacedHelpers } from 'vuex';
|
|
|
import { createNamespacedHelpers, mapState } from 'vuex';
|
|
|
|
|
|
const { mapState, mapActions, mapMutations } = createNamespacedHelpers('order/orderConfirm');
|
|
|
const { mapState: mapOrderState, mapActions: mapOrderAction, mapMutations: mapOrderMutations } = createNamespacedHelpers('order/orderConfirm');
|
|
|
|
|
|
const UserType = {
|
|
|
sell: 'sell',
|
...
|
...
|
@@ -57,13 +58,29 @@ export default { |
|
|
mounted() {
|
|
|
this.fetchUserStatus();
|
|
|
this.fetchOrderAddress({ tabType: UserType.sell });
|
|
|
this.$store.dispatch('product/getSelectedTradeProduct', {
|
|
|
productId: this.productId,
|
|
|
sizeId: this.sizeId,
|
|
|
tradeTypedId: this.tradeTypeId
|
|
|
});
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['productDetail', 'address', 'fee', 'price', 'agree'])
|
|
|
...mapOrderState(['address', 'fee', 'price', 'agree']),
|
|
|
...mapState({
|
|
|
productDetail: state => {
|
|
|
return {
|
|
|
goodImg: get(state.product.selectedProductInfo, 'product.goods_list[0].image_list[0].image_url', ''),
|
|
|
colorName: get(state.product.selectedProductInfo, 'product.goods_list[0].color_name', ''),
|
|
|
sizeName: get(state.product.selectedProductInfo, 'size.size_name', ''),
|
|
|
goodPrice: get(state.product.selectedProductInfo, 'size.least_price', ''),
|
|
|
storageId: get(state.product.selectedProductInfo, 'size.storage_id', '')
|
|
|
};
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchOrderAddress', 'fetchUserStatus', 'fetchOrderPrice', 'submitOrder', 'fetchPayList']),
|
|
|
...mapMutations([Types.CHANGE_PRICE, Types.CHANGE_AGREE]),
|
|
|
...mapOrderAction(['fetchOrderAddress', 'fetchUserStatus', 'fetchOrderPrice', 'submitOrder', 'fetchPayList']),
|
|
|
...mapOrderMutations([Types.CHANGE_PRICE, Types.CHANGE_AGREE]),
|
|
|
|
|
|
onClick() {
|
|
|
this.submit();
|
...
|
...
|
@@ -73,7 +90,7 @@ export default { |
|
|
address_id: this.address.address_id,
|
|
|
num: this.num,
|
|
|
price: this.price,
|
|
|
storage_id: 10000128,
|
|
|
storage_id: this.productDetail.storageId,
|
|
|
}).then(result => {
|
|
|
if (result.error) {
|
|
|
this.error = result.error;
|
...
|
...
|
@@ -105,7 +122,7 @@ export default { |
|
|
address_id: this.address.address_id,
|
|
|
num: 1,
|
|
|
price: this.price,
|
|
|
storage_id: 10000128,
|
|
|
storage_id: this.productDetail.storageId,
|
|
|
});
|
|
|
|
|
|
if (orderResult.code !== 200) {
|
...
|
...
|
@@ -127,8 +144,16 @@ export default { |
|
|
data: payListResult.data,
|
|
|
price: this.fee.earnestMoneyStr,
|
|
|
desc: '保证金',
|
|
|
orderCode,
|
|
|
onCloseAction() {
|
|
|
vm.onClose();
|
|
|
vm.$router.push({
|
|
|
name: 'orderDetail',
|
|
|
params: {
|
|
|
owner: UserType.sell,
|
|
|
code: orderCode
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
onPayAction() {
|
|
|
vm.onPay();
|
...
|
...
|
|