|
@@ -1,8 +1,40 @@
|
|
<!-- -->
|
|
<!-- -->
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
|
|
+ <save-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ class="searchForm"
|
|
|
|
+ save-key="liveClassManager-studentList"
|
|
|
|
+ @submit="search"
|
|
|
|
+ @reset="onReSet"
|
|
|
|
+ :model="searchForm"
|
|
|
|
+ ref="searchForm"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item prop="search">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.trim="searchForm.search"
|
|
|
|
+ clearable
|
|
|
|
+ @keyup.enter.native="
|
|
|
|
+ (e) => {
|
|
|
|
+ e.target.blur();
|
|
|
|
+ $refs.searchForm.save();
|
|
|
|
+ search();
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ placeholder="姓名/编号/手机号"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button @click="search" type="danger">搜索</el-button>
|
|
|
|
+ <el-button type="primary" native-type="reset">重置</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </save-form>
|
|
<div class="tableWrap">
|
|
<div class="tableWrap">
|
|
- <el-table style="width: 100%" :header-cell-style="{ background: '#EDEEF0', color: '#444' }" :data="tableList">
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
|
+ :data="tableList"
|
|
|
|
+ >
|
|
<el-table-column align="center" prop="studentId" label="编号"></el-table-column>
|
|
<el-table-column align="center" prop="studentId" label="编号"></el-table-column>
|
|
<el-table-column align="center" prop="organName" label="分部"></el-table-column>
|
|
<el-table-column align="center" prop="organName" label="分部"></el-table-column>
|
|
<el-table-column align="center" label="学员姓名" prop="studentName">
|
|
<el-table-column align="center" label="学员姓名" prop="studentName">
|
|
@@ -30,40 +62,53 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
<div>
|
|
<auth auths="/liveBlackList">
|
|
<auth auths="/liveBlackList">
|
|
- <el-button type="text" v-if="scope.row.studentStatus == 0 || scope.row.studentStatus == 3
|
|
|
|
- " @click="lookFee(scope)">退学</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ v-if="scope.row.studentStatus == 0 || scope.row.studentStatus == 3"
|
|
|
|
+ @click="lookFee(scope)"
|
|
|
|
+ >退学</el-button
|
|
|
|
+ >
|
|
</auth>
|
|
</auth>
|
|
|
|
|
|
<el-button type="text" @click="onDetail(scope.row)">查看订单</el-button>
|
|
<el-button type="text" @click="onDetail(scope.row)">查看订单</el-button>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <pagination sync saveKey="liveClass-courseOverview" :total.sync="rules.total" :page.sync="rules.page"
|
|
|
|
- :limit.sync="rules.limit" :page-sizes="rules.page_size" @pagination="getStudents" />
|
|
|
|
|
|
+ <pagination
|
|
|
|
+ sync
|
|
|
|
+ saveKey="liveClassManager-studentList"
|
|
|
|
+ :total.sync="rules.total"
|
|
|
|
+ :page.sync="rules.page"
|
|
|
|
+ :limit.sync="rules.limit"
|
|
|
|
+ :page-sizes="rules.page_size"
|
|
|
|
+ @pagination="getStudents"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { liveStudentList, leaveSchool, getStudentSurplusCourseFee } from '../../api';
|
|
|
|
|
|
+import { liveStudentList, leaveSchool, getStudentSurplusCourseFee } from "../../api";
|
|
import pagination from "@/components/Pagination/index";
|
|
import pagination from "@/components/Pagination/index";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
- pagination
|
|
|
|
|
|
+ pagination,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
id: this.$route.query.id,
|
|
id: this.$route.query.id,
|
|
tableList: [],
|
|
tableList: [],
|
|
|
|
+ searchForm: {
|
|
|
|
+ search: "",
|
|
|
|
+ },
|
|
rules: {
|
|
rules: {
|
|
// 分页规则
|
|
// 分页规则
|
|
limit: 10, // 限制显示条数
|
|
limit: 10, // 限制显示条数
|
|
page: 1, // 当前页
|
|
page: 1, // 当前页
|
|
total: 0, // 总条数
|
|
total: 0, // 总条数
|
|
- page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
|
- }
|
|
|
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -71,23 +116,32 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
onDetail(row) {
|
|
onDetail(row) {
|
|
- console.log(row, '111')
|
|
|
|
|
|
+ console.log(row, "111");
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- path: '/orderManager/income',
|
|
|
|
|
|
+ path: "/orderManager/income",
|
|
query: {
|
|
query: {
|
|
- orderNo: row.orderNo
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ orderNo: row.orderNo,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ search() {
|
|
|
|
+ this.rules.page = 1;
|
|
|
|
+ this.getStudents();
|
|
|
|
+ },
|
|
|
|
+ onReSet() {
|
|
|
|
+ this.$refs.searchForm.resetFields();
|
|
|
|
+ (this.searchForm.id = this.$route.query.id), this.search();
|
|
},
|
|
},
|
|
async getStudents() {
|
|
async getStudents() {
|
|
try {
|
|
try {
|
|
const { data } = await liveStudentList({
|
|
const { data } = await liveStudentList({
|
|
liveGroupId: this.id,
|
|
liveGroupId: this.id,
|
|
page: this.rules.page,
|
|
page: this.rules.page,
|
|
- rows: this.rules.limit
|
|
|
|
- })
|
|
|
|
- console.log(data, 'data')
|
|
|
|
- this.tableList = data.rows
|
|
|
|
|
|
+ rows: this.rules.limit,
|
|
|
|
+ ...this.searchForm,
|
|
|
|
+ });
|
|
|
|
+ console.log(data, "data");
|
|
|
|
+ this.tableList = data.rows;
|
|
for (let i in this.tableList) {
|
|
for (let i in this.tableList) {
|
|
this.tableList[i].fee = 0;
|
|
this.tableList[i].fee = 0;
|
|
this.tableList[i].visible = false;
|
|
this.tableList[i].visible = false;
|
|
@@ -101,7 +155,7 @@ export default {
|
|
let studentId = scope.row.studentId;
|
|
let studentId = scope.row.studentId;
|
|
let vipGroupId = this.id;
|
|
let vipGroupId = this.id;
|
|
let amount = scope.row.fee;
|
|
let amount = scope.row.fee;
|
|
- await leaveSchool({ studentId, vipGroupId, amount }).then(res => {
|
|
|
|
|
|
+ await leaveSchool({ studentId, vipGroupId, amount }).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message.success("退学成功");
|
|
this.$message.success("退学成功");
|
|
this.getStudents();
|
|
this.getStudents();
|
|
@@ -109,14 +163,14 @@ export default {
|
|
if (res.code == 206) {
|
|
if (res.code == 206) {
|
|
this.$confirm(res.msg, "提示", {
|
|
this.$confirm(res.msg, "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
- cancelButtonText: "取消"
|
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
}).then(() => {
|
|
}).then(() => {
|
|
leaveSchool({
|
|
leaveSchool({
|
|
studentId,
|
|
studentId,
|
|
vipGroupId,
|
|
vipGroupId,
|
|
amount,
|
|
amount,
|
|
- confirmReturnActivityGive: true
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
+ confirmReturnActivityGive: true,
|
|
|
|
+ }).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message.success("退学成功");
|
|
this.$message.success("退学成功");
|
|
this.getStudents();
|
|
this.getStudents();
|
|
@@ -127,12 +181,16 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
lookFee(scope) {
|
|
lookFee(scope) {
|
|
- this.$confirm(`是否确认将该学员退学?<p style="color: red;marginTop:20px">如需退款请在OA中操作</p>`, "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
|
- type: "warning"
|
|
|
|
- })
|
|
|
|
|
|
+ this.$confirm(
|
|
|
|
+ `是否确认将该学员退学?<p style="color: red;marginTop:20px">如需退款请在OA中操作</p>`,
|
|
|
|
+ "提示",
|
|
|
|
+ {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ type: "warning",
|
|
|
|
+ }
|
|
|
|
+ )
|
|
.then(async () => {
|
|
.then(async () => {
|
|
let id = scope.row.studentId;
|
|
let id = scope.row.studentId;
|
|
if (scope.row.studentStatus == 3) {
|
|
if (scope.row.studentStatus == 3) {
|
|
@@ -140,15 +198,15 @@ export default {
|
|
} else {
|
|
} else {
|
|
const { data } = await getStudentSurplusCourseFee({
|
|
const { data } = await getStudentSurplusCourseFee({
|
|
studentId: id,
|
|
studentId: id,
|
|
- vipGroupId: this.id
|
|
|
|
- })
|
|
|
|
|
|
+ vipGroupId: this.id,
|
|
|
|
+ });
|
|
scope.row.fee = data.suplusCourseFee;
|
|
scope.row.fee = data.suplusCourseFee;
|
|
this.leaveSchool(scope);
|
|
this.leaveSchool(scope);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- .catch(() => { });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|