Commit c6c773ca authored by 黄奎's avatar 黄奎

取消约课调整

parent 313f610c
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<q-field filled label="老师" stack-label class="col-6"> <q-field filled label="老师" stack-label class="col-6">
<template v-slot:control> <template v-slot:control>
<div>{{ saveObj.TeacherName }}</div> <div>{{ saveObj.TeacherName }}</div>
<!-- dateObj.date>formattedString -->
<q-btn color="accent" size="xs" label="修改" <q-btn color="accent" size="xs" label="修改"
v-if="auth.IsEdit&&saveObj.ClassType==3&&(saveObj.State==1||saveObj.State==2)" @click="modifyTeacher" v-if="auth.IsEdit&&saveObj.ClassType==3&&(saveObj.State==1||saveObj.State==2)" @click="modifyTeacher"
class="q-ml-md" /> class="q-ml-md" />
...@@ -73,6 +72,8 @@ ...@@ -73,6 +72,8 @@
saveObj.AppointState == 1 && saveObj.AppointState == 1 &&
isShowTag(saveObj.GuestList, saveObj.ScrollMinNum) isShowTag(saveObj.GuestList, saveObj.ScrollMinNum)
" /> " />
<q-btn color="accent" size="xs" label="取消" v-if="auth.IsEdit
" @click="CancelAdminAppointment(saveObj)" class="q-ml-md" :loading="saveLoading" />
</template> </template>
</q-field> </q-field>
<q-field filled label="最小成班人数:" stack-label class="col-6" v-if="saveObj.ClassType == 3"> <q-field filled label="最小成班人数:" stack-label class="col-6" v-if="saveObj.ClassType == 3">
...@@ -138,14 +139,17 @@ ...@@ -138,14 +139,17 @@
<script> <script>
import { import {
CancelAppointment, CancelAppointment,
SetSureAppointment SetSureAppointment,
cancelSureAppointment
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
import ChangeCourse from "./changeCourse"; import ChangeCourse from "./changeCourse";
import MakeUp from "./makeUp.vue" import MakeUp from "./makeUp.vue"
import CancelSub from './deleteStu' import CancelSub from './deleteStu'
import Room from "./changeRoom.vue" import Room from "./changeRoom.vue"
import changeTeacher from "./changeTeacher.vue" import changeTeacher from "./changeTeacher.vue"
import { date } from 'quasar' import {
date
} from 'quasar'
export default { export default {
components: { components: {
ChangeCourse, ChangeCourse,
...@@ -259,6 +263,45 @@ ...@@ -259,6 +263,45 @@
} }
}); });
}, },
//取消预约
CancelAdminAppointment(item) {
let that = this;
var postMsg = {
AppointIds: "",
Date: this.dateObj.date,
ShiftSort: item.ShiftSort,
TeacherId: item.Tid
};
var tempList = [];
if (item.GuestList && item.GuestList.length > 0) {
item.GuestList.forEach(subItem => {
tempList.push(subItem.AppointmentId);
})
}
if (tempList && tempList.length > 0) {
postMsg.AppointIds = tempList.join(",");
}
this.$q
.dialog({
title: "提示信息",
message: "是否要取消本次预约",
cancel: true,
ok: "是",
cancel: "否"
})
.onOk(() => {
cancelSureAppointment(postMsg).then(res => {
if (res.Code == 1) {
that.$q.notify({
message: "操作成功",
position: "top"
});
that.$emit("close");
}
});
})
.onCancel(() => {});
},
//显示调课弹窗 //显示调课弹窗
showChangeCourse() { showChangeCourse() {
this.CourseObj = { this.CourseObj = {
......
...@@ -482,14 +482,6 @@ ...@@ -482,14 +482,6 @@
}, },
//获取学生列表 //获取学生列表
getStu_V2() { getStu_V2() {
// if (!this.stuMsg_v2.StuName) {
// this.$q.notify({
// position: "top",
// message: "请输入学生姓名",
// timeout: 2500
// });
// return;
// }
if (this.editType == 1) { if (this.editType == 1) {
this.stuMsg_v2.NextCourseGradeNo = this.checkChapter.ChapterGradeNo; this.stuMsg_v2.NextCourseGradeNo = this.checkChapter.ChapterGradeNo;
this.stuMsg_v2.CourseGradeId = this.checkChapter.CourseRate; this.stuMsg_v2.CourseGradeId = this.checkChapter.CourseRate;
...@@ -544,6 +536,7 @@ ...@@ -544,6 +536,7 @@
} }
}); });
this.saveMsg.ChapterNo = this.checkChapter.ChapterNo; this.saveMsg.ChapterNo = this.checkChapter.ChapterNo;
// HK 2024-09-06 注释,可以不选老师,不选老师就默认通班的时间段
// this.saveMsg.TeacherId = 0; // this.saveMsg.TeacherId = 0;
// this.teacherTimeList = []; // this.teacherTimeList = [];
//获取学生列表 //获取学生列表
...@@ -677,48 +670,6 @@ ...@@ -677,48 +670,6 @@
}, },
//保存约课 //保存约课
SaveStuAppointment() { 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;
// }
var tipStr = "" var tipStr = ""
if (this.saveMsg.ChooseStuList && this.saveMsg.ChooseStuList.length > 0) { if (this.saveMsg.ChooseStuList && this.saveMsg.ChooseStuList.length > 0) {
this.saveMsg.ChooseStuList.forEach(item => { this.saveMsg.ChooseStuList.forEach(item => {
......
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