|  | @@ -6,6 +6,7 @@
 | 
	
		
			
				|  |  |  			<!-- <van-field v-model="form.name" label="课程班名称" input-align="right" size="large" placeholder="请输入班级名称" /> -->
 | 
	
		
			
				|  |  |  			<van-field v-model="formName.subjectListName" @click="onGetSheetList('subjectList')" label="科目名称" :readonly="true" input-align="right" is-link size="large" placeholder="请选择" />
 | 
	
		
			
				|  |  |  			<van-field v-model="formName.vipGroupCategoryName" @click="onGetSheetList('vipGroupCategory')" label="课程形式" :readonly="true" input-align="right" is-link size="large" placeholder="请选择" />
 | 
	
		
			
				|  |  | +			<van-field v-model="formName.educationalTeacherName" @click="onGetSheetList('teacherList')" label="教务老师" :readonly="true" input-align="right" is-link size="large" placeholder="请选择" />
 | 
	
		
			
				|  |  |  			<van-cell title="上课学生" @click="onCheckStudent" :readonly="true" input-align="right" :is-link="checkboxSelectDataList.length > 0 ? false : true" size="large" :value="checkboxSelectDataList.length > 0 ? '重新选择' : '请选择'" :value-class="checkboxSelectDataList.length > 0 ? 'studentColor' : null" />
 | 
	
		
			
				|  |  |  			<div v-if="checkboxSelectDataList.length > 0" style="text-align: center;line-height: 1.8; padding: .05rem 0;background: #fafbff;">
 | 
	
		
			
				|  |  |  				<p style="color: #323233;" v-for="(item, index) in checkboxSelectDataList" :key="index">
 | 
	
	
		
			
				|  | @@ -159,8 +160,10 @@
 | 
	
		
			
				|  |  |  		findVipSchoolByTeacher2,
 | 
	
		
			
				|  |  |  		findByTeacherAndCategory,
 | 
	
		
			
				|  |  |  		vipGroupApply,
 | 
	
		
			
				|  |  | +		findEducationUsers,
 | 
	
		
			
				|  |  |  		queryStudentsWithTeacher
 | 
	
		
			
				|  |  |  	} from '@/api/teacher'
 | 
	
		
			
				|  |  | +	import setLoading from '@/utils/loading'
 | 
	
		
			
				|  |  |  	let minutes = [] // 分钟数
 | 
	
		
			
				|  |  |  	for (let i = 0; i < 60; i++) {
 | 
	
		
			
				|  |  |  		let mi = i < 10 ? '0' + i : i
 | 
	
	
		
			
				|  | @@ -206,6 +209,8 @@
 | 
	
		
			
				|  |  |  					vipGroupActivitySelect: [], // 选中的活动文案JSON
 | 
	
		
			
				|  |  |  					teacherSchool: [], // 线下课地址
 | 
	
		
			
				|  |  |  					teacherSchoolSelect: [], // 选中的线下课地址JSON
 | 
	
		
			
				|  |  | +					teacherList: [], // 线下课地址
 | 
	
		
			
				|  |  | +					teacherListSelect: [], // 选中的线下课地址JSON
 | 
	
		
			
				|  |  |  					giveTeachMode: [{
 | 
	
		
			
				|  |  |  						name: '线上课',
 | 
	
		
			
				|  |  |  						value: 'ONLINE'
 | 
	
	
		
			
				|  | @@ -247,6 +252,7 @@
 | 
	
		
			
				|  |  |  					vipGroupCategoryId: null,
 | 
	
		
			
				|  |  |  					vipGroupActivityId: null,
 | 
	
		
			
				|  |  |  					teacherSchoolId: null,
 | 
	
		
			
				|  |  | +					educationalTeacherId: null,
 | 
	
		
			
				|  |  |  					studentNum: null,
 | 
	
		
			
				|  |  |  					singleClassMinutes: null,
 | 
	
		
			
				|  |  |  					onlineClassesNums: null,
 | 
	
	
		
			
				|  | @@ -272,6 +278,8 @@
 | 
	
		
			
				|  |  |  					teacherSchoolName: null, // 线下课地址
 | 
	
		
			
				|  |  |  					teacherSchoolIndex: 0, // 线下课地址
 | 
	
		
			
				|  |  |  					giveTeachModeName: null, // 赠课类型
 | 
	
		
			
				|  |  | +					educationalTeacherName: null, // 教务老师
 | 
	
		
			
				|  |  | +					educationalTeacherIndex: 0,
 | 
	
		
			
				|  |  |  				},
 | 
	
		
			
				|  |  |  				other: {
 | 
	
		
			
				|  |  |  					onlineSalary: null, // 线上课课酬结算方式
 | 
	
	
		
			
				|  | @@ -416,6 +424,24 @@
 | 
	
		
			
				|  |  |  							sheetForm.loading = false
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  					})
 | 
	
		
			
				|  |  | +				} else if (sheetForm.currentType == 'teacherList') { // 教务老师
 | 
	
		
			
				|  |  | +					findEducationUsers().then(res => {
 | 
	
		
			
				|  |  | +						let result = res.data
 | 
	
		
			
				|  |  | +						if (result.code == 200 && result.data.length > 0) {
 | 
	
		
			
				|  |  | +							let tempArr = []
 | 
	
		
			
				|  |  | +							result.data.forEach(item => {
 | 
	
		
			
				|  |  | +								item.value = item.userId
 | 
	
		
			
				|  |  | +								item.text = item.userName
 | 
	
		
			
				|  |  | +								tempArr.push(item)
 | 
	
		
			
				|  |  | +							})
 | 
	
		
			
				|  |  | +							this.loadData.teacherList = tempArr
 | 
	
		
			
				|  |  | +							sheetForm.columns = tempArr
 | 
	
		
			
				|  |  | +							sheetForm.loading = false
 | 
	
		
			
				|  |  | +						} else {
 | 
	
		
			
				|  |  | +							this.$toast('暂无教务老师')
 | 
	
		
			
				|  |  | +							sheetForm.loading = false
 | 
	
		
			
				|  |  | +						}
 | 
	
		
			
				|  |  | +					})
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			findTeacherCategory(id) { // 获取教师课酬
 | 
	
	
		
			
				|  | @@ -501,6 +527,10 @@
 | 
	
		
			
				|  |  |  					form.teacherSchoolId = value.value
 | 
	
		
			
				|  |  |  					formName.teacherSchoolName = value.text
 | 
	
		
			
				|  |  |  					formName.teacherSchoolIndex = index
 | 
	
		
			
				|  |  | +				} else if (sheetForm.currentType == 'teacherList') { // 教务老师
 | 
	
		
			
				|  |  | +					form.educationalTeacherId = value.value
 | 
	
		
			
				|  |  | +					formName.educationalTeacherName = value.text
 | 
	
		
			
				|  |  | +					formName.educationalTeacherIndex = index
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  				sheetForm.sheetStatus = false
 | 
	
	
		
			
				|  | @@ -928,7 +958,7 @@
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  				return value;
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | -			onSubmit() {
 | 
	
		
			
				|  |  | +			async onSubmit() {
 | 
	
		
			
				|  |  |  				let form = this.form
 | 
	
		
			
				|  |  |  				let statusList = this.statusList
 | 
	
		
			
				|  |  |  				// 排课
 | 
	
	
		
			
				|  | @@ -946,14 +976,20 @@
 | 
	
		
			
				|  |  |  					this.$toast('请选择课程形式')
 | 
	
		
			
				|  |  |  					return false
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | +				if (!form.educationalTeacherId) {
 | 
	
		
			
				|  |  | +					this.$toast('请选择教务老师')
 | 
	
		
			
				|  |  | +					return
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  |  				if(this.checkboxSelectIds.length <= 0) {
 | 
	
		
			
				|  |  |  					this.$toast('请选择上课学生')
 | 
	
		
			
				|  |  |  					return
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  				if (!form.vipGroupActivityId) {
 | 
	
		
			
				|  |  |  					this.$toast('请选择活动方案')
 | 
	
		
			
				|  |  |  					return false
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  				// 判断是否有线下
 | 
	
		
			
				|  |  |  				if (statusList.hasOffline) {
 | 
	
		
			
				|  |  |  					if (!form.teacherSchoolId) {
 | 
	
	
		
			
				|  | @@ -1043,8 +1079,10 @@
 | 
	
		
			
				|  |  |  					return
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  				this.onSubmitStatus = false
 | 
	
		
			
				|  |  | -				vipGroupApply(params).then(res => {
 | 
	
		
			
				|  |  | +				setLoading(true)
 | 
	
		
			
				|  |  | +				await vipGroupApply(params).then(res => {
 | 
	
		
			
				|  |  |  					let result = res.data
 | 
	
		
			
				|  |  | +					setLoading(false)
 | 
	
		
			
				|  |  |  					if (result.code == 200) {
 | 
	
		
			
				|  |  |  						this.$toast('申请成功')
 | 
	
		
			
				|  |  |  						setTimeout(() => {
 | 
	
	
		
			
				|  | @@ -1065,6 +1103,8 @@
 | 
	
		
			
				|  |  |  						this.onSubmitStatus = true
 | 
	
		
			
				|  |  |  						this.$toast(result.msg)
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  | +				}).catch(() => {
 | 
	
		
			
				|  |  | +					setLoading(false)
 | 
	
		
			
				|  |  |  				})
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			// 搜索
 | 
	
	
		
			
				|  | @@ -1300,4 +1340,8 @@
 | 
	
		
			
				|  |  |  	.studentColor {
 | 
	
		
			
				|  |  |  		color: #14928A;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/deep/.van-field--disabled .van-field__label {
 | 
	
		
			
				|  |  | +		color: #323233;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  |  </style>
 |