|
@@ -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>
|