Browse Source

增加优惠券查看

yuhao 1 year ago
parent
commit
0de246c2ec
2 changed files with 277 additions and 438 deletions
  1. 126 207
      src/pages/customerMan/myOrder/index.vue
  2. 151 231
      src/pages/payUser/myOrder/index.vue

+ 126 - 207
src/pages/customerMan/myOrder/index.vue

@@ -7,8 +7,7 @@
7
           type="primary"
7
           type="primary"
8
           @click="refreshList"
8
           @click="refreshList"
9
           :loading="refresh"
9
           :loading="refresh"
10
-          >{{ refresh ? "加载中..." : "刷新" }}</el-button
11
-        >
10
+        >{{ refresh ? "加载中..." : "刷新" }}</el-button>
12
       </div>
11
       </div>
13
       <el-tabs type="border-card" @tab-click="changeTab" v-model="activeName">
12
       <el-tabs type="border-card" @tab-click="changeTab" v-model="activeName">
14
         <el-tab-pane label="项目订单" name="first">
13
         <el-tab-pane label="项目订单" name="first">
@@ -33,40 +32,27 @@
33
                   <div>{{ scope.row.goods.length }}</div>
32
                   <div>{{ scope.row.goods.length }}</div>
34
                 </template>
33
                 </template>
35
               </el-table-column>
34
               </el-table-column>
36
-              <el-table-column
37
-                prop="price"
38
-                label="总价格"
39
-                show-overflow-tooltip
40
-              ></el-table-column>
41
-              <el-table-column
42
-                prop="order_time"
43
-                label="预约时间"
44
-                width="180"
45
-                show-overflow-tooltip
46
-              ></el-table-column>
47
-              <el-table-column
48
-                prop="store_name"
49
-                label="预约店铺"
50
-                show-overflow-tooltip
51
-              ></el-table-column>
35
+              <el-table-column prop="price" label="总价格" show-overflow-tooltip></el-table-column>
36
+              <el-table-column prop="order_time" label="预约时间" width="180" show-overflow-tooltip></el-table-column>
37
+              <el-table-column prop="store_name" label="预约店铺" show-overflow-tooltip></el-table-column>
52
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
38
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
53
                 <template slot-scope="scope">
39
                 <template slot-scope="scope">
54
                   <div :class="'color' + scope.row.status">
40
                   <div :class="'color' + scope.row.status">
55
                     <!-- 状态:0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
41
                     <!-- 状态:0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
56
                     {{
42
                     {{
57
-                      scope.row.status == 0
58
-                        ? "已预约"
59
-                        : scope.row.status == 1
60
-                        ? "待使用"
61
-                        : scope.row.status == 2
62
-                        ? "正在使用"
63
-                        : scope.row.status == 3
64
-                        ? "已结算"
65
-                        : scope.row.status == -1
66
-                        ? "已取消"
67
-                        : scope.row.status == -2
68
-                        ? "退款审核中"
69
-                        : "已退款"
43
+                    scope.row.status == 0
44
+                    ? "已预约"
45
+                    : scope.row.status == 1
46
+                    ? "待使用"
47
+                    : scope.row.status == 2
48
+                    ? "正在使用"
49
+                    : scope.row.status == 3
50
+                    ? "已结算"
51
+                    : scope.row.status == -1
52
+                    ? "已取消"
53
+                    : scope.row.status == -2
54
+                    ? "退款审核中"
55
+                    : "已退款"
70
                     }}
56
                     }}
71
                   </div>
57
                   </div>
72
                 </template>
58
                 </template>
@@ -99,25 +85,11 @@
99
                   <div>{{ scope.row.card_name | ellipsis(8) }}</div>
85
                   <div>{{ scope.row.card_name | ellipsis(8) }}</div>
100
                 </template>
86
                 </template>
101
               </el-table-column>
87
               </el-table-column>
102
-              <el-table-column
103
-                prop="total_num"
104
-                label="总次数"
105
-                show-overflow-tooltip
106
-                align="center"
107
-              >
108
-                <template slot-scope="{ row }" v-if="row.card_type == 1">
109
-                  {{ row.total_num }}
110
-                </template>
88
+              <el-table-column prop="total_num" label="总次数" show-overflow-tooltip align="center">
89
+                <template slot-scope="{ row }" v-if="row.card_type == 1">{{ row.total_num }}</template>
111
               </el-table-column>
90
               </el-table-column>
112
-              <el-table-column
113
-                prop="num"
114
-                label="剩余次数"
115
-                show-overflow-tooltip
116
-                align="center"
117
-              >
118
-                <template slot-scope="{ row }" v-if="row.card_type == 1">
119
-                  {{ row.num }}
120
-                </template>
91
+              <el-table-column prop="num" label="剩余次数" show-overflow-tooltip align="center">
92
+                <template slot-scope="{ row }" v-if="row.card_type == 1">{{ row.num }}</template>
121
               </el-table-column>
93
               </el-table-column>
122
               <el-table-column
94
               <el-table-column
123
                 prop="used_num"
95
                 prop="used_num"
@@ -126,49 +98,30 @@
126
                 show-overflow-tooltip
98
                 show-overflow-tooltip
127
                 align="center"
99
                 align="center"
128
               ></el-table-column>
100
               ></el-table-column>
129
-              <el-table-column
130
-                prop="expir_time"
131
-                label="过期时间"
132
-                width="180"
133
-                show-overflow-tooltip
134
-              >
101
+              <el-table-column prop="expir_time" label="过期时间" width="180" show-overflow-tooltip>
135
                 <template slot-scope="{ row }">
102
                 <template slot-scope="{ row }">
136
-                  <div class="expir_time" @click.stop="amendCardTime(row)">
137
-                    {{ row.expir_time }}
138
-                  </div>
103
+                  <div class="expir_time" @click.stop="amendCardTime(row)">{{ row.expir_time }}</div>
139
                 </template>
104
                 </template>
140
               </el-table-column>
105
               </el-table-column>
141
-              <el-table-column
142
-                prop="create_time"
143
-                label="创建时间"
144
-                width="180"
145
-                show-overflow-tooltip
146
-              ></el-table-column>
106
+              <el-table-column prop="create_time" label="创建时间" width="180" show-overflow-tooltip></el-table-column>
147
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
107
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
148
                 <template slot-scope="scope">
108
                 <template slot-scope="scope">
149
                   <div :class="'colorB' + scope.row.status">
109
                   <div :class="'colorB' + scope.row.status">
150
                     {{
110
                     {{
151
-                      scope.row.status == -2
152
-                        ? "已注销"
153
-                        : scope.row.status == -1
154
-                        ? "已过期"
155
-                        : scope.row.status == -0
156
-                        ? "已使用"
157
-                        : "待使用"
111
+                    scope.row.status == -2
112
+                    ? "已注销"
113
+                    : scope.row.status == -1
114
+                    ? "已过期"
115
+                    : scope.row.status == -0
116
+                    ? "已使用"
117
+                    : "待使用"
158
                     }}
118
                     }}
159
                   </div>
119
                   </div>
160
                 </template>
120
                 </template>
161
               </el-table-column>
121
               </el-table-column>
162
-              <el-table-column
163
-                prop=""
164
-                label="操作"
165
-                width="100"
166
-                show-overflow-tooltip
167
-              >
122
+              <el-table-column prop label="操作" width="100" show-overflow-tooltip>
168
                 <template slot-scope="scope" v-if="scope.row.status == 1">
123
                 <template slot-scope="scope" v-if="scope.row.status == 1">
169
-                  <div class="cancleCoupon" @click.stop="cancleCard(scope.row)">
170
-                    操作
171
-                  </div>
124
+                  <div class="cancleCoupon" @click.stop="cancleCard(scope.row)">操作</div>
172
                 </template>
125
                 </template>
173
               </el-table-column>
126
               </el-table-column>
174
             </el-table>
127
             </el-table>
@@ -198,7 +151,7 @@
198
 goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
151
 goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
199
 id: 47
152
 id: 47
200
 price: "0.01"
153
 price: "0.01"
201
-status: 5 -->
154
+              status: 5-->
202
 
155
 
203
               <el-table-column prop="goods" label="商品名称" width="200">
156
               <el-table-column prop="goods" label="商品名称" width="200">
204
                 <template slot-scope="scope">
157
                 <template slot-scope="scope">
@@ -212,33 +165,24 @@ status: 5 -->
212
                   <div>{{ scope.row.goods.length }}</div>
165
                   <div>{{ scope.row.goods.length }}</div>
213
                 </template>
166
                 </template>
214
               </el-table-column>
167
               </el-table-column>
215
-              <el-table-column
216
-                prop="price"
217
-                label="实付款"
218
-                show-overflow-tooltip
219
-              ></el-table-column>
220
-              <el-table-column
221
-                prop="create_time"
222
-                label="下单时间"
223
-                width="180"
224
-                show-overflow-tooltip
225
-              ></el-table-column>
168
+              <el-table-column prop="price" label="实付款" show-overflow-tooltip></el-table-column>
169
+              <el-table-column prop="create_time" label="下单时间" width="180" show-overflow-tooltip></el-table-column>
226
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
170
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
227
                 <template slot-scope="scope">
171
                 <template slot-scope="scope">
228
                   <div :class="'color' + scope.row.status">
172
                   <div :class="'color' + scope.row.status">
229
                     <!-- 状态,0未支付,1已支付,待取货,2已取货,-1已取消,-2退款审核中,-3已退款 -->
173
                     <!-- 状态,0未支付,1已支付,待取货,2已取货,-1已取消,-2退款审核中,-3已退款 -->
230
                     {{
174
                     {{
231
-                      scope.row.status == 0
232
-                        ? "未支付"
233
-                        : scope.row.status == 1
234
-                        ? "待取货"
235
-                        : scope.row.status == 2
236
-                        ? "已取货"
237
-                        : scope.row.status == -1
238
-                        ? "已取消"
239
-                        : scope.row.status == -2
240
-                        ? "退款审核中"
241
-                        : "已退款"
175
+                    scope.row.status == 0
176
+                    ? "未支付"
177
+                    : scope.row.status == 1
178
+                    ? "待取货"
179
+                    : scope.row.status == 2
180
+                    ? "已取货"
181
+                    : scope.row.status == -1
182
+                    ? "已取消"
183
+                    : scope.row.status == -2
184
+                    ? "退款审核中"
185
+                    : "已退款"
242
                     }}
186
                     }}
243
                   </div>
187
                   </div>
244
                 </template>
188
                 </template>
@@ -270,52 +214,25 @@ ex_time: "2022.03.17 23:59"
270
 id: 2517
214
 id: 2517
271
 name: "新人体验券"
215
 name: "新人体验券"
272
 status: 2
216
 status: 2
273
-type: "全额券" -->
217
+              type: "全额券"-->
274
 
218
 
275
               <el-table-column prop="name" label="卡卷名称"></el-table-column>
219
               <el-table-column prop="name" label="卡卷名称"></el-table-column>
276
-              <el-table-column
277
-                prop="type"
278
-                label="卡卷类型"
279
-                show-overflow-tooltip
280
-                width="100"
281
-              ></el-table-column>
282
-              <el-table-column
283
-                prop="ex_time"
284
-                label="到期时间"
285
-                width="180"
286
-                show-overflow-tooltip
287
-              ></el-table-column>
288
-              <el-table-column
289
-                prop="create_time"
290
-                label="创建时间"
291
-                width="180"
292
-                show-overflow-tooltip
293
-              ></el-table-column>
294
-              <el-table-column
295
-                width="100"
296
-                prop="status"
297
-                label="状态"
298
-                show-overflow-tooltip
299
-              >
220
+              <el-table-column prop="type" label="卡卷类型" show-overflow-tooltip width="100"></el-table-column>
221
+              <el-table-column prop="ex_time" label="到期时间" width="180" show-overflow-tooltip></el-table-column>
222
+              <el-table-column prop="create_time" label="创建时间" width="180" show-overflow-tooltip></el-table-column>
223
+              <el-table-column width="100" prop="status" label="状态" show-overflow-tooltip>
300
                 <template slot-scope="scope">
224
                 <template slot-scope="scope">
301
-                  <div :class="'colorA' + scope.row.status">
302
-                    {{ couponStatus[scope.row.status] }}
303
-                  </div>
225
+                  <div :class="'colorA' + scope.row.status">{{ couponStatus[scope.row.status] }}</div>
304
                 </template>
226
                 </template>
305
               </el-table-column>
227
               </el-table-column>
306
-              <el-table-column
307
-                prop=""
308
-                label="操作"
309
-                width="100"
310
-                show-overflow-tooltip
311
-              >
228
+              <el-table-column prop label="备注" width="90" show-overflow-tooltip>
229
+                <template slot-scope="scope" v-if="scope.row.is_send == 1">
230
+                  <button class="examineCoupon" @click.stop="cancleCoupon(scope.row,true)">查看</button>
231
+                </template>
232
+              </el-table-column>
233
+              <el-table-column prop label="操作" width="80" show-overflow-tooltip>
312
                 <template slot-scope="scope" v-if="scope.row.status == 0">
234
                 <template slot-scope="scope" v-if="scope.row.status == 0">
313
-                  <div
314
-                    class="cancleCoupon"
315
-                    @click.stop="cancleCoupon(scope.row)"
316
-                  >
317
-                    操作
318
-                  </div>
235
+                  <div class="cancleCoupon" @click.stop="cancleCoupon(scope.row,false)">操作</div>
319
                 </template>
236
                 </template>
320
               </el-table-column>
237
               </el-table-column>
321
             </el-table>
238
             </el-table>
@@ -347,11 +264,7 @@ type: "全额券" -->
347
           <div class="project">
264
           <div class="project">
348
             <div class="project-title">项目名称:</div>
265
             <div class="project-title">项目名称:</div>
349
             <div class="project-list">
266
             <div class="project-list">
350
-              <div
351
-                class="project-info"
352
-                v-for="(item, index) in cardInfo.project_list"
353
-                :key="index"
354
-              >
267
+              <div class="project-info" v-for="(item, index) in cardInfo.project_list" :key="index">
355
                 <div class="name-text">{{ item.project_name }}</div>
268
                 <div class="name-text">{{ item.project_name }}</div>
356
                 <div class="change-num" v-if="cardInfo.card_type == 1">
269
                 <div class="change-num" v-if="cardInfo.card_type == 1">
357
                   <div class="num-content">
270
                   <div class="num-content">
@@ -364,33 +277,27 @@ type: "全额券" -->
364
             </div>
277
             </div>
365
           </div>
278
           </div>
366
           <div class="common">
279
           <div class="common">
367
-            <span class="common-title">支付方式:</span
368
-            ><span>{{ cardInfo.pay_way }}</span>
280
+            <span class="common-title">支付方式:</span>
281
+            <span>{{ cardInfo.pay_way }}</span>
369
           </div>
282
           </div>
370
           <div class="common">
283
           <div class="common">
371
-            <span class="common-title">有效期限:</span
372
-            ><span>{{ cardInfo.ex_time }}</span>
284
+            <span class="common-title">有效期限:</span>
285
+            <span>{{ cardInfo.ex_time }}</span>
373
           </div>
286
           </div>
374
           <div class="common">
287
           <div class="common">
375
-            <span class="common-title">实付金额:</span
376
-            ><span>¥{{ cardInfo.price }}</span>
288
+            <span class="common-title">实付金额:</span>
289
+            <span>¥{{ cardInfo.price }}</span>
377
           </div>
290
           </div>
378
           <div class="consume-list">
291
           <div class="consume-list">
379
             <div class="consume-title">消耗信息:</div>
292
             <div class="consume-title">消耗信息:</div>
380
-            <div
381
-              class="consume-info min-size"
382
-              v-for="(item, index) in cardLogList"
383
-              :key="index"
384
-            >
293
+            <div class="consume-info min-size" v-for="(item, index) in cardLogList" :key="index">
385
               <div class="shop">{{ item.store_name }}</div>
294
               <div class="shop">{{ item.store_name }}</div>
386
               <div class="project-tips">{{ item.remark }}</div>
295
               <div class="project-tips">{{ item.remark }}</div>
387
               <div class="project-ts">{{ item.create_time }}</div>
296
               <div class="project-ts">{{ item.create_time }}</div>
388
             </div>
297
             </div>
389
           </div>
298
           </div>
390
         </div>
299
         </div>
391
-        <div v-if="cardInfo.card_type == 1" class="confirm" @click="confirm">
392
-          确定
393
-        </div>
300
+        <div v-if="cardInfo.card_type == 1" class="confirm" @click="confirm">确定</div>
394
       </div>
301
       </div>
395
     </mine-pupop>
302
     </mine-pupop>
396
     <!-- 修改次卡时间 -->
303
     <!-- 修改次卡时间 -->
@@ -405,7 +312,8 @@ type: "全额券" -->
405
         </div>
312
         </div>
406
         <div class="admendTime-content">
313
         <div class="admendTime-content">
407
           <div class="oldTime">
314
           <div class="oldTime">
408
-            次卡过期时间 :<span> {{ amendCardInfo.expir_time }}</span>
315
+            次卡过期时间 :
316
+            <span>{{ amendCardInfo.expir_time }}</span>
409
           </div>
317
           </div>
410
           <div class="newTime">
318
           <div class="newTime">
411
             选择更改日期:
319
             选择更改日期:
@@ -416,8 +324,7 @@ type: "全额券" -->
416
               placeholder="选择日期"
324
               placeholder="选择日期"
417
               value-format="yyyy-MM-dd"
325
               value-format="yyyy-MM-dd"
418
               @focus="forbid"
326
               @focus="forbid"
419
-            >
420
-            </el-date-picker>
327
+            ></el-date-picker>
421
           </div>
328
           </div>
422
           <div class="radio">
329
           <div class="radio">
423
             <button class="cancelBtn" @click="cancel">取消</button>
330
             <button class="cancelBtn" @click="cancel">取消</button>
@@ -436,14 +343,15 @@ type: "全额券" -->
436
             @click="closeCouponPop"
343
             @click="closeCouponPop"
437
           />
344
           />
438
         </div>
345
         </div>
439
-        <div class="title">核销优惠券</div>
346
+        <div class="title">{{examineCoupon?'发券备注信息':'核销优惠券'}}</div>
440
         <div class="couponName">
347
         <div class="couponName">
441
-          <div class="one">优惠券名称:</div>
442
-          <div>{{ cancelCouponInfo.name }}</div>
348
+          <div class="one">{{examineCoupon?'发券人:':'优惠券名称:'}}</div>
349
+          <div>{{ examineCoupon?cancelCouponInfo.send_name:cancelCouponInfo.name }}</div>
443
         </div>
350
         </div>
444
         <div class="couponRemark">
351
         <div class="couponRemark">
445
           <div class="one">备注信息:</div>
352
           <div class="one">备注信息:</div>
446
-          <el-input v-model.trim="couponRemark"></el-input>
353
+          <el-input v-if='!examineCoupon' v-model.trim="couponRemark"></el-input>
354
+          <div v-else>{{cancelCouponInfo.send_remark}}</div>
447
         </div>
355
         </div>
448
         <div class="radio">
356
         <div class="radio">
449
           <button class="affirmBtn" @click="checkCoupon">确定</button>
357
           <button class="affirmBtn" @click="checkCoupon">确定</button>
@@ -483,19 +391,19 @@ import minePupop from "../../../components/minePupop/index.vue";
483
 
391
 
484
 export default {
392
 export default {
485
   components: {
393
   components: {
486
-    minePupop,
394
+    minePupop
487
   },
395
   },
488
   data() {
396
   data() {
489
     return {
397
     return {
490
       couponList: [
398
       couponList: [
491
         {
399
         {
492
           value: "选项1",
400
           value: "选项1",
493
-          label: "黄金糕",
401
+          label: "黄金糕"
494
         },
402
         },
495
         {
403
         {
496
           value: "选项2",
404
           value: "选项2",
497
-          label: "双皮奶",
498
-        },
405
+          label: "双皮奶"
406
+        }
499
       ],
407
       ],
500
       tableData: [
408
       tableData: [
501
         {
409
         {
@@ -507,7 +415,7 @@ export default {
507
           numberList: 2,
415
           numberList: 2,
508
           price: 100,
416
           price: 100,
509
           shop: "运用店",
417
           shop: "运用店",
510
-          status: 2,
418
+          status: 2
511
         },
419
         },
512
         {
420
         {
513
           date: "2022.04.25  14:30",
421
           date: "2022.04.25  14:30",
@@ -518,8 +426,8 @@ export default {
518
           numberList: 5,
426
           numberList: 5,
519
           price: 800,
427
           price: 800,
520
           shop: "武昌店",
428
           shop: "武昌店",
521
-          status: 1,
522
-        },
429
+          status: 1
430
+        }
523
       ],
431
       ],
524
       couponStatus: ["待使用", "已使用", "已过期"],
432
       couponStatus: ["待使用", "已使用", "已过期"],
525
       goodStatus: ["未支付", "已支付", "已取货"],
433
       goodStatus: ["未支付", "已支付", "已取货"],
@@ -539,12 +447,13 @@ export default {
539
       amendCardInfo: "", // 要修改次卡的信息
447
       amendCardInfo: "", // 要修改次卡的信息
540
       cardTime: "", //次卡修改时间(年月日)
448
       cardTime: "", //次卡修改时间(年月日)
541
       isCancelCoupon: false, //核销优惠券界面
449
       isCancelCoupon: false, //核销优惠券界面
542
-      cancelCouponInfo: "", //核销优惠券名称
450
+      cancelCouponInfo: "", //核销优惠券信息
543
       couponRemark: "", //核销优惠券备注信息
451
       couponRemark: "", //核销优惠券备注信息
544
       refresh: false, //刷新页面数据
452
       refresh: false, //刷新页面数据
545
       isCancelCard: false, //核销次卡界面
453
       isCancelCard: false, //核销次卡界面
546
-      cancelCardInfo: "", //核销次卡名称
547
-      cardRemark: "", //核销优惠券备注信息
454
+      cancelCardInfo: "", //核销次卡信息
455
+      cardRemark: "", //核销次卡备注信息
456
+      examineCoupon:false,//是否是查看优惠券
548
     };
457
     };
549
   },
458
   },
550
   computed: {},
459
   computed: {},
@@ -554,7 +463,7 @@ export default {
554
     // 刷新页面数据
463
     // 刷新页面数据
555
     refreshList() {
464
     refreshList() {
556
       this.refresh = true;
465
       this.refresh = true;
557
-      api.syncErpOrder({}).then((res) => {
466
+      api.syncErpOrder({}).then(res => {
558
         if (res.code == 200) {
467
         if (res.code == 200) {
559
           this.currentPage1 = 1;
468
           this.currentPage1 = 1;
560
           if (this.activeName == "first") {
469
           if (this.activeName == "first") {
@@ -570,7 +479,8 @@ export default {
570
       });
479
       });
571
     },
480
     },
572
     // 打开核销优惠券界面
481
     // 打开核销优惠券界面
573
-    cancleCoupon(e) {
482
+    cancleCoupon(e,examineCoupon) {
483
+      this.examineCoupon = examineCoupon
574
       this.isCancelCoupon = true;
484
       this.isCancelCoupon = true;
575
       this.cancelCouponInfo = e;
485
       this.cancelCouponInfo = e;
576
     },
486
     },
@@ -581,6 +491,10 @@ export default {
581
     },
491
     },
582
     // 核销优惠券
492
     // 核销优惠券
583
     checkCoupon() {
493
     checkCoupon() {
494
+      if(this.examineCoupon){
495
+        this.isCancelCoupon = false;
496
+        return
497
+      }
584
       if (this.couponRemark == "") {
498
       if (this.couponRemark == "") {
585
         this.$message.error("请填写备注信息");
499
         this.$message.error("请填写备注信息");
586
         return;
500
         return;
@@ -588,9 +502,9 @@ export default {
588
       api
502
       api
589
         .checkCoupon({
503
         .checkCoupon({
590
           id: this.cancelCouponInfo.id,
504
           id: this.cancelCouponInfo.id,
591
-          remark: this.couponRemark,
505
+          remark: this.couponRemark
592
         })
506
         })
593
-        .then((res) => {
507
+        .then(res => {
594
           if (res.code == 200) {
508
           if (res.code == 200) {
595
             this.$message.success("核销成功");
509
             this.$message.success("核销成功");
596
             this.isCancelCoupon = false;
510
             this.isCancelCoupon = false;
@@ -617,9 +531,9 @@ export default {
617
       api
531
       api
618
         .checkCard({
532
         .checkCard({
619
           id: this.cancelCardInfo.id,
533
           id: this.cancelCardInfo.id,
620
-          remark: this.cardRemark,
534
+          remark: this.cardRemark
621
         })
535
         })
622
-        .then((res) => {
536
+        .then(res => {
623
           if (res.code == 200) {
537
           if (res.code == 200) {
624
             this.$message.success("核销成功");
538
             this.$message.success("核销成功");
625
             this.isCancelCard = false;
539
             this.isCancelCard = false;
@@ -648,7 +562,7 @@ export default {
648
       if (e.status == -2) {
562
       if (e.status == -2) {
649
         this.$message({
563
         this.$message({
650
           message: "该次卡已注销",
564
           message: "该次卡已注销",
651
-          type: "error",
565
+          type: "error"
652
         });
566
         });
653
         return;
567
         return;
654
       }
568
       }
@@ -666,13 +580,13 @@ export default {
666
       api
580
       api
667
         .amendCardTime({
581
         .amendCardTime({
668
           id: this.amendCardInfo.id,
582
           id: this.amendCardInfo.id,
669
-          expire_date: this.cardTime,
583
+          expire_date: this.cardTime
670
         })
584
         })
671
-        .then((res) => {
585
+        .then(res => {
672
           if (res.code == 200) {
586
           if (res.code == 200) {
673
             this.$message({
587
             this.$message({
674
               message: res.msg,
588
               message: res.msg,
675
-              type: "success",
589
+              type: "success"
676
             });
590
             });
677
             this.isAmend = false;
591
             this.isAmend = false;
678
             // 更新次卡列表
592
             // 更新次卡列表
@@ -685,9 +599,9 @@ export default {
685
       let params = {
599
       let params = {
686
         page: this.currentPage1,
600
         page: this.currentPage1,
687
         limit: this.limit,
601
         limit: this.limit,
688
-        id: this.id,
602
+        id: this.id
689
       };
603
       };
690
-      api.getUserCoupon(params).then((res) => {
604
+      api.getUserCoupon(params).then(res => {
691
         this.couponData = res.data.list;
605
         this.couponData = res.data.list;
692
         this.total = res.data.total;
606
         this.total = res.data.total;
693
         // 关闭刷新动画
607
         // 关闭刷新动画
@@ -705,18 +619,18 @@ export default {
705
       if (row.status == -2) {
619
       if (row.status == -2) {
706
         this.$message({
620
         this.$message({
707
           message: "该次卡已注销",
621
           message: "该次卡已注销",
708
-          type: "error",
622
+          type: "error"
709
         });
623
         });
710
         return;
624
         return;
711
       }
625
       }
712
       this.isPore = true;
626
       this.isPore = true;
713
-      api.cardInfo({ id: row.id }).then((res) => {
627
+      api.cardInfo({ id: row.id }).then(res => {
714
         if (res.code == 200) {
628
         if (res.code == 200) {
715
           res.data.card_type = row.card_type;
629
           res.data.card_type = row.card_type;
716
           this.cardInfo = res.data;
630
           this.cardInfo = res.data;
717
         }
631
         }
718
       });
632
       });
719
-      api.cardLog({ id: row.id }).then((res) => {
633
+      api.cardLog({ id: row.id }).then(res => {
720
         if (res.code == 200) {
634
         if (res.code == 200) {
721
           this.cardLogList = res.data.list;
635
           this.cardLogList = res.data.list;
722
         }
636
         }
@@ -726,19 +640,19 @@ export default {
726
       // 项目ID,json字符,格式如:[{"project_id":"10","num":5}],project_id:适用项目ID,num:剩余次数
640
       // 项目ID,json字符,格式如:[{"project_id":"10","num":5}],project_id:适用项目ID,num:剩余次数
727
       let project_data = [],
641
       let project_data = [],
728
         project_info = {};
642
         project_info = {};
729
-      this.cardInfo.project_list.forEach((res) => {
643
+      this.cardInfo.project_list.forEach(res => {
730
         project_info = {
644
         project_info = {
731
           project_id: res.id,
645
           project_id: res.id,
732
-          num: res.num,
646
+          num: res.num
733
         };
647
         };
734
         project_data.push(project_info);
648
         project_data.push(project_info);
735
       });
649
       });
736
       api
650
       api
737
         .cardUpdate({
651
         .cardUpdate({
738
           id: this.cardInfo.id,
652
           id: this.cardInfo.id,
739
-          project_data: JSON.stringify(project_data),
653
+          project_data: JSON.stringify(project_data)
740
         })
654
         })
741
-        .then((res) => {
655
+        .then(res => {
742
           if (res.code == 200) {
656
           if (res.code == 200) {
743
             this.$message.success("更改成功!");
657
             this.$message.success("更改成功!");
744
             this.isPore = false;
658
             this.isPore = false;
@@ -753,9 +667,9 @@ export default {
753
       let params = {
667
       let params = {
754
         page: this.currentPage1,
668
         page: this.currentPage1,
755
         limit: this.limit,
669
         limit: this.limit,
756
-        id: this.id,
670
+        id: this.id
757
       };
671
       };
758
-      api.getUserGoods(params).then((res) => {
672
+      api.getUserGoods(params).then(res => {
759
         this.goodData = res.data.list;
673
         this.goodData = res.data.list;
760
         this.total = res.data.total;
674
         this.total = res.data.total;
761
         // 关闭刷新动画
675
         // 关闭刷新动画
@@ -768,9 +682,9 @@ export default {
768
       let params = {
682
       let params = {
769
         page: this.currentPage1,
683
         page: this.currentPage1,
770
         limit: this.limit,
684
         limit: this.limit,
771
-        id: this.id,
685
+        id: this.id
772
       };
686
       };
773
-      api.getUserProject(params).then((res) => {
687
+      api.getUserProject(params).then(res => {
774
         this.projectData = res.data.list;
688
         this.projectData = res.data.list;
775
         this.total = res.data.total;
689
         this.total = res.data.total;
776
         // 关闭刷新动画
690
         // 关闭刷新动画
@@ -797,7 +711,7 @@ export default {
797
       let params = {
711
       let params = {
798
         page: this.currentPage1,
712
         page: this.currentPage1,
799
         limit: this.limit,
713
         limit: this.limit,
800
-        id: this.id,
714
+        id: this.id
801
       };
715
       };
802
       let resp = await api.getCardList(params);
716
       let resp = await api.getCardList(params);
803
       if (resp.code === 200) {
717
       if (resp.code === 200) {
@@ -824,8 +738,8 @@ export default {
824
       this.$router.push({
738
       this.$router.push({
825
         path: "/historicalOrder/details",
739
         path: "/historicalOrder/details",
826
         query: {
740
         query: {
827
-          id: row.id,
828
-        },
741
+          id: row.id
742
+        }
829
       });
743
       });
830
     },
744
     },
831
     onSubmit() {},
745
     onSubmit() {},
@@ -842,7 +756,7 @@ export default {
842
       } else if (e.index == 3) {
756
       } else if (e.index == 3) {
843
         this.getUserCoupon();
757
         this.getUserCoupon();
844
       }
758
       }
845
-    },
759
+    }
846
   },
760
   },
847
 
761
 
848
   created() {
762
   created() {
@@ -862,7 +776,7 @@ export default {
862
     }
776
     }
863
   },
777
   },
864
 
778
 
865
-  mounted() {},
779
+  mounted() {}
866
 };
780
 };
867
 </script>
781
 </script>
868
 
782
 
@@ -891,6 +805,11 @@ export default {
891
     text-align: center;
805
     text-align: center;
892
     color: #fff;
806
     color: #fff;
893
   }
807
   }
808
+  .examineCoupon {
809
+    width: 50px;
810
+    height: 25px;
811
+
812
+  }
894
   .pagin {
813
   .pagin {
895
     padding: 20px 0;
814
     padding: 20px 0;
896
     .el-pagination {
815
     .el-pagination {

+ 151 - 231
src/pages/payUser/myOrder/index.vue

@@ -7,8 +7,7 @@
7
           type="primary"
7
           type="primary"
8
           @click="refreshList"
8
           @click="refreshList"
9
           :loading="refresh"
9
           :loading="refresh"
10
-          >{{ refresh ? "加载中..." : "刷新" }}</el-button
11
-        >
10
+        >{{ refresh ? "加载中..." : "刷新" }}</el-button>
12
       </div>
11
       </div>
13
       <el-tabs type="border-card" @tab-click="changeTab" v-model="activeName">
12
       <el-tabs type="border-card" @tab-click="changeTab" v-model="activeName">
14
         <el-tab-pane label="项目订单" name="first">
13
         <el-tab-pane label="项目订单" name="first">
@@ -33,40 +32,27 @@
33
                   <div>{{ scope.row.goods.length }}</div>
32
                   <div>{{ scope.row.goods.length }}</div>
34
                 </template>
33
                 </template>
35
               </el-table-column>
34
               </el-table-column>
36
-              <el-table-column
37
-                prop="price"
38
-                label="总价格"
39
-                show-overflow-tooltip
40
-              ></el-table-column>
41
-              <el-table-column
42
-                prop="order_time"
43
-                label="预约时间"
44
-                width="180"
45
-                show-overflow-tooltip
46
-              ></el-table-column>
47
-              <el-table-column
48
-                prop="store_name"
49
-                label="预约店铺"
50
-                show-overflow-tooltip
51
-              ></el-table-column>
35
+              <el-table-column prop="price" label="总价格" show-overflow-tooltip></el-table-column>
36
+              <el-table-column prop="order_time" label="预约时间" width="180" show-overflow-tooltip></el-table-column>
37
+              <el-table-column prop="store_name" label="预约店铺" show-overflow-tooltip></el-table-column>
52
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
38
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
53
                 <template slot-scope="scope">
39
                 <template slot-scope="scope">
54
                   <div :class="'color' + scope.row.status">
40
                   <div :class="'color' + scope.row.status">
55
                     <!-- 状态:0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
41
                     <!-- 状态:0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
56
                     {{
42
                     {{
57
-                      scope.row.status == 0
58
-                        ? "已预约"
59
-                        : scope.row.status == 1
60
-                        ? "待使用"
61
-                        : scope.row.status == 2
62
-                        ? "正在使用"
63
-                        : scope.row.status == 3
64
-                        ? "已结算"
65
-                        : scope.row.status == -1
66
-                        ? "已取消"
67
-                        : scope.row.status == -2
68
-                        ? "退款审核中"
69
-                        : "已退款"
43
+                    scope.row.status == 0
44
+                    ? "已预约"
45
+                    : scope.row.status == 1
46
+                    ? "待使用"
47
+                    : scope.row.status == 2
48
+                    ? "正在使用"
49
+                    : scope.row.status == 3
50
+                    ? "已结算"
51
+                    : scope.row.status == -1
52
+                    ? "已取消"
53
+                    : scope.row.status == -2
54
+                    ? "退款审核中"
55
+                    : "已退款"
70
                     }}
56
                     }}
71
                   </div>
57
                   </div>
72
                 </template>
58
                 </template>
@@ -99,25 +85,19 @@
99
                   <div>{{ scope.row.card_name | ellipsis(8) }}</div>
85
                   <div>{{ scope.row.card_name | ellipsis(8) }}</div>
100
                 </template>
86
                 </template>
101
               </el-table-column>
87
               </el-table-column>
102
-              <el-table-column
103
-                prop="total_num"
104
-                label="总次数"
105
-                show-overflow-tooltip
106
-                align="center"
107
-              >
108
-                <template slot-scope="{ row }" v-if="row.card_type == 1">{{
88
+              <el-table-column prop="total_num" label="总次数" show-overflow-tooltip align="center">
89
+                <template slot-scope="{ row }" v-if="row.card_type == 1">
90
+                  {{
109
                   row.total_num
91
                   row.total_num
110
-                }}</template>
92
+                  }}
93
+                </template>
111
               </el-table-column>
94
               </el-table-column>
112
-              <el-table-column
113
-                prop="num"
114
-                label="剩余次数"
115
-                show-overflow-tooltip
116
-                align="center"
117
-              >
118
-                <template slot-scope="{ row }" v-if="row.card_type == 1">{{
95
+              <el-table-column prop="num" label="剩余次数" show-overflow-tooltip align="center">
96
+                <template slot-scope="{ row }" v-if="row.card_type == 1">
97
+                  {{
119
                   row.num
98
                   row.num
120
-                }}</template>
99
+                  }}
100
+                </template>
121
               </el-table-column>
101
               </el-table-column>
122
 
102
 
123
               <el-table-column
103
               <el-table-column
@@ -127,49 +107,30 @@
127
                 show-overflow-tooltip
107
                 show-overflow-tooltip
128
                 align="center"
108
                 align="center"
129
               ></el-table-column>
109
               ></el-table-column>
130
-              <el-table-column
131
-                prop="expir_time"
132
-                label="过期时间"
133
-                width="180"
134
-                show-overflow-tooltip
135
-              >
110
+              <el-table-column prop="expir_time" label="过期时间" width="180" show-overflow-tooltip>
136
                 <template slot-scope="{ row }">
111
                 <template slot-scope="{ row }">
137
-                  <div class="expir_time" @click.stop="amendCardTime(row)">
138
-                    {{ row.expir_time }}
139
-                  </div>
112
+                  <div class="expir_time" @click.stop="amendCardTime(row)">{{ row.expir_time }}</div>
140
                 </template>
113
                 </template>
141
               </el-table-column>
114
               </el-table-column>
142
-              <el-table-column
143
-                prop="create_time"
144
-                label="创建时间"
145
-                width="180"
146
-                show-overflow-tooltip
147
-              ></el-table-column>
115
+              <el-table-column prop="create_time" label="创建时间" width="180" show-overflow-tooltip></el-table-column>
148
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
116
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
149
                 <template slot-scope="scope">
117
                 <template slot-scope="scope">
150
                   <div :class="'colorB' + scope.row.status">
118
                   <div :class="'colorB' + scope.row.status">
151
                     {{
119
                     {{
152
-                      scope.row.status == -2
153
-                        ? "已注销"
154
-                        : scope.row.status == -1
155
-                        ? "已过期"
156
-                        : scope.row.status == -0
157
-                        ? "已使用"
158
-                        : "待使用"
120
+                    scope.row.status == -2
121
+                    ? "已注销"
122
+                    : scope.row.status == -1
123
+                    ? "已过期"
124
+                    : scope.row.status == -0
125
+                    ? "已使用"
126
+                    : "待使用"
159
                     }}
127
                     }}
160
                   </div>
128
                   </div>
161
                 </template>
129
                 </template>
162
               </el-table-column>
130
               </el-table-column>
163
-              <el-table-column
164
-                prop=""
165
-                label="操作"
166
-                width="100"
167
-                show-overflow-tooltip
168
-              >
131
+              <el-table-column prop label="操作" width="100" show-overflow-tooltip>
169
                 <template slot-scope="scope" v-if="scope.row.status == 1">
132
                 <template slot-scope="scope" v-if="scope.row.status == 1">
170
-                  <div class="cancleCoupon" @click.stop="cancleCard(scope.row)">
171
-                    操作
172
-                  </div>
133
+                  <div class="cancleCoupon" @click.stop="cancleCard(scope.row)">操作</div>
173
                 </template>
134
                 </template>
174
               </el-table-column>
135
               </el-table-column>
175
             </el-table>
136
             </el-table>
@@ -199,7 +160,7 @@
199
 goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
160
 goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
200
 id: 47
161
 id: 47
201
 price: "0.01"
162
 price: "0.01"
202
-status: 5 -->
163
+              status: 5-->
203
 
164
 
204
               <el-table-column prop="goods" label="商品名称" width="200">
165
               <el-table-column prop="goods" label="商品名称" width="200">
205
                 <template slot-scope="scope">
166
                 <template slot-scope="scope">
@@ -213,32 +174,23 @@ status: 5 -->
213
                   <div>{{ scope.row.goods.length }}</div>
174
                   <div>{{ scope.row.goods.length }}</div>
214
                 </template>
175
                 </template>
215
               </el-table-column>
176
               </el-table-column>
216
-              <el-table-column
217
-                prop="price"
218
-                label="实付款"
219
-                show-overflow-tooltip
220
-              ></el-table-column>
221
-              <el-table-column
222
-                prop="create_time"
223
-                label="下单时间"
224
-                width="180"
225
-                show-overflow-tooltip
226
-              ></el-table-column>
177
+              <el-table-column prop="price" label="实付款" show-overflow-tooltip></el-table-column>
178
+              <el-table-column prop="create_time" label="下单时间" width="180" show-overflow-tooltip></el-table-column>
227
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
179
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
228
                 <template slot-scope="scope">
180
                 <template slot-scope="scope">
229
                   <div :class="'color' + scope.row.status">
181
                   <div :class="'color' + scope.row.status">
230
                     {{
182
                     {{
231
-                      scope.row.status == 0
232
-                        ? "未支付"
233
-                        : scope.row.status == 1
234
-                        ? "待取货"
235
-                        : scope.row.status == 2
236
-                        ? "已取货"
237
-                        : scope.row.status == -1
238
-                        ? "已取消"
239
-                        : scope.row.status == -2
240
-                        ? "退款审核中"
241
-                        : "已退款"
183
+                    scope.row.status == 0
184
+                    ? "未支付"
185
+                    : scope.row.status == 1
186
+                    ? "待取货"
187
+                    : scope.row.status == 2
188
+                    ? "已取货"
189
+                    : scope.row.status == -1
190
+                    ? "已取消"
191
+                    : scope.row.status == -2
192
+                    ? "退款审核中"
193
+                    : "已退款"
242
                     }}
194
                     }}
243
                   </div>
195
                   </div>
244
                 </template>
196
                 </template>
@@ -270,50 +222,25 @@ ex_time: "2022.03.17 23:59"
270
 id: 2517
222
 id: 2517
271
 name: "新人体验券"
223
 name: "新人体验券"
272
 status: 2
224
 status: 2
273
-type: "全额券" -->
225
+              type: "全额券"-->
274
 
226
 
275
-              <el-table-column
276
-                prop="name"
277
-                label="卡卷名称"
278
-                width="200"
279
-              ></el-table-column>
280
-              <el-table-column
281
-                prop="type"
282
-                label="卡卷类型"
283
-                show-overflow-tooltip
284
-              ></el-table-column>
285
-              <el-table-column
286
-                prop="create_time"
287
-                label="到期时间"
288
-                width="180"
289
-                show-overflow-tooltip
290
-              ></el-table-column>
291
-              <el-table-column
292
-                prop="create_time"
293
-                label="创建时间"
294
-                width="180"
295
-                show-overflow-tooltipA
296
-              ></el-table-column>
227
+              <el-table-column prop="name" label="卡卷名称" width="200"></el-table-column>
228
+              <el-table-column prop="type" label="卡卷类型" show-overflow-tooltip></el-table-column>
229
+              <el-table-column prop="create_time" label="到期时间" width="180" show-overflow-tooltip></el-table-column>
230
+              <el-table-column prop="create_time" label="创建时间" width="180" show-overflow-tooltipA></el-table-column>
297
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
231
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
298
                 <template slot-scope="scope">
232
                 <template slot-scope="scope">
299
-                  <div :class="'colorA' + scope.row.status">
300
-                    {{ couponStatus[scope.row.status] }}
301
-                  </div>
233
+                  <div :class="'colorA' + scope.row.status">{{ couponStatus[scope.row.status] }}</div>
302
                 </template>
234
                 </template>
303
               </el-table-column>
235
               </el-table-column>
304
-              <el-table-column
305
-                prop=""
306
-                label="操作"
307
-                width="100"
308
-                show-overflow-tooltip
309
-              >
236
+              <el-table-column prop label="备注" width="90" show-overflow-tooltip>
237
+                <template slot-scope="scope" v-if="scope.row.is_send == 1">
238
+                  <button class="examineCoupon" @click.stop="cancleCoupon(scope.row,true)">查看</button>
239
+                </template>
240
+              </el-table-column>
241
+              <el-table-column prop label="操作" width="80" show-overflow-tooltip>
310
                 <template slot-scope="scope" v-if="scope.row.status == 0">
242
                 <template slot-scope="scope" v-if="scope.row.status == 0">
311
-                  <div
312
-                    class="cancleCoupon"
313
-                    @click.stop="cancleCoupon(scope.row)"
314
-                  >
315
-                    操作
316
-                  </div>
243
+                  <div class="cancleCoupon" @click.stop="cancleCoupon(scope.row,false)">操作</div>
317
                 </template>
244
                 </template>
318
               </el-table-column>
245
               </el-table-column>
319
             </el-table>
246
             </el-table>
@@ -348,20 +275,12 @@ type: "全额券" -->
348
                   <div>{{ scope.row.before_amount }}</div>
275
                   <div>{{ scope.row.before_amount }}</div>
349
                 </template>
276
                 </template>
350
               </el-table-column>
277
               </el-table-column>
351
-              <el-table-column
352
-                prop="goods"
353
-                label="变更后金额"
354
-                show-overflow-tooltip
355
-              >
278
+              <el-table-column prop="goods" label="变更后金额" show-overflow-tooltip>
356
                 <template slot-scope="scope">
279
                 <template slot-scope="scope">
357
                   <div>{{ scope.row.after_amount }}</div>
280
                   <div>{{ scope.row.after_amount }}</div>
358
                 </template>
281
                 </template>
359
               </el-table-column>
282
               </el-table-column>
360
-              <el-table-column
361
-                prop="price"
362
-                label="变更金额"
363
-                show-overflow-tooltip
364
-              >
283
+              <el-table-column prop="price" label="变更金额" show-overflow-tooltip>
365
                 <template slot-scope="scope">
284
                 <template slot-scope="scope">
366
                   <div>
285
                   <div>
367
                     {{ scope.row.is_add == 1 ? "+" : "-"
286
                     {{ scope.row.is_add == 1 ? "+" : "-"
@@ -373,29 +292,29 @@ type: "全额券" -->
373
                 <template slot-scope="scope">
292
                 <template slot-scope="scope">
374
                   <div>{{ scope.row.msg }}</div>
293
                   <div>{{ scope.row.msg }}</div>
375
                 </template>
294
                 </template>
376
-              </el-table-column> -->
295
+              </el-table-column>-->
377
               <!--  余额类型(记录类型,1充值,2充值赠送,3订单退款,5提现驳回,-1消费,-2提现冻结,10客服添加,-10客服扣除) -->
296
               <!--  余额类型(记录类型,1充值,2充值赠送,3订单退款,5提现驳回,-1消费,-2提现冻结,10客服添加,-10客服扣除) -->
378
               <el-table-column prop="status" label="类型" show-overflow-tooltip>
297
               <el-table-column prop="status" label="类型" show-overflow-tooltip>
379
                 <template slot-scope="scope">
298
                 <template slot-scope="scope">
380
                   <div>
299
                   <div>
381
                     {{
300
                     {{
382
-                      scope.row.type == 1
383
-                        ? "充值"
384
-                        : scope.row.type == 2
385
-                        ? "充值赠送"
386
-                        : scope.row.type == 3
387
-                        ? "订单退款"
388
-                        : scope.row.type == 5
389
-                        ? "提现驳回"
390
-                        : scope.row.type == -1
391
-                        ? "消费"
392
-                        : scope.row.type == -2
393
-                        ? "提现冻结"
394
-                        : scope.row.type == 10
395
-                        ? "客服添加"
396
-                        : scope.row.type == -10
397
-                        ? "客服扣除"
398
-                        : ""
301
+                    scope.row.type == 1
302
+                    ? "充值"
303
+                    : scope.row.type == 2
304
+                    ? "充值赠送"
305
+                    : scope.row.type == 3
306
+                    ? "订单退款"
307
+                    : scope.row.type == 5
308
+                    ? "提现驳回"
309
+                    : scope.row.type == -1
310
+                    ? "消费"
311
+                    : scope.row.type == -2
312
+                    ? "提现冻结"
313
+                    : scope.row.type == 10
314
+                    ? "客服添加"
315
+                    : scope.row.type == -10
316
+                    ? "客服扣除"
317
+                    : ""
399
                     }}
318
                     }}
400
                   </div>
319
                   </div>
401
                 </template>
320
                 </template>
@@ -428,11 +347,7 @@ type: "全额券" -->
428
           <div class="project">
347
           <div class="project">
429
             <div class="project-title">项目名称:</div>
348
             <div class="project-title">项目名称:</div>
430
             <div class="project-list">
349
             <div class="project-list">
431
-              <div
432
-                class="project-info"
433
-                v-for="(item, index) in cardInfo.project_list"
434
-                :key="index"
435
-              >
350
+              <div class="project-info" v-for="(item, index) in cardInfo.project_list" :key="index">
436
                 <div class="name-text">{{ item.project_name }}</div>
351
                 <div class="name-text">{{ item.project_name }}</div>
437
                 <div class="change-num" v-if="cardInfo.card_type == 1">
352
                 <div class="change-num" v-if="cardInfo.card_type == 1">
438
                   <div class="num-content">
353
                   <div class="num-content">
@@ -445,33 +360,27 @@ type: "全额券" -->
445
             </div>
360
             </div>
446
           </div>
361
           </div>
447
           <div class="common">
362
           <div class="common">
448
-            <span class="common-title">支付方式:</span
449
-            ><span>{{ cardInfo.pay_way }}</span>
363
+            <span class="common-title">支付方式:</span>
364
+            <span>{{ cardInfo.pay_way }}</span>
450
           </div>
365
           </div>
451
           <div class="common">
366
           <div class="common">
452
-            <span class="common-title">有效期限:</span
453
-            ><span>{{ cardInfo.ex_time }}</span>
367
+            <span class="common-title">有效期限:</span>
368
+            <span>{{ cardInfo.ex_time }}</span>
454
           </div>
369
           </div>
455
           <div class="common">
370
           <div class="common">
456
-            <span class="common-title">实付金额:</span
457
-            ><span>¥{{ cardInfo.price }}</span>
371
+            <span class="common-title">实付金额:</span>
372
+            <span>¥{{ cardInfo.price }}</span>
458
           </div>
373
           </div>
459
           <div class="consume-list">
374
           <div class="consume-list">
460
             <div class="consume-title">消耗信息:</div>
375
             <div class="consume-title">消耗信息:</div>
461
-            <div
462
-              class="consume-info min-size"
463
-              v-for="(item, index) in cardLogList"
464
-              :key="index"
465
-            >
376
+            <div class="consume-info min-size" v-for="(item, index) in cardLogList" :key="index">
466
               <div class="shop">{{ item.store_name }}</div>
377
               <div class="shop">{{ item.store_name }}</div>
467
               <div class="project-tips">{{ item.remark }}</div>
378
               <div class="project-tips">{{ item.remark }}</div>
468
               <div class="project-ts">{{ item.create_time }}</div>
379
               <div class="project-ts">{{ item.create_time }}</div>
469
             </div>
380
             </div>
470
           </div>
381
           </div>
471
         </div>
382
         </div>
472
-        <div v-if="cardInfo.card_type == 1" class="confirm" @click="confirm">
473
-          确定
474
-        </div>
383
+        <div v-if="cardInfo.card_type == 1" class="confirm" @click="confirm">确定</div>
475
       </div>
384
       </div>
476
     </mine-pupop>
385
     </mine-pupop>
477
     <!-- 修改次卡时间 -->
386
     <!-- 修改次卡时间 -->
@@ -486,7 +395,8 @@ type: "全额券" -->
486
         </div>
395
         </div>
487
         <div class="admendTime-content">
396
         <div class="admendTime-content">
488
           <div class="oldTime">
397
           <div class="oldTime">
489
-            次卡过期时间 :<span> {{ amendCardInfo.expir_time }}</span>
398
+            次卡过期时间 :
399
+            <span>{{ amendCardInfo.expir_time }}</span>
490
           </div>
400
           </div>
491
           <div class="newTime">
401
           <div class="newTime">
492
             选择更改日期:
402
             选择更改日期:
@@ -497,8 +407,7 @@ type: "全额券" -->
497
               placeholder="选择日期"
407
               placeholder="选择日期"
498
               value-format="yyyy-MM-dd"
408
               value-format="yyyy-MM-dd"
499
               @focus="forbid"
409
               @focus="forbid"
500
-            >
501
-            </el-date-picker>
410
+            ></el-date-picker>
502
           </div>
411
           </div>
503
           <div class="radio">
412
           <div class="radio">
504
             <button class="cancelBtn" @click="cancel">取消</button>
413
             <button class="cancelBtn" @click="cancel">取消</button>
@@ -517,14 +426,15 @@ type: "全额券" -->
517
             @click="closeCouponPop"
426
             @click="closeCouponPop"
518
           />
427
           />
519
         </div>
428
         </div>
520
-        <div class="title">核销优惠券</div>
429
+        <div class="title">{{examineCoupon?'发券备注信息':'核销优惠券'}}</div>
521
         <div class="couponName">
430
         <div class="couponName">
522
-          <div class="one">优惠券名称:</div>
523
-          <div>{{ cancelCouponInfo.name }}</div>
431
+          <div class="one">{{examineCoupon?'发券人:':'优惠券名称:'}}</div>
432
+          <div>{{ examineCoupon?cancelCouponInfo.send_name:cancelCouponInfo.name }}</div>
524
         </div>
433
         </div>
525
         <div class="couponRemark">
434
         <div class="couponRemark">
526
           <div class="one">备注信息:</div>
435
           <div class="one">备注信息:</div>
527
-          <el-input v-model.trim="couponRemark"></el-input>
436
+          <el-input v-if="!examineCoupon" v-model.trim="couponRemark"></el-input>
437
+          <div v-else>{{cancelCouponInfo.send_remark}}</div>
528
         </div>
438
         </div>
529
         <div class="radio">
439
         <div class="radio">
530
           <button class="affirmBtn" @click="checkCoupon">确定</button>
440
           <button class="affirmBtn" @click="checkCoupon">确定</button>
@@ -565,19 +475,19 @@ import { log } from "console";
565
 
475
 
566
 export default {
476
 export default {
567
   components: {
477
   components: {
568
-    minePupop,
478
+    minePupop
569
   },
479
   },
570
   data() {
480
   data() {
571
     return {
481
     return {
572
       couponList: [
482
       couponList: [
573
         {
483
         {
574
           value: "选项1",
484
           value: "选项1",
575
-          label: "黄金糕",
485
+          label: "黄金糕"
576
         },
486
         },
577
         {
487
         {
578
           value: "选项2",
488
           value: "选项2",
579
-          label: "双皮奶",
580
-        },
489
+          label: "双皮奶"
490
+        }
581
       ],
491
       ],
582
       tableData: [
492
       tableData: [
583
         {
493
         {
@@ -589,7 +499,7 @@ export default {
589
           numberList: 2,
499
           numberList: 2,
590
           price: 100,
500
           price: 100,
591
           shop: "运用店",
501
           shop: "运用店",
592
-          status: 2,
502
+          status: 2
593
         },
503
         },
594
         {
504
         {
595
           date: "2022.04.25  14:30",
505
           date: "2022.04.25  14:30",
@@ -600,8 +510,8 @@ export default {
600
           numberList: 5,
510
           numberList: 5,
601
           price: 800,
511
           price: 800,
602
           shop: "武昌店",
512
           shop: "武昌店",
603
-          status: 1,
604
-        },
513
+          status: 1
514
+        }
605
       ],
515
       ],
606
       couponStatus: ["待使用", "已使用", "已过期"],
516
       couponStatus: ["待使用", "已使用", "已过期"],
607
       goodStatus: ["未支付", "已支付", "已取货"],
517
       goodStatus: ["未支付", "已支付", "已取货"],
@@ -622,12 +532,13 @@ export default {
622
       amendCardInfo: "", // 要修改次卡的信息
532
       amendCardInfo: "", // 要修改次卡的信息
623
       cardTime: "", //次卡修改时间(年月日)
533
       cardTime: "", //次卡修改时间(年月日)
624
       isCancelCoupon: false, //核销优惠券界面
534
       isCancelCoupon: false, //核销优惠券界面
625
-      cancelCouponInfo: "", //核销优惠券名称
535
+      cancelCouponInfo: "", //核销优惠券信息
626
       couponRemark: "", //核销优惠券备注信息
536
       couponRemark: "", //核销优惠券备注信息
627
       refresh: false, //刷新页面数据
537
       refresh: false, //刷新页面数据
628
       isCancelCard: false, //核销次卡界面
538
       isCancelCard: false, //核销次卡界面
629
-      cancelCardInfo: "", //核销次卡名称
630
-      cardRemark: "", //核销优惠券备注信息
539
+      cancelCardInfo: "", //核销次卡信息
540
+      cardRemark: "", //核销次卡备注信息
541
+      examineCoupon: false //是否是查看优惠券
631
     };
542
     };
632
   },
543
   },
633
   computed: {},
544
   computed: {},
@@ -651,7 +562,8 @@ export default {
651
       }
562
       }
652
     },
563
     },
653
     // 打开核销优惠券界面
564
     // 打开核销优惠券界面
654
-    cancleCoupon(e) {
565
+    cancleCoupon(e, examineCoupon) {
566
+      this.examineCoupon = examineCoupon;
655
       this.isCancelCoupon = true;
567
       this.isCancelCoupon = true;
656
       this.cancelCouponInfo = e;
568
       this.cancelCouponInfo = e;
657
     },
569
     },
@@ -662,6 +574,10 @@ export default {
662
     },
574
     },
663
     // 核销优惠券
575
     // 核销优惠券
664
     checkCoupon() {
576
     checkCoupon() {
577
+      if (this.examineCoupon) {
578
+        this.isCancelCoupon = false;
579
+        return;
580
+      }
665
       if (this.couponRemark == "") {
581
       if (this.couponRemark == "") {
666
         this.$message.error("请填写备注信息");
582
         this.$message.error("请填写备注信息");
667
         return;
583
         return;
@@ -669,9 +585,9 @@ export default {
669
       api
585
       api
670
         .checkCoupon({
586
         .checkCoupon({
671
           id: this.cancelCouponInfo.id,
587
           id: this.cancelCouponInfo.id,
672
-          remark: this.couponRemark,
588
+          remark: this.couponRemark
673
         })
589
         })
674
-        .then((res) => {
590
+        .then(res => {
675
           if (res.code == 200) {
591
           if (res.code == 200) {
676
             this.$message.success("核销成功");
592
             this.$message.success("核销成功");
677
             this.isCancelCoupon = false;
593
             this.isCancelCoupon = false;
@@ -698,9 +614,9 @@ export default {
698
       api
614
       api
699
         .checkCard({
615
         .checkCard({
700
           id: this.cancelCardInfo.id,
616
           id: this.cancelCardInfo.id,
701
-          remark: this.cardRemark,
617
+          remark: this.cardRemark
702
         })
618
         })
703
-        .then((res) => {
619
+        .then(res => {
704
           if (res.code == 200) {
620
           if (res.code == 200) {
705
             this.$message.success("核销成功");
621
             this.$message.success("核销成功");
706
             this.isCancelCard = false;
622
             this.isCancelCard = false;
@@ -728,7 +644,7 @@ export default {
728
       if (e.status == -2) {
644
       if (e.status == -2) {
729
         this.$message({
645
         this.$message({
730
           message: "该次卡已注销",
646
           message: "该次卡已注销",
731
-          type: "error",
647
+          type: "error"
732
         });
648
         });
733
         return;
649
         return;
734
       }
650
       }
@@ -746,13 +662,13 @@ export default {
746
       api
662
       api
747
         .amendCardTime({
663
         .amendCardTime({
748
           id: this.amendCardInfo.id,
664
           id: this.amendCardInfo.id,
749
-          expire_date: this.cardTime,
665
+          expire_date: this.cardTime
750
         })
666
         })
751
-        .then((res) => {
667
+        .then(res => {
752
           if (res.code == 200) {
668
           if (res.code == 200) {
753
             this.$message({
669
             this.$message({
754
               message: res.msg,
670
               message: res.msg,
755
-              type: "success",
671
+              type: "success"
756
             });
672
             });
757
             this.isAmend = false;
673
             this.isAmend = false;
758
             // 更新次卡列表
674
             // 更新次卡列表
@@ -765,9 +681,9 @@ export default {
765
       let params = {
681
       let params = {
766
         page: this.currentPage1,
682
         page: this.currentPage1,
767
         limit: this.limit,
683
         limit: this.limit,
768
-        id: this.id,
684
+        id: this.id
769
       };
685
       };
770
-      api.getUserCoupon(params).then((res) => {
686
+      api.getUserCoupon(params).then(res => {
771
         this.couponData = res.data.list;
687
         this.couponData = res.data.list;
772
         this.total = res.data.total;
688
         this.total = res.data.total;
773
         // 关闭刷新动画
689
         // 关闭刷新动画
@@ -785,18 +701,18 @@ export default {
785
       if (row.status == -2) {
701
       if (row.status == -2) {
786
         this.$message({
702
         this.$message({
787
           message: "该次卡已注销",
703
           message: "该次卡已注销",
788
-          type: "error",
704
+          type: "error"
789
         });
705
         });
790
         return;
706
         return;
791
       }
707
       }
792
       this.isPore = true;
708
       this.isPore = true;
793
-      api.cardInfo({ id: row.id }).then((res) => {
709
+      api.cardInfo({ id: row.id }).then(res => {
794
         if (res.code == 200) {
710
         if (res.code == 200) {
795
           res.data.card_type = row.card_type;
711
           res.data.card_type = row.card_type;
796
           this.cardInfo = res.data;
712
           this.cardInfo = res.data;
797
         }
713
         }
798
       });
714
       });
799
-      api.cardLog({ id: row.id }).then((res) => {
715
+      api.cardLog({ id: row.id }).then(res => {
800
         if (res.code == 200) {
716
         if (res.code == 200) {
801
           this.cardLogList = res.data.list;
717
           this.cardLogList = res.data.list;
802
         }
718
         }
@@ -806,19 +722,19 @@ export default {
806
       // 项目ID,json字符,格式如:[{"project_id":"10","num":5}],project_id:适用项目ID,num:剩余次数
722
       // 项目ID,json字符,格式如:[{"project_id":"10","num":5}],project_id:适用项目ID,num:剩余次数
807
       let project_data = [],
723
       let project_data = [],
808
         project_info = {};
724
         project_info = {};
809
-      this.cardInfo.project_list.forEach((res) => {
725
+      this.cardInfo.project_list.forEach(res => {
810
         project_info = {
726
         project_info = {
811
           project_id: res.id,
727
           project_id: res.id,
812
-          num: res.num,
728
+          num: res.num
813
         };
729
         };
814
         project_data.push(project_info);
730
         project_data.push(project_info);
815
       });
731
       });
816
       api
732
       api
817
         .cardUpdate({
733
         .cardUpdate({
818
           id: this.cardInfo.id,
734
           id: this.cardInfo.id,
819
-          project_data: JSON.stringify(project_data),
735
+          project_data: JSON.stringify(project_data)
820
         })
736
         })
821
-        .then((res) => {
737
+        .then(res => {
822
           if (res.code == 200) {
738
           if (res.code == 200) {
823
             this.$message.success("更改成功!");
739
             this.$message.success("更改成功!");
824
             this.isPore = false;
740
             this.isPore = false;
@@ -833,9 +749,9 @@ export default {
833
       let params = {
749
       let params = {
834
         page: this.currentPage1,
750
         page: this.currentPage1,
835
         limit: this.limit,
751
         limit: this.limit,
836
-        id: this.id,
752
+        id: this.id
837
       };
753
       };
838
-      api.getUserGoods(params).then((res) => {
754
+      api.getUserGoods(params).then(res => {
839
         this.goodData = res.data.list;
755
         this.goodData = res.data.list;
840
         this.total = res.data.total;
756
         this.total = res.data.total;
841
         // 关闭刷新动画
757
         // 关闭刷新动画
@@ -848,9 +764,9 @@ export default {
848
       let params = {
764
       let params = {
849
         page: this.currentPage1,
765
         page: this.currentPage1,
850
         limit: this.limit,
766
         limit: this.limit,
851
-        id: this.id,
767
+        id: this.id
852
       };
768
       };
853
-      api.getUserProject(params).then((res) => {
769
+      api.getUserProject(params).then(res => {
854
         this.projectData = res.data.list;
770
         this.projectData = res.data.list;
855
         this.total = res.data.total;
771
         this.total = res.data.total;
856
         // 关闭刷新动画
772
         // 关闭刷新动画
@@ -877,7 +793,7 @@ export default {
877
       let params = {
793
       let params = {
878
         page: this.currentPage1,
794
         page: this.currentPage1,
879
         limit: this.limit,
795
         limit: this.limit,
880
-        id: this.id,
796
+        id: this.id
881
       };
797
       };
882
       let resp = await api.getCardList(params);
798
       let resp = await api.getCardList(params);
883
       if (resp.code === 200) {
799
       if (resp.code === 200) {
@@ -892,7 +808,7 @@ export default {
892
       let params = {
808
       let params = {
893
         page: this.currentPage1,
809
         page: this.currentPage1,
894
         limit: this.limit,
810
         limit: this.limit,
895
-        id: this.id,
811
+        id: this.id
896
       };
812
       };
897
       let resp = await api.getBalanceRecord(params);
813
       let resp = await api.getBalanceRecord(params);
898
       if (resp.code === 200) {
814
       if (resp.code === 200) {
@@ -921,8 +837,8 @@ export default {
921
       this.$router.push({
837
       this.$router.push({
922
         path: "/historicalOrder/details",
838
         path: "/historicalOrder/details",
923
         query: {
839
         query: {
924
-          id: row.id,
925
-        },
840
+          id: row.id
841
+        }
926
       });
842
       });
927
     },
843
     },
928
     onSubmit() {},
844
     onSubmit() {},
@@ -942,7 +858,7 @@ export default {
942
       } else if (e.index == 4) {
858
       } else if (e.index == 4) {
943
         this.getBalanceRecord();
859
         this.getBalanceRecord();
944
       }
860
       }
945
-    },
861
+    }
946
   },
862
   },
947
 
863
 
948
   created() {
864
   created() {
@@ -981,7 +897,7 @@ export default {
981
     }
897
     }
982
   },
898
   },
983
 
899
 
984
-  mounted() {},
900
+  mounted() {}
985
 };
901
 };
986
 </script>
902
 </script>
987
 
903
 
@@ -1010,6 +926,10 @@ export default {
1010
     text-align: center;
926
     text-align: center;
1011
     color: #fff;
927
     color: #fff;
1012
   }
928
   }
929
+  .examineCoupon {
930
+    width: 50px;
931
+    height: 25px;
932
+  }
1013
   .pagin {
933
   .pagin {
1014
     padding: 20px 0;
934
     padding: 20px 0;
1015
     .el-pagination {
935
     .el-pagination {