|
@@ -1,6 +1,15 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="order">
|
3
|
3
|
<div class="warp">
|
|
4
|
+ <div class="refreshBtn">
|
|
5
|
+ <el-button
|
|
6
|
+ class="refresh"
|
|
7
|
+ type="primary"
|
|
8
|
+ @click="refreshList"
|
|
9
|
+ :loading="refresh"
|
|
10
|
+ >{{ refresh ? "加载中..." : "刷新" }}</el-button
|
|
11
|
+ >
|
|
12
|
+ </div>
|
4
|
13
|
<el-tabs type="border-card" @tab-click="changeTab" v-model="activeName">
|
5
|
14
|
<el-tab-pane label="项目订单" name="first">
|
6
|
15
|
<div class="user-list">
|
|
@@ -96,13 +105,21 @@
|
96
|
105
|
show-overflow-tooltip
|
97
|
106
|
align="center"
|
98
|
107
|
>
|
|
108
|
+ <template slot-scope="{ row }" v-if="row.card_type == 1">{{
|
|
109
|
+ row.total_num
|
|
110
|
+ }}</template>
|
99
|
111
|
</el-table-column>
|
100
|
112
|
<el-table-column
|
101
|
113
|
prop="num"
|
102
|
114
|
label="剩余次数"
|
103
|
115
|
show-overflow-tooltip
|
104
|
116
|
align="center"
|
105
|
|
- ></el-table-column>
|
|
117
|
+ >
|
|
118
|
+ <template slot-scope="{ row }" v-if="row.card_type == 1">{{
|
|
119
|
+ row.num
|
|
120
|
+ }}</template>
|
|
121
|
+ </el-table-column>
|
|
122
|
+
|
106
|
123
|
<el-table-column
|
107
|
124
|
prop="used_num"
|
108
|
125
|
label="已用次数"
|
|
@@ -115,7 +132,13 @@
|
115
|
132
|
label="过期时间"
|
116
|
133
|
width="180"
|
117
|
134
|
show-overflow-tooltip
|
118
|
|
- ></el-table-column>
|
|
135
|
+ >
|
|
136
|
+ <template slot-scope="{ row }">
|
|
137
|
+ <div class="expir_time" @click.stop="amendCardTime(row)">
|
|
138
|
+ {{ row.expir_time }}
|
|
139
|
+ </div>
|
|
140
|
+ </template>
|
|
141
|
+ </el-table-column>
|
119
|
142
|
<el-table-column
|
120
|
143
|
prop="create_time"
|
121
|
144
|
label="创建时间"
|
|
@@ -264,6 +287,21 @@ type: "全额券" -->
|
264
|
287
|
</div>
|
265
|
288
|
</template>
|
266
|
289
|
</el-table-column>
|
|
290
|
+ <el-table-column
|
|
291
|
+ prop=""
|
|
292
|
+ label="操作"
|
|
293
|
+ width="100"
|
|
294
|
+ show-overflow-tooltip
|
|
295
|
+ >
|
|
296
|
+ <template slot-scope="scope" v-if="scope.row.status == 0">
|
|
297
|
+ <div
|
|
298
|
+ class="cancleCoupon"
|
|
299
|
+ @click.stop="cancleCoupon(scope.row)"
|
|
300
|
+ >
|
|
301
|
+ 操作
|
|
302
|
+ </div>
|
|
303
|
+ </template>
|
|
304
|
+ </el-table-column>
|
267
|
305
|
</el-table>
|
268
|
306
|
|
269
|
307
|
<div class="pagin">
|
|
@@ -382,7 +420,7 @@ type: "全额券" -->
|
382
|
420
|
:key="index"
|
383
|
421
|
>
|
384
|
422
|
<div class="name-text">{{ item.project_name }}</div>
|
385
|
|
- <div class="change-num">
|
|
423
|
+ <div class="change-num" v-if="cardInfo.card_type == 1">
|
386
|
424
|
<div class="num-content">
|
387
|
425
|
<div class="content-left" @click="reduce(index)">-</div>
|
388
|
426
|
<div class="content-num">{{ item.num || 0 }}</div>
|
|
@@ -417,7 +455,64 @@ type: "全额券" -->
|
417
|
455
|
</div>
|
418
|
456
|
</div>
|
419
|
457
|
</div>
|
420
|
|
- <div class="confirm" @click="confirm">确定</div>
|
|
458
|
+ <div v-if='cardInfo.card_type == 1' class="confirm" @click="confirm">确定</div>
|
|
459
|
+ </div>
|
|
460
|
+ </mine-pupop>
|
|
461
|
+ <!-- 修改次卡时间 -->
|
|
462
|
+ <mine-pupop :show="isAmend">
|
|
463
|
+ <div class="amendTime">
|
|
464
|
+ <div class="image">
|
|
465
|
+ <img
|
|
466
|
+ src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
|
|
467
|
+ alt
|
|
468
|
+ @click="closeAmend"
|
|
469
|
+ />
|
|
470
|
+ </div>
|
|
471
|
+ <div class="admendTime-content">
|
|
472
|
+ <div class="oldTime">
|
|
473
|
+ 次卡过期时间 :<span> {{ amendCardInfo.expir_time }}</span>
|
|
474
|
+ </div>
|
|
475
|
+ <div class="newTime">
|
|
476
|
+ 选择更改日期:
|
|
477
|
+ <el-date-picker
|
|
478
|
+ class="date"
|
|
479
|
+ v-model="cardTime"
|
|
480
|
+ type="date"
|
|
481
|
+ placeholder="选择日期"
|
|
482
|
+ value-format="yyyy-MM-dd"
|
|
483
|
+ @focus="forbid"
|
|
484
|
+ >
|
|
485
|
+ </el-date-picker>
|
|
486
|
+ </div>
|
|
487
|
+ <div class="radio">
|
|
488
|
+ <button class="cancelBtn" @click="cancel">取消</button>
|
|
489
|
+ <button class="affirmBtn" @click="affirm">确定</button>
|
|
490
|
+ </div>
|
|
491
|
+ </div>
|
|
492
|
+ </div>
|
|
493
|
+ </mine-pupop>
|
|
494
|
+ <!-- 操作核销优惠券 -->
|
|
495
|
+ <mine-pupop :show="isCancelCoupon">
|
|
496
|
+ <div class="CouponPop">
|
|
497
|
+ <div class="image">
|
|
498
|
+ <img
|
|
499
|
+ src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
|
|
500
|
+ alt
|
|
501
|
+ @click="closeCouponPop"
|
|
502
|
+ />
|
|
503
|
+ </div>
|
|
504
|
+ <div class="title">核销优惠券</div>
|
|
505
|
+ <div class="couponName">
|
|
506
|
+ <div class="one">优惠券名称:</div>
|
|
507
|
+ <div>{{ cancelCouponInfo.name }}</div>
|
|
508
|
+ </div>
|
|
509
|
+ <div class="couponRemark">
|
|
510
|
+ <div class="one">备注信息:</div>
|
|
511
|
+ <el-input v-model.trim="couponRemark"></el-input>
|
|
512
|
+ </div>
|
|
513
|
+ <div class="radio">
|
|
514
|
+ <button class="affirmBtn" @click="checkCoupon">确定</button>
|
|
515
|
+ </div>
|
421
|
516
|
</div>
|
422
|
517
|
</mine-pupop>
|
423
|
518
|
</div>
|
|
@@ -482,12 +577,109 @@ export default {
|
482
|
577
|
cardLogList: [], //次卡消耗记录
|
483
|
578
|
cardListData: [], //用户次卡列表
|
484
|
579
|
balanceListData: [], //用户余额变更记录
|
|
580
|
+ isAmend: false, //修改次卡时间弹窗
|
|
581
|
+ amendCardInfo: "", // 要修改次卡的信息
|
|
582
|
+ cardTime: "", //次卡修改时间(年月日)
|
|
583
|
+ isCancelCoupon: false, //核销优惠券界面
|
|
584
|
+ cancelCouponInfo: "", //核销优惠券名称
|
|
585
|
+ couponRemark: "", //核销优惠券备注信息
|
|
586
|
+ refresh: false, //刷新页面数据
|
485
|
587
|
};
|
486
|
588
|
},
|
487
|
589
|
computed: {},
|
488
|
590
|
watch: {},
|
489
|
591
|
|
490
|
592
|
methods: {
|
|
593
|
+ // 刷新页面数据
|
|
594
|
+ refreshList() {
|
|
595
|
+ this.currentPage1 = 1;
|
|
596
|
+ this.refresh = true;
|
|
597
|
+ if (this.activeName == "first") {
|
|
598
|
+ this.getUserProject();
|
|
599
|
+ } else if (this.activeName == "second") {
|
|
600
|
+ this.getCardList();
|
|
601
|
+ } else if (this.activeName == "third") {
|
|
602
|
+ this.getUserGoods();
|
|
603
|
+ } else if (this.activeName == "fourth") {
|
|
604
|
+ this.getUserCoupon();
|
|
605
|
+ } else if (this.activeName == "five") {
|
|
606
|
+ this.getBalanceRecord();
|
|
607
|
+ }
|
|
608
|
+ },
|
|
609
|
+ // 打开核销优惠券界面
|
|
610
|
+ cancleCoupon(e) {
|
|
611
|
+ this.isCancelCoupon = true;
|
|
612
|
+ this.cancelCouponInfo = e;
|
|
613
|
+ },
|
|
614
|
+ // 关闭核销优惠券页面
|
|
615
|
+ closeCouponPop() {
|
|
616
|
+ this.isCancelCoupon = false;
|
|
617
|
+ this.couponRemark = "";
|
|
618
|
+ },
|
|
619
|
+ // 核销优惠券
|
|
620
|
+ checkCoupon() {
|
|
621
|
+ if (this.couponRemark == "") {
|
|
622
|
+ this.$message.error("请填写备注信息");
|
|
623
|
+ return;
|
|
624
|
+ }
|
|
625
|
+ api
|
|
626
|
+ .checkCoupon({
|
|
627
|
+ id: this.cancelCouponInfo.id,
|
|
628
|
+ remark: this.couponRemark,
|
|
629
|
+ })
|
|
630
|
+ .then((res) => {
|
|
631
|
+ if (res.code == 200) {
|
|
632
|
+ this.$message.success("核销成功");
|
|
633
|
+ this.isCancelCoupon = false;
|
|
634
|
+ // 刷新优惠券列表
|
|
635
|
+ this.getUserCoupon();
|
|
636
|
+ }
|
|
637
|
+ });
|
|
638
|
+ },
|
|
639
|
+ // 阻止修改次卡时间时键盘弹出
|
|
640
|
+ forbid() {
|
|
641
|
+ //禁止软键盘弹出
|
|
642
|
+ document.activeElement.blur();
|
|
643
|
+ },
|
|
644
|
+ // 修改次卡时间取消
|
|
645
|
+ cancel() {
|
|
646
|
+ this.isAmend = false;
|
|
647
|
+ this.cardTime = "";
|
|
648
|
+ },
|
|
649
|
+ // 修改次卡时间确定
|
|
650
|
+ affirm() {
|
|
651
|
+ this.amendCardTimeApi();
|
|
652
|
+ },
|
|
653
|
+ // 修改次卡时间
|
|
654
|
+ amendCardTime(e) {
|
|
655
|
+ this.isAmend = true;
|
|
656
|
+ this.amendCardInfo = e;
|
|
657
|
+ console.log(e);
|
|
658
|
+ },
|
|
659
|
+ // 关闭修改次卡时间弹窗
|
|
660
|
+ closeAmend() {
|
|
661
|
+ this.isAmend = false;
|
|
662
|
+ this.cardTime = "";
|
|
663
|
+ },
|
|
664
|
+ // 发起修改次卡订单请求
|
|
665
|
+ amendCardTimeApi() {
|
|
666
|
+ api
|
|
667
|
+ .amendCardTime({
|
|
668
|
+ id: this.amendCardInfo.id,
|
|
669
|
+ expire_date: this.cardTime,
|
|
670
|
+ })
|
|
671
|
+ .then((res) => {
|
|
672
|
+ if (res.code == 200) {
|
|
673
|
+ this.$message({
|
|
674
|
+ message: res.msg,
|
|
675
|
+ type: "success",
|
|
676
|
+ });
|
|
677
|
+ this.isAmend = false;
|
|
678
|
+ // 更新次卡列表
|
|
679
|
+ this.getCardList();
|
|
680
|
+ }
|
|
681
|
+ });
|
|
682
|
+ },
|
491
|
683
|
// 获取优惠券订单
|
492
|
684
|
getUserCoupon() {
|
493
|
685
|
let params = {
|
|
@@ -498,6 +690,8 @@ export default {
|
498
|
690
|
api.getUserCoupon(params).then((res) => {
|
499
|
691
|
this.couponData = res.data.list;
|
500
|
692
|
this.total = res.data.total;
|
|
693
|
+ // 关闭刷新动画
|
|
694
|
+ this.refresh = false;
|
501
|
695
|
});
|
502
|
696
|
},
|
503
|
697
|
reduce(index) {
|
|
@@ -511,6 +705,7 @@ export default {
|
511
|
705
|
this.isPore = true;
|
512
|
706
|
api.cardInfo({ id: row.id }).then((res) => {
|
513
|
707
|
if (res.code == 200) {
|
|
708
|
+ res.data.card_type = row.card_type;
|
514
|
709
|
this.cardInfo = res.data;
|
515
|
710
|
}
|
516
|
711
|
});
|
|
@@ -541,7 +736,7 @@ export default {
|
541
|
736
|
this.$message.success("更改成功!");
|
542
|
737
|
this.isPore = false;
|
543
|
738
|
// 刷新次卡列表
|
544
|
|
- this.getCardList()
|
|
739
|
+ this.getCardList();
|
545
|
740
|
}
|
546
|
741
|
});
|
547
|
742
|
},
|
|
@@ -556,6 +751,8 @@ export default {
|
556
|
751
|
api.getUserGoods(params).then((res) => {
|
557
|
752
|
this.goodData = res.data.list;
|
558
|
753
|
this.total = res.data.total;
|
|
754
|
+ // 关闭刷新动画
|
|
755
|
+ this.refresh = false;
|
559
|
756
|
});
|
560
|
757
|
},
|
561
|
758
|
|
|
@@ -569,6 +766,8 @@ export default {
|
569
|
766
|
api.getUserProject(params).then((res) => {
|
570
|
767
|
this.projectData = res.data.list;
|
571
|
768
|
this.total = res.data.total;
|
|
769
|
+ // 关闭刷新动画
|
|
770
|
+ this.refresh = false;
|
572
|
771
|
});
|
573
|
772
|
},
|
574
|
773
|
|
|
@@ -597,6 +796,8 @@ export default {
|
597
|
796
|
if (resp.code === 200) {
|
598
|
797
|
this.cardListData = resp.data.list;
|
599
|
798
|
this.total = resp.data.total;
|
|
799
|
+ // 关闭刷新动画
|
|
800
|
+ this.refresh = false;
|
600
|
801
|
}
|
601
|
802
|
},
|
602
|
803
|
// 获取余额变更记录
|
|
@@ -610,6 +811,8 @@ export default {
|
610
|
811
|
if (resp.code === 200) {
|
611
|
812
|
this.balanceListData = resp.data.list;
|
612
|
813
|
this.total = resp.data.count;
|
|
814
|
+ // 关闭刷新动画
|
|
815
|
+ this.refresh = false;
|
613
|
816
|
}
|
614
|
817
|
},
|
615
|
818
|
handleCurrentChange(val) {
|
|
@@ -681,7 +884,6 @@ export default {
|
681
|
884
|
if (this.activeName == "first") {
|
682
|
885
|
this.getUserProject();
|
683
|
886
|
} else if (this.activeName == "second") {
|
684
|
|
- // this.getCardOrders();
|
685
|
887
|
this.getCardList();
|
686
|
888
|
} else if (this.activeName == "third") {
|
687
|
889
|
this.getUserGoods();
|
|
@@ -700,6 +902,27 @@ export default {
|
700
|
902
|
.order {
|
701
|
903
|
height: 100%;
|
702
|
904
|
width: 100%;
|
|
905
|
+ .refreshBtn {
|
|
906
|
+ width: 100%;
|
|
907
|
+ display: flex;
|
|
908
|
+ justify-content: flex-end;
|
|
909
|
+ margin-bottom: 10px;
|
|
910
|
+ .refresh {
|
|
911
|
+ width: 100px;
|
|
912
|
+ background: #fa7d22;
|
|
913
|
+ border-radius: 2px;
|
|
914
|
+ border-color: #fa7d22;
|
|
915
|
+ }
|
|
916
|
+ }
|
|
917
|
+ .cancleCoupon {
|
|
918
|
+ width: 50px;
|
|
919
|
+ height: 25px;
|
|
920
|
+ background: #fa7d22;
|
|
921
|
+ border-radius: 2px;
|
|
922
|
+ line-height: 25px;
|
|
923
|
+ text-align: center;
|
|
924
|
+ color: #fff;
|
|
925
|
+ }
|
703
|
926
|
.pagin {
|
704
|
927
|
padding: 20px 0;
|
705
|
928
|
.el-pagination {
|
|
@@ -731,13 +954,13 @@ export default {
|
731
|
954
|
.color-3 {
|
732
|
955
|
color: #fc3019;
|
733
|
956
|
}
|
734
|
|
-.colorA1{
|
|
957
|
+.colorA1 {
|
735
|
958
|
color: #333;
|
736
|
959
|
}
|
737
|
|
-.colorA2{
|
|
960
|
+.colorA2 {
|
738
|
961
|
color: #fc3019;
|
739
|
962
|
}
|
740
|
|
-.colorA0{
|
|
963
|
+.colorA0 {
|
741
|
964
|
color: #61d09d;
|
742
|
965
|
}
|
743
|
966
|
.priceColor {
|
|
@@ -878,4 +1101,128 @@ export default {
|
878
|
1101
|
text-align: center;
|
879
|
1102
|
}
|
880
|
1103
|
}
|
|
1104
|
+// 修改次卡时间
|
|
1105
|
+.amendTime {
|
|
1106
|
+ width: 440px;
|
|
1107
|
+ height: 300px;
|
|
1108
|
+ background-color: #fff;
|
|
1109
|
+ border-radius: 12px;
|
|
1110
|
+ padding: 15px;
|
|
1111
|
+ .image {
|
|
1112
|
+ height: 30px;
|
|
1113
|
+ width: 30px;
|
|
1114
|
+ img {
|
|
1115
|
+ width: 100%;
|
|
1116
|
+ }
|
|
1117
|
+ }
|
|
1118
|
+ .oldTime {
|
|
1119
|
+ color: #333;
|
|
1120
|
+ margin-left: 20px;
|
|
1121
|
+ margin-top: 30px;
|
|
1122
|
+ span {
|
|
1123
|
+ margin-left: 20px;
|
|
1124
|
+ }
|
|
1125
|
+ }
|
|
1126
|
+ .newTime {
|
|
1127
|
+ margin-left: 20px;
|
|
1128
|
+ margin-top: 10px;
|
|
1129
|
+ .time {
|
|
1130
|
+ margin-top: 20px;
|
|
1131
|
+ margin-left: 110px;
|
|
1132
|
+ }
|
|
1133
|
+ .date {
|
|
1134
|
+ margin-top: 20px;
|
|
1135
|
+ margin-left: 20px;
|
|
1136
|
+ }
|
|
1137
|
+ }
|
|
1138
|
+ .radio {
|
|
1139
|
+ width: 100%;
|
|
1140
|
+ display: flex;
|
|
1141
|
+ justify-content: space-evenly;
|
|
1142
|
+ button {
|
|
1143
|
+ width: 176px;
|
|
1144
|
+ height: 28px;
|
|
1145
|
+ border-radius: 14px;
|
|
1146
|
+ background-color: #fff;
|
|
1147
|
+ border: none;
|
|
1148
|
+ margin-top: 90px;
|
|
1149
|
+ }
|
|
1150
|
+ .cancelBtn {
|
|
1151
|
+ border: 1px solid #fa7d22;
|
|
1152
|
+ color: #fa7d22;
|
|
1153
|
+ }
|
|
1154
|
+ .affirmBtn {
|
|
1155
|
+ background-color: #fa7d22;
|
|
1156
|
+ color: #fff;
|
|
1157
|
+ margin-left: 15px;
|
|
1158
|
+ }
|
|
1159
|
+ }
|
|
1160
|
+}
|
|
1161
|
+// 核销优惠券
|
|
1162
|
+.CouponPop {
|
|
1163
|
+ width: 440px;
|
|
1164
|
+ height: 300px;
|
|
1165
|
+ background-color: #fff;
|
|
1166
|
+ border-radius: 12px;
|
|
1167
|
+ padding: 15px;
|
|
1168
|
+ .image {
|
|
1169
|
+ height: 30px;
|
|
1170
|
+ width: 30px;
|
|
1171
|
+ img {
|
|
1172
|
+ width: 100%;
|
|
1173
|
+ }
|
|
1174
|
+ }
|
|
1175
|
+ .title {
|
|
1176
|
+ text-align: center;
|
|
1177
|
+ font-weight: 700;
|
|
1178
|
+ font-size: 16px;
|
|
1179
|
+ margin-bottom: 40px;
|
|
1180
|
+ }
|
|
1181
|
+ .couponName {
|
|
1182
|
+ display: flex;
|
|
1183
|
+ margin-bottom: 40px;
|
|
1184
|
+ .one {
|
|
1185
|
+ font-weight: 600;
|
|
1186
|
+ margin-right: 20px;
|
|
1187
|
+ width: 90px;
|
|
1188
|
+ }
|
|
1189
|
+ }
|
|
1190
|
+ .couponRemark {
|
|
1191
|
+ display: flex;
|
|
1192
|
+ align-items: center;
|
|
1193
|
+ .one {
|
|
1194
|
+ margin-right: 22px;
|
|
1195
|
+ font-weight: 600;
|
|
1196
|
+ width: 90px;
|
|
1197
|
+ }
|
|
1198
|
+ .el-input {
|
|
1199
|
+ width: 300px;
|
|
1200
|
+ /deep/.el-input__inner:focus {
|
|
1201
|
+ // el-input输入时设置边框颜色
|
|
1202
|
+ border: #fa7d22 1px solid;
|
|
1203
|
+ }
|
|
1204
|
+ }
|
|
1205
|
+ }
|
|
1206
|
+ .radio {
|
|
1207
|
+ width: 100%;
|
|
1208
|
+ display: flex;
|
|
1209
|
+ justify-content: space-evenly;
|
|
1210
|
+ button {
|
|
1211
|
+ width: 176px;
|
|
1212
|
+ height: 28px;
|
|
1213
|
+ border-radius: 14px;
|
|
1214
|
+ background-color: #fff;
|
|
1215
|
+ border: none;
|
|
1216
|
+ margin-top: 50px;
|
|
1217
|
+ }
|
|
1218
|
+ .affirmBtn {
|
|
1219
|
+ background-color: #fa7d22;
|
|
1220
|
+ color: #fff;
|
|
1221
|
+ margin-left: 15px;
|
|
1222
|
+ }
|
|
1223
|
+ }
|
|
1224
|
+}
|
|
1225
|
+.expir_time {
|
|
1226
|
+ color: #3115cc;
|
|
1227
|
+}
|
881
|
1228
|
</style>
|