|
@@ -18,7 +18,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="科目名称"
|
|
<el-form-item label="科目名称"
|
|
prop="subject">
|
|
prop="subject">
|
|
- <el-select v-model="leftForm.subject">
|
|
|
|
|
|
+ <el-select v-model="leftForm.subject"
|
|
|
|
+ @change="changeSubject">
|
|
<el-option v-for='(item,index) in subjectList'
|
|
<el-option v-for='(item,index) in subjectList'
|
|
:key='index'
|
|
:key='index'
|
|
:value="item.id"
|
|
:value="item.id"
|
|
@@ -151,15 +152,18 @@
|
|
@click="dialogFormVisible = true">点击排课</el-button>
|
|
@click="dialogFormVisible = true">点击排课</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="planCore">
|
|
<div class="planCore">
|
|
|
|
+ <div class="row">
|
|
|
|
+ <div class="name">时间</div>
|
|
|
|
+ <div class="week">开始时间</div>
|
|
|
|
+ <div class="time">结束时间</div>
|
|
|
|
+ <div class="time">课程类型</div>
|
|
|
|
+ </div>
|
|
<div class="row"
|
|
<div class="row"
|
|
- v-for="(item,index) in this.lookList">
|
|
|
|
- <div class="name">{{ item.type }}</div>
|
|
|
|
- <div class="week">{{ item.week }}</div>
|
|
|
|
- <div class="time">{{ item.time }}</div>
|
|
|
|
- <div class="operation">
|
|
|
|
- <el-button type='text'
|
|
|
|
- @click="removeWeekCourse(item.id)">删除</el-button>
|
|
|
|
- </div>
|
|
|
|
|
|
+ v-for="(item,index) in this.timeTable">
|
|
|
|
+ <div class="name">{{ item.classDate | formatTimer}}</div>
|
|
|
|
+ <div class="week">{{ item.startClassTimeStr }}</div>
|
|
|
|
+ <div class="time">{{ item.endClassTimeStr }}</div>
|
|
|
|
+ <div class="time">{{ item.teachMode |teachMode}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -174,13 +178,13 @@
|
|
v-if="hasOnline">
|
|
v-if="hasOnline">
|
|
<el-input v-model="rightForm.onlineCourse"
|
|
<el-input v-model="rightForm.onlineCourse"
|
|
:disabled="salaryReadonlyFlag==0"></el-input>
|
|
:disabled="salaryReadonlyFlag==0"></el-input>
|
|
- <!-- || onlineSalary!='TEACHER_DEFAULT' -->
|
|
|
|
|
|
+ <!-- || onlineSalary!='TEACHER_DEFAULT' -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="线下课课酬"
|
|
<el-form-item label="线下课课酬"
|
|
v-if="hasOffline">
|
|
v-if="hasOffline">
|
|
<el-input v-model="rightForm.offlineCourse"
|
|
<el-input v-model="rightForm.offlineCourse"
|
|
:disabled="salaryReadonlyFlag==0"></el-input>
|
|
:disabled="salaryReadonlyFlag==0"></el-input>
|
|
- <!-- || offlineSalary!='TEACHER_DEFAULT' -->
|
|
|
|
|
|
+ <!-- || offlineSalary!='TEACHER_DEFAULT' -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="线上课单价"
|
|
<el-form-item label="线上课单价"
|
|
v-if="hasOnline">
|
|
v-if="hasOnline">
|
|
@@ -425,9 +429,13 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ changeSubject (val) {
|
|
|
|
+ this.leftForm.teacher = ''
|
|
|
|
+ this.leftForm.section = ''
|
|
|
|
+ },
|
|
// 选择课程类型
|
|
// 选择课程类型
|
|
changeType (val) {
|
|
changeType (val) {
|
|
-
|
|
|
|
|
|
+ this.leftForm.activeType = '';
|
|
for (let i in this.courseTypeList) {
|
|
for (let i in this.courseTypeList) {
|
|
if (this.courseTypeList[i].id == val) {
|
|
if (this.courseTypeList[i].id == val) {
|
|
// 学生人数
|
|
// 学生人数
|
|
@@ -650,7 +658,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
let date = this.maskForm.courseStart;
|
|
let date = this.maskForm.courseStart;
|
|
- let date1 = this.maskForm.courseStart;
|
|
|
|
|
|
+ let seceond = date.getTime();
|
|
|
|
+ let date1 = new Date(seceond);
|
|
|
|
+ console.log(date1)
|
|
let startWeekday = this.maskForm.courseStart.getDay();
|
|
let startWeekday = this.maskForm.courseStart.getDay();
|
|
let onlineList = []; // 装线上课的数组
|
|
let onlineList = []; // 装线上课的数组
|
|
let offlineList = []; //装线下课的数组
|
|
let offlineList = []; //装线下课的数组
|
|
@@ -667,6 +677,9 @@ export default {
|
|
offlineList.push({ week: this.lookList[i].weekDay, date: this.lookList[i] })
|
|
offlineList.push({ week: this.lookList[i].weekDay, date: this.lookList[i] })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // console.log(onlineList + '----------------------------------------------------------------------------------');
|
|
|
|
+ // console.log(offlineList);
|
|
|
|
+
|
|
if (online > 0 && onlineList.length <= 0) {
|
|
if (online > 0 && onlineList.length <= 0) {
|
|
this.$message.error('选择了线上课但未排线上课');
|
|
this.$message.error('选择了线上课但未排线上课');
|
|
this.timeTable = [];
|
|
this.timeTable = [];
|
|
@@ -700,7 +713,7 @@ export default {
|
|
date.setDate(date.getDate() + 7);
|
|
date.setDate(date.getDate() + 7);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ console.log(date1)
|
|
while (offline && offline > 0) {
|
|
while (offline && offline > 0) {
|
|
// 排线下课
|
|
// 排线下课
|
|
for (let i in offlineList) {
|
|
for (let i in offlineList) {
|
|
@@ -720,7 +733,7 @@ export default {
|
|
// 加一周
|
|
// 加一周
|
|
date1.setDate(date1.getDate() + 7);
|
|
date1.setDate(date1.getDate() + 7);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ console.log(this.timeTable);
|
|
this.dialogFormVisible = false;
|
|
this.dialogFormVisible = false;
|
|
},
|
|
},
|
|
getThinkDate (date, num) {
|
|
getThinkDate (date, num) {
|
|
@@ -764,7 +777,9 @@ export default {
|
|
offlineClassesNum = parseInt(offlineClassesNum) + parseInt(this.giveNum)
|
|
offlineClassesNum = parseInt(offlineClassesNum) + parseInt(this.giveNum)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- getVipGroupCostCount({ vipGroupActivityId, onlineClassesUnitPrice, vipGroupCategoryId, offlineClassesUnitPrice, onlineClassesNum, offlineClassesNum, userId, giveTeachMode }).then(res => {
|
|
|
|
|
|
+ let onlineTeacherSalary = this.rightForm.onlineCourse || null;
|
|
|
|
+ let offlineTeacherSalary = this.rightForm.offlineCourse || null;
|
|
|
|
+ getVipGroupCostCount({ vipGroupActivityId, onlineClassesUnitPrice, offlineTeacherSalary, offlineTeacherSalary, vipGroupCategoryId, offlineClassesUnitPrice, onlineClassesNum, offlineClassesNum, userId, giveTeachMode }).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.rightForm.onlineCourse = res.data.onlineTeacherSalary;
|
|
this.rightForm.onlineCourse = res.data.onlineTeacherSalary;
|
|
this.rightForm.offlineCourse = res.data.offlineTeacherSalary;
|
|
this.rightForm.offlineCourse = res.data.offlineTeacherSalary;
|
|
@@ -828,6 +843,7 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
setSection (val) {
|
|
setSection (val) {
|
|
|
|
+ this.leftForm.section = '';
|
|
getTeachSchool({ userId: val }).then(res => {
|
|
getTeachSchool({ userId: val }).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.scetionList = res.data;
|
|
this.scetionList = res.data;
|
|
@@ -900,6 +916,15 @@ export default {
|
|
height: 40px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
line-height: 40px;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ div {
|
|
|
|
+ width: 87px;
|
|
|
|
+ }
|
|
|
|
+ // div {
|
|
|
|
+ // &:nth-child(1) {
|
|
|
|
+ // text-align: left;
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|