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"
...@@ -152,48 +152,46 @@ ...@@ -152,48 +152,46 @@
</tr> </tr>
</thead> </thead>
<template v-if="saveMsg.ChooseStuList.length>0"> <template v-if="saveMsg.ChooseStuList.length>0">
<tbody v-for="(item,index) in saveMsg.ChooseStuList" :key="index" style="text-align: center;"> <tbody v-for="(item,index) in saveMsg.ChooseStuList" :key="index" style="text-align: center;">
<tr> <tr>
<td width="80px"> <td width="80px">
{{item.StuName}} {{item.StuName}}
</td> </td>
<td> <td>
{{item.CourseName}} {{item.CourseName}}
</td> </td>
<td> <td>
<template v-if="item.AppointmentId==0"> <template v-if="item.AppointmentId==0">
{{item.CourseChapterNoName}} {{item.CourseChapterNoName}}
</template> </template>
</td> </td>
<td> <td>
<template v-if="item.AppointmentId>0"> <template v-if="item.AppointmentId>0">
{{item.CourseChapterNoName}} {{item.CourseChapterNoName}}
</template> </template>
<template v-else> <template v-else>
<q-select filled stack-label use-input option-value="ChapterNo" option-label="ChapterName" <q-select filled stack-label use-input option-value="ChapterNo" option-label="ChapterName"
v-model="item.CourseGradeNo" ref="ChapterGradeNo" :options="item.CourseChapterList" v-model="item.CourseGradeNo" ref="ChapterGradeNo" :options="item.CourseChapterList"
label="消课章节" :dense="false" emit-value map-options class="col-4"> label="消课章节" :dense="false" emit-value map-options class="col-4">
<template v-slot:option="{ itemProps, itemEvents, opt, }"> <template v-slot:option="{ itemProps, itemEvents, opt, }">
<q-item v-bind="itemProps" v-on="itemEvents"> <q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section> <q-item-section>
<q-item-label v-html="opt.ChapterName"></q-item-label> <q-item-label v-html="opt.ChapterName"></q-item-label>
</q-item-section> </q-item-section>
<q-item-section side> <q-item-section side>
<q-item-label v-html="opt.CourseRateName"></q-item-label> <q-item-label v-html="opt.CourseRateName"></q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
</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)" icon="iconfont icon-shanchu" />
round color="red" </td>
icon="iconfont icon-shanchu" /> </tr>
</td> </tbody>
</tr>
</tbody>
</template> </template>
<tbody v-if="saveMsg.ChooseStuList.length==0" style="text-align: center;"> <tbody v-if="saveMsg.ChooseStuList.length==0" style="text-align: center;">
<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){ // if(!this.saveMsg.TeacherId){
this.$q.notify({ // this.$q.notify({
type: 'negative', // type: 'negative',
position: "top", // position: "top",
message: `请选择老师` // 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 + "】消课编号;";
}
}) })
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;
} }
// 检查消课编号是否选择 if (tipStr != '') {
let ArrCourseGradeNo = this.saveMsg.ChooseStuList.map(item=>{
return item.CourseGradeNo
})
if(ArrCourseGradeNo.indexOf('')!=-1){
this.$q.notify({ this.$q.notify({
message: "请选择消课编号", message: tipStr,
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