许成详 6 anos atrás
pai
commit
6147b02dd8

+ 14
- 2
src/pages/system/page.js Ver arquivo

@@ -71,9 +71,11 @@ import editSchedule from './courseManager/scheduleManager/edit' // 新增、编
71 71
 
72 72
 import verificationManager from './verificationManager/index' // 核销管理
73 73
 import qrcodeVerification from './verificationManager/qrcodeVerification/index' // 二维码核销
74
-// import qrcodeVerificationList from './verificationManager/qrcodeVerification/verificationList/index' // 二维码核销列表
74
+import qrcodeVerificationList from './verificationManager/qrcodeVerification/verificationList/index' // 二维码核销列表
75 75
 import phoneVerification from './verificationManager/phoneVerification/index' // 手机核销
76 76
 import phoneVerificationList from './verificationManager/phoneVerification/verificationList/index' // 手机核销列表
77
+import drawVerification from './verificationManager/drawVerification/index' // 抽奖核销
78
+import drawVerificationList from './verificationManager/drawVerification/verificationList/index' // 抽奖核销列表
77 79
 
78 80
 import dataStatistics from './dataStatistics/index' // 数据统计
79 81
 import frontEndUserList from './dataStatistics/frontEndUserList/index' // 课程管理
@@ -428,7 +430,7 @@ export default {
428 430
           children: [{ // 二维码核销列表
429 431
             path: 'qrcodeVerificationList',
430 432
             name: 'qrcodeVerificationList',
431
-            component: phoneVerificationList,
433
+            component: qrcodeVerificationList,
432 434
             children: []
433 435
           }]
434 436
         }, { // 手机核销
@@ -441,6 +443,16 @@ export default {
441 443
             component: phoneVerificationList,
442 444
             children: []
443 445
           }]
446
+        }, { // 抽奖核销
447
+          path: 'drawVerification',
448
+          name: 'drawVerification',
449
+          component: drawVerification,
450
+          children: [{ // 抽奖核销列表
451
+            path: 'drawVerificationList',
452
+            name: 'drawVerificationList',
453
+            component: drawVerificationList,
454
+            children: []
455
+          }]
444 456
         }]
445 457
       }, { // 商品订单系统
446 458
         path: 'newOrder',

+ 74
- 0
src/pages/system/verificationManager/drawVerification/index.vue Ver arquivo

@@ -0,0 +1,74 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="flex-h top">
4
+      <div class="flex-item">
5
+        <div>
6
+          <i class="iconfont icon-qrcode"></i>
7
+          <span>1</span>
8
+          <span>请用户出示核销的二维码</span>
9
+        </div>
10
+      </div>
11
+      <div class="flex-item">
12
+        <div>
13
+          <i class="iconfont icon-saoma"></i>
14
+          <span>2</span>
15
+          <span>点击“立即核销”按钮<br>使用扫码枪扫描客户二维码</span>
16
+        </div>
17
+      </div>
18
+      <div class="flex-item">
19
+        <div>
20
+          <i class="iconfont icon-hexiao"></i>
21
+          <span>3</span>
22
+          <span>根据提示进行核销操作</span>
23
+        </div>
24
+      </div>
25
+    </div>
26
+    <div style="text-align:center;margin-top:40px;">
27
+      <el-button type="danger" round @click="centerDialogVisible = true">立即核销</el-button>
28
+    </div>
29
+    <el-dialog
30
+      title="核销"
31
+      :visible.sync="centerDialogVisible"
32
+      width="500px"
33
+      center>
34
+      <div v-if="centerDialogVisible">
35
+        <el-input
36
+          autofocus
37
+          ref="input"
38
+          placeholder="请输入核销码"
39
+          v-model="verificationCode"
40
+          clearable>
41
+        </el-input>
42
+      </div>
43
+      <span slot="footer" class="dialog-footer">
44
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
45
+        <el-button type="primary" @click="toVerificationList">确 定</el-button>
46
+      </span>
47
+    </el-dialog>
48
+  </div>
49
+</template>
50
+
51
+<script>
52
+export default {
53
+  name: '',
54
+  data () {
55
+    return {
56
+      centerDialogVisible: false, // 显隐核销弹窗
57
+      verificationCode: '', // 核销码
58
+    }
59
+  },
60
+  mounted () {
61
+    this.$nextTick(function () { })
62
+  },
63
+  methods: {
64
+    toVerificationList () { // 定向到核销列表
65
+      this.$router.push({name: 'drawVerificationList', query: {code: this.verificationCode}})
66
+    },
67
+  }
68
+}
69
+</script>
70
+
71
+<!-- Add "scoped" attribute to limit CSS to this component only -->
72
+<style lang="scss" scoped>
73
+@import "page.scss";
74
+</style>

+ 51
- 0
src/pages/system/verificationManager/drawVerification/page.scss Ver arquivo

@@ -0,0 +1,51 @@
1
+
2
+.subPage{
3
+  .top{
4
+    width: 100%;
5
+    position: relative;
6
+    overflow: hidden;
7
+    margin-top: 40px;
8
+    >div{
9
+      >div{
10
+        width: 100%;
11
+        position: relative;
12
+        overflow: hidden;
13
+        text-align: center;
14
+        >span{
15
+          width: 100%;
16
+          display: block;
17
+          text-align: center;
18
+          line-height: 24px;
19
+          font-size: 15px;
20
+          color: #666;
21
+        }
22
+        >i{
23
+          font-size: 30px;
24
+          color: #409EFF;
25
+          display: inline-block;
26
+        }
27
+      }
28
+    }
29
+  }
30
+}
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+

+ 148
- 0
src/pages/system/verificationManager/drawVerification/verificationList/index.vue Ver arquivo

@@ -0,0 +1,148 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="list flex-h">
4
+      <div class="flex-item">
5
+        <div style="text-align:right;margin: 20px 0 0;border:none;">
6
+          <el-button
7
+            size="mini"
8
+            type="warning"
9
+            @click="reback">返回</el-button>
10
+        </div>
11
+        <div v-if="(courses.list||[]).length>0">
12
+          <el-table
13
+              :data="courses.list"
14
+              stripe
15
+              style="width: 100%">
16
+              <el-table-column
17
+                prop="CaseName"
18
+                label="所在案场">
19
+              </el-table-column>
20
+              <el-table-column
21
+                prop="LocationName"
22
+                label="课程分类">
23
+              </el-table-column>
24
+              <el-table-column
25
+                prop="CourseName"
26
+                label="课程名称">
27
+              </el-table-column>
28
+              <el-table-column
29
+                prop="DetailName"
30
+                label="课时名称">
31
+              </el-table-column>
32
+              <el-table-column
33
+                prop="StartDate"
34
+                label="课程开始时间">
35
+                <template slot-scope="scope">
36
+                  <span>{{toolClass.dateFormat(scope.row.StartDate)}}</span>
37
+                </template>
38
+              </el-table-column>
39
+              <el-table-column
40
+                prop="EndDate"
41
+                label="课程结束时间">
42
+                <template slot-scope="scope">
43
+                  <span>{{toolClass.dateFormat(scope.row.EndDate)}}</span>
44
+                </template>
45
+              </el-table-column>
46
+              <el-table-column
47
+                label="操作">
48
+                <template slot-scope="scope">
49
+                  <el-button
50
+                    size="mini"
51
+                    type="success"
52
+                    v-if="scope.row.VerifyStatus!=='used'"
53
+                    @click="check(scope.row)">核销</el-button>
54
+                  <span v-else>已完成</span>
55
+                </template>
56
+              </el-table-column>
57
+            </el-table>
58
+        </div>
59
+        <span class="noData" v-else>今日暂无可核销的课程</span>
60
+      </div>
61
+    </div>
62
+  </div>
63
+</template>
64
+
65
+<script>
66
+import { createNamespacedHelpers } from 'vuex'
67
+
68
+const { mapState: mapVerifState, mapActions: mapVerifActions } = createNamespacedHelpers('verification')
69
+
70
+export default {
71
+  name: '',
72
+  data () {
73
+    return {
74
+      code: '',
75
+    }
76
+  },
77
+  mounted () {
78
+    const { code } = this.$route.query
79
+    this.code = code
80
+    this.$nextTick(function () {
81
+      this.getList()
82
+    })
83
+  },
84
+  computed: {
85
+    ...mapVerifState({
86
+      courses: x => x.courseVerifs
87
+    })
88
+  },
89
+  methods: {
90
+    ...mapVerifActions([
91
+      'GetCourseVerList',
92
+      'CourseVerifs',
93
+    ]),
94
+    check (item) { // 核销
95
+      this.$confirm('确认核销此课程?', '提示', {
96
+        confirmButtonText: '确定',
97
+        cancelButtonText: '取消',
98
+        type: 'warning'
99
+      })
100
+        .then(() => {
101
+          this.CourseVerifs({id: item.CustomerDetailId, callback: this.afterCheck})
102
+        })
103
+    },
104
+    getList () {
105
+      this.GetCourseVerList({id: this.code})
106
+    },
107
+    afterCheck () {
108
+      this.$message({
109
+        type: 'success',
110
+        message: '操作成功!'
111
+      })
112
+      this.getList()
113
+    },
114
+    reback () { // 返回
115
+      this.$router.push({name: 'drawVerificationList'})
116
+    },
117
+  }
118
+}
119
+</script>
120
+
121
+<!-- Add "scoped" attribute to limit CSS to this component only -->
122
+<style lang="scss" scoped>
123
+.subPage {
124
+  .list {
125
+    > div {
126
+      margin: 0 20px;
127
+      > div {
128
+        width: 100%;
129
+        position: relative;
130
+        overflow: hidden;
131
+        box-sizing: border-box;
132
+        border: 1px solid #eee;
133
+        border-bottom: none;
134
+        margin-top: 20px;
135
+      }
136
+    }
137
+  }
138
+  .noData{
139
+    width: 100%;
140
+    display: block;
141
+    line-height: 40px;
142
+    font-size: 30px;
143
+    color: #ccc;
144
+    text-align: center;
145
+    margin: 40px auto 0;
146
+  }
147
+}
148
+</style>

+ 1
- 1
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue Ver arquivo

@@ -142,7 +142,7 @@ export default {
142 142
       this.getList()
143 143
     },
144 144
     reback () { // 返回
145
-      this.$router.push({name: 'qrcodeVerification'})
145
+      this.$router.push({name: 'phoneVerification'})
146 146
     },
147 147
   }
148 148
 }