Commit aea2c6c5 authored by 黄奎's avatar 黄奎

1111

parent b0c85efd
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</q-field> </q-field>
</template> </template>
<div class="row col-12" v-if="(saveObj&& saveObj.ClassType==3)||editType==1"> <div class="row col-12" v-if="(saveObj&& saveObj.ClassType==3)||editType==1">
<div class="row col-12" > <div class="row col-12">
<div class="col-9"> <div class="col-9">
<q-select filled stack-label use-input option-value="StuId" option-label="StuName" v-model="stuInfo" <q-select filled stack-label use-input option-value="StuId" option-label="StuName" v-model="stuInfo"
ref="StuId" :options="stuList" label="学员列表" :dense="false" class="col-6" @filter="filterStu" ref="StuId" :options="stuList" label="学员列表" :dense="false" class="col-6" @filter="filterStu"
...@@ -187,9 +187,7 @@ ...@@ -187,9 +187,7 @@
</template> </template>
</td> </td>
<td width="60px"> <td width="60px">
<q-btn size="8px" class="SurverDel" <q-btn size="8px" class="SurverDel" v-if="item.AppointmentId==0" @click="DeleteStu(index)" round color="red"
@click="DeleteStu(index)"
round color="red"
icon="iconfont icon-shanchu" /> icon="iconfont icon-shanchu" />
</td> </td>
</tr> </tr>
...@@ -572,7 +570,7 @@ ...@@ -572,7 +570,7 @@
}) })
return; return;
} }
if(!this.saveMsg.ChapterNo){ if (!this.saveMsg.ChapterNo) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -580,7 +578,7 @@ ...@@ -580,7 +578,7 @@
}) })
return; return;
} }
if(!this.saveMsg.TeacherId){ if (!this.saveMsg.TeacherId) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -653,79 +651,87 @@ ...@@ -653,79 +651,87 @@
sObj.CourseGradeNo = ""; sObj.CourseGradeNo = "";
// 对比是否存在改学员 // 对比是否存在改学员
if(this.saveMsg.ChooseStuList.length>0){ if (this.saveMsg.ChooseStuList.length > 0) {
let ArrId = this.saveMsg.ChooseStuList.map(item=>{return item.GuestId}) let ArrId = this.saveMsg.ChooseStuList.map(item => {
if(ArrId.indexOf(sObj.GuestId)==-1){ return item.GuestId
})
if (ArrId.indexOf(sObj.GuestId) == -1) {
this.getCourseChapterList(sObj); this.getCourseChapterList(sObj);
this.saveMsg.ChooseStuList.push(sObj); this.saveMsg.ChooseStuList.push(sObj);
}else{ } else {
this.$q.notify({ this.$q.notify({
message: "该学员已选择,试试别的学员吧", message: "该学员已选择,试试别的学员吧",
position: "top", position: "top",
type: "negative" type: "negative"
}); });
} }
}else{ } else {
this.getCourseChapterList(sObj); this.getCourseChapterList(sObj);
this.saveMsg.ChooseStuList.push(sObj); this.saveMsg.ChooseStuList.push(sObj);
} }
}, },
//保存约课 //保存约课
SaveStuAppointment() { SaveStuAppointment() {
this.$refs.CourseId.validate(); // this.$refs.CourseId.validate();
this.$refs.StuId.validate(); // this.$refs.StuId.validate();
if (!this.saveMsg.CourseId) { // if (!this.saveMsg.CourseId) {
this.$q.notify({ // this.$q.notify({
type: 'negative', // type: 'negative',
position: "top", // position: "top",
message: `请选择课程` // message: `请选择课程`
}) // })
return; // return;
} // }
if(!this.saveMsg.ChapterNo){ // if(!this.saveMsg.ChapterNo){
this.$q.notify({ // this.$q.notify({
type: 'negative', // type: 'negative',
position: "top", // position: "top",
message: `请选择章节` // message: `请选择章节`
}) // })
return; // return;
// }
// if(!this.saveMsg.TeacherId){
// this.$q.notify({
// type: 'negative',
// position: "top",
// message: `请选择老师`
// })
// return;
// }
// if (this.courseCheckList.length === 0) {
// this.$q.notify({
// message: "请选择上课时段",
// position: "top",
// type: "negative"
// });
// return;
// }
// if(this.saveMsg.ChooseStuList.length===0){
// this.$q.notify({
// message: "请添加学员",
// position: "top",
// type: "negative"
// });
// return;
// }
var tipStr = ""
if (this.saveMsg.ChooseStuList && this.saveMsg.ChooseStuList.length > 0) {
this.saveMsg.ChooseStuList.forEach(item => {
if (item.CourseGradeNo == '' || !item.CourseGradeNo) {
tipStr += "请选择【" + item.StuName + "】消课编号;";
} }
if(!this.saveMsg.TeacherId){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择老师`
}) })
return;
} }
if (this.courseCheckList.length === 0) { if (tipStr != '') {
this.$q.notify({ this.$q.notify({
message: "请选择上课时段", message: tipStr,
position: "top",
type: "negative"
});
return;
}
if(this.saveMsg.ChooseStuList.length===0){
this.$q.notify({
message: "请添加学员",
position: "top",
type: "negative"
});
return;
}
// 检查消课编号是否选择
let ArrCourseGradeNo = this.saveMsg.ChooseStuList.map(item=>{
return item.CourseGradeNo
})
if(ArrCourseGradeNo.indexOf('')!=-1){
this.$q.notify({
message: "请选择消课编号",
position: "top", position: "top",
type: "negative" type: "negative"
}); });
return; return;
} }
this.addLoading = true; this.addLoading = true;
setAdminScrollAppointment_V3(this.saveMsg) setAdminScrollAppointment_V3(this.saveMsg)
.then(res => { .then(res => {
...@@ -821,15 +827,18 @@ ...@@ -821,15 +827,18 @@
.timeItem { .timeItem {
margin: 10px 0; margin: 10px 0;
} }
.table{
.table {
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
overflow: hidden; overflow: hidden;
} }
.thead{
.thead {
background: rgba(0, 0, 0, 0.09); background: rgba(0, 0, 0, 0.09);
} }
.thead tr th{
.thead tr th {
padding: 10px 0; padding: 10px 0;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment