소스 검색

bug修改

wangfei 6 년 전
부모
커밋
7b7ccc2591

+ 3
- 3
config/index.js 파일 보기

@@ -13,10 +13,10 @@ module.exports = {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15 15
         // target: 'http://192.168.0.62:8080', //wf
16
-        //target: 'http://127.0.0.1:8080', 
17
-        target: 'http://localhost:8080', //wf
16
+        // target: 'http://127.0.0.1:8080', 
17
+        // target: 'http://192.168.0.62:8080', //wf
18 18
         // target: 'http://192.168.0.11', //ys
19
-        // target: 'http://192.168.0.125:8080', //hyq
19
+        target: 'http://192.168.0.125:8080', //hyq
20 20
         // target: 'http://dev.ycjcjy.com/', //frp
21 21
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
22 22
         // pathRewrite: {

+ 125
- 31
src/pages/system/cardAndCouponManager/cardManager/edit.vue 파일 보기

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>选择案场:</span>
6
+          <span>选择案场:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="cardInfo.CaseId" placeholder="请选择" @change="caseChange">
@@ -18,7 +18,7 @@
18 18
           </div>
19 19
         </li>
20 20
         <li class="flex-h">
21
-          <span>卡图片:</span>
21
+          <span>卡图片:<em>*</em></span>
22 22
           <div class="flex-item">
23 23
             <div>
24 24
               <el-upload
@@ -34,7 +34,7 @@
34 34
           </div>
35 35
         </li>
36 36
         <li class="flex-h">
37
-          <span>卡名称:</span>
37
+          <span>卡名称:<em>*</em></span>
38 38
           <div class="flex-item">
39 39
             <div style="width:200px;">
40 40
               <el-input
@@ -46,7 +46,7 @@
46 46
           </div>
47 47
         </li>
48 48
         <li class="flex-h">
49
-          <span>卡价格:</span>
49
+          <span>卡价格:<em>*</em></span>
50 50
           <div class="flex-item">
51 51
             <div style="width:200px;">
52 52
               <el-input
@@ -58,7 +58,7 @@
58 58
           </div>
59 59
         </li>
60 60
         <li class="flex-h">
61
-          <span>总张数:</span>
61
+          <span>总张数:<em>*</em></span>
62 62
           <div class="flex-item">
63 63
             <div style="width:200px;">
64 64
               <el-input
@@ -70,7 +70,7 @@
70 70
           </div>
71 71
         </li>
72 72
         <li class="flex-h">
73
-          <span>发送类型:</span>
73
+          <span>发送类型:<em>*</em></span>
74 74
           <div class="flex-item">
75 75
             <div>
76 76
               <el-radio v-model="cardInfo.SendType" label="channel">渠道</el-radio>
@@ -80,7 +80,7 @@
80 80
           </div>
81 81
         </li>
82 82
         <li class="flex-h" v-if="cardInfo.SendType === 'channel'">
83
-          <span>选择渠道:</span>
83
+          <span>选择渠道:<em>*</em></span>
84 84
           <div class="flex-item">
85 85
             <div style="width:50%">
86 86
               <el-select v-model="cardInfo.ChannelId" placeholder="请选择">
@@ -95,7 +95,7 @@
95 95
           </div>
96 96
         </li>
97 97
         <li class="flex-h">
98
-          <span>目标课程:</span>
98
+          <span>目标课程:<em>*</em></span>
99 99
           <div class="flex-item">
100 100
             <div>
101 101
               <el-select v-model="cardInfo.Targets[0].TargetId" placeholder="请选择">
@@ -111,21 +111,10 @@
111 111
           </div>
112 112
         </li>
113 113
         <li class="flex-h">
114
-          <span>卡有效时间:</span>
114
+          <span>卡有效时间:<em>*</em></span>
115 115
           <div class="flex-item">
116 116
             <div>
117 117
               <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
118
-                <!-- <el-date-picker
119
-                  v-model="cardInfo.StartDate"
120
-                  type="date"
121
-                  placeholder="选择起始日期">
122
-                </el-date-picker>
123
-                <span style="line-height:40px;">至</span>
124
-                <el-date-picker
125
-                  v-model="cardInfo.EndDate"
126
-                  type="date"
127
-                  placeholder="选择截止日期">
128
-                </el-date-picker> -->
129 118
                 <el-date-picker
130 119
                   v-model="date"
131 120
                   type="daterange"
@@ -139,7 +128,7 @@
139 128
           </div>
140 129
         </li>
141 130
         <li class="flex-h" v-if="cardInfo.SendType !== 'case' && cardInfo.SendType !== 'system'">
142
-          <span>视频:</span>
131
+          <span>视频:<em>*</em></span>
143 132
           <div class="flex-item">
144 133
             <div style="vertical-align: middle;">
145 134
               <a style="line-height: 40px;" v-if="videoOff" :href="cardInfo.VideoUrl" target="blank">{{cardInfo.VideoUrl}}</a>
@@ -156,7 +145,7 @@
156 145
           </div>
157 146
         </li>
158 147
         <li class="flex-h">
159
-          <span>分享描述:</span>
148
+          <span>分享描述:<em>*</em></span>
160 149
           <div class="flex-item">
161 150
             <div>
162 151
               <el-input
@@ -169,7 +158,7 @@
169 158
           </div>
170 159
         </li>
171 160
         <li class="flex-h">
172
-          <span>规则描述:</span>
161
+          <span>规则描述:<em>*</em></span>
173 162
           <div class="flex-item">
174 163
             <div>
175 164
               <el-input
@@ -182,7 +171,7 @@
182 171
           </div>
183 172
         </li>
184 173
         <li class="flex-h">
185
-          <span>使用说明:</span>
174
+          <span>使用说明:<em>*</em></span>
186 175
           <div class="flex-item">
187 176
             <div>
188 177
               <el-input
@@ -236,7 +225,11 @@ export default {
236 225
         TotalCount: '',
237 226
         CaseId: '',
238 227
         OrgId: '',
239
-        Share: {},
228
+        Share: {
229
+          CardShareInfo: '',
230
+          CardUseRule: '',
231
+          CardUseInstruction: '',
232
+        },
240 233
         Images: null,
241 234
         Targets: [{}],
242 235
         ChannelId: ''
@@ -355,7 +348,110 @@ export default {
355 348
     addGoods () { // 添加指定商品
356 349
       this.centerDialogVisible = true
357 350
     },
351
+    checkInfo () { // 校验表单信息
352
+      if (this.cardInfo.CaseId === '') {
353
+        this.$message({
354
+          type: 'error',
355
+          message: '案场不能为空'
356
+        })
357
+        return false
358
+      }
359
+      if (this.cardInfo.Images === '') {
360
+        this.$message({
361
+          type: 'error',
362
+          message: '卡图片不能为空'
363
+        })
364
+        return false
365
+      }
366
+      if (this.cardInfo.CardName === '') {
367
+        this.$message({
368
+          type: 'error',
369
+          message: '卡名称不能为空'
370
+        })
371
+        return false
372
+      }
373
+      if (this.cardInfo.Price === '') {
374
+        this.$message({
375
+          type: 'error',
376
+          message: '卡价格不能为空'
377
+        })
378
+        return false
379
+      }
380
+      if (this.cardInfo.TotalCount === '') {
381
+        this.$message({
382
+          type: 'error',
383
+          message: '总张数不能为空'
384
+        })
385
+        return false
386
+      }
387
+      if (this.cardInfo.SendType === '') {
388
+        this.$message({
389
+          type: 'error',
390
+          message: '发送类型不能为空'
391
+        })
392
+        return false
393
+      }
394
+      if (this.cardInfo.SendType === 'channel' && this.cardInfo.ChannelId === '') {
395
+        this.$message({
396
+          type: 'error',
397
+          message: '渠道不能为空'
398
+        })
399
+        return false
400
+      }
401
+      if (this.cardInfo.Targets[0].TargetId === '') {
402
+        this.$message({
403
+          type: 'error',
404
+          message: '目标课程不能为空'
405
+        })
406
+        return false
407
+      }
408
+      if (this.cardInfo.StartDate === '') {
409
+        this.$message({
410
+          type: 'error',
411
+          message: '开始时间不能为空'
412
+        })
413
+        return false
414
+      }
415
+      if (this.cardInfo.EndDate === '') {
416
+        this.$message({
417
+          type: 'error',
418
+          message: '截止时间不能为空'
419
+        })
420
+        return false
421
+      }
422
+      if (this.cardInfo.SendType === 'channel' && this.cardInfo.VideoUrl === '') {
423
+        this.$message({
424
+          type: 'error',
425
+          message: '视频不能为空'
426
+        })
427
+        return false
428
+      }
429
+      if (this.cardInfo.Share.CardShareInfo === '') {
430
+        this.$message({
431
+          type: 'error',
432
+          message: '分享描述不能为空'
433
+        })
434
+        return false
435
+      }
436
+      if (this.cardInfo.Share.CardUseRule === '') {
437
+        this.$message({
438
+          type: 'error',
439
+          message: '使用规则不能为空'
440
+        })
441
+        return false
442
+      }
443
+      if (this.cardInfo.Share.CardUseInstruction === '') {
444
+        this.$message({
445
+          type: 'error',
446
+          message: '使用说明不能为空'
447
+        })
448
+        return false
449
+      }
450
+    },
358 451
     submit () { // 保存
452
+      if (!this.checkInfo()) {
453
+        return false
454
+      }
359 455
       if (this.$route.query.id) {
360 456
         if (this.date !== '') {
361 457
           this.cardInfo.StartDate = this.date[0]
@@ -368,14 +464,12 @@ export default {
368 464
           }
369 465
         }
370 466
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
371
-        console.log(JSON.stringify(this.cardInfo))
372 467
         this.editCard(this.cardInfo).then((res) => {
373
-          this.$alert('操作成功', '提示', {
374
-            confirmButtonText: '确定',
375
-            callback: action => {
376
-              this.$router.push({ name: 'cardList' })
377
-            }
468
+          this.$message({
469
+            type: 'success',
470
+            message: '操作成功'
378 471
           })
472
+          this.$router.push({ name: 'cardList' })
379 473
         })
380 474
       } else {
381 475
         this.cardInfo.OrgId = this.OrgId

+ 111
- 15
src/pages/system/cardAndCouponManager/couponManager/edit.vue 파일 보기

@@ -4,7 +4,7 @@
4 4
       <!-- <h1 style="font-size:22px;">{{isEdit === 0 ? '新建' : '编辑'}}{{couponInfo.CouponType === 'goods' ? '饮品优惠券' : '课程优惠券'}}</h1> -->
5 5
       <ul>
6 6
         <li class="flex-h">
7
-          <span>选择案场:</span>
7
+          <span>选择案场:<em>*</em></span>
8 8
           <div class="flex-item">
9 9
             <div style="width:50%">
10 10
               <el-select v-model="couponInfo.CaseId" placeholder="请选择" @change="caseChange">
@@ -19,7 +19,7 @@
19 19
           </div>
20 20
         </li>
21 21
         <li class="flex-h">
22
-          <span>券图片:</span>
22
+          <span>券图片:<em>*</em></span>
23 23
           <div class="flex-item">
24 24
             <div>
25 25
               <el-upload
@@ -35,7 +35,7 @@
35 35
           </div>
36 36
         </li>
37 37
         <li class="flex-h">
38
-          <span>券名称:</span>
38
+          <span>券名称:<em>*</em></span>
39 39
           <div class="flex-item">
40 40
             <div style="width:200px;">
41 41
               <el-input
@@ -47,7 +47,7 @@
47 47
           </div>
48 48
         </li>
49 49
         <li class="flex-h">
50
-          <span>券类型:</span>
50
+          <span>券类型:<em>*</em></span>
51 51
           <div class="flex-item">
52 52
             <div style="width:50%">
53 53
               <el-select v-model="couponInfo.CouponType" placeholder="请选择" @change="couponTypeChange">
@@ -62,7 +62,7 @@
62 62
           </div>
63 63
         </li>
64 64
         <li class="flex-h">
65
-          <span>券价格:</span>
65
+          <span>券价格:<em>*</em></span>
66 66
           <div class="flex-item">
67 67
             <div style="width:200px;">
68 68
               <el-input
@@ -74,7 +74,7 @@
74 74
           </div>
75 75
         </li>
76 76
         <li class="flex-h">
77
-          <span>总张数:</span>
77
+          <span>总张数:<em>*</em></span>
78 78
           <div class="flex-item">
79 79
             <div style="width:200px;">
80 80
               <el-input
@@ -86,7 +86,7 @@
86 86
           </div>
87 87
         </li>
88 88
         <li class="flex-h">
89
-          <span>发送类型:</span>
89
+          <span>发送类型:<em>*</em></span>
90 90
           <div class="flex-item">
91 91
             <div>
92 92
               <el-radio v-model="couponInfo.SendType" label="channel">渠道</el-radio>
@@ -96,7 +96,7 @@
96 96
           </div>
97 97
         </li>
98 98
         <li class="flex-h" v-if="couponInfo.SendType === 'channel'">
99
-          <span>选择渠道:</span>
99
+          <span>选择渠道:<em>*</em></span>
100 100
           <div class="flex-item">
101 101
             <div style="width:50%">
102 102
               <el-select v-model="couponInfo.ChannelId" placeholder="请选择">
@@ -111,7 +111,7 @@
111 111
           </div>
112 112
         </li>
113 113
         <li class="flex-h">
114
-          <span>目标商品:</span>
114
+          <span>目标商品:<em>*</em></span>
115 115
           <div class="flex-item">
116 116
             <div>
117 117
               <el-radio v-model="couponInfo.IsAll" label="1">全部商品</el-radio>
@@ -153,7 +153,7 @@
153 153
           </div>
154 154
         </li>
155 155
         <li class="flex-h" v-if="couponInfo.CouponType === 'goods'">
156
-          <span>券有效时间:</span>
156
+          <span>券有效时间:<em>*</em></span>
157 157
           <div class="flex-item">
158 158
             <div>
159 159
               <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
@@ -185,7 +185,7 @@
185 185
           </div>
186 186
         </li>
187 187
         <li class="flex-h" v-if="couponInfo.CouponType === 'course'">
188
-          <span>券有效时间:</span>
188
+          <span>券有效时间:<em>*</em></span>
189 189
           <div class="flex-item">
190 190
             <div>
191 191
               <el-date-picker
@@ -203,7 +203,7 @@
203 203
           </div>
204 204
         </li>
205 205
         <li class="flex-h" v-if="couponInfo.SendType !== 'case' && couponInfo.SendType !== 'system'">
206
-          <span>视频:</span>
206
+          <span>视频:<em>*</em></span>
207 207
           <div class="flex-item">
208 208
             <div style="vertical-align: middle;">
209 209
               <a style="line-height: 40px;" v-if="videoOff" :href="couponInfo.VideoUrl" target="blank">{{couponInfo.VideoUrl}}</a>
@@ -220,7 +220,7 @@
220 220
           </div>
221 221
         </li>
222 222
         <li class="flex-h">
223
-          <span>分享描述:</span>
223
+          <span>分享描述:<em>*</em></span>
224 224
           <div class="flex-item">
225 225
             <div>
226 226
               <el-input
@@ -233,7 +233,7 @@
233 233
           </div>
234 234
         </li>
235 235
         <li class="flex-h">
236
-          <span>规则描述:</span>
236
+          <span>规则描述:<em>*</em></span>
237 237
           <div class="flex-item">
238 238
             <div>
239 239
               <el-input
@@ -246,7 +246,7 @@
246 246
           </div>
247 247
         </li>
248 248
         <li class="flex-h">
249
-          <span>使用说明:</span>
249
+          <span>使用说明:<em>*</em></span>
250 250
           <div class="flex-item">
251 251
             <div>
252 252
               <el-input
@@ -587,7 +587,103 @@ export default {
587 587
         })
588 588
       }
589 589
     },
590
+    checkInfo () { // 校验表单信息
591
+      if (this.couponInfo.CaseId === '') {
592
+        this.$message({
593
+          type: 'error',
594
+          message: '案场不能为空'
595
+        })
596
+        return false
597
+      }
598
+      if (this.couponInfo.Images[0].CouponImageUrl === '') {
599
+        this.$message({
600
+          type: 'error',
601
+          message: '券图片不能为空'
602
+        })
603
+        return false
604
+      }
605
+      if (this.couponInfo.CouponName === '') {
606
+        this.$message({
607
+          type: 'error',
608
+          message: '券名称不能为空'
609
+        })
610
+        return false
611
+      }
612
+      if (this.couponInfo.CouponType === '') {
613
+        this.$message({
614
+          type: 'error',
615
+          message: '券类型不能为空'
616
+        })
617
+        return false
618
+      }
619
+      if (this.couponInfo.Price === '') {
620
+        this.$message({
621
+          type: 'error',
622
+          message: '券价格不能为空'
623
+        })
624
+        return false
625
+      }
626
+      if (this.couponInfo.TotalCount === '') {
627
+        this.$message({
628
+          type: 'error',
629
+          message: '总张数不能为空'
630
+        })
631
+        return false
632
+      }
633
+      if (this.couponInfo.SendType === '') {
634
+        this.$message({
635
+          type: 'error',
636
+          message: '发送类型不能为空'
637
+        })
638
+        return false
639
+      }
640
+      if (this.couponInfo.SendType === 'channel' && this.couponInfo.ChannelId === '') {
641
+        this.$message({
642
+          type: 'error',
643
+          message: '渠道不能为空'
644
+        })
645
+        return false
646
+      }
647
+      if (this.couponInfo.IsAll === 0 && this.couponInfo.Targets[0].TargetId === '') {
648
+        this.$message({
649
+          type: 'error',
650
+          message: '目标商品不能为空'
651
+        })
652
+        return false
653
+      }
654
+      if (this.couponInfo.SendType === 'channel' && this.couponInfo.VideoUrl === '') {
655
+        this.$message({
656
+          type: 'error',
657
+          message: '视频不能为空'
658
+        })
659
+        return false
660
+      }
661
+      if (this.couponInfo.Share.CouponShareInfo === '') {
662
+        this.$message({
663
+          type: 'error',
664
+          message: '分享描述不能为空'
665
+        })
666
+        return false
667
+      }
668
+      if (this.couponInfo.Share.UseRule === '') {
669
+        this.$message({
670
+          type: 'error',
671
+          message: '使用规则不能为空'
672
+        })
673
+        return false
674
+      }
675
+      if (this.couponInfo.Share.UseInstruction === '') {
676
+        this.$message({
677
+          type: 'error',
678
+          message: '使用说明不能为空'
679
+        })
680
+        return false
681
+      }
682
+    },
590 683
     submit () { // 保存
684
+      if (!this.checkInfo()) {
685
+        return false
686
+      }
591 687
       if (this.$route.query.id) {
592 688
         if (this.couponInfo.ValidDays) {
593 689
           this.couponInfo.StartDate = undefined

+ 1
- 1
src/pages/system/caseManager/keyManager/add.vue 파일 보기

@@ -101,6 +101,7 @@ export default {
101 101
       this.postData.AreaIcon = res.result.url
102 102
     },
103 103
     submit () { // 提交数据
104
+      console.log('柜子编号:' + this.postData.beginnum + ' ' + this.postData.endnum)
104 105
       if (this.postData.beginnum === '') {
105 106
         this.$message({
106 107
           type: 'error',
@@ -115,7 +116,6 @@ export default {
115 116
         })
116 117
         return false
117 118
       }
118
-      console.log('柜子编号:' + this.postData.beginnum + ' ' + this.postData.endnum)
119 119
       this.postData.orgid = this.OrgId
120 120
       this.$ajax(this.$api.caseManager.addKey.url, {
121 121
         method: this.$api.caseManager.addKey.method,

+ 1
- 1
src/pages/system/verificationManager/drawVerification/verificationList/index.vue 파일 보기

@@ -65,7 +65,7 @@
65 65
               </el-table-column>
66 66
             </el-table>
67 67
         </div>
68
-        <span class="noData" v-if="!info.length && ajaxOff">今日暂无可核销的课程</span>
68
+        <span class="noData" v-if="!info.length && ajaxOff">查不到当前信息,请核对二维码或详情</span>
69 69
       </div>
70 70
     </div>
71 71
   </div>

+ 169
- 28
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue 파일 보기

@@ -52,14 +52,18 @@
52 52
                 </template>
53 53
               </el-table-column>
54 54
               <el-table-column
55
-                label="操作">
55
+                label="操作"
56
+                width="200">
56 57
                 <template slot-scope="scope">
57 58
                   <el-button
58 59
                     size="mini"
59 60
                     type="success"
60 61
                     v-if="scope.row.VerifyStatus!=='used'"
61 62
                     @click="check(scope.row)">核销</el-button>
62
-                  <span v-else>已完成</span>
63
+                  <el-button
64
+                    size="mini"
65
+                    type="info"
66
+                    v-else>已完成</el-button>
63 67
                 </template>
64 68
               </el-table-column>
65 69
             </el-table>
@@ -71,46 +75,122 @@
71 75
             :total="courses.pagenum">
72 76
           </el-pagination>
73 77
         </div>
74
-        <span class="noData" v-else>今日暂无可核销的课程</span>
78
+        <span class="noData" v-else>查不到当前信息,请核对手机号或详情</span>
75 79
       </div>
76 80
     </div>
81
+    <el-dialog
82
+      title="选择绑定钥匙"
83
+      :visible.sync="centerDialogVisible"
84
+      width="400"
85
+      center>
86
+      <div>
87
+        <el-table
88
+          :data="dialogList"
89
+          stripe
90
+          style="width: 100%">
91
+          <el-table-column
92
+            prop="CustomerName"
93
+            label="当前用户">
94
+          </el-table-column>
95
+          <el-table-column
96
+            prop="LockNo"
97
+            label="锁柜号">
98
+          </el-table-column>
99
+          <el-table-column
100
+            prop="Status"
101
+            label="状态">
102
+            <template slot-scope="scope">
103
+              {{scope.row.Status === 1 ? '有人' : '无人'}}
104
+            </template>
105
+          </el-table-column>
106
+          <el-table-column
107
+            label="操作"
108
+            width="200">
109
+            <template slot-scope="scope">
110
+              <el-button
111
+                v-if="scope.row.Status === 0"
112
+                size="mini"
113
+                type="success"
114
+                @click="toBindKey(scope.row)">绑定</el-button>
115
+            </template>
116
+          </el-table-column>
117
+        </el-table>
118
+        <el-pagination
119
+          @current-change="handleCurrentChangeDialog"
120
+          :current-page.sync="postData.page"
121
+          :page-size="postData.pagesize"
122
+          layout="prev, pager, next, jumper"
123
+          :total="dialogTotal">
124
+        </el-pagination>
125
+      </div>
126
+      <span slot="footer" class="dialog-footer">
127
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
128
+        <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
129
+      </span>
130
+    </el-dialog>
131
+    <el-dialog
132
+      title="提示"
133
+      :visible.sync="dialogVisible"
134
+      width="200">
135
+      <span>确认核销此课程</span>
136
+      <span slot="footer" class="dialog-footer">
137
+        <el-button @click="sureVerify">确 定</el-button>
138
+        <el-button type="primary" @click="sureAndBind">确定并绑定钥匙</el-button>
139
+      </span>
140
+    </el-dialog>
77 141
   </div>
78 142
 </template>
79 143
 
80 144
 <script>
81
-import { createNamespacedHelpers } from 'vuex'
145
+import { mapState, createNamespacedHelpers } from 'vuex'
82 146
 
83 147
 const { mapState: mapVerifState, mapActions: mapVerifActions } = createNamespacedHelpers('verification')
148
+const { mapActions: mapDeviceActions } = createNamespacedHelpers('device')
84 149
 
85 150
 export default {
86 151
   name: '',
87 152
   data () {
88 153
     return {
154
+      dialogVisible: false,
155
+      dialogList: [],
156
+      centerDialogVisible: false,
157
+      customerId: '',
89 158
       customerName: '',
90 159
       phone: this.$route.query.tel,
91 160
       code: '',
92 161
       tel: '',
93 162
       page: 1,
94 163
       pagesize: 10,
164
+      postData: {
165
+        caseid: '',
166
+        page: 1,
167
+        pagesize: 6,
168
+      },
169
+      dialogTotal: 0,
95 170
     }
96 171
   },
97 172
   mounted () {
98 173
     this.$nextTick(function () {
99
-      this.getCustomerName({
100
-        id: this.phone
101
-      }).then((res) => {
102
-        console.log(res)
103
-        const { code, tel } = this.$route.query
104
-        this.code = code
105
-        this.tel = tel
106
-        this.getList()
107
-      })
174
+      this.init()
108 175
     })
109 176
   },
110 177
   computed: {
178
+    ...mapState({
179
+      cases: x => x.app.cases.list,
180
+      defaultCaseId: x => x.app.cases.default,
181
+      OrgId: x => x.app.user.OrgId,
182
+    }),
183
+    CaseId: {
184
+      get () {
185
+        return this.postData.caseid || this.defaultCaseId
186
+      },
187
+      set (val) {
188
+        this.postData.caseid = val
189
+      }
190
+    },
111 191
     ...mapVerifState({
112 192
       courses: x => x.courseVerifs
113
-    })
193
+    }),
114 194
   },
115 195
   methods: {
116 196
     ...mapVerifActions([
@@ -119,22 +199,55 @@ export default {
119 199
       'GetCourseVerListByTel',
120 200
       'getCustomerName'
121 201
     ]),
202
+    ...mapDeviceActions([
203
+      'getKeyList',
204
+      'bindKeyer',
205
+    ]),
206
+    init () {
207
+      this.getCustomerName({
208
+        id: this.phone
209
+      }).then((res) => {
210
+        if (res !== null) {
211
+          this.customerId = res.CustomerId
212
+          this.customerName = res.CustomerName
213
+          const { code, tel } = this.$route.query
214
+          this.code = code
215
+          this.tel = tel
216
+          this.getList()
217
+        } else {
218
+          this.$message({
219
+            type: 'error',
220
+            message: '未查询到用户信息'
221
+          })
222
+        }
223
+      })
224
+    },
122 225
     check (item) { // 核销
123
-      this.$confirm('确认核销此课程?', '提示', {
124
-        confirmButtonText: '确定',
125
-        cancelButtonText: '取消',
126
-        type: 'warning'
226
+      this.currentItem = item
227
+      this.dialogVisible = true
228
+    },
229
+    sureVerify () {
230
+      this.CourseVerifs({ id: this.currentItem.CustomerDetailId, callback: this.afterCheck })
231
+      this.dialogVisible = false
232
+    },
233
+    sureAndBind () {
234
+      this.dialogVisible = false
235
+      this.getKeyList({
236
+        ...this.postData,
237
+        caseid: this.CaseId,
238
+      }).then((res) => {
239
+        // console.log(JSON.stringify(res))
240
+        this.dialogTotal = res.pagenum
241
+        this.dialogList = res.list
242
+        this.centerDialogVisible = true
127 243
       })
128
-        .then(() => {
129
-          this.CourseVerifs({id: item.CustomerDetailId, callback: this.afterCheck})
130
-        })
131 244
     },
132 245
     getList () {
133 246
       if (this.code && this.code !== '') {
134
-        this.GetCourseVerList({id: this.code, page: this.page, pagesize: this.pagesize})
247
+        this.GetCourseVerList({ id: this.code, page: this.page, pagesize: this.pagesize })
135 248
       } else {
136 249
         if (this.tel && this.tel !== '') {
137
-          this.GetCourseVerListByTel({tel: this.tel, page: this.page, pagesize: this.pagesize})
250
+          this.GetCourseVerListByTel({ tel: this.tel, page: this.page, pagesize: this.pagesize })
138 251
         }
139 252
       }
140 253
     },
@@ -150,7 +263,35 @@ export default {
150 263
       this.getList()
151 264
     },
152 265
     reback () { // 返回
153
-      this.$router.push({name: 'phoneVerification'})
266
+      this.$router.push({ name: 'phoneVerification' })
267
+    },
268
+    bindKey (item) { // 绑定钥匙
269
+    },
270
+    handleCurrentChangeDialog (val) {
271
+      this.postData.page = val
272
+      this.getKeyList({
273
+        ...this.postData,
274
+        caseid: this.CaseId,
275
+      }).then((res) => {
276
+        // console.log(JSON.stringify(res))
277
+        this.dialogTotal = res.pagenum
278
+        this.dialogList = res.list
279
+        this.centerDialogVisible = true
280
+      })
281
+    },
282
+    toBindKey (item) {
283
+      this.bindKeyer({
284
+        keyid: item.KeyId,
285
+        customerid: this.customerId,
286
+        customername: this.customerName
287
+      }).then((res) => {
288
+        // console.log(JSON.stringify(res))
289
+        this.CourseVerifs({ id: this.currentItem.CustomerDetailId, callback: this.afterCheck })
290
+        this.centerDialogVisible = false
291
+        this.postData.page = 1
292
+        this.dialogList = []
293
+        this.init()
294
+      })
154 295
     },
155 296
   }
156 297
 }
@@ -159,14 +300,14 @@ export default {
159 300
 <!-- Add "scoped" attribute to limit CSS to this component only -->
160 301
 <style lang="scss" scoped>
161 302
 .subPage {
162
-  .userInfo{
303
+  .userInfo {
163 304
     white-space: nowrap;
164 305
     font-size: 0;
165
-    >*{
306
+    > * {
166 307
       display: inline-block;
167 308
       margin-right: 10px;
168 309
     }
169
-    >b{
310
+    > b {
170 311
       font-weight: bolder;
171 312
       font-size: 15px;
172 313
       margin-right: 30px;
@@ -186,7 +327,7 @@ export default {
186 327
       }
187 328
     }
188 329
   }
189
-  .noData{
330
+  .noData {
190 331
     width: 100%;
191 332
     display: block;
192 333
     line-height: 40px;

+ 1
- 1
src/pages/system/verificationManager/qrcodeVerification/verificationList/index.vue 파일 보기

@@ -56,7 +56,7 @@
56 56
               </el-table-column>
57 57
             </el-table>
58 58
         </div>
59
-        <span class="noData" v-else>今日暂无可核销的课程</span>
59
+        <span class="noData" v-else>查不到当前信息,请核对二维码或详情</span>
60 60
       </div>
61 61
     </div>
62 62
   </div>

+ 20
- 0
src/store/case/device.js 파일 보기

@@ -16,6 +16,26 @@ export default {
16 16
     },
17 17
   },
18 18
   actions: {
19
+    bindKeyer ({ commit }, payload) {
20
+      return new Promise((resolve, reject) => {
21
+        ajax(api.caseManager.bindKey.url, {
22
+          method: api.caseManager.bindKey.method,
23
+          urlData: { ...payload },
24
+        }).then(res => {
25
+          resolve(res)
26
+        }).catch(reject)
27
+      })
28
+    },
29
+    getKeyList ({ commit }, payload) {
30
+      return new Promise((resolve, reject) => {
31
+        ajax(api.caseManager.getKeyListById.url, {
32
+          method: api.caseManager.getKeyListById.method,
33
+          queryData: { ...payload },
34
+        }).then(res => {
35
+          resolve(res)
36
+        }).catch(reject)
37
+      })
38
+    },
19 39
     GetDeviceList ({ commit }, payload) {
20 40
       return new Promise((resolve, reject) => {
21 41
         ajax(api.device.list.url, {

+ 8
- 0
src/util/api.js 파일 보기

@@ -85,6 +85,14 @@ const $api = {
85 85
     },
86 86
   },
87 87
   caseManager: {
88
+    getKeyListById: {
89
+      method: 'get',
90
+      url: `${baseUrl}${common}/case/key`
91
+    },
92
+    bindKey: {
93
+      method: 'post',
94
+      url: `${baseUrl}${common}/case/key/:keyid/:customerid/:customername`
95
+    },
88 96
     getRolesList: { // 获取角色列表
89 97
       method: 'get',
90 98
       url: `${baseUrl}${common}/role`