Showing
5 changed files
with
240 additions
and
0 deletions
app/pages/order/detail/components/index.js
0 → 100644
app/pages/order/detail/detail.vue
0 → 100644
1 | +<template> | ||
2 | + <div class="ivu-row"> | ||
3 | + <div class="ivu-card"> | ||
4 | + <div class="ivu-card-head"> | ||
5 | + <p slot="title" style="height: 35px"> | ||
6 | + 当前订单状态:{{ orderStatus[orderInfo.orderStatus] }} | ||
7 | + <template v-if="orderInfo.orderStatus >= 100 && orderInfo.orderStatus < 600"> | ||
8 | + <i-button size="large" type="success" style="margin-left: 50px;" @click="deliver(123)">发货</i-button> | ||
9 | + </template> | ||
10 | + </p> | ||
11 | + </div> | ||
12 | + <div class="ivu-card-body"> | ||
13 | + 若订单一直未发货,买家会有投诉风险,建议您及时点击发货 查看未发货超时规则 <br /> | ||
14 | + 若买家存在恶意购买行为,您可以联系平台处理 | ||
15 | + </div> | ||
16 | + </div> | ||
17 | + <div class="ivu-card"> | ||
18 | + <div class="ivu-card-head"> | ||
19 | + <p slot="title">订单信息</p> | ||
20 | + </div> | ||
21 | + <div class="ivu-card-body"> | ||
22 | + <Row> | ||
23 | + <i-col span="24">订购人:{{ orderInfo.mobile }}({{ orderInfo.adminName }})</i-col> | ||
24 | + </Row> | ||
25 | + <br /> | ||
26 | + <Row> | ||
27 | + <i-col span="4">订单号:{{ orderInfo.orderCode }}</i-col> | ||
28 | + <i-col span="4">下单时间:{{ orderInfo.createTime | timeFormat }}</i-col> | ||
29 | + <i-col span="4">发货时间:{{ orderInfo.arriveTime | timeFormat }}</i-col> | ||
30 | + </Row> | ||
31 | + <br /> | ||
32 | + <Row> | ||
33 | + <i-col span="4">订单状态:{{ orderStatus[orderInfo.orderStatus] }}</i-col> | ||
34 | + <i-col span="4">提交时间:{{ orderInfo.checkTime | timeFormat }}</i-col> | ||
35 | + <i-col span="4">成交时间:</i-col> | ||
36 | + </Row> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="ivu-card"> | ||
40 | + <div class="ivu-card-head"> | ||
41 | + <p slot="title">物流信息</p> | ||
42 | + </div> | ||
43 | + <div class="ivu-card-body"> | ||
44 | + <Row> | ||
45 | + <i-col span="4">收货人:{{ orderInfo.consigneeName }}</i-col> | ||
46 | + <i-col span="4">手机号:{{ orderInfo.mobile }} </i-col> | ||
47 | + </Row> | ||
48 | + <Row> | ||
49 | + <i-col span="24"> | ||
50 | + 送货地址:{{ orderInfo.province }} {{ orderInfo.city }} {{ orderInfo.district }} | ||
51 | + {{ orderInfo.street }} | ||
52 | + </i-col> | ||
53 | + </Row> | ||
54 | + <Row> | ||
55 | + <i-col span="24">详细地址:{{ orderInfo.address }}</i-col> | ||
56 | + </Row> | ||
57 | + <Row> | ||
58 | + <i-col span="24">邮政编码:{{ orderInfo.zipCode }}</i-col> | ||
59 | + </Row> | ||
60 | + <Row> | ||
61 | + <i-col span="24">物流公司:{{ orderInfo.expressName }} </i-col> | ||
62 | + </Row> | ||
63 | + <Row> | ||
64 | + <i-col span="24">运单号:{{ orderInfo.expressNumber }} </i-col> | ||
65 | + </Row> | ||
66 | + </div> | ||
67 | + </div> | ||
68 | + <div class="ivu-card"> | ||
69 | + <div class="ivu-card-head"> | ||
70 | + <p slot="title">商品信息</p> | ||
71 | + </div> | ||
72 | + <div class="ivu-card-body"> | ||
73 | + <goods-info | ||
74 | + :table-data="tableData" | ||
75 | + :coupons-data="couponsData" | ||
76 | + :goods-promos="goodsPromos" | ||
77 | + :order-info="orderInfo" | ||
78 | + :order-promos="orderPromos" | ||
79 | + > | ||
80 | + </goods-info> | ||
81 | + </div> | ||
82 | + </div> | ||
83 | + </div> | ||
84 | +</template> | ||
85 | + | ||
86 | +<script> | ||
87 | +import { GoodsInfo } from './components'; | ||
88 | +import { OrderConfig } from '../configs'; | ||
89 | +import OrderService from 'services/order/order-service'; | ||
90 | +import _ from 'lodash'; | ||
91 | + | ||
92 | +export default { | ||
93 | + components: { GoodsInfo }, | ||
94 | + data() { | ||
95 | + return { | ||
96 | + orderCode: this.$route.query.orderCode, | ||
97 | + orderStatus: OrderConfig.orderStatus, | ||
98 | + feeSharingType: OrderConfig.feeSharingType, | ||
99 | + orderInfo: [], | ||
100 | + couponsData: [], | ||
101 | + tableData: [], | ||
102 | + goodsPromos: [], | ||
103 | + orderPromos: [], | ||
104 | + }; | ||
105 | + }, | ||
106 | + created() { | ||
107 | + this.orderService = new OrderService(); | ||
108 | + this.getOrderInfo(); | ||
109 | + this.getOrderGoods(); | ||
110 | + this.getGoodsPromos(); | ||
111 | + this.getOrderCoupons(); | ||
112 | + this.getOrderPromos(); | ||
113 | + }, | ||
114 | + methods: { | ||
115 | + deliver(code) { | ||
116 | + this.$router.push({ | ||
117 | + name: 'order.deliver.step1', | ||
118 | + params: {}, | ||
119 | + query: { | ||
120 | + orderCode: code, | ||
121 | + }, | ||
122 | + }); | ||
123 | + }, | ||
124 | + //获取订单详情 | ||
125 | + getOrderInfo() { | ||
126 | + this.orderService.orderDetail({ orderCode: +this.orderCode }).then(ret => { | ||
127 | + this.orderInfo = _.get(ret, 'data', []); | ||
128 | + }); | ||
129 | + }, | ||
130 | + //获取订单商品 | ||
131 | + getOrderGoods() { | ||
132 | + this.orderService.queryOrderGoods({ orderCode: +this.orderCode }).then(ret => { | ||
133 | + this.tableData = _.get(ret, 'data', []); | ||
134 | + }); | ||
135 | + }, | ||
136 | + //获取订单商品促销信息 | ||
137 | + getGoodsPromos() { | ||
138 | + this.orderService.queryOrderGoodsPromos({ orderCode: +this.orderCode }).then(ret => { | ||
139 | + this.goodsPromos = _.get(ret, 'data', []); | ||
140 | + }); | ||
141 | + }, | ||
142 | + //获取订单优惠券 | ||
143 | + getOrderCoupons() { | ||
144 | + this.orderService.queryOrderCoupons({ orderCode: +this.orderCode }).then(ret => { | ||
145 | + this.couponsData = _.get(ret, 'data', {}); | ||
146 | + _.each(this.couponsData, coupons => { | ||
147 | + coupons['feeSharingTypeStr'] = this.feeSharingType[coupons.feeSharingType] || '无'; | ||
148 | + }); | ||
149 | + }); | ||
150 | + }, | ||
151 | + //获取订单促销信息 | ||
152 | + getOrderPromos() { | ||
153 | + this.orderService.queryOrderPromos({ orderCode: +this.orderCode }).then(ret => { | ||
154 | + this.orderPromos = _.get(ret, 'data', {}); | ||
155 | + }); | ||
156 | + }, | ||
157 | + }, | ||
158 | +}; | ||
159 | +</script> | ||
160 | + | ||
161 | +<style lang="scss"></style> |
app/pages/order/detail/index.js
0 → 100644
app/services/order/index.js
0 → 100644
app/services/order/order-service.js
0 → 100644
1 | +import Service from '../service'; | ||
2 | + | ||
3 | +const apiUrl = { | ||
4 | + orderList: '/erp/orderList', | ||
5 | + orderDetail: '/erp/orderDetail', | ||
6 | + orderGoods: '/erp/queryOrderGoods', | ||
7 | + orderGoodsPromos: '/erp/queryOrderGoodsPromos', | ||
8 | + orderCoupons: '/erp/queryOrderCoupons', | ||
9 | + orderPromos: '/erp/queryOrderPromos', | ||
10 | +}; | ||
11 | + | ||
12 | +class OrderService extends Service { | ||
13 | + /** | ||
14 | + * 订单列表 | ||
15 | + * @param params | ||
16 | + * @return {*} | ||
17 | + */ | ||
18 | + orderList(params) { | ||
19 | + return this.post(apiUrl.orderList, params); | ||
20 | + } | ||
21 | + | ||
22 | + /** | ||
23 | + * 订单详情 | ||
24 | + * @param params | ||
25 | + * @return {*} | ||
26 | + */ | ||
27 | + orderDetail(params) { | ||
28 | + return this.post(apiUrl.orderDetail, params); | ||
29 | + } | ||
30 | + | ||
31 | + /** | ||
32 | + * 根据订单号获取订单商品 | ||
33 | + * @param params | ||
34 | + */ | ||
35 | + queryOrderGoods(params) { | ||
36 | + return this.post(apiUrl.orderGoods, params); | ||
37 | + } | ||
38 | + | ||
39 | + /** | ||
40 | + * 获取订单商品的促销 | ||
41 | + * @param params | ||
42 | + */ | ||
43 | + queryOrderGoodsPromos(params) { | ||
44 | + return this.post(apiUrl.orderGoodsPromos, params); | ||
45 | + } | ||
46 | + | ||
47 | + /** | ||
48 | + * 获取订单的优惠券信息 | ||
49 | + * @param parmas | ||
50 | + * @return {*} | ||
51 | + */ | ||
52 | + queryOrderCoupons(parmas) { | ||
53 | + return this.post(apiUrl.orderCoupons, parmas); | ||
54 | + } | ||
55 | + | ||
56 | + /** | ||
57 | + * 获取订单促销 | ||
58 | + * @param parmas | ||
59 | + */ | ||
60 | + queryOrderPromos(params) { | ||
61 | + return this.post(apiUrl.orderPromos, params); | ||
62 | + } | ||
63 | +} | ||
64 | + | ||
65 | +export default OrderService; |
-
Please register or login to post a comment