|
@@ -6,9 +6,9 @@
|
6
|
6
|
<div class="flex-item">
|
7
|
7
|
<div class="userInfo">
|
8
|
8
|
<span>用户名:</span>
|
9
|
|
- <b>某某某</b>
|
|
9
|
+ <b>{{(courses.customerInfo || {}).Name || (courses.customerInfo || {}).CustomerName }}</b>
|
10
|
10
|
<span>手机号:</span>
|
11
|
|
- <b>{{phone}}</b>
|
|
11
|
+ <b>{{(courses.customerInfo || {}).Phone}}</b>
|
12
|
12
|
</div>
|
13
|
13
|
</div>
|
14
|
14
|
<el-button
|
|
@@ -16,9 +16,9 @@
|
16
|
16
|
type="warning"
|
17
|
17
|
@click="reback">返回</el-button>
|
18
|
18
|
</div>
|
19
|
|
- <div>
|
|
19
|
+ <div v-if="(courses.list||[]).length>0">
|
20
|
20
|
<el-table
|
21
|
|
- :data="coursesList"
|
|
21
|
+ :data="courses.list"
|
22
|
22
|
stripe
|
23
|
23
|
style="width: 100%">
|
24
|
24
|
<el-table-column
|
|
@@ -26,8 +26,8 @@
|
26
|
26
|
label="所在案场">
|
27
|
27
|
</el-table-column>
|
28
|
28
|
<el-table-column
|
29
|
|
- prop="LocationId"
|
30
|
|
- label="课程类别">
|
|
29
|
+ prop="LocationName"
|
|
30
|
+ label="课程分类">
|
31
|
31
|
</el-table-column>
|
32
|
32
|
<el-table-column
|
33
|
33
|
prop="CourseName"
|
|
@@ -38,12 +38,18 @@
|
38
|
38
|
label="课时名称">
|
39
|
39
|
</el-table-column>
|
40
|
40
|
<el-table-column
|
41
|
|
- prop="BeginDate"
|
|
41
|
+ prop="StartDate"
|
42
|
42
|
label="课程开始时间">
|
|
43
|
+ <template slot-scope="scope">
|
|
44
|
+ <span>{{toolClass.dateFormat(scope.row.StartDate)}}</span>
|
|
45
|
+ </template>
|
43
|
46
|
</el-table-column>
|
44
|
47
|
<el-table-column
|
45
|
48
|
prop="EndDate"
|
46
|
49
|
label="课程结束时间">
|
|
50
|
+ <template slot-scope="scope">
|
|
51
|
+ <span>{{toolClass.dateFormat(scope.row.EndDate)}}</span>
|
|
52
|
+ </template>
|
47
|
53
|
</el-table-column>
|
48
|
54
|
<el-table-column
|
49
|
55
|
label="操作">
|
|
@@ -51,55 +57,92 @@
|
51
|
57
|
<el-button
|
52
|
58
|
size="mini"
|
53
|
59
|
type="success"
|
|
60
|
+ v-if="scope.row.VerifyStatus!=='used'"
|
54
|
61
|
@click="check(scope.row)">核销</el-button>
|
|
62
|
+ <span>已完成</span>
|
55
|
63
|
</template>
|
56
|
64
|
</el-table-column>
|
57
|
65
|
</el-table>
|
|
66
|
+ <el-pagination
|
|
67
|
+ @current-change="handleCurrentChange"
|
|
68
|
+ :current-page.sync="courses.page"
|
|
69
|
+ :page-size="courses.pagesize"
|
|
70
|
+ layout="prev, pager, next, jumper"
|
|
71
|
+ :total="courses.pagenum">
|
|
72
|
+ </el-pagination>
|
58
|
73
|
</div>
|
59
|
|
- <span class="noData">今日暂无可核销的课程</span>
|
|
74
|
+ <span class="noData" v-else>今日暂无可核销的课程</span>
|
60
|
75
|
</div>
|
61
|
76
|
</div>
|
62
|
|
- <el-dialog
|
63
|
|
- title="提示"
|
64
|
|
- :visible.sync="centerDialogVisible"
|
65
|
|
- width="300px"
|
66
|
|
- center>
|
67
|
|
- <span style="width:100%;display:block;text-align:center;margin:20px 0;">确认核销此课程?</span>
|
68
|
|
- <span slot="footer" class="dialog-footer">
|
69
|
|
- <el-button @click="centerDialogVisible = false">取 消</el-button>
|
70
|
|
- <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
|
71
|
|
- </span>
|
72
|
|
- </el-dialog>
|
73
|
77
|
</div>
|
74
|
78
|
</template>
|
75
|
79
|
|
76
|
80
|
<script>
|
|
81
|
+import { createNamespacedHelpers } from 'vuex'
|
|
82
|
+
|
|
83
|
+const { mapState: mapVerifState, mapActions: mapVerifActions } = createNamespacedHelpers('verification')
|
77
|
84
|
|
78
|
85
|
export default {
|
79
|
86
|
name: '',
|
80
|
87
|
data () {
|
81
|
88
|
return {
|
82
|
|
- phone: this.$route.query.code,
|
83
|
|
- centerDialogVisible: false,
|
84
|
|
- coursesList: [{
|
85
|
|
- CaseName: 'xxx',
|
86
|
|
- LocationId: 'xxx',
|
87
|
|
- CourseName: 'xxx',
|
88
|
|
- DetailName: 'xxx',
|
89
|
|
- BeginDate: 'xxx',
|
90
|
|
- EndDate: 'xxx',
|
91
|
|
- }],
|
|
89
|
+ code: '',
|
|
90
|
+ tel: '',
|
|
91
|
+ page: 1,
|
|
92
|
+ pagesize: 10,
|
92
|
93
|
}
|
93
|
94
|
},
|
94
|
95
|
mounted () {
|
95
|
|
- this.$nextTick(function () { })
|
|
96
|
+ const { code, tel } = this.$route.query
|
|
97
|
+ this.code = code
|
|
98
|
+ this.tel = tel
|
|
99
|
+ this.$nextTick(function () {
|
|
100
|
+ this.getList()
|
|
101
|
+ })
|
|
102
|
+ },
|
|
103
|
+ computed: {
|
|
104
|
+ ...mapVerifState({
|
|
105
|
+ courses: x => x.courseVerifs
|
|
106
|
+ })
|
96
|
107
|
},
|
97
|
108
|
methods: {
|
|
109
|
+ ...mapVerifActions([
|
|
110
|
+ 'GetCourseVerList',
|
|
111
|
+ 'CourseVerifs',
|
|
112
|
+ 'GetCourseVerListByTel',
|
|
113
|
+ ]),
|
98
|
114
|
check (item) { // 核销
|
99
|
|
- this.centerDialogVisible = true
|
|
115
|
+ this.$confirm('确认核销此课程?', '提示', {
|
|
116
|
+ confirmButtonText: '确定',
|
|
117
|
+ cancelButtonText: '取消',
|
|
118
|
+ type: 'warning'
|
|
119
|
+ })
|
|
120
|
+ .then(() => {
|
|
121
|
+ this.CourseVerifs({id: item.CustomerDetailId, callback: this.afterCheck})
|
|
122
|
+ })
|
|
123
|
+ },
|
|
124
|
+ getList () {
|
|
125
|
+ if (this.code && this.code !== '') {
|
|
126
|
+ this.GetCourseVerList({id: this.code, page: this.page, pagesize: this.pagesize})
|
|
127
|
+ } else {
|
|
128
|
+ if (this.tel && this.tel !== '') {
|
|
129
|
+ this.GetCourseVerListByTel({tel: this.tel, page: this.page, pagesize: this.pagesize})
|
|
130
|
+ }
|
|
131
|
+ }
|
|
132
|
+ },
|
|
133
|
+ handleCurrentChange (val) { // 跳转到分页
|
|
134
|
+ this.page = val
|
|
135
|
+ this.getList()
|
|
136
|
+ },
|
|
137
|
+ afterCheck () {
|
|
138
|
+ this.$message({
|
|
139
|
+ type: 'success',
|
|
140
|
+ message: '操作成功!'
|
|
141
|
+ })
|
|
142
|
+ this.getList()
|
100
|
143
|
},
|
101
|
144
|
reback () { // 返回
|
102
|
|
- this.$router.push({name: 'phoneVerification'})
|
|
145
|
+ this.$router.push({name: 'qrcodeVerification'})
|
103
|
146
|
},
|
104
|
147
|
}
|
105
|
148
|
}
|