|
@@ -15,7 +15,7 @@
|
|
|
v-permission="'vipGroupManage/updateVipBaseInfo'"
|
|
|
@click="addrVisible = true"
|
|
|
>修改教学点</div>
|
|
|
- <div
|
|
|
+ <div
|
|
|
class="newBand"
|
|
|
v-permission="{parent:'/vipReset',child:'employee/findEducationUsers'}"
|
|
|
@click="educationalVisible = true"
|
|
@@ -44,7 +44,7 @@
|
|
|
<div>{{ scope.row.status | coursesStatus }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="是否点名" align="center">
|
|
|
+ <el-table-column label="是否点名" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<div>{{scope.row.isCallNames?'已点名':'未点名'}}</div>
|
|
|
</template>
|
|
@@ -62,10 +62,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="教学点" align="center" prop="schoolName">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- {{scope.row.schoolName?scope.row.schoolName:'网络教室'}}
|
|
|
- </div>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{scope.row.schoolName?scope.row.schoolName:'网络教室'}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="180" align="center">
|
|
@@ -73,22 +71,22 @@
|
|
|
<div>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
- v-permission="{parent:'/vipReset',child:'courseSchedule/classStartDateAdjust'}"
|
|
|
+ v-permission="{parent:'/vipReset',child:'courseSchedule/classStartDateAdjust'}"
|
|
|
v-if="!scope.row.isSettlement"
|
|
|
@click="resetClass(scope.row)"
|
|
|
>调整</el-button>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-permission="{parent:'/vipReset',child:'courseSchedule/batchDelete'}"
|
|
|
- v-if="!scope.row.isSettlement&&scope.row.status != 'OVER'"
|
|
|
+ v-if="!scope.row.isSettlement&&scope.row.status != 'OVER'"
|
|
|
@click="removeClass(scope.row)"
|
|
|
>删除</el-button>
|
|
|
<!-- -->
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
type="text"
|
|
|
- v-permission="{parent:'/vipReset',child:'vip/cleanAttendance'}"
|
|
|
+ v-permission="{parent:'/vipReset',child:'vip/cleanAttendance'}"
|
|
|
v-if="!scope.row.isSettlement"
|
|
|
- @click="clearAttend(scope.row)"
|
|
|
+ @click="clearAttend(scope.row)"
|
|
|
>清除考勤</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -342,22 +340,18 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 修改教务老师 -->
|
|
|
- <el-dialog title="修改教务" width="400px" :visible.sync="educationalVisible">
|
|
|
+ <el-dialog title="修改教务" width="400px" :visible.sync="educationalVisible">
|
|
|
<el-form :model="addrForm">
|
|
|
- <el-form-item label="教务老师" prop="educationalTeacherId">
|
|
|
- <el-select
|
|
|
- v-model.trim="addrForm.educationalTeacherId"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item,index) in educationList"
|
|
|
- :key="index"
|
|
|
- :label="item.userName"
|
|
|
- :value="item.userId"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item label="教务老师" prop="educationalTeacherId">
|
|
|
+ <el-select v-model.trim="addrForm.educationalTeacherId" filterable clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in educationList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.userName"
|
|
|
+ :value="item.userId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="educationalVisible = false">取 消</el-button>
|
|
@@ -367,7 +361,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { resetCourse, cleanAttendance,findEducationUsers } from "@/api/buildTeam";
|
|
|
+import {
|
|
|
+ resetCourse,
|
|
|
+ cleanAttendance,
|
|
|
+ findEducationUsers
|
|
|
+} from "@/api/buildTeam";
|
|
|
// import { getSchool } from '@/api/systemManage'
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import {
|
|
@@ -394,15 +392,15 @@ export default {
|
|
|
adjustmentVisible: false,
|
|
|
addCourseVisible: false,
|
|
|
courseVisible: false,
|
|
|
- educationalVisible:false,
|
|
|
+ educationalVisible: false,
|
|
|
tableList: [],
|
|
|
addTable: [],
|
|
|
- educationList:[],
|
|
|
+ educationList: [],
|
|
|
courseTime: "",
|
|
|
vipid: "",
|
|
|
addrForm: {
|
|
|
address: "",
|
|
|
- educationalTeacherId:''
|
|
|
+ educationalTeacherId: ""
|
|
|
},
|
|
|
maskForm: {
|
|
|
date: "",
|
|
@@ -467,9 +465,7 @@ export default {
|
|
|
startTime: ""
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
-
|
|
|
- },
|
|
|
+ created() {},
|
|
|
mounted() {
|
|
|
this.__init();
|
|
|
this.getList();
|
|
@@ -481,24 +477,22 @@ export default {
|
|
|
methods: {
|
|
|
__init() {
|
|
|
this.vipid = this.$route.query.id;
|
|
|
- if(this.$route.query.educationalTeacherId){
|
|
|
- this.addrForm.educationalTeacherId = this.$route.query.educationalTeacherId
|
|
|
- }else {
|
|
|
- this.addrForm.educationalTeacherId = null;
|
|
|
+ if (this.$route.query.educationalTeacherId) {
|
|
|
+ this.addrForm.educationalTeacherId = this.$route.query.educationalTeacherId;
|
|
|
+ } else {
|
|
|
+ this.addrForm.educationalTeacherId = null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (this.$route.query.rules) {
|
|
|
this.Frules = this.$route.query.rules;
|
|
|
}
|
|
|
if (this.$route.query.searchForm) {
|
|
|
this.FsearchForm = this.$route.query.searchForm;
|
|
|
}
|
|
|
- // 获取教务老师
|
|
|
- findEducationUsers({
|
|
|
-
|
|
|
- }).then(res => {
|
|
|
+ // 获取教务老师
|
|
|
+ findEducationUsers({}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.educationList = res.data
|
|
|
+ this.educationList = res.data;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -563,8 +557,22 @@ export default {
|
|
|
this.$message.error("请填写修改时间");
|
|
|
return;
|
|
|
}
|
|
|
+ let classTime = this.maskForm.date
|
|
|
+ ? new Date(this.maskForm.date)
|
|
|
+ : new Date();
|
|
|
+ let ymd =
|
|
|
+ classTime.getFullYear() +
|
|
|
+ "-" +
|
|
|
+ (classTime.getMonth() + 1) +
|
|
|
+ "-" +
|
|
|
+ classTime.getDate();
|
|
|
+ let tempStartTime = this.startTime
|
|
|
+ if (this.startTime.length <= 5) {
|
|
|
+ tempStartTime = tempStartTime + ":00";
|
|
|
+ }
|
|
|
let obj = {
|
|
|
- startClassTimeStr: this.startTime,
|
|
|
+ startClassTime: ymd + " " + this.startTime,
|
|
|
+ // startClassTimeStr: this.startTime,
|
|
|
id: this.maskForm.id,
|
|
|
classDate: this.maskForm.date,
|
|
|
schoolId: this.maskForm.address || null,
|
|
@@ -685,7 +693,7 @@ export default {
|
|
|
// 删除循环周
|
|
|
removeWeek(item) {
|
|
|
for (let i in this.weekList) {
|
|
|
- if (this.weekList[i].id == item.id) {
|
|
|
+ if (this.weekList[i].id == item.id) {
|
|
|
this.weekList.splice(i, 1);
|
|
|
}
|
|
|
}
|
|
@@ -713,13 +721,24 @@ export default {
|
|
|
let idArr = this.activeList.map(item => {
|
|
|
return item.id;
|
|
|
});
|
|
|
+ // let tempWeekList = []
|
|
|
+ // this.weekList.forEach(item => {
|
|
|
+ // let tempTime = item.startClassTime.length <= 5 ? item.startClassTime + ':00' : item.startClassTime
|
|
|
+ // tempWeekList.push({
|
|
|
+ // dayOfWeek: item.dayOfWeek,
|
|
|
+ // startTime: item.startTime,
|
|
|
+ // endTime: item.endTime,
|
|
|
+ // moid: item.moid,
|
|
|
+ // startClassTime: obj.courseCreateStartTime + ' ' + tempTime,
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+
|
|
|
let courseScheduleIds = idArr.join(",");
|
|
|
obj.courseScheduleIds = courseScheduleIds;
|
|
|
obj.courseTimes = this.weekList;
|
|
|
obj.holiday = this.adjustmentForm.checked;
|
|
|
obj.teachMode = this.adjustmentForm.courseType || null;
|
|
|
- obj.groupType = 'VIP';
|
|
|
- console.log(obj);
|
|
|
+ obj.groupType = "VIP";
|
|
|
obj.vipGroupId = this.vipid;
|
|
|
vipCourseAdjust(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -753,7 +772,7 @@ export default {
|
|
|
obj.courseCount = this.adjustmentForm.addCount;
|
|
|
obj.teachMode = this.adjustmentForm.courseType;
|
|
|
obj.singleClassPrice = this.adjustmentForm.fee;
|
|
|
- obj.groupType = 'VIP'
|
|
|
+ obj.groupType = "VIP";
|
|
|
batchAppendVipGroupCourses(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("恭喜您添加成功");
|
|
@@ -773,7 +792,7 @@ export default {
|
|
|
updateVipBaseInfo({
|
|
|
id: this.vipid,
|
|
|
teacherSchoolId: this.addrForm.address,
|
|
|
- educationalTeacherId:this.addrForm.educationalTeacherId
|
|
|
+ educationalTeacherId: this.addrForm.educationalTeacherId
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("修改成功");
|
|
@@ -782,8 +801,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- resetEducationalVisible(){
|
|
|
- if (!this.addrForm.educationalTeacherId) {
|
|
|
+ resetEducationalVisible() {
|
|
|
+ if (!this.addrForm.educationalTeacherId) {
|
|
|
this.$message.error("请选择一个教学点");
|
|
|
return;
|
|
|
}
|
|
@@ -791,7 +810,7 @@ export default {
|
|
|
updateVipBaseInfo({
|
|
|
id: this.vipid,
|
|
|
|
|
|
- educationalTeacherId:this.addrForm.educationalTeacherId
|
|
|
+ educationalTeacherId: this.addrForm.educationalTeacherId
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("修改成功");
|
|
@@ -799,8 +818,8 @@ export default {
|
|
|
this.getList();
|
|
|
}
|
|
|
});
|
|
|
- },
|
|
|
- // 清除考勤
|
|
|
+ },
|
|
|
+ // 清除考勤
|
|
|
clearAttend(row) {
|
|
|
this.$confirm("是否清除考勤记录?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -808,16 +827,14 @@ export default {
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- cleanAttendance({ courseScheduleIds: row.id }).then(
|
|
|
- res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("清除成功");
|
|
|
- this.getList();
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
+ cleanAttendance({ courseScheduleIds: row.id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("清除成功");
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
- );
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
}
|