|
@@ -1,182 +1,209 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="order">
|
3
|
3
|
<div class="warp">
|
4
|
|
- <el-tabs type="border-card"
|
5
|
|
- @tab-click="changeTab"
|
6
|
|
- v-model="activeName">
|
7
|
|
- <el-tab-pane label="项目订单"
|
8
|
|
- name="first">
|
|
4
|
+ <el-tabs type="border-card" @tab-click="changeTab" v-model="activeName">
|
|
5
|
+ <el-tab-pane label="项目订单" name="first">
|
9
|
6
|
<div class="user-list">
|
10
|
|
- <el-table ref="multipleTable"
|
11
|
|
- :data="projectData"
|
12
|
|
- tooltip-effect="dark"
|
13
|
|
- height="354"
|
14
|
|
- style="width: 100%;border-radius: 8px;"
|
15
|
|
- @row-click="handleSelectionChange">
|
16
|
|
- <el-table-column prop="goods"
|
17
|
|
- label="项目名称"
|
18
|
|
- width="200">
|
|
7
|
+ <el-table
|
|
8
|
+ ref="multipleTable"
|
|
9
|
+ :data="projectData"
|
|
10
|
+ tooltip-effect="dark"
|
|
11
|
+ height="354"
|
|
12
|
+ style="width: 100%; border-radius: 8px"
|
|
13
|
+ @row-click="handleSelectionChange"
|
|
14
|
+ >
|
|
15
|
+ <el-table-column prop="goods" label="项目名称" width="200">
|
19
|
16
|
<template slot-scope="scope">
|
20
|
|
- <div v-for="(val,index) in scope.row.goods"
|
21
|
|
- :key="index">
|
22
|
|
- <div>{{val.name}}</div>
|
|
17
|
+ <div v-for="(val, index) in scope.row.goods" :key="index">
|
|
18
|
+ <div>{{ val.name }}</div>
|
23
|
19
|
</div>
|
24
|
20
|
</template>
|
25
|
21
|
</el-table-column>
|
26
|
|
- <el-table-column prop="goods"
|
27
|
|
- label="数量"
|
28
|
|
- show-overflow-tooltip>
|
|
22
|
+ <el-table-column prop="goods" label="数量" show-overflow-tooltip>
|
29
|
23
|
<template slot-scope="scope">
|
30
|
|
- <div>{{scope.row.goods.length}}</div>
|
|
24
|
+ <div>{{ scope.row.goods.length }}</div>
|
31
|
25
|
</template>
|
32
|
26
|
</el-table-column>
|
33
|
|
- <el-table-column prop="price"
|
34
|
|
- label="总价格"
|
35
|
|
- show-overflow-tooltip></el-table-column>
|
36
|
|
- <el-table-column prop="order_time"
|
37
|
|
- label="预约时间"
|
38
|
|
- width="180"
|
39
|
|
- show-overflow-tooltip></el-table-column>
|
40
|
|
- <el-table-column prop="store_name"
|
41
|
|
- label="预约店铺"
|
42
|
|
- show-overflow-tooltip></el-table-column>
|
43
|
|
- <el-table-column prop="status"
|
44
|
|
- label="状态"
|
45
|
|
- show-overflow-tooltip>
|
|
27
|
+ <el-table-column
|
|
28
|
+ prop="price"
|
|
29
|
+ label="总价格"
|
|
30
|
+ show-overflow-tooltip
|
|
31
|
+ ></el-table-column>
|
|
32
|
+ <el-table-column
|
|
33
|
+ prop="order_time"
|
|
34
|
+ label="预约时间"
|
|
35
|
+ width="180"
|
|
36
|
+ show-overflow-tooltip
|
|
37
|
+ ></el-table-column>
|
|
38
|
+ <el-table-column
|
|
39
|
+ prop="store_name"
|
|
40
|
+ label="预约店铺"
|
|
41
|
+ show-overflow-tooltip
|
|
42
|
+ ></el-table-column>
|
|
43
|
+ <el-table-column prop="status" label="状态" show-overflow-tooltip>
|
46
|
44
|
<template slot-scope="scope">
|
47
|
|
- <div :class="'color'+scope.row.status">{{scope.row.status!=5?statusStr[scope.row.status]:statusStr[statusStr.length-1]}}</div>
|
|
45
|
+ <div :class="'color' + scope.row.status">
|
|
46
|
+ {{
|
|
47
|
+ scope.row.status != 5
|
|
48
|
+ ? statusStr[scope.row.status]
|
|
49
|
+ : statusStr[statusStr.length - 1]
|
|
50
|
+ }}
|
|
51
|
+ </div>
|
48
|
52
|
</template>
|
49
|
53
|
</el-table-column>
|
50
|
54
|
</el-table>
|
51
|
55
|
|
52
|
56
|
<div class="pagin">
|
53
|
|
- <el-pagination background
|
54
|
|
- layout="prev, pager, next"
|
55
|
|
- @current-change="handleCurrentChange"
|
56
|
|
- :current-page.sync="currentPage1"
|
57
|
|
- :total="total"></el-pagination>
|
|
57
|
+ <el-pagination
|
|
58
|
+ background
|
|
59
|
+ layout="prev, pager, next"
|
|
60
|
+ @current-change="handleCurrentChange"
|
|
61
|
+ :current-page.sync="currentPage1"
|
|
62
|
+ :total="total"
|
|
63
|
+ ></el-pagination>
|
58
|
64
|
</div>
|
59
|
65
|
</div>
|
60
|
66
|
</el-tab-pane>
|
61
|
|
- <el-tab-pane label="次卡订单"
|
62
|
|
- name="second">
|
|
67
|
+ <el-tab-pane label="次卡订单" name="second">
|
63
|
68
|
<div class="user-list">
|
64
|
|
- <el-table ref="multipleTable"
|
65
|
|
- :data="cardOrderData"
|
66
|
|
- tooltip-effect="dark"
|
67
|
|
- height="354"
|
68
|
|
- @row-click="openDetail"
|
69
|
|
- style="width: 100%;border-radius: 8px;">
|
70
|
|
- <el-table-column prop="name"
|
71
|
|
- label="卡券名称"
|
72
|
|
- width="200">
|
|
69
|
+ <el-table
|
|
70
|
+ ref="multipleTable"
|
|
71
|
+ :data="cardListData"
|
|
72
|
+ tooltip-effect="dark"
|
|
73
|
+ height="354"
|
|
74
|
+ @row-click="openDetail"
|
|
75
|
+ style="width: 100%; border-radius: 8px"
|
|
76
|
+ >
|
|
77
|
+ <el-table-column prop="card_name" label="卡券名称" width="200">
|
73
|
78
|
<template slot-scope="scope">
|
74
|
|
- <div>{{scope.row.name | ellipsis(8)}}</div>
|
|
79
|
+ <div>{{ scope.row.card_name | ellipsis(8) }}</div>
|
75
|
80
|
</template>
|
76
|
|
-
|
77
|
81
|
</el-table-column>
|
78
|
|
- <el-table-column prop="type"
|
79
|
|
- label="分类"
|
80
|
|
- show-overflow-tooltip>
|
|
82
|
+ <el-table-column prop="total_num" label="总次数" show-overflow-tooltip align="center">
|
81
|
83
|
</el-table-column>
|
82
|
|
- <el-table-column prop="create_time"
|
83
|
|
- label="总价格"
|
84
|
|
- width="180"
|
85
|
|
- show-overflow-tooltip></el-table-column>
|
86
|
|
-
|
87
|
|
- <el-table-column prop="ex_time"
|
88
|
|
- label="到期时间"
|
89
|
|
- width="180"
|
90
|
|
- show-overflow-tooltip></el-table-column>
|
91
|
|
- <el-table-column prop="create_time"
|
92
|
|
- label="创建时间"
|
93
|
|
- width="180"
|
94
|
|
- show-overflow-tooltip></el-table-column>
|
95
|
|
- <el-table-column prop="status"
|
96
|
|
- label="状态"
|
97
|
|
- show-overflow-tooltip>
|
|
84
|
+ <el-table-column
|
|
85
|
+ prop="num"
|
|
86
|
+ label="剩余次数"
|
|
87
|
+ show-overflow-tooltip
|
|
88
|
+ align="center"
|
|
89
|
+ ></el-table-column>
|
|
90
|
+ <el-table-column
|
|
91
|
+ prop="used_num"
|
|
92
|
+ label="已用次数"
|
|
93
|
+ width="180"
|
|
94
|
+ show-overflow-tooltip
|
|
95
|
+ align="center"
|
|
96
|
+ ></el-table-column>
|
|
97
|
+ <el-table-column
|
|
98
|
+ prop="expir_time"
|
|
99
|
+ label="过期时间"
|
|
100
|
+ width="180"
|
|
101
|
+ show-overflow-tooltip
|
|
102
|
+ ></el-table-column>
|
|
103
|
+ <el-table-column
|
|
104
|
+ prop="create_time"
|
|
105
|
+ label="创建时间"
|
|
106
|
+ width="180"
|
|
107
|
+ show-overflow-tooltip
|
|
108
|
+ ></el-table-column>
|
|
109
|
+ <el-table-column prop="status" label="状态" show-overflow-tooltip>
|
98
|
110
|
<template slot-scope="scope">
|
99
|
|
- <div :class="'color'+scope.row.status">{{scope.row.status==-1?'已过期':scope.row.status==-0?'已使用':'待使用'}}</div>
|
|
111
|
+ <div :class="'color' + scope.row.status">
|
|
112
|
+ {{
|
|
113
|
+ scope.row.status == -1
|
|
114
|
+ ? "已过期"
|
|
115
|
+ : scope.row.status == -0
|
|
116
|
+ ? "已使用"
|
|
117
|
+ : "待使用"
|
|
118
|
+ }}
|
|
119
|
+ </div>
|
100
|
120
|
</template>
|
101
|
121
|
</el-table-column>
|
102
|
122
|
</el-table>
|
103
|
123
|
|
104
|
124
|
<div class="pagin">
|
105
|
|
- <el-pagination background
|
106
|
|
- layout="prev, pager, next"
|
107
|
|
- @current-change="handleCurrentChange"
|
108
|
|
- :current-page.sync="currentPage1"
|
109
|
|
- :total="total"></el-pagination>
|
|
125
|
+ <el-pagination
|
|
126
|
+ background
|
|
127
|
+ layout="prev, pager, next"
|
|
128
|
+ @current-change="handleCurrentChange"
|
|
129
|
+ :current-page.sync="currentPage1"
|
|
130
|
+ :total="total"
|
|
131
|
+ ></el-pagination>
|
110
|
132
|
</div>
|
111
|
133
|
</div>
|
112
|
134
|
</el-tab-pane>
|
113
|
135
|
|
114
|
|
- <el-tab-pane label="商品订单"
|
115
|
|
- name="third">
|
|
136
|
+ <el-tab-pane label="商品订单" name="third">
|
116
|
137
|
<div class="user-list">
|
117
|
|
- <el-table ref="multipleTable"
|
118
|
|
- :data="goodData"
|
119
|
|
- tooltip-effect="dark"
|
120
|
|
- height="354"
|
121
|
|
- style="width: 100%;border-radius: 8px;">
|
122
|
|
-
|
|
138
|
+ <el-table
|
|
139
|
+ ref="multipleTable"
|
|
140
|
+ :data="goodData"
|
|
141
|
+ tooltip-effect="dark"
|
|
142
|
+ height="354"
|
|
143
|
+ style="width: 100%; border-radius: 8px"
|
|
144
|
+ >
|
123
|
145
|
<!-- create_time: "2022-03-19 22:53:40"
|
124
|
146
|
goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
|
125
|
147
|
id: 47
|
126
|
148
|
price: "0.01"
|
127
|
149
|
status: 5 -->
|
128
|
150
|
|
129
|
|
- <el-table-column prop="goods"
|
130
|
|
- label="商品名称"
|
131
|
|
- width="200">
|
|
151
|
+ <el-table-column prop="goods" label="商品名称" width="200">
|
132
|
152
|
<template slot-scope="scope">
|
133
|
|
- <div v-for="(val,index) in scope.row.goods"
|
134
|
|
- :key="index">
|
135
|
|
- <div>{{val.name}}</div>
|
|
153
|
+ <div v-for="(val, index) in scope.row.goods" :key="index">
|
|
154
|
+ <div>{{ val.name }}</div>
|
136
|
155
|
</div>
|
137
|
156
|
</template>
|
138
|
157
|
</el-table-column>
|
139
|
|
- <el-table-column prop="goods"
|
140
|
|
- label="数量"
|
141
|
|
- show-overflow-tooltip>
|
|
158
|
+ <el-table-column prop="goods" label="数量" show-overflow-tooltip>
|
142
|
159
|
<template slot-scope="scope">
|
143
|
|
- <div>{{scope.row.goods.length}}</div>
|
|
160
|
+ <div>{{ scope.row.goods.length }}</div>
|
144
|
161
|
</template>
|
145
|
162
|
</el-table-column>
|
146
|
|
- <el-table-column prop="price"
|
147
|
|
- label="实付款"
|
148
|
|
- show-overflow-tooltip></el-table-column>
|
149
|
|
- <el-table-column prop="create_time"
|
150
|
|
- label="下单时间"
|
151
|
|
- width="180"
|
152
|
|
- show-overflow-tooltip></el-table-column>
|
153
|
|
- <el-table-column prop="status"
|
154
|
|
- label="状态"
|
155
|
|
- show-overflow-tooltip>
|
|
163
|
+ <el-table-column
|
|
164
|
+ prop="price"
|
|
165
|
+ label="实付款"
|
|
166
|
+ show-overflow-tooltip
|
|
167
|
+ ></el-table-column>
|
|
168
|
+ <el-table-column
|
|
169
|
+ prop="create_time"
|
|
170
|
+ label="下单时间"
|
|
171
|
+ width="180"
|
|
172
|
+ show-overflow-tooltip
|
|
173
|
+ ></el-table-column>
|
|
174
|
+ <el-table-column prop="status" label="状态" show-overflow-tooltip>
|
156
|
175
|
<template slot-scope="scope">
|
157
|
|
- <div :class="'classShow'+scope.$index">{{scope.row.status==1||scope.row.status==2?goodStatus[scope.row.status]:goodStatus[goodStatus.length-1]}}</div>
|
|
176
|
+ <div :class="'classShow' + scope.$index">
|
|
177
|
+ {{
|
|
178
|
+ scope.row.status == 1 || scope.row.status == 2
|
|
179
|
+ ? goodStatus[scope.row.status]
|
|
180
|
+ : goodStatus[goodStatus.length - 1]
|
|
181
|
+ }}
|
|
182
|
+ </div>
|
158
|
183
|
</template>
|
159
|
184
|
</el-table-column>
|
160
|
185
|
</el-table>
|
161
|
186
|
|
162
|
187
|
<div class="pagin">
|
163
|
|
- <el-pagination background
|
164
|
|
- layout="prev, pager, next"
|
165
|
|
- @current-change="handleCurrentChange"
|
166
|
|
- :current-page.sync="currentPage1"
|
167
|
|
- :total="total"></el-pagination>
|
|
188
|
+ <el-pagination
|
|
189
|
+ background
|
|
190
|
+ layout="prev, pager, next"
|
|
191
|
+ @current-change="handleCurrentChange"
|
|
192
|
+ :current-page.sync="currentPage1"
|
|
193
|
+ :total="total"
|
|
194
|
+ ></el-pagination>
|
168
|
195
|
</div>
|
169
|
196
|
</div>
|
170
|
197
|
</el-tab-pane>
|
171
|
|
- <el-tab-pane label="优惠券"
|
172
|
|
- name="fourth">
|
|
198
|
+ <el-tab-pane label="优惠券" name="fourth">
|
173
|
199
|
<div class="user-list">
|
174
|
|
- <el-table ref="multipleTable"
|
175
|
|
- :data="couponData"
|
176
|
|
- tooltip-effect="dark"
|
177
|
|
- height="354"
|
178
|
|
- style="width: 100%;border-radius: 8px;">
|
179
|
|
-
|
|
200
|
+ <el-table
|
|
201
|
+ ref="multipleTable"
|
|
202
|
+ :data="couponData"
|
|
203
|
+ tooltip-effect="dark"
|
|
204
|
+ height="354"
|
|
205
|
+ style="width: 100%; border-radius: 8px"
|
|
206
|
+ >
|
180
|
207
|
<!-- create_time: "2022-03-10 10:39:19"
|
181
|
208
|
ex_time: "2022.03.17 23:59"
|
182
|
209
|
id: 2517
|
|
@@ -184,38 +211,50 @@ name: "新人体验券"
|
184
|
211
|
status: 2
|
185
|
212
|
type: "全额券" -->
|
186
|
213
|
|
187
|
|
- <el-table-column prop="name"
|
188
|
|
- label="卡卷名称"
|
189
|
|
- width="200"></el-table-column>
|
190
|
|
- <el-table-column prop="type"
|
191
|
|
- label="卡卷类型"
|
192
|
|
- show-overflow-tooltip></el-table-column>
|
193
|
|
- <el-table-column prop="price"
|
194
|
|
- label="总价格"
|
195
|
|
- show-overflow-tooltip></el-table-column>
|
196
|
|
- <el-table-column prop="create_time"
|
197
|
|
- label="到期时间"
|
198
|
|
- width="180"
|
199
|
|
- show-overflow-tooltip></el-table-column>
|
200
|
|
- <el-table-column prop="create_time"
|
201
|
|
- label="创建时间"
|
202
|
|
- width="180"
|
203
|
|
- show-overflow-tooltip></el-table-column>
|
204
|
|
- <el-table-column prop="status"
|
205
|
|
- label="状态"
|
206
|
|
- show-overflow-tooltip>
|
|
214
|
+ <el-table-column
|
|
215
|
+ prop="name"
|
|
216
|
+ label="卡卷名称"
|
|
217
|
+ width="200"
|
|
218
|
+ ></el-table-column>
|
|
219
|
+ <el-table-column
|
|
220
|
+ prop="type"
|
|
221
|
+ label="卡卷类型"
|
|
222
|
+ show-overflow-tooltip
|
|
223
|
+ ></el-table-column>
|
|
224
|
+ <el-table-column
|
|
225
|
+ prop="price"
|
|
226
|
+ label="总价格"
|
|
227
|
+ show-overflow-tooltip
|
|
228
|
+ ></el-table-column>
|
|
229
|
+ <el-table-column
|
|
230
|
+ prop="create_time"
|
|
231
|
+ label="到期时间"
|
|
232
|
+ width="180"
|
|
233
|
+ show-overflow-tooltip
|
|
234
|
+ ></el-table-column>
|
|
235
|
+ <el-table-column
|
|
236
|
+ prop="create_time"
|
|
237
|
+ label="创建时间"
|
|
238
|
+ width="180"
|
|
239
|
+ show-overflow-tooltip
|
|
240
|
+ ></el-table-column>
|
|
241
|
+ <el-table-column prop="status" label="状态" show-overflow-tooltip>
|
207
|
242
|
<template slot-scope="scope">
|
208
|
|
- <div :class="'color'+scope.row.status">{{couponStatus[scope.row.status]}}</div>
|
|
243
|
+ <div :class="'color' + scope.row.status">
|
|
244
|
+ {{ couponStatus[scope.row.status] }}
|
|
245
|
+ </div>
|
209
|
246
|
</template>
|
210
|
247
|
</el-table-column>
|
211
|
248
|
</el-table>
|
212
|
249
|
|
213
|
250
|
<div class="pagin">
|
214
|
|
- <el-pagination background
|
215
|
|
- layout="prev, pager, next"
|
216
|
|
- @current-change="handleCurrentChange"
|
217
|
|
- :current-page.sync="currentPage1"
|
218
|
|
- :total="total"></el-pagination>
|
|
251
|
+ <el-pagination
|
|
252
|
+ background
|
|
253
|
+ layout="prev, pager, next"
|
|
254
|
+ @current-change="handleCurrentChange"
|
|
255
|
+ :current-page.sync="currentPage1"
|
|
256
|
+ :total="total"
|
|
257
|
+ ></el-pagination>
|
219
|
258
|
</div>
|
220
|
259
|
</div>
|
221
|
260
|
</el-tab-pane>
|
|
@@ -224,48 +263,59 @@ type: "全额券" -->
|
224
|
263
|
<!-- 次卡详情 -->
|
225
|
264
|
<mine-pupop :show="isPore">
|
226
|
265
|
<div class="pore-block">
|
227
|
|
- <div class="delete-pupop"
|
228
|
|
- @click="isPore=false">
|
229
|
|
- <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
|
230
|
|
- alt />
|
|
266
|
+ <div class="delete-pupop" @click="isPore = false">
|
|
267
|
+ <img
|
|
268
|
+ src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
|
|
269
|
+ alt
|
|
270
|
+ />
|
231
|
271
|
</div>
|
232
|
272
|
<div class="pore-content">
|
233
|
273
|
<div class="card-title">订单详情</div>
|
234
|
274
|
<div class="project">
|
235
|
275
|
<div class="project-title">项目名称:</div>
|
236
|
276
|
<div class="project-list">
|
237
|
|
- <div class="project-info"
|
238
|
|
- v-for="item,index in cardInfo.project_list"
|
239
|
|
- :key="index">
|
240
|
|
- <div class="name-text"> {{item.project_name}}</div>
|
|
277
|
+ <div
|
|
278
|
+ class="project-info"
|
|
279
|
+ v-for="(item, index) in cardInfo.project_list"
|
|
280
|
+ :key="index"
|
|
281
|
+ >
|
|
282
|
+ <div class="name-text">{{ item.project_name }}</div>
|
241
|
283
|
<div class="change-num">
|
242
|
284
|
<div class="num-content">
|
243
|
|
- <div class="content-left"
|
244
|
|
- @click="reduce(index)">-</div>
|
245
|
|
- <div class="content-num">{{item.num || 0}}</div>
|
246
|
|
- <div class="content-right"
|
247
|
|
- @click="item.num++">+</div>
|
|
285
|
+ <div class="content-left" @click="reduce(index)">-</div>
|
|
286
|
+ <div class="content-num">{{ item.num || 0 }}</div>
|
|
287
|
+ <div class="content-right" @click="item.num++">+</div>
|
248
|
288
|
</div>
|
249
|
289
|
</div>
|
250
|
290
|
</div>
|
251
|
291
|
</div>
|
252
|
292
|
</div>
|
253
|
|
- <div class="common"><span class="common-title">支付方式:</span><span>{{cardInfo.pay_way}}</span></div>
|
254
|
|
- <div class="common"><span class="common-title">有效期限:</span><span>{{cardInfo.ex_time}}</span></div>
|
255
|
|
- <div class="common"><span class="common-title">实付金额:</span><span>¥{{cardInfo.price}}</span></div>
|
|
293
|
+ <div class="common">
|
|
294
|
+ <span class="common-title">支付方式:</span
|
|
295
|
+ ><span>{{ cardInfo.pay_way }}</span>
|
|
296
|
+ </div>
|
|
297
|
+ <div class="common">
|
|
298
|
+ <span class="common-title">有效期限:</span
|
|
299
|
+ ><span>{{ cardInfo.ex_time }}</span>
|
|
300
|
+ </div>
|
|
301
|
+ <div class="common">
|
|
302
|
+ <span class="common-title">实付金额:</span
|
|
303
|
+ ><span>¥{{ cardInfo.price }}</span>
|
|
304
|
+ </div>
|
256
|
305
|
<div class="consume-list">
|
257
|
306
|
<div class="consume-title">消耗信息:</div>
|
258
|
|
- <div class="consume-info min-size"
|
259
|
|
- v-for="item,index in cardLogList"
|
260
|
|
- :key="index">
|
261
|
|
- <div class="shop">{{item.store_name}}</div>
|
262
|
|
- <div class="project-tips">{{item.remark}}</div>
|
263
|
|
- <div class="project-ts">{{item.create_time}}</div>
|
|
307
|
+ <div
|
|
308
|
+ class="consume-info min-size"
|
|
309
|
+ v-for="(item, index) in cardLogList"
|
|
310
|
+ :key="index"
|
|
311
|
+ >
|
|
312
|
+ <div class="shop">{{ item.store_name }}</div>
|
|
313
|
+ <div class="project-tips">{{ item.remark }}</div>
|
|
314
|
+ <div class="project-ts">{{ item.create_time }}</div>
|
264
|
315
|
</div>
|
265
|
316
|
</div>
|
266
|
317
|
</div>
|
267
|
|
- <div class="confirm"
|
268
|
|
- @click="confirm">确定</div>
|
|
318
|
+ <div class="confirm" @click="confirm">确定</div>
|
269
|
319
|
</div>
|
270
|
320
|
</mine-pupop>
|
271
|
321
|
</div>
|
|
@@ -277,19 +327,19 @@ import minePupop from "../../../components/minePupop/index.vue";
|
277
|
327
|
|
278
|
328
|
export default {
|
279
|
329
|
components: {
|
280
|
|
- minePupop
|
|
330
|
+ minePupop,
|
281
|
331
|
},
|
282
|
|
- data () {
|
|
332
|
+ data() {
|
283
|
333
|
return {
|
284
|
334
|
couponList: [
|
285
|
335
|
{
|
286
|
336
|
value: "选项1",
|
287
|
|
- label: "黄金糕"
|
|
337
|
+ label: "黄金糕",
|
288
|
338
|
},
|
289
|
339
|
{
|
290
|
340
|
value: "选项2",
|
291
|
|
- label: "双皮奶"
|
292
|
|
- }
|
|
341
|
+ label: "双皮奶",
|
|
342
|
+ },
|
293
|
343
|
],
|
294
|
344
|
tableData: [
|
295
|
345
|
{
|
|
@@ -301,7 +351,7 @@ export default {
|
301
|
351
|
numberList: 2,
|
302
|
352
|
price: 100,
|
303
|
353
|
shop: "运用店",
|
304
|
|
- status: 2
|
|
354
|
+ status: 2,
|
305
|
355
|
},
|
306
|
356
|
{
|
307
|
357
|
date: "2022.04.25 14:30",
|
|
@@ -312,27 +362,13 @@ export default {
|
312
|
362
|
numberList: 5,
|
313
|
363
|
price: 800,
|
314
|
364
|
shop: "武昌店",
|
315
|
|
- status: 1
|
316
|
|
- }
|
317
|
|
- ],
|
318
|
|
- statusStr: [
|
319
|
|
- "未支付",
|
320
|
|
- "待使用",
|
321
|
|
- "正在使用",
|
322
|
|
- "已结算",
|
323
|
|
- "已取消"
|
324
|
|
- ],
|
325
|
|
- couponStatus: [
|
326
|
|
- '待使用',
|
327
|
|
- '已使用',
|
328
|
|
- '已过期'
|
329
|
|
- ],
|
330
|
|
- goodStatus: [
|
331
|
|
- '未支付',
|
332
|
|
- '已支付',
|
333
|
|
- '已取货'
|
|
365
|
+ status: 1,
|
|
366
|
+ },
|
334
|
367
|
],
|
335
|
|
- activeName: 'first',
|
|
368
|
+ statusStr: ["未支付", "待使用", "正在使用", "已结算", "已取消"],
|
|
369
|
+ couponStatus: ["待使用", "已使用", "已过期"],
|
|
370
|
+ goodStatus: ["未支付", "已支付", "已取货"],
|
|
371
|
+ activeName: "first",
|
336
|
372
|
currentPage1: 1,
|
337
|
373
|
couponData: [],
|
338
|
374
|
goodData: [],
|
|
@@ -341,8 +377,9 @@ export default {
|
341
|
377
|
total: 100,
|
342
|
378
|
limit: 10,
|
343
|
379
|
isPore: false,
|
344
|
|
- cardInfo: {},//订单详情
|
345
|
|
- cardLogList: [],//次卡消耗记录
|
|
380
|
+ cardInfo: {}, //订单详情
|
|
381
|
+ cardLogList: [], //次卡消耗记录
|
|
382
|
+ cardListData: [], //用户次卡列表
|
346
|
383
|
};
|
347
|
384
|
},
|
348
|
385
|
computed: {},
|
|
@@ -350,146 +387,169 @@ export default {
|
350
|
387
|
|
351
|
388
|
methods: {
|
352
|
389
|
// 获取优惠券订单
|
353
|
|
- getUserCoupon () {
|
|
390
|
+ getUserCoupon() {
|
354
|
391
|
let params = {
|
355
|
392
|
page: this.currentPage1,
|
356
|
393
|
limit: this.limit,
|
357
|
|
- id: this.id
|
|
394
|
+ id: this.id,
|
358
|
395
|
};
|
359
|
|
- api.getUserCoupon(params).then(res => {
|
|
396
|
+ api.getUserCoupon(params).then((res) => {
|
360
|
397
|
this.couponData = res.data.list;
|
361
|
398
|
this.total = res.data.total;
|
362
|
399
|
});
|
363
|
400
|
},
|
364
|
|
- reduce (index) {
|
365
|
|
- this.cardInfo.project_list[index].num--
|
|
401
|
+ reduce(index) {
|
|
402
|
+ this.cardInfo.project_list[index].num--;
|
366
|
403
|
if (this.cardInfo.project_list[index].num < 0) {
|
367
|
|
- this.cardInfo.project_list[index].num = 0
|
|
404
|
+ this.cardInfo.project_list[index].num = 0;
|
368
|
405
|
}
|
369
|
406
|
},
|
370
|
407
|
//次卡订单详情
|
371
|
|
- openDetail (row, column, event) {
|
372
|
|
- this.isPore = true
|
373
|
|
- api.cardInfo({ id: row.id }).then(res => {
|
|
408
|
+ openDetail(row, column, event) {
|
|
409
|
+ this.isPore = true;
|
|
410
|
+ api.cardInfo({ id: row.id }).then((res) => {
|
374
|
411
|
if (res.code == 200) {
|
375
|
|
- this.cardInfo = res.data
|
|
412
|
+ this.cardInfo = res.data;
|
376
|
413
|
}
|
377
|
|
- })
|
378
|
|
- api.cardLog({ id: row.id }).then(res => {
|
|
414
|
+ });
|
|
415
|
+ api.cardLog({ id: row.id }).then((res) => {
|
379
|
416
|
if (res.code == 200) {
|
380
|
|
- this.cardLogList = res.data.list
|
|
417
|
+ this.cardLogList = res.data.list;
|
381
|
418
|
}
|
382
|
|
- })
|
|
419
|
+ });
|
383
|
420
|
},
|
384
|
|
- confirm () {
|
|
421
|
+ confirm() {
|
385
|
422
|
// 项目ID,json字符,格式如:[{"project_id":"10","num":5}],project_id:适用项目ID,num:剩余次数
|
386
|
|
- let project_data = [], project_info = {}
|
387
|
|
- this.cardInfo.project_list.forEach(res=>{
|
|
423
|
+ let project_data = [],
|
|
424
|
+ project_info = {};
|
|
425
|
+ this.cardInfo.project_list.forEach((res) => {
|
388
|
426
|
project_info = {
|
389
|
|
- project_id:res.id,
|
390
|
|
- num:res.num
|
391
|
|
- }
|
392
|
|
- project_data.push(project_info)
|
393
|
|
- })
|
394
|
|
- api.cardUpdate({ id: this.cardInfo.id, project_data: JSON.stringify(project_data) }).then(res => {
|
395
|
|
- if (res.code == 200) {
|
396
|
|
- this.$message.success('更改成功!')
|
397
|
|
- this.isPore = false
|
398
|
|
- }
|
399
|
|
- })
|
400
|
|
-
|
|
427
|
+ project_id: res.id,
|
|
428
|
+ num: res.num,
|
|
429
|
+ };
|
|
430
|
+ project_data.push(project_info);
|
|
431
|
+ });
|
|
432
|
+ api
|
|
433
|
+ .cardUpdate({
|
|
434
|
+ id: this.cardInfo.id,
|
|
435
|
+ project_data: JSON.stringify(project_data),
|
|
436
|
+ })
|
|
437
|
+ .then((res) => {
|
|
438
|
+ if (res.code == 200) {
|
|
439
|
+ this.$message.success("更改成功!");
|
|
440
|
+ this.isPore = false;
|
|
441
|
+ }
|
|
442
|
+ });
|
401
|
443
|
},
|
402
|
444
|
|
403
|
445
|
// 获取商品订单
|
404
|
|
- getUserGoods () {
|
|
446
|
+ getUserGoods() {
|
405
|
447
|
let params = {
|
406
|
448
|
page: this.currentPage1,
|
407
|
449
|
limit: this.limit,
|
408
|
|
- id: this.id
|
|
450
|
+ id: this.id,
|
409
|
451
|
};
|
410
|
|
- api.getUserGoods(params).then(res => {
|
|
452
|
+ api.getUserGoods(params).then((res) => {
|
411
|
453
|
this.goodData = res.data.list;
|
412
|
454
|
this.total = res.data.total;
|
413
|
455
|
});
|
414
|
456
|
},
|
415
|
457
|
|
416
|
458
|
// 获取获取项目订单
|
417
|
|
- getUserProject () {
|
|
459
|
+ getUserProject() {
|
418
|
460
|
let params = {
|
419
|
461
|
page: this.currentPage1,
|
420
|
462
|
limit: this.limit,
|
421
|
|
- id: this.id
|
|
463
|
+ id: this.id,
|
422
|
464
|
};
|
423
|
|
- api.getUserProject(params).then(res => {
|
|
465
|
+ api.getUserProject(params).then((res) => {
|
424
|
466
|
this.projectData = res.data.list;
|
425
|
467
|
this.total = res.data.total;
|
426
|
468
|
});
|
427
|
469
|
},
|
428
|
470
|
|
429
|
471
|
// 获取卡券订单
|
430
|
|
- async getCardOrders () {
|
|
472
|
+ // async getCardOrders() {
|
|
473
|
+ // let params = {
|
|
474
|
+ // page: this.currentPage1,
|
|
475
|
+ // limit: this.limit,
|
|
476
|
+ // id: this.id,
|
|
477
|
+ // };
|
|
478
|
+ // let resp = await api.getCardOrders(params);
|
|
479
|
+ // if (resp.code === 200) {
|
|
480
|
+ // console.log(resp, "adadasdasdadsadsadasd");
|
|
481
|
+ // this.cardOrderData = resp.data.list;
|
|
482
|
+ // this.total = resp.data.total;
|
|
483
|
+ // }
|
|
484
|
+ // },
|
|
485
|
+ //获取用户次卡列表
|
|
486
|
+ async getCardList() {
|
431
|
487
|
let params = {
|
432
|
488
|
page: this.currentPage1,
|
433
|
489
|
limit: this.limit,
|
434
|
|
- id: this.id
|
|
490
|
+ id: this.id,
|
435
|
491
|
};
|
436
|
|
- let resp = await api.getCardOrders(params)
|
|
492
|
+ let resp = await api.getCardList(params);
|
437
|
493
|
if (resp.code === 200) {
|
438
|
|
- this.cardOrderData = resp.data.list
|
439
|
|
- this.total = resp.data.total
|
|
494
|
+ console.log(resp, "asdasdasd");
|
|
495
|
+ this.cardListData = resp.data.list;
|
|
496
|
+ this.total = resp.data.total;
|
440
|
497
|
}
|
441
|
498
|
},
|
442
|
|
- handleCurrentChange (val) {
|
443
|
|
- this.currentPage1 = val
|
444
|
|
- if (this.activeName == 'first') {
|
|
499
|
+ handleCurrentChange(val) {
|
|
500
|
+ this.currentPage1 = val;
|
|
501
|
+ if (this.activeName == "first") {
|
445
|
502
|
this.getUserProject();
|
446
|
|
- } else if (this.activeName == 'second') {
|
447
|
|
- this.getCardOrders()
|
448
|
|
- } else if (this.activeName == 'third') {
|
|
503
|
+ } else if (this.activeName == "second") {
|
|
504
|
+ // this.getCardOrders();
|
|
505
|
+ this.getCardList();
|
|
506
|
+ } else if (this.activeName == "third") {
|
449
|
507
|
this.getUserGoods();
|
450
|
|
- } else if (this.activeName == 'fourth') {
|
|
508
|
+ } else if (this.activeName == "fourth") {
|
451
|
509
|
this.getUserCoupon();
|
452
|
510
|
}
|
453
|
511
|
},
|
454
|
|
- handleSelectionChange (row, column, event) {
|
|
512
|
+ handleSelectionChange(row, column, event) {
|
455
|
513
|
this.$router.push({
|
456
|
514
|
path: "/historicalOrder/details",
|
457
|
515
|
query: {
|
458
|
|
- id: row.id
|
459
|
|
- }
|
|
516
|
+ id: row.id,
|
|
517
|
+ },
|
460
|
518
|
});
|
461
|
519
|
},
|
462
|
|
- onSubmit () { },
|
463
|
|
- submitFrequency () { },
|
464
|
|
- changeTab (e) {
|
465
|
|
- this.currentPage1 = 1
|
|
520
|
+ onSubmit() {},
|
|
521
|
+ submitFrequency() {},
|
|
522
|
+ changeTab(e) {
|
|
523
|
+ this.currentPage1 = 1;
|
466
|
524
|
if (e.index == 0) {
|
467
|
525
|
this.getUserProject();
|
468
|
526
|
} else if (e.index == 1) {
|
469
|
|
- this.getCardOrders()
|
|
527
|
+ // this.getCardOrders();
|
|
528
|
+ this.getCardList();
|
470
|
529
|
} else if (e.index == 2) {
|
471
|
530
|
this.getUserGoods();
|
472
|
531
|
} else if (e.index == 3) {
|
473
|
532
|
this.getUserCoupon();
|
474
|
533
|
}
|
475
|
|
- }
|
|
534
|
+ },
|
476
|
535
|
},
|
477
|
536
|
|
478
|
|
- created () {
|
|
537
|
+ created() {
|
479
|
538
|
let id = this.$route.query.id;
|
480
|
|
- let activeName = this.$route.query.activeName
|
481
|
|
- this.activeName = activeName
|
|
539
|
+ let activeName = this.$route.query.activeName;
|
|
540
|
+ this.activeName = activeName;
|
482
|
541
|
this.id = id;
|
483
|
|
- if (this.activeName == 'first') {
|
|
542
|
+ if (this.activeName == "first") {
|
484
|
543
|
this.getUserProject();
|
485
|
|
- } else if (this.activeName == 'second') {
|
486
|
|
- this.getCardOrders()
|
487
|
|
- } else if (this.activeName == 'third') {
|
|
544
|
+ } else if (this.activeName == "second") {
|
|
545
|
+ // this.getCardOrders();
|
|
546
|
+ this.getCardList();
|
|
547
|
+ } else if (this.activeName == "third") {
|
488
|
548
|
this.getUserGoods();
|
489
|
549
|
}
|
490
|
550
|
},
|
491
|
551
|
|
492
|
|
- mounted () { }
|
|
552
|
+ mounted() {},
|
493
|
553
|
};
|
494
|
554
|
</script>
|
495
|
555
|
|