|
@@ -8,9 +8,9 @@
|
8
|
8
|
type="warning"
|
9
|
9
|
@click="reback">返回</el-button>
|
10
|
10
|
</div>
|
11
|
|
- <div v-if="(courses.list||[]).length>0">
|
|
11
|
+ <div>
|
12
|
12
|
<el-table
|
13
|
|
- :data="courses.list"
|
|
13
|
+ :data="info"
|
14
|
14
|
stripe
|
15
|
15
|
style="width: 100%">
|
16
|
16
|
<el-table-column
|
|
@@ -18,29 +18,38 @@
|
18
|
18
|
label="所在案场">
|
19
|
19
|
</el-table-column>
|
20
|
20
|
<el-table-column
|
21
|
|
- prop="LocationName"
|
22
|
|
- label="课程分类">
|
|
21
|
+ prop="PrizeName"
|
|
22
|
+ label="奖品名称">
|
23
|
23
|
</el-table-column>
|
24
|
24
|
<el-table-column
|
25
|
|
- prop="CourseName"
|
26
|
|
- label="课程名称">
|
|
25
|
+ prop="Name"
|
|
26
|
+ label="姓名">
|
27
|
27
|
</el-table-column>
|
28
|
28
|
<el-table-column
|
29
|
|
- prop="DetailName"
|
30
|
|
- label="课时名称">
|
|
29
|
+ prop="CustomerName"
|
|
30
|
+ label="微信昵称">
|
31
|
31
|
</el-table-column>
|
32
|
32
|
<el-table-column
|
33
|
|
- prop="StartDate"
|
34
|
|
- label="课程开始时间">
|
|
33
|
+ prop="Phone"
|
|
34
|
+ label="手机号">
|
|
35
|
+ </el-table-column>
|
|
36
|
+ <el-table-column
|
|
37
|
+ prop="ActivitName"
|
|
38
|
+ label="活动名称">
|
|
39
|
+ </el-table-column>
|
|
40
|
+ <el-table-column
|
|
41
|
+ prop="CreateDate"
|
|
42
|
+ label="获取时间"
|
|
43
|
+ width="140px">
|
35
|
44
|
<template slot-scope="scope">
|
36
|
|
- <span>{{toolClass.dateFormat(scope.row.StartDate)}}</span>
|
|
45
|
+ {{toolClass.dateFormat(scope.row.CreateDate)}}
|
37
|
46
|
</template>
|
38
|
47
|
</el-table-column>
|
39
|
48
|
<el-table-column
|
40
|
|
- prop="EndDate"
|
41
|
|
- label="课程结束时间">
|
|
49
|
+ prop="Status"
|
|
50
|
+ label="状态">
|
42
|
51
|
<template slot-scope="scope">
|
43
|
|
- <span>{{toolClass.dateFormat(scope.row.EndDate)}}</span>
|
|
52
|
+ {{scope.row.Status === 0 ? '未核销' : '已核销'}}
|
44
|
53
|
</template>
|
45
|
54
|
</el-table-column>
|
46
|
55
|
<el-table-column
|
|
@@ -49,14 +58,14 @@
|
49
|
58
|
<el-button
|
50
|
59
|
size="mini"
|
51
|
60
|
type="success"
|
52
|
|
- v-if="scope.row.VerifyStatus!=='used'"
|
|
61
|
+ v-if="scope.row.Status === 0"
|
53
|
62
|
@click="check(scope.row)">核销</el-button>
|
54
|
|
- <span v-else>已完成</span>
|
|
63
|
+ <span v-else>已核销</span>
|
55
|
64
|
</template>
|
56
|
65
|
</el-table-column>
|
57
|
66
|
</el-table>
|
58
|
67
|
</div>
|
59
|
|
- <span class="noData" v-else>今日暂无可核销的课程</span>
|
|
68
|
+ <span class="noData" v-if="!info.length && ajaxOff">今日暂无可核销的课程</span>
|
60
|
69
|
</div>
|
61
|
70
|
</div>
|
62
|
71
|
</div>
|
|
@@ -65,44 +74,55 @@
|
65
|
74
|
<script>
|
66
|
75
|
import { createNamespacedHelpers } from 'vuex'
|
67
|
76
|
|
68
|
|
-const { mapState: mapVerifState, mapActions: mapVerifActions } = createNamespacedHelpers('verification')
|
|
77
|
+const { mapActions: mapVerifActions } = createNamespacedHelpers('verification')
|
69
|
78
|
|
70
|
79
|
export default {
|
71
|
80
|
name: '',
|
72
|
81
|
data () {
|
73
|
82
|
return {
|
74
|
|
- code: '',
|
|
83
|
+ ajaxOff: false,
|
|
84
|
+ info: [],
|
75
|
85
|
}
|
76
|
86
|
},
|
77
|
87
|
mounted () {
|
78
|
|
- const { code } = this.$route.query
|
79
|
|
- this.code = code
|
80
|
88
|
this.$nextTick(function () {
|
81
|
|
- this.getList()
|
|
89
|
+ this.drawVerifyList({
|
|
90
|
+ id: this.$route.query.code
|
|
91
|
+ }).then((res) => {
|
|
92
|
+ // console.log(JSON.stringify(res))
|
|
93
|
+ if (res !== null) {
|
|
94
|
+ this.info.push(res)
|
|
95
|
+ }
|
|
96
|
+ this.ajaxOff = true
|
|
97
|
+ })
|
82
|
98
|
})
|
83
|
99
|
},
|
84
|
100
|
computed: {
|
85
|
|
- ...mapVerifState({
|
86
|
|
- courses: x => x.courseVerifs
|
87
|
|
- })
|
88
|
101
|
},
|
89
|
102
|
methods: {
|
90
|
103
|
...mapVerifActions([
|
91
|
|
- 'GetCourseVerList',
|
92
|
|
- 'CourseVerifs',
|
|
104
|
+ 'drawVerify',
|
|
105
|
+ 'drawVerifyList',
|
93
|
106
|
]),
|
94
|
107
|
check (item) { // 核销
|
95
|
|
- this.$confirm('确认核销此课程?', '提示', {
|
|
108
|
+ this.$confirm('确认核销此卡?', '提示', {
|
96
|
109
|
confirmButtonText: '确定',
|
97
|
110
|
cancelButtonText: '取消',
|
98
|
111
|
type: 'warning'
|
99
|
|
- })
|
100
|
|
- .then(() => {
|
101
|
|
- this.CourseVerifs({id: item.CustomerDetailId, callback: this.afterCheck})
|
|
112
|
+ }).then(() => {
|
|
113
|
+ this.drawVerify({
|
|
114
|
+ id: this.$route.query.code
|
|
115
|
+ }).then((res) => {
|
|
116
|
+ this.$message({
|
|
117
|
+ type: 'success',
|
|
118
|
+ message: '操作成功!'
|
|
119
|
+ })
|
|
120
|
+ this.$router.push({ name: 'drawVerification' })
|
102
|
121
|
})
|
|
122
|
+ })
|
103
|
123
|
},
|
104
|
124
|
getList () {
|
105
|
|
- this.GetCourseVerList({id: this.code})
|
|
125
|
+ // 1
|
106
|
126
|
},
|
107
|
127
|
afterCheck () {
|
108
|
128
|
this.$message({
|
|
@@ -112,7 +132,7 @@ export default {
|
112
|
132
|
this.getList()
|
113
|
133
|
},
|
114
|
134
|
reback () { // 返回
|
115
|
|
- this.$router.push({name: 'drawVerificationList'})
|
|
135
|
+ this.$router.push({ name: 'drawVerificationList' })
|
116
|
136
|
},
|
117
|
137
|
}
|
118
|
138
|
}
|
|
@@ -135,7 +155,7 @@ export default {
|
135
|
155
|
}
|
136
|
156
|
}
|
137
|
157
|
}
|
138
|
|
- .noData{
|
|
158
|
+ .noData {
|
139
|
159
|
width: 100%;
|
140
|
160
|
display: block;
|
141
|
161
|
line-height: 40px;
|