...
|
...
|
@@ -2,13 +2,16 @@ |
|
|
<LayoutApp :show-back="true">
|
|
|
<div class="body">
|
|
|
<TitleComp txt="确认订单" class="title-class"></TitleComp>
|
|
|
<AddressInfo :data="orderDetail.userAddress" class="order-item" :show-tip="false"></AddressInfo>
|
|
|
<ProductInfo :data="orderDetail.goodsInfo" class="product-info order-item"></ProductInfo>
|
|
|
<BuyerFeeInfo :data="price" class="order-item"></BuyerFeeInfo>
|
|
|
<OrderInfo class="order-item"></OrderInfo>
|
|
|
<AddressInfo :data="address" class="order-item" :show-tip="false"></AddressInfo>
|
|
|
<ProductInfo :data="orderDetail.good" class="product-info order-item"></ProductInfo>
|
|
|
<Coupon class="order-item" :data="orderDetail.recommendedCouponInfo" @click="onCouponClick"></Coupon>
|
|
|
<BuyerFeeInfo :data="orderDetail.promotionFormulaList" class="order-item"></BuyerFeeInfo>
|
|
|
<div class="tip2 order-item">{{orderDetail.specialTips}}</div>
|
|
|
<div class="tip order-item" v-html="replaceBr(orderDetail.damagesDesc)"></div>
|
|
|
<OrderInfo class="order-item" :pay-way="orderDetail.paymentWay" :delivery-way="orderDetail.deliveryWay"></OrderInfo>
|
|
|
</div>
|
|
|
|
|
|
<OrderFooter class="footer"></OrderFooter>
|
|
|
<OrderFooter class="footer" :amount="orderDetail.amount"></OrderFooter>
|
|
|
</LayoutApp>
|
|
|
</template>
|
|
|
|
...
|
...
|
@@ -20,23 +23,19 @@ import TitleComp from './components/confirm/title'; |
|
|
import BuyerFeeInfo from './components/confirm/buyer-fee';
|
|
|
import OrderInfo from './components/confirm/order-info';
|
|
|
import OrderFooter from './components/confirm/buyer-order-footer';
|
|
|
import Coupon from './components/confirm/coupon';
|
|
|
import { Types, UserType } 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');
|
|
|
|
|
|
export default {
|
|
|
name: 'OrderConfirm',
|
|
|
props: {
|
|
|
orderCode: {
|
|
|
type: String,
|
|
|
default: ''
|
|
|
}
|
|
|
},
|
|
|
props: ['productId', 'sizeId', 'tradeTypeId'],
|
|
|
data() {
|
|
|
return {
|
|
|
price: {}
|
|
|
};
|
|
|
return {};
|
|
|
},
|
|
|
components: {
|
|
|
ProductInfo,
|
...
|
...
|
@@ -44,16 +43,39 @@ export default { |
|
|
TitleComp,
|
|
|
BuyerFeeInfo,
|
|
|
OrderInfo,
|
|
|
OrderFooter
|
|
|
OrderFooter,
|
|
|
Coupon
|
|
|
},
|
|
|
mounted() {
|
|
|
this.fetchOrderDetail({ orderCode: this.orderCode });
|
|
|
async mounted() {
|
|
|
this.fetchUserStatus();
|
|
|
this.fetchOrderAddress({ tabType: UserType.buy });
|
|
|
await this.$store.dispatch('product/getSelectedTradeProduct', {
|
|
|
productId: this.productId,
|
|
|
sizeId: this.sizeId
|
|
|
});
|
|
|
|
|
|
this.fetchPayment({ skup: this.productDetail.skup });
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['orderDetail'])
|
|
|
...mapOrderState(['address', 'orderDetail']),
|
|
|
...mapState({
|
|
|
productDetail: state => {
|
|
|
return {
|
|
|
skup: get(state.product.selectedProductInfo, 'size.skup', '')
|
|
|
};
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchOrderDetail'])
|
|
|
...mapOrderAction(['fetchOrderAddress', 'fetchUserStatus', 'fetchPayList', 'fetchPayment']),
|
|
|
replaceBr(str) {
|
|
|
return str ? str.replace(/\n/g, '<br />') : '';
|
|
|
},
|
|
|
onCouponClick() {
|
|
|
this.$createOrderCouponList({
|
|
|
data: this.orderDetail.couponList
|
|
|
}).show();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
...
|
...
|
@@ -64,6 +86,8 @@ export default { |
|
|
bottom: 0;
|
|
|
width: 100%;
|
|
|
z-index: 100;
|
|
|
background-color: white;
|
|
|
border-top: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.body {
|
...
|
...
|
@@ -87,4 +111,13 @@ export default { |
|
|
height: 260px;
|
|
|
}
|
|
|
|
|
|
.tip {
|
|
|
font-size: 24px;
|
|
|
color: #999;
|
|
|
}
|
|
|
|
|
|
.tip2 {
|
|
|
font-size: 28px;
|
|
|
}
|
|
|
|
|
|
</style> |
...
|
...
|
|