|
@@ -147,9 +147,11 @@
|
147
|
147
|
></el-table-column>
|
148
|
148
|
<el-table-column prop="status" label="状态" show-overflow-tooltip>
|
149
|
149
|
<template slot-scope="scope">
|
150
|
|
- <div :class="'color' + scope.row.status">
|
|
150
|
+ <div :class="'colorB' + scope.row.status">
|
151
|
151
|
{{
|
152
|
|
- scope.row.status == -1
|
|
152
|
+ scope.row.status == -2
|
|
153
|
+ ? "已注销"
|
|
154
|
+ : scope.row.status == -1
|
153
|
155
|
? "已过期"
|
154
|
156
|
: scope.row.status == -0
|
155
|
157
|
? "已使用"
|
|
@@ -158,6 +160,18 @@
|
158
|
160
|
</div>
|
159
|
161
|
</template>
|
160
|
162
|
</el-table-column>
|
|
163
|
+ <el-table-column
|
|
164
|
+ prop=""
|
|
165
|
+ label="操作"
|
|
166
|
+ width="100"
|
|
167
|
+ show-overflow-tooltip
|
|
168
|
+ >
|
|
169
|
+ <template slot-scope="scope" v-if="scope.row.status != -2">
|
|
170
|
+ <div class="cancleCoupon" @click.stop="cancleCard(scope.row)">
|
|
171
|
+ 操作
|
|
172
|
+ </div>
|
|
173
|
+ </template>
|
|
174
|
+ </el-table-column>
|
161
|
175
|
</el-table>
|
162
|
176
|
|
163
|
177
|
<div class="pagin">
|
|
@@ -455,7 +469,9 @@ type: "全额券" -->
|
455
|
469
|
</div>
|
456
|
470
|
</div>
|
457
|
471
|
</div>
|
458
|
|
- <div v-if='cardInfo.card_type == 1' class="confirm" @click="confirm">确定</div>
|
|
472
|
+ <div v-if="cardInfo.card_type == 1" class="confirm" @click="confirm">
|
|
473
|
+ 确定
|
|
474
|
+ </div>
|
459
|
475
|
</div>
|
460
|
476
|
</mine-pupop>
|
461
|
477
|
<!-- 修改次卡时间 -->
|
|
@@ -515,12 +531,37 @@ type: "全额券" -->
|
515
|
531
|
</div>
|
516
|
532
|
</div>
|
517
|
533
|
</mine-pupop>
|
|
534
|
+ <!-- 操作核销次卡 -->
|
|
535
|
+ <mine-pupop :show="isCancelCard">
|
|
536
|
+ <div class="CancelCard">
|
|
537
|
+ <div class="image">
|
|
538
|
+ <img
|
|
539
|
+ src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
|
|
540
|
+ alt
|
|
541
|
+ @click="closeCardPop"
|
|
542
|
+ />
|
|
543
|
+ </div>
|
|
544
|
+ <div class="title">核销次卡</div>
|
|
545
|
+ <div class="CardName">
|
|
546
|
+ <div class="one">次卡名称:</div>
|
|
547
|
+ <div>{{ cancelCardInfo.card_name }}</div>
|
|
548
|
+ </div>
|
|
549
|
+ <div class="cardRemark">
|
|
550
|
+ <div class="one">备注信息:</div>
|
|
551
|
+ <el-input v-model.trim="cardRemark"></el-input>
|
|
552
|
+ </div>
|
|
553
|
+ <div class="radio">
|
|
554
|
+ <button class="affirmBtn" @click="checkCard">确定</button>
|
|
555
|
+ </div>
|
|
556
|
+ </div>
|
|
557
|
+ </mine-pupop>
|
518
|
558
|
</div>
|
519
|
559
|
</template>
|
520
|
560
|
|
521
|
561
|
<script>
|
522
|
562
|
import api from "../../../server/home";
|
523
|
563
|
import minePupop from "../../../components/minePupop/index.vue";
|
|
564
|
+import { log } from "console";
|
524
|
565
|
|
525
|
566
|
export default {
|
526
|
567
|
components: {
|
|
@@ -584,6 +625,9 @@ export default {
|
584
|
625
|
cancelCouponInfo: "", //核销优惠券名称
|
585
|
626
|
couponRemark: "", //核销优惠券备注信息
|
586
|
627
|
refresh: false, //刷新页面数据
|
|
628
|
+ isCancelCard: false, //核销次卡界面
|
|
629
|
+ cancelCardInfo: "", //核销次卡名称
|
|
630
|
+ cardRemark: "", //核销优惠券备注信息
|
587
|
631
|
};
|
588
|
632
|
},
|
589
|
633
|
computed: {},
|
|
@@ -636,6 +680,35 @@ export default {
|
636
|
680
|
}
|
637
|
681
|
});
|
638
|
682
|
},
|
|
683
|
+ // 打开次卡弹窗
|
|
684
|
+ cancleCard(e) {
|
|
685
|
+ this.isCancelCard = true;
|
|
686
|
+ this.cancelCardInfo = e;
|
|
687
|
+ },
|
|
688
|
+ // 关闭次卡弹窗
|
|
689
|
+ closeCardPop() {
|
|
690
|
+ this.isCancelCard = false;
|
|
691
|
+ },
|
|
692
|
+ // 核销次卡
|
|
693
|
+ checkCard() {
|
|
694
|
+ if (this.cardRemark == "") {
|
|
695
|
+ this.$message.error("请填写备注信息");
|
|
696
|
+ return;
|
|
697
|
+ }
|
|
698
|
+ api
|
|
699
|
+ .checkCard({
|
|
700
|
+ id: this.cancelCardInfo.id,
|
|
701
|
+ remark: this.cardRemark,
|
|
702
|
+ })
|
|
703
|
+ .then((res) => {
|
|
704
|
+ if (res.code == 200) {
|
|
705
|
+ this.$message.success("核销成功");
|
|
706
|
+ this.isCancelCard = false;
|
|
707
|
+ // 刷新次卡列表
|
|
708
|
+ this.getCardList();
|
|
709
|
+ }
|
|
710
|
+ });
|
|
711
|
+ },
|
639
|
712
|
// 阻止修改次卡时间时键盘弹出
|
640
|
713
|
forbid() {
|
641
|
714
|
//禁止软键盘弹出
|
|
@@ -652,6 +725,13 @@ export default {
|
652
|
725
|
},
|
653
|
726
|
// 修改次卡时间
|
654
|
727
|
amendCardTime(e) {
|
|
728
|
+ if (e.status == -2) {
|
|
729
|
+ this.$message({
|
|
730
|
+ message: "该次卡已注销",
|
|
731
|
+ type: "error",
|
|
732
|
+ });
|
|
733
|
+ return;
|
|
734
|
+ }
|
655
|
735
|
this.isAmend = true;
|
656
|
736
|
this.amendCardInfo = e;
|
657
|
737
|
console.log(e);
|
|
@@ -702,6 +782,13 @@ export default {
|
702
|
782
|
},
|
703
|
783
|
//次卡订单详情
|
704
|
784
|
openDetail(row, column, event) {
|
|
785
|
+ if (row.status == -2) {
|
|
786
|
+ this.$message({
|
|
787
|
+ message: "该次卡已注销",
|
|
788
|
+ type: "error",
|
|
789
|
+ });
|
|
790
|
+ return;
|
|
791
|
+ }
|
705
|
792
|
this.isPore = true;
|
706
|
793
|
api.cardInfo({ id: row.id }).then((res) => {
|
707
|
794
|
if (res.code == 200) {
|
|
@@ -963,6 +1050,18 @@ export default {
|
963
|
1050
|
.colorA0 {
|
964
|
1051
|
color: #61d09d;
|
965
|
1052
|
}
|
|
1053
|
+.colorB0 {
|
|
1054
|
+ color: #3ef3ed;
|
|
1055
|
+}
|
|
1056
|
+.colorB1 {
|
|
1057
|
+ color: #61d09d;
|
|
1058
|
+}
|
|
1059
|
+.colorB-1 {
|
|
1060
|
+ color: #fc3019;
|
|
1061
|
+}
|
|
1062
|
+.colorB-2 {
|
|
1063
|
+ color: #333;
|
|
1064
|
+}
|
966
|
1065
|
.priceColor {
|
967
|
1066
|
color: #ff3007;
|
968
|
1067
|
}
|
|
@@ -1222,6 +1321,70 @@ export default {
|
1222
|
1321
|
}
|
1223
|
1322
|
}
|
1224
|
1323
|
}
|
|
1324
|
+// 核销次卡界面
|
|
1325
|
+.CancelCard {
|
|
1326
|
+ width: 440px;
|
|
1327
|
+ height: 300px;
|
|
1328
|
+ background-color: #fff;
|
|
1329
|
+ border-radius: 12px;
|
|
1330
|
+ padding: 15px;
|
|
1331
|
+ .image {
|
|
1332
|
+ height: 30px;
|
|
1333
|
+ width: 30px;
|
|
1334
|
+ img {
|
|
1335
|
+ width: 100%;
|
|
1336
|
+ }
|
|
1337
|
+ }
|
|
1338
|
+ .title {
|
|
1339
|
+ text-align: center;
|
|
1340
|
+ font-weight: 700;
|
|
1341
|
+ font-size: 16px;
|
|
1342
|
+ margin-bottom: 40px;
|
|
1343
|
+ }
|
|
1344
|
+ .CardName {
|
|
1345
|
+ display: flex;
|
|
1346
|
+ margin-bottom: 40px;
|
|
1347
|
+ .one {
|
|
1348
|
+ font-weight: 600;
|
|
1349
|
+ margin-right: 10px;
|
|
1350
|
+ width: 90px;
|
|
1351
|
+ }
|
|
1352
|
+ }
|
|
1353
|
+ .cardRemark {
|
|
1354
|
+ display: flex;
|
|
1355
|
+ align-items: center;
|
|
1356
|
+ .one {
|
|
1357
|
+ margin-right: 22px;
|
|
1358
|
+ font-weight: 600;
|
|
1359
|
+ width: 90px;
|
|
1360
|
+ }
|
|
1361
|
+ .el-input {
|
|
1362
|
+ width: 300px;
|
|
1363
|
+ /deep/.el-input__inner:focus {
|
|
1364
|
+ // el-input输入时设置边框颜色
|
|
1365
|
+ border: #fa7d22 1px solid;
|
|
1366
|
+ }
|
|
1367
|
+ }
|
|
1368
|
+ }
|
|
1369
|
+ .radio {
|
|
1370
|
+ width: 100%;
|
|
1371
|
+ display: flex;
|
|
1372
|
+ justify-content: space-evenly;
|
|
1373
|
+ button {
|
|
1374
|
+ width: 176px;
|
|
1375
|
+ height: 28px;
|
|
1376
|
+ border-radius: 14px;
|
|
1377
|
+ background-color: #fff;
|
|
1378
|
+ border: none;
|
|
1379
|
+ margin-top: 50px;
|
|
1380
|
+ }
|
|
1381
|
+ .affirmBtn {
|
|
1382
|
+ background-color: #fa7d22;
|
|
1383
|
+ color: #fff;
|
|
1384
|
+ margin-left: 15px;
|
|
1385
|
+ }
|
|
1386
|
+ }
|
|
1387
|
+}
|
1225
|
1388
|
.expir_time {
|
1226
|
1389
|
color: #3115cc;
|
1227
|
1390
|
}
|