order-info.vue
1.95 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
61
62
63
<template>
<div v-if="data" class="order-info">
<div>单号:<span>{{this.data.id}} </span> | 发往:<span>{{this.data.storeroomName || '-'}} {{this.data.address || '-'}} {{this.data.adminName || '-'}}</span></div>
<div>品牌:<span>{{this.data.brandName || '-'}}</span>
| 店铺:<span>{{this.data.shopName || '-'}}</span>
| 供应商:<span>{{this.data.supplierName || '-'}}</span>
| 进项税率:<span>{{this.data.inputTaxRate || '-'}}</span>
| 数量:<span>{{this.data.totalNum || '-'}}</span>
| 总吊牌金额:<span>{{this.data.totalRetailPrice || '-'}}</span>
| 总进货金额:<span>{{this.data.totalPurchasePrice || '-'}}</span>
</div>
</div>
</template>
<script>
import InvoiceService from 'services/repository/invoice-service';
export default {
name: 'order-info',
props: ['id'],
created() {
this.invoiceService = new InvoiceService();
},
data() {
return {
data: null
};
},
mounted() {
this.getOrderInfo();
},
methods: {
getOrderInfo() {
return this.invoiceService.orderInfo(this.id).then((result) =>{
if (result.code === 200) {
this.data = result.data;
this.$emit('on-change', this.data);
}
});
},
refresh() {
this.getOrderInfo();
}
}
};
</script>
<style lang="scss" scoped>
.order-info {
div {
display: block;
margin-bottom: 10px;
}
span {
padding: 5px;
color: #f00;
background-color: #f9f3f5;
border-radius: 2px;
margin-right: 5px;
}
}
</style>