Commit a78ee0f5 authored by youjie's avatar youjie

no message

parent 3095a020
......@@ -24,7 +24,8 @@
<q-select filled stack-label use-input option-value="CourseId" option-label="CourseName"
v-model="saveMsg.CourseId" ref="CourseId" :options="CourseList" label="课程" :dense="false" class="col-12"
emit-value map-options @filter="filterCourse"
@input="getCanTeacherTimeList(), getChapterTree(), changeCourse()" v-if="editType == 1">
@input="getCanTeacherTimeList(), getChapterTree(), changeCourse()" v-if="editType == 1"
:rules="[val => !!val || '请选择课程']">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
......@@ -101,7 +102,8 @@
<div class="row col-12" >
<div class="col-9">
<q-select filled stack-label use-input option-value="StuId" option-label="StuName" v-model="stuInfo"
ref="CourseId" :options="stuList" label="学员列表" :dense="false" class="col-6" @filter="filterStu">
ref="StuId" :options="stuList" label="学员列表" :dense="false" class="col-6" @filter="filterStu"
:rules="[val => !!val || '请选择学员']">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
......@@ -560,6 +562,32 @@
return;
}
}
this.$refs.CourseId.validate();
this.$refs.StuId.validate();
if (!this.saveMsg.CourseId) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择课程`
})
return;
}
if(!this.saveMsg.ChapterNo){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择章节`
})
return;
}
if(!this.saveMsg.TeacherId){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择老师`
})
return;
}
if (this.courseCheckList.length === 0) {
this.$q.notify({
message: "请选择上课时段",
......@@ -568,6 +596,14 @@
});
return;
}
if (!this.stuInfo) {
this.$q.notify({
message: "请选择学员",
position: "top",
type: "negative"
});
return;
}
const totalTime = this.courseCheckList.reduce((pre, cur) => {
return (pre += cur.Minutes);
}, 0);
......@@ -615,12 +651,78 @@
};
sObj.CourseGradeId = this.stuInfo.CourseRate;
sObj.CourseGradeNo = "";
if(this.saveMsg.ChooseStuList.length>0){
let ArrId = this.saveMsg.ChooseStuList.map(item=>{return item.GuestId})
if(ArrId.indexOf(sObj.GuestId)==-1){
this.getCourseChapterList(sObj);
this.saveMsg.ChooseStuList.push(sObj);
}else{
this.$q.notify({
message: "该学员已选择,试试别的学员吧",
position: "top",
type: "negative"
});
}
}else{
this.getCourseChapterList(sObj);
this.saveMsg.ChooseStuList.push(sObj);
}
},
//保存约课
SaveStuAppointment() {
this.$refs.CourseId.validate();
this.$refs.StuId.validate();
if (!this.saveMsg.CourseId) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择课程`
})
return;
}
if(!this.saveMsg.ChapterNo){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择章节`
})
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;
}
let ArrCourseGradeNo = this.saveMsg.ChooseStuList.map(item=>{
return item.CourseGradeNo
})
if(ArrCourseGradeNo.indexOf('')!=-1){
this.$q.notify({
message: "请选择消课编号",
position: "top",
type: "negative"
});
return;
}
this.addLoading = true;
setAdminScrollAppointment_V3(this.saveMsg)
.then(res => {
......
......@@ -12,9 +12,7 @@
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="postMsg.Date" @input="() => $refs.qDateProxy1.hide()"
:rules="[val => !!val || '请选择预约日期']"
/>
<q-date v-model="postMsg.Date" @input="() => $refs.qDateProxy1.hide()"/>
</q-popup-proxy>
</q-icon>
</template>
......
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