|  | @@ -234,7 +234,9 @@
 | 
											
												
													
														|  |                 ref='maskForm'
 |  |                 ref='maskForm'
 | 
											
												
													
														|  |                 width="500px"
 |  |                 width="500px"
 | 
											
												
													
														|  |                 :visible.sync="dialogFormVisible">
 |  |                 :visible.sync="dialogFormVisible">
 | 
											
												
													
														|  | -      <el-form :model="maskForm">
 |  | 
 | 
											
												
													
														|  | 
 |  | +      <el-form :model="maskForm"
 | 
											
												
													
														|  | 
 |  | +               label-position="right"
 | 
											
												
													
														|  | 
 |  | +               label-width="150px">
 | 
											
												
													
														|  |          <el-form-item label="课程类型"
 |  |          <el-form-item label="课程类型"
 | 
											
												
													
														|  |                        prop="type">
 |  |                        prop="type">
 | 
											
												
													
														|  |            <el-radio v-if="hasOnline"
 |  |            <el-radio v-if="hasOnline"
 | 
											
										
											
												
													
														|  | @@ -248,10 +250,22 @@
 | 
											
												
													
														|  |              线下课
 |  |              线下课
 | 
											
												
													
														|  |            </el-radio>
 |  |            </el-radio>
 | 
											
												
													
														|  |          </el-form-item>
 |  |          </el-form-item>
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <el-form-item label="线上课开课时间">
 | 
											
												
													
														|  | 
 |  | +          <el-date-picker v-model="maskForm.courseStartOnline"
 | 
											
												
													
														|  | 
 |  | +                          type="date"
 | 
											
												
													
														|  | 
 |  | +                          :picker-options="courseOption"
 | 
											
												
													
														|  | 
 |  | +                          placeholder="请选择开课时间" />
 | 
											
												
													
														|  | 
 |  | +        </el-form-item>
 | 
											
												
													
														|  | 
 |  | +        <el-form-item label="线下课开课时间">
 | 
											
												
													
														|  | 
 |  | +          <el-date-picker v-model="maskForm.courseStartOffline"
 | 
											
												
													
														|  | 
 |  | +                          type="date"
 | 
											
												
													
														|  | 
 |  | +                          :picker-options="courseOption"
 | 
											
												
													
														|  | 
 |  | +                          placeholder="请选择开课时间" />
 | 
											
												
													
														|  | 
 |  | +        </el-form-item>
 | 
											
												
													
														|  |          <el-form-item label="循环周次"
 |  |          <el-form-item label="循环周次"
 | 
											
												
													
														|  |                        prop="week">
 |  |                        prop="week">
 | 
											
												
													
														|  | -          <el-select v-model="maskForm.week">
 |  | 
 | 
											
												
													
														|  | 
 |  | +          <el-select v-model="maskForm.week"
 | 
											
												
													
														|  | 
 |  | +                     style="width:220px!important;">
 | 
											
												
													
														|  |              <el-option label="星期日"
 |  |              <el-option label="星期日"
 | 
											
												
													
														|  |                         value="0" />
 |  |                         value="0" />
 | 
											
												
													
														|  |              <el-option label="星期一"
 |  |              <el-option label="星期一"
 | 
											
										
											
												
													
														|  | @@ -278,6 +292,7 @@
 | 
											
												
													
														|  |                            }"
 |  |                            }"
 | 
											
												
													
														|  |                            placeholder="选择时间" />
 |  |                            placeholder="选择时间" />
 | 
											
												
													
														|  |          </el-form-item>
 |  |          </el-form-item>
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |        </el-form>
 |  |        </el-form>
 | 
											
												
													
														|  |        <div class="btnWrap">
 |  |        <div class="btnWrap">
 | 
											
												
													
														|  |          <div class="okBtn"
 |  |          <div class="okBtn"
 | 
											
										
											
												
													
														|  | @@ -311,14 +326,8 @@
 | 
											
												
													
														|  |              </div>
 |  |              </div>
 | 
											
												
													
														|  |            </div>
 |  |            </div>
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
												
													
														|  | -        <div style="margin:20px 0">
 |  | 
 | 
											
												
													
														|  | -          <el-date-picker v-model="maskForm.courseStart"
 |  | 
 | 
											
												
													
														|  | -                          type="date"
 |  | 
 | 
											
												
													
														|  | -                          :picker-options="courseOption"
 |  | 
 | 
											
												
													
														|  | -                          placeholder="请选择开课时间" />
 |  | 
 | 
											
												
													
														|  | -        </div>
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |          <div slot="footer"
 |  |          <div slot="footer"
 | 
											
												
													
														|  | 
 |  | +             style='margin-top:20px;'
 | 
											
												
													
														|  |               class="dialog-footer">
 |  |               class="dialog-footer">
 | 
											
												
													
														|  |            <el-button @click="dialogFormVisible = false">
 |  |            <el-button @click="dialogFormVisible = false">
 | 
											
												
													
														|  |              取 消
 |  |              取 消
 | 
											
										
											
												
													
														|  | @@ -360,7 +369,8 @@ export default {
 | 
											
												
													
														|  |          classTime: '',
 |  |          classTime: '',
 | 
											
												
													
														|  |          signUpStart: '',
 |  |          signUpStart: '',
 | 
											
												
													
														|  |          signUpEnd: '',
 |  |          signUpEnd: '',
 | 
											
												
													
														|  | -        courseStart: '',
 |  | 
 | 
											
												
													
														|  | 
 |  | +        courseStartOnline: '',
 | 
											
												
													
														|  | 
 |  | +        courseStartOffline: '',
 | 
											
												
													
														|  |          courseEnd: '',
 |  |          courseEnd: '',
 | 
											
												
													
														|  |          section: ''
 |  |          section: ''
 | 
											
												
													
														|  |        },
 |  |        },
 | 
											
										
											
												
													
														|  | @@ -394,7 +404,9 @@ export default {
 | 
											
												
													
														|  |        attribute1: '',
 |  |        attribute1: '',
 | 
											
												
													
														|  |        attribute2: '',
 |  |        attribute2: '',
 | 
											
												
													
														|  |        salaryReadonlyFlag: '', // 老师工资是否可配
 |  |        salaryReadonlyFlag: '', // 老师工资是否可配
 | 
											
												
													
														|  | -      lookList: [], // 展示课表
 |  | 
 | 
											
												
													
														|  | 
 |  | +      lookList: [],
 | 
											
												
													
														|  | 
 |  | +      onlinelookList: [], // 展示课表线上
 | 
											
												
													
														|  | 
 |  | +      offlineLookList: [], // 展示课表线下
 | 
											
												
													
														|  |        timeTable: [], // 真正的课表
 |  |        timeTable: [], // 真正的课表
 | 
											
												
													
														|  |        giveNum: '',
 |  |        giveNum: '',
 | 
											
												
													
														|  |        weekDay: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
 |  |        weekDay: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
 | 
											
										
											
												
													
														|  | @@ -622,7 +634,7 @@ export default {
 | 
											
												
													
														|  |            'id': Date.now()
 |  |            'id': Date.now()
 | 
											
												
													
														|  |          })
 |  |          })
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +      console.log(this.lookList)
 | 
											
												
													
														|  |        // let courseType = this.maskForm.type;
 |  |        // let courseType = this.maskForm.type;
 | 
											
												
													
														|  |        // // let week = ;this.maskForm.week 
 |  |        // // let week = ;this.maskForm.week 
 | 
											
												
													
														|  |        // let startTime = this.maskForm.startTime;
 |  |        // let startTime = this.maskForm.startTime;
 | 
											
										
											
												
													
														|  | @@ -682,14 +694,12 @@ export default {
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      setTimeTable () {
 |  |      setTimeTable () {
 | 
											
												
													
														|  | -      if (!this.maskForm.courseStart) {
 |  | 
 | 
											
												
													
														|  | -        this.$message.error('请选择开课时间')
 |  | 
 | 
											
												
													
														|  | -        return;
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |        // 拿到线上课数与线下课数 以及
 |  |        // 拿到线上课数与线下课数 以及
 | 
											
												
													
														|  |        this.timeTable = [];
 |  |        this.timeTable = [];
 | 
											
												
													
														|  | -      let online = parseInt(this.centerForm.onlineCourseNum);
 |  | 
 | 
											
												
													
														|  | -      let offline = parseInt(this.centerForm.offlineCourseNum);
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let online = parseInt(this.centerForm.onlineCourseNum) || 0;
 | 
											
												
													
														|  | 
 |  | +      let offline = parseInt(this.centerForm.offlineCourseNum) || 0;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        let giveNum = this.giveNum;
 |  |        let giveNum = this.giveNum;
 | 
											
												
													
														|  |        let giveClassType = this.centerForm.radio;
 |  |        let giveClassType = this.centerForm.radio;
 | 
											
										
											
												
													
														|  | @@ -699,11 +709,20 @@ export default {
 | 
											
												
													
														|  |        } else if (giveClassType == 'OFFLINE') {
 |  |        } else if (giveClassType == 'OFFLINE') {
 | 
											
												
													
														|  |          offline += giveNum;
 |  |          offline += giveNum;
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  | 
 |  | +      // 这里判断是否选择了排课开始时间
 | 
											
												
													
														|  | 
 |  | +      if (online && !this.maskForm.courseStartOnline) {
 | 
											
												
													
														|  | 
 |  | +        console.log(this.maskForm.courseStartOnline)
 | 
											
												
													
														|  | 
 |  | +        alert('选择了线上课 但没有线上课开始时间')
 | 
											
												
													
														|  | 
 |  | +        return
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +      if (offline && !this.maskForm.courseStartOffline) {
 | 
											
												
													
														|  | 
 |  | +        alert('选择了线下课 但没有线下课开始时间')
 | 
											
												
													
														|  | 
 |  | +        return
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -      let date = new Date(this.maskForm.courseStart.getTime());
 |  | 
 | 
											
												
													
														|  | -      let date1 = new Date(this.maskForm.courseStart.getTime());
 |  | 
 | 
											
												
													
														|  | -      let startWeekday = this.maskForm.courseStart.getDay();
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let date = new Date(this.maskForm.courseStartOnline.getTime());
 | 
											
												
													
														|  | 
 |  | +      let date1 = new Date(this.maskForm.courseStartOffline.getTime());
 | 
											
												
													
														|  | 
 |  | +      // let startWeekday = this.maskForm.courseStart.getDay();
 | 
											
												
													
														|  |        let onlineList = []; // 装线上课的数组
 |  |        let onlineList = []; // 装线上课的数组
 | 
											
												
													
														|  |        let offlineList = []; //装线下课的数组
 |  |        let offlineList = []; //装线下课的数组
 | 
											
												
													
														|  |        if (this.lookList.length <= 0) {
 |  |        if (this.lookList.length <= 0) {
 | 
											
										
											
												
													
														|  | @@ -804,14 +823,14 @@ export default {
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      // 计算课酬
 |  |      // 计算课酬
 | 
											
												
													
														|  |      computational () {
 |  |      computational () {
 | 
											
												
													
														|  | -      let userId = this.leftForm.teacher;
 |  | 
 | 
											
												
													
														|  | -      let giveTeachMode = this.centerForm.radio;
 |  | 
 | 
											
												
													
														|  | -      let vipGroupCategoryId = this.leftForm.courseType;
 |  | 
 | 
											
												
													
														|  | -      let vipGroupActivityId = this.leftForm.activeType;
 |  | 
 | 
											
												
													
														|  | -      let onlineClassesUnitPrice = this.rightForm.onlinePrice;
 |  | 
 | 
											
												
													
														|  | -      let offlineClassesUnitPrice = this.rightForm.offlinePrice;
 |  | 
 | 
											
												
													
														|  | -      let onlineClassesNum = this.centerForm.onlineCourseNum;
 |  | 
 | 
											
												
													
														|  | -      let offlineClassesNum = this.centerForm.offlineCourseNum;
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let userId = this.leftForm.teacher || null;
 | 
											
												
													
														|  | 
 |  | +      let giveTeachMode = this.centerForm.radio || null;
 | 
											
												
													
														|  | 
 |  | +      let vipGroupCategoryId = this.leftForm.courseType || null;
 | 
											
												
													
														|  | 
 |  | +      let vipGroupActivityId = this.leftForm.activeType || null;
 | 
											
												
													
														|  | 
 |  | +      let onlineClassesUnitPrice = this.rightForm.onlinePrice || null;
 | 
											
												
													
														|  | 
 |  | +      let offlineClassesUnitPrice = this.rightForm.offlinePrice || null;
 | 
											
												
													
														|  | 
 |  | +      let onlineClassesNum = this.centerForm.onlineCourseNum || 0;
 | 
											
												
													
														|  | 
 |  | +      let offlineClassesNum = this.centerForm.offlineCourseNum || 0;
 | 
											
												
													
														|  |        if (this.hotType == 'GIVE_CLASS') {
 |  |        if (this.hotType == 'GIVE_CLASS') {
 | 
											
												
													
														|  |          if (this.centerForm.radio == 'ONLINE') {
 |  |          if (this.centerForm.radio == 'ONLINE') {
 | 
											
												
													
														|  |            onlineClassesNum = parseInt(onlineClassesNum) + parseInt(this.giveNum)
 |  |            onlineClassesNum = parseInt(onlineClassesNum) + parseInt(this.giveNum)
 | 
											
										
											
												
													
														|  | @@ -861,8 +880,8 @@ export default {
 | 
											
												
													
														|  |          coursesExpireDate: this.leftForm.courseEnd,
 |  |          coursesExpireDate: this.leftForm.courseEnd,
 | 
											
												
													
														|  |          teacherSchoolId: this.leftForm.section,
 |  |          teacherSchoolId: this.leftForm.section,
 | 
											
												
													
														|  |          name: this.leftForm.name,
 |  |          name: this.leftForm.name,
 | 
											
												
													
														|  | -        offlineClassesNum: offline,
 |  | 
 | 
											
												
													
														|  | -        onlineClassesNum: online,
 |  | 
 | 
											
												
													
														|  | 
 |  | +        offlineClassesNum: offline || 0,
 | 
											
												
													
														|  | 
 |  | +        onlineClassesNum: online || 0,
 | 
											
												
													
														|  |          offlineClassesUnitPrice: this.rightForm.offlinePrice,
 |  |          offlineClassesUnitPrice: this.rightForm.offlinePrice,
 | 
											
												
													
														|  |          onlineClassesUnitPrice: this.rightForm.onlinePrice,
 |  |          onlineClassesUnitPrice: this.rightForm.onlinePrice,
 | 
											
												
													
														|  |          paymentExpireDate: this.leftForm.signUpEnd,
 |  |          paymentExpireDate: this.leftForm.signUpEnd,
 |