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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<template>
<el-dialog
title="订单详情"
center
:visible.sync="dialogObj.show"
width="800px">
<el-row align="middle" type="flex">
<el-col :span="4"><label>订单号</label></el-col>
<el-col :span="8">
{{detail.out_trade_no}}
</el-col>
<el-col :span="4"><label>商品名称</label></el-col>
<el-col :span="8">{{detail.goods_name}}</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>用户昵称</label></el-col>
<el-col :span="8">
{{detail.user_nickname}}
</el-col>
<el-col :span="4"><label>用户手机号</label></el-col>
<el-col :span="8">{{detail.user_mobile}}</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>推广人类型</label></el-col>
<el-col :span="8">{{detail.invite_type | inviteType}}</el-col>
<el-col :span="4"><label>推广人ID</label></el-col>
<el-col :span="8">{{detail.invite_id}}</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>推广人收益</label></el-col>
<el-col :span="8">{{ detail.invite_earnings ? detail.invite_earnings/100 : 0}}元</el-col>
<template v-if="detail.buy_type === 2">
<el-col :span="4"><label>团购信息</label></el-col>
<el-col :span="8">团ID:{{detail.order_group_id}}<br>是否是团长:{{detail.is_captain === 0 ? '否' : '是'}}</el-col>
</template>
</el-row>
<el-row>
<el-col :span="4"><label>期数ID</label></el-col>
<el-col :span="8">{{detail.periods_id}}</el-col>
<el-col :span="4"><label>描述</label></el-col>
<el-col :span="8">{{detail.desc}}</el-col>
</el-row>
<el-row>
<el-col :span="4"><label>收货地址</label></el-col>
<el-col :span="20">
<template v-if="detail.user_address_id && detail.address_info">
收货人:{{detail.address_info.receive_name}}<br>
手机号:{{detail.address_info.receive_mobile}}<br>
收货地址: {{detail.address_info.province_name}}{{detail.address_info.city}}{{detail.address_info.area}}{{detail.address_info.address}}
</template>
</el-col>
</el-row>
<el-row>
<el-col :span="4"><label>付款时间</label></el-col>
<el-col :span="8">{{detail.pay_at}}</el-col>
</el-row>
</el-dialog>
</template>
<script>
import {INVITETYPE,ORDERSTATUS,BUYTYPE} from "../../util/wordbook";
export default {
name: "detail",
props:[
'dialogObj'
],
data(){
return {
detail:{},
show:false
}
},
methods:{
initDialog(){
this.detail = this.dialogObj.detail;
this.show = this.dialogObj.show;
}
},
filters:{
payMentFilter(val){
return val=='1'?'已付款':'未付款'
},
courseTypeFilter(val){
return val.type=='1'?`正式课(${val.duration}个月)`:`试听课(${val.duration}天)`
},
inviteType(value){
return INVITETYPE[value]
},
status(value){
return ORDERSTATUS[value]
},
buyType(value){
return BUYTYPE[value]
},
moneytFilter(val){
return val = val / 100 + '元'
}
},
watch:{
dialogObj:{
handler: function () {
this.initDialog()
},
deep: true
},
show(value){
this.$emit("changeShow",value);
}
}
}
</script>
<style scoped lang="less">
.el-col{
height: 60px;
img{
width: 50px;
border-radius: 100px;
}
label{
color: #5982e6;
}
}
</style>