|
@@ -17,7 +17,7 @@
|
|
|
@submit="search"
|
|
|
@reset="onReSet"
|
|
|
>
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item prop="search">
|
|
|
<el-input
|
|
|
class="search"
|
|
|
v-model.trim="searchForm.search"
|
|
@@ -56,34 +56,89 @@
|
|
|
>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="organName"
|
|
|
label="分部"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="userId"
|
|
|
label="学员编号"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="username"
|
|
|
label="学员姓名"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="phone"
|
|
|
label="手机号"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
+ v-if="courseType&&courseType == 'VIP'"
|
|
|
align="center"
|
|
|
prop="studentId"
|
|
|
label="付费课已使用/剩余资格"
|
|
|
- ></el-table-column>
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.userId">
|
|
|
+ {{ scope.row.useVipNum+'' + "/" + scope.row.freeVipNum+'' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
+ v-else
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="付费课已使用/剩余资格"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.userId">
|
|
|
+ {{ scope.row.usePracticeNum+'' + "/" + scope.row.freePracticeNum+'' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ v-if="giveCourseType == 'VIP'"
|
|
|
align="center"
|
|
|
prop="studentId"
|
|
|
label="赠课已使用/剩余资格"
|
|
|
- ></el-table-column>
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.userId">
|
|
|
+ {{ scope.row.useGiveVipNum+'' + "/" + scope.row.freeGiveVipNum+'' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="giveCourseType == 'PRACTICE'"
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="赠课已使用/剩余资格"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <div v-if="scope.row.userId">
|
|
|
+ {{
|
|
|
+ scope.row.useGivePracticeNum+'' +
|
|
|
+ "/" +
|
|
|
+ scope.row.freeGivePracticeNum+''
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="giveCourseType!='PRACTICE'&&giveCourseType!='VIP'"
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="赠课已使用/剩余资格"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.userId">
|
|
|
+ {{ "--" + "/" + "--" }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -135,12 +190,8 @@
|
|
|
>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="减少资格"
|
|
|
- :visible.sync="reduceVisible"
|
|
|
- width="1000px"
|
|
|
- >
|
|
|
- <reduceSenior />
|
|
|
+ <el-dialog title="减少资格" :visible.sync="reduceVisible" width="1000px">
|
|
|
+ <reduceSenior />
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<!-- <el-button @click="addStudentVisible = false">取 消</el-button> -->
|
|
|
<el-button type="primary" @click="reduceVisible = false"
|
|
@@ -156,7 +207,10 @@ import axios from "axios";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
-import { getVipGroupActivity } from "@/api/vipSeting";
|
|
|
+import {
|
|
|
+ getVipGroupActivity,
|
|
|
+ getActivityUserMapperList,
|
|
|
+} from "@/api/vipSeting";
|
|
|
import addSenior from "./modals/addSenior.vue";
|
|
|
import reduceSenior from "./modals/reduceSenior.vue";
|
|
|
import addStudentSenior from "./modals/addStudentSenior.vue";
|
|
@@ -174,7 +228,9 @@ export default {
|
|
|
hasGive: false,
|
|
|
addStudentVisible: false,
|
|
|
addSeniorVisible: false,
|
|
|
- reduceVisible:false,
|
|
|
+ reduceVisible: false,
|
|
|
+ courseType: "",
|
|
|
+ giveCourseType: "",
|
|
|
rules: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -206,8 +262,22 @@ export default {
|
|
|
console.log(e);
|
|
|
}
|
|
|
}
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ const res = await getActivityUserMapperList({
|
|
|
+ ...this.searchForm,
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ activityId: this.$route.query.id,
|
|
|
+ });
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ this.rules.total = res.data.total;
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
},
|
|
|
- getList() {},
|
|
|
search() {
|
|
|
this.rules.page = 1;
|
|
|
this.getList();
|
|
@@ -234,14 +304,16 @@ export default {
|
|
|
this.hasGive = Boolean(
|
|
|
data.giveCourseType && data.giveCourseType != "MEMBER"
|
|
|
);
|
|
|
- console.log(this.hasGive);
|
|
|
+ this.courseType = data.courseType;
|
|
|
+ this.giveCourseType = data.giveCourseType;
|
|
|
+ console.log( this.courseType , this.giveCourseType )
|
|
|
// selects.branchs
|
|
|
},
|
|
|
addCount() {
|
|
|
this.addSeniorVisible = true;
|
|
|
},
|
|
|
reduceCount() {
|
|
|
- this.reduceVisible = true
|
|
|
+ this.reduceVisible = true;
|
|
|
},
|
|
|
addStudent() {
|
|
|
this.addStudentVisible = true;
|