|
@@ -5,13 +5,22 @@
|
|
|
</h2>
|
|
|
<div class="newBand" v-permission="'/buildVip'" @click="gotoBuildVip">新建VIP课</div>
|
|
|
<div class="newBand" v-permission="'export/vipGroupList'" @click="onVIPCourseExport">导出VIP课</div>
|
|
|
- <div class="newBand" v-permission="'export/vipGroup'" @click="onStudentExport" style="width: 120px;">VIP课程续费提醒</div>
|
|
|
+ <div
|
|
|
+ class="newBand"
|
|
|
+ v-permission="'export/vipGroup'"
|
|
|
+ @click="onStudentExport"
|
|
|
+ style="width: 120px;"
|
|
|
+ >VIP课程续费提醒</div>
|
|
|
<div class="m-core">
|
|
|
<!-- 搜索类型 -->
|
|
|
<el-form :inline="true" class="searchForm" v-model.trim="searchForm">
|
|
|
<!-- 状态 指导老师 活动方案-->
|
|
|
<el-form-item>
|
|
|
- <el-input v-model.trim="searchForm.search" @keyup.enter.native="search" placeholder="课程名称"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="searchForm.search"
|
|
|
+ @keyup.enter.native="search"
|
|
|
+ placeholder="课程名称"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="orgin">
|
|
|
<el-select
|
|
@@ -67,7 +76,7 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="status">
|
|
|
+ <el-form-item prop="status">
|
|
|
<el-select
|
|
|
class="multiple"
|
|
|
v-model.trim="searchForm.hasEducationalTeacherId"
|
|
@@ -76,7 +85,7 @@
|
|
|
placeholder="是否有教务老师"
|
|
|
>
|
|
|
<el-option label="是" value="true"></el-option>
|
|
|
- <el-option label="否" value="false"></el-option>
|
|
|
+ <el-option label="否" value="false"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -122,6 +131,13 @@
|
|
|
<el-table-column align="center" label="月均消耗">
|
|
|
<template slot-scope="scope">{{ scope.row.monthConsumeRate }}%</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column align="center" prop="createTime" label="上次课时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <p>{{scope.row.lastOverTime | formatterTime}}</p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" prop="paymentExpireDate" label="开课时间">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -209,7 +225,7 @@ import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
import store from "@/store";
|
|
|
import axios from "axios";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
-import load from '@/utils/loading'
|
|
|
+import load from "@/utils/loading";
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
name: "vipList",
|
|
@@ -222,7 +238,7 @@ export default {
|
|
|
search: null,
|
|
|
orgin: null,
|
|
|
status: null,
|
|
|
- hasEducationalTeacherId:null
|
|
|
+ hasEducationalTeacherId: null
|
|
|
},
|
|
|
teacherList: [],
|
|
|
activeList: [],
|
|
@@ -256,11 +272,10 @@ export default {
|
|
|
this.$route.query.rules instanceof Object
|
|
|
? (this.rules = this.$route.query.rules)
|
|
|
: (this.rules = JSON.parse(this.$route.query.rules));
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.init();
|
|
|
+ this.init();
|
|
|
},
|
|
|
activated() {
|
|
|
this.init();
|
|
@@ -302,23 +317,21 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
getList() {
|
|
|
-
|
|
|
- let params = this.searchForm;
|
|
|
- params.page = this.rules.page;
|
|
|
- params.rows = this.rules.limit;
|
|
|
- params.hasEducationalTeacherId = this.searchForm.hasEducationalTeacherId || null
|
|
|
- params.organId = this.searchForm.orgin || null;
|
|
|
- params.status = this.searchForm.status || null;
|
|
|
- getVipList(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.tableData= []
|
|
|
- setTimeout(() => {
|
|
|
- this.tableData = res.data.rows;
|
|
|
- }, 50);
|
|
|
- this.rules.total = res.data.total;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ let params = this.searchForm;
|
|
|
+ params.page = this.rules.page;
|
|
|
+ params.rows = this.rules.limit;
|
|
|
+ params.hasEducationalTeacherId =
|
|
|
+ this.searchForm.hasEducationalTeacherId || null;
|
|
|
+ params.organId = this.searchForm.orgin || null;
|
|
|
+ params.status = this.searchForm.status || null;
|
|
|
+ getVipList(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.tableData = [];
|
|
|
+ setTimeout(() => {
|
|
|
+ this.tableData = res.data.rows;
|
|
|
+ }, 50);
|
|
|
+ this.rules.total = res.data.total;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
// 跳转到vip详情
|
|
@@ -376,37 +389,41 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
- }).then(() => {
|
|
|
- load.startLoading()
|
|
|
- axios(options).then(res => {
|
|
|
- let blob = new Blob([res.data], {
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- });
|
|
|
-
|
|
|
- let text = (new Response(blob)).text()
|
|
|
- text.then(res => {
|
|
|
- // 判断是否报错
|
|
|
- if(res.indexOf('code') != -1) {
|
|
|
- let json = JSON.parse(res)
|
|
|
- this.$message.error(json.msg)
|
|
|
- } else {
|
|
|
- let objectUrl = URL.createObjectURL(blob);
|
|
|
- let link = document.createElement("a");
|
|
|
- let fname = "VIP列表" + new Date().getTime(); //下载文件的名字
|
|
|
- link.href = objectUrl;
|
|
|
- link.setAttribute("download", fname);
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- }
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ load.startLoading();
|
|
|
+ axios(options)
|
|
|
+ .then(res => {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
+ //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ });
|
|
|
+
|
|
|
+ let text = new Response(blob).text();
|
|
|
+ text.then(res => {
|
|
|
+ // 判断是否报错
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
+ let json = JSON.parse(res);
|
|
|
+ this.$message.error(json.msg);
|
|
|
+ } else {
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let fname = "VIP列表" + new Date().getTime(); //下载文件的名字
|
|
|
+ link.href = objectUrl;
|
|
|
+ link.setAttribute("download", fname);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ load.endLoading();
|
|
|
})
|
|
|
- load.endLoading();
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error('导出数据失败,请连接管理员');
|
|
|
- load.endLoading();
|
|
|
- });
|
|
|
- }).catch(() => {});
|
|
|
+ .catch(error => {
|
|
|
+ this.$message.error("导出数据失败,请连接管理员");
|
|
|
+ load.endLoading();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
onStudentExport() {
|
|
|
// 导出VIP课
|
|
@@ -434,46 +451,49 @@ export default {
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- load.startLoading()
|
|
|
- axios(options).then(res => {
|
|
|
- let blob = new Blob([res.data], {
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- });
|
|
|
-
|
|
|
- let text = (new Response(blob)).text()
|
|
|
- text.then(res => {
|
|
|
- // 判断是否报错
|
|
|
- if(res.indexOf('code') != -1) {
|
|
|
- let json = JSON.parse(res)
|
|
|
- this.$message.error(json.msg)
|
|
|
- } else {
|
|
|
- let objectUrl = URL.createObjectURL(blob);
|
|
|
- let link = document.createElement("a");
|
|
|
- let fname = "VIP课程续费提醒" + new Date().getTime(); //下载文件的名字
|
|
|
- link.href = objectUrl;
|
|
|
- link.setAttribute("download", fname);
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- }
|
|
|
+ load.startLoading();
|
|
|
+ axios(options)
|
|
|
+ .then(res => {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
+ //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ });
|
|
|
+
|
|
|
+ let text = new Response(blob).text();
|
|
|
+ text.then(res => {
|
|
|
+ // 判断是否报错
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
+ let json = JSON.parse(res);
|
|
|
+ this.$message.error(json.msg);
|
|
|
+ } else {
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let fname = "VIP课程续费提醒" + new Date().getTime(); //下载文件的名字
|
|
|
+ link.href = objectUrl;
|
|
|
+ link.setAttribute("download", fname);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ load.endLoading();
|
|
|
})
|
|
|
- load.endLoading();
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error('导出数据失败,请连接管理员');
|
|
|
- load.endLoading();
|
|
|
- });
|
|
|
- }).catch(() => {});
|
|
|
+ .catch(error => {
|
|
|
+ this.$message.error("导出数据失败,请连接管理员");
|
|
|
+ load.endLoading();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
// 修改vip
|
|
|
resetVip(row) {
|
|
|
- let id = row.id;
|
|
|
+ let id = row.id;
|
|
|
let educationalTeacherId = row.educationalTeacherId;
|
|
|
let rules = JSON.stringify(this.rules);
|
|
|
let searchForm = JSON.stringify(this.searchForm);
|
|
|
this.$router.push({
|
|
|
path: "/business/vipReset",
|
|
|
- query: { id,educationalTeacherId, rules, searchForm }
|
|
|
+ query: { id, educationalTeacherId, rules, searchForm }
|
|
|
});
|
|
|
}
|
|
|
},
|