orderDetail.vue
5.41 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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<template>
<view class="container">
<Navbar title="订单详情" :canBack="true"></Navbar>
<view class="topTitleCss">
<view class="text-xxl text-bold">
{{detailForm.fDdzt}}
</view>
<view class="text-gray text-lg margin-top">
订单完成时间:{{ detailForm.fSjwcsj?detailForm.fSjwcsj:detailForm.fDdzt==='待配送'? "等待配送中":detailForm==='已取消'?'已取消':detailForm.fDdzt }}
</view>
</view>
<view class="orderCard">
<view class="flex align-center">
<view class="flex align-center w80" @click="goStorePage">
<u-icon name="/static/images/home/shopTitle.png" size="20"></u-icon>
<view class="margin-left-xs overflow-one-lines">
{{detailForm.fCzmc}}
</view>
</view>
<!-- <view class="themeColor">
待配送
</view> -->
</view>
<u-divider></u-divider>
<view class="" v-for="(item,index) in detailForm.ddxqList" :key="index">
<view class="flex justify-between margin-top">
<view class="">
<u-image width="80px" height="80px" :src="item.fTp"></u-image>
</view>
<view class="w60 flex flex-direction justify-between margin-left-xs">
<view class="overflow-one-lines">
{{item.fSpmc}}
</view>
<view class="text-sm text-gray overflow-one-lines">
规格:{{item.fMs}}
</view>
<view class="text-lg text-bold overflow-one-lines">
¥{{item.fDj}}
</view>
</view>
<view class="flex align-end">
X {{item.fSl}}
</view>
</view>
<!-- <u-divider></u-divider> -->
</view>
<view class="flex margin-top-lg w90">
<view class="text-gray overflow-one-lines">
订单编号:{{detailForm.fDddh}}
</view>
</view>
<view class="flex margin-top-sm w90">
<view class="text-gray overflow-one-lines">
备注信息:{{detailForm.fMjly}}
</view>
</view>
<view class="flex margin-top-lg margin-bottom-lg justify-end">
<view class="text-gray">
<!-- 共3件商品 -->
合计:
</view>
<view class="themeColor">
¥{{detailForm.fDdje}}
</view>
</view>
</view>
<!-- 收货信息 -->
<view class="contactsCardCss" v-if="detailForm.fShlxr">
<view class="margin-top text-lg">
收货信息
</view>
<view class="flex flex-direction margin-top-xs">
<view class="flex justify-between align-center margin-top">
<view class="text-gray w30">
联系人
</view>
<view class="flex justify-end w70">
{{detailForm.fShlxr}}
</view>
</view>
<view class="flex justify-between align-center margin-top">
<view class="text-gray">
联系方式
</view>
<view class="flex justify-end w70">
{{detailForm.fShlxrdh}}
</view>
</view>
<view class="flex justify-between align-center margin-top">
<view class="text-gray">
联系地址
</view>
<view class="flex justify-end w70">
{{detailForm.fShsf}} {{detailForm.fShs}} {{detailForm.fShq}} {{detailForm.fShjd}} {{detailForm.fShxxdz}}
</view>
</view>
</view>
</view>
<view class="productCardCss">
<view class="flex margin-top justify-between align-center">
<view class=" text-lg">
商品总价
</view>
<view class="themeColor text-xl">
¥{{detailForm.fDdje}}
</view>
</view>
<view class="flex flex-direction margin-top-xs">
<view class="flex justify-between align-center margin-top">
<view class="text-gray w30">
订单编号
</view>
<view class="flex justify-end w70">
{{detailForm.fDddh}}
</view>
</view>
<view class="flex justify-between align-center margin-top">
<view class="text-gray">
下单时间
</view>
<view class="flex justify-end w70">
{{detailForm.fCjsj}}
</view>
</view>
<!-- <view class="flex justify-between align-center margin-top">
<view class="text-gray">
支付方式
</view>
<view class="flex justify-end w70">
微信支付
</view>
</view> -->
<view class="flex justify-between align-center margin-top">
<view class="text-gray">
提取方式
</view>
<view class="flex justify-end w70">
{{detailForm.fPsfs}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
props: {
},
data() {
return {
detailForm:{
ddxq:[],
fCzmc:'',
fDdjg:'',
fDdzt:'',
fQpbh:'',
}
}
},
computed: {
},
async onLoad(options) {
console.log('打印options',options);
if(options.id){
await this.getDetailInfo(options.id);
}
},
methods: {
async getDetailInfo(id){
let result = await this.$api.orderApi.getOrderDetail(id);
console.log('打印getDetailInfo===result',result);
let {
code,
value
} = result;
if(code == 200){
this.detailForm = value;
this.detailForm.ddxqList.map(async item =>{
let JsonParse = JSON.parse(item.fTp);
item.fTp = await this.$getPhotoUrl(JsonParse[0].response.fileId);
});
}
},
}
}
</script>
<style lang="scss" scoped>
.container{
padding-bottom: 10px;
}
.topTitleCss {
margin: 20px 10px;
}
.orderCard {
margin: 10px;
padding: 10px;
background: #fff;
border-radius: 15px;
}
.contactsCardCss {
margin: 10px;
padding: 10px;
background: #fff;
border-radius: 15px;
}
.productCardCss {
margin: 10px;
padding: 10px;
background: #fff;
border-radius: 15px;
}
</style>