order-user-info.vue
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<template>
<div class="ivu-card">
<div class="ivu-card-head">
<p slot="title">物流信息</p>
</div>
<div class="ivu-card-body">
<Row>
<i-col span="24">收货人:{{ orderInfo.consigneeName }} 手机号:{{ orderInfo.mobile }} </i-col>
</Row>
<Row>
<i-col span="24">
送货地址:{{ orderInfo.province }} {{ orderInfo.city }} {{ orderInfo.district }}
{{ orderInfo.street }}
</i-col>
</Row>
<Row>
<i-col span="24">详细地址:{{ orderInfo.address }}</i-col>
</Row>
<Row>
<i-col span="24">邮政编码:{{ orderInfo.zipCode > 0 ? orderInfo.zipCode : '' }}</i-col>
</Row>
<Row>
<i-col span="24">
物流公司:
<template v-for="(item, index) in logisticsList">
<span v-if="item.id == orderInfo.expressId" :key="index">{{ item.companyName }}</span>
</template>
</i-col>
</Row>
<Row>
<i-col span="24">运单号:{{ orderInfo.expressNumber > 0 ? orderInfo.expressNumber : '' }} </i-col>
</Row>
</div>
</div>
</template>
<script>
import _ from 'lodash';
import LogisticsService from 'services/logistics/logistics-service';
export default {
name: 'OrderUserInfo',
props: ['orderInfo'],
data() {
return {
logisticsList: [],
};
},
created() {
this.LogisticsService = new LogisticsService();
this.getLogisticsList();
},
methods: {
//获取物流公司列表
getLogisticsList() {
this.LogisticsService.logisticsList().then(ret => {
this.logisticsList = _.get(ret, 'data', []);
});
},
},
};
</script>