Commit c2c949ad authored by 黄奎's avatar 黄奎

11111

parent 9dd7cee1
...@@ -141,6 +141,7 @@ export function getCanAppointmentStuList_V2(data) { ...@@ -141,6 +141,7 @@ export function getCanAppointmentStuList_V2(data) {
data data
}) })
} }
/** /**
* 新增约课 * 新增约课
*/ */
...@@ -151,6 +152,18 @@ export function setAdminScrollAppointment_V2(data) { ...@@ -151,6 +152,18 @@ export function setAdminScrollAppointment_V2(data) {
data data
}) })
} }
/**
* 新增约课
*/
export function setAdminScrollAppointment_V3(data) {
return request({
url: '/Scroll/SetAdminScrollAppointment_V3',
method: 'post',
data
})
}
/** /**
* 补录约课 * 补录约课
*/ */
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
<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.RoomName }}</div> <div>{{ saveObj.RoomName }}</div>
<q-btn color="accent" size="xs" label="修改" v-if="auth.IsEdit&&saveObj.ClassType==3" @click="modifyRoom" class="q-ml-md" /> <q-btn color="accent" size="xs" label="修改" v-if="auth.IsEdit&&saveObj.ClassType==3" @click="modifyRoom"
class="q-ml-md" />
</template> </template>
</q-field> </q-field>
<q-field filled label="课程" stack-label class="col-6"> <q-field filled label="课程" stack-label class="col-6">
...@@ -74,17 +75,7 @@ ...@@ -74,17 +75,7 @@
<div>{{ saveObj.ScrollMinNum }}</div> <div>{{ saveObj.ScrollMinNum }}</div>
</template> </template>
</q-field> </q-field>
<!-- <q-field
filled
label="最大成班人数:"
stack-label
class="col-6"
v-if="saveObj.ClassType == 3"
>
<template v-slot:control>
<div>{{ saveObj.ScrollMaxNum }}</div>
</template>
</q-field> -->
<q-field filled label="已约学员:" stack-label class="col-12" v-if="saveObj.ClassType == 3"> <q-field filled label="已约学员:" stack-label class="col-12" v-if="saveObj.ClassType == 3">
<template v-slot:control> <template v-slot:control>
<div v-if="saveObj.AppointState == 1 && auth.IsEdit"> <div v-if="saveObj.AppointState == 1 && auth.IsEdit">
...@@ -106,7 +97,7 @@ ...@@ -106,7 +97,7 @@
<div class="row col-12 relative-position" v-else> <div class="row col-12 relative-position" v-else>
<div class="absolute" style="top:-20px;right:0" v-if="auth.IsEdit"> <div class="absolute" style="top:-20px;right:0" v-if="auth.IsEdit">
<q-btn color="accent" size="xs" label="取消" @click="showCancelDig = true" /> <q-btn color="accent" size="xs" label="取消" @click="showCancelDig = true" />
<q-btn color="accent" size="xs" label="补录" @click="showMakeUpDig = true" class="q-ml-sm" /> <q-btn style="display:none;" color="accent" size="xs" label="补录" @click="showMakeUpDig = true" class="q-ml-sm" />
</div> </div>
<span v-for="(x, y) in saveObj.GuestList" :key="y"> <span v-for="(x, y) in saveObj.GuestList" :key="y">
...@@ -132,7 +123,8 @@ ...@@ -132,7 +123,8 @@
<ChangeCourse v-model="showChangeDig" :saveObj="CourseObj" @success="ChangeCourseSuccessHandle" /> <ChangeCourse v-model="showChangeDig" :saveObj="CourseObj" @success="ChangeCourseSuccessHandle" />
<MakeUp v-model="showMakeUpDig" :saveObj="saveObj" :date="dateObj.date" @success="makeUpHandle"></MakeUp> <MakeUp v-model="showMakeUpDig" :saveObj="saveObj" :date="dateObj.date" @success="makeUpHandle"></MakeUp>
<CancelSub v-model="showCancelDig" :saveObj="saveObj" :date="dateObj.date" @success="cancelHandle"></CancelSub> <CancelSub v-model="showCancelDig" :saveObj="saveObj" :date="dateObj.date" @success="cancelHandle"></CancelSub>
<Room v-model="showRoomDig" :room="saveObj.RoomId" :saveObj="saveObj" :date="dateObj.date" @success="roomHandle"></Room> <Room v-model="showRoomDig" :room="saveObj.RoomId" :saveObj="saveObj" :date="dateObj.date" @success="roomHandle">
</Room>
</div> </div>
</template> </template>
<script> <script>
...@@ -168,7 +160,7 @@ ...@@ -168,7 +160,7 @@
}; };
} }
}, },
CourseChapterName:{ CourseChapterName: {
type: String, type: String,
default: "" default: ""
} }
...@@ -179,7 +171,7 @@ ...@@ -179,7 +171,7 @@
showChangeDig: false, showChangeDig: false,
showMakeUpDig: false, showMakeUpDig: false,
showCancelDig: false, showCancelDig: false,
showRoomDig:false, showRoomDig: false,
CourseObj: {} CourseObj: {}
}; };
}, },
...@@ -277,7 +269,7 @@ ...@@ -277,7 +269,7 @@
}, },
roomHandle(val) { roomHandle(val) {
this.$set(this.saveObj, "RoomName", val.Name); this.$set(this.saveObj, "RoomName", val.Name);
this.$emit("success",val); this.$emit("success", val);
}, },
isShowTag(arr, min) { isShowTag(arr, min) {
let n = 0; let n = 0;
...@@ -292,10 +284,9 @@ ...@@ -292,10 +284,9 @@
return false; return false;
} }
}, },
modifyRoom(){ modifyRoom() {
this.showRoomDig=true this.showRoomDig = true
} }
} }
}; };
</script> </script>
\ No newline at end of file
<template> <template>
<div> <div>
<q-dialog <q-dialog v-model="show" persistent transition-show="scale" transition-hide="scale" @input="changeDig">
v-model="show"
persistent
transition-show="scale"
transition-hide="scale"
@input="changeDig"
>
<q-card style="width: 600px;max-width:900px;"> <q-card style="width: 600px;max-width:900px;">
<q-card-section class="row items-center q-pb-none"> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">补录</div> <div class="text-h6">补录</div>
...@@ -16,36 +10,15 @@ ...@@ -16,36 +10,15 @@
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row col q-mr-lg q-col-gutter-md changeCourse"> <div class="row col q-mr-lg q-col-gutter-md changeCourse">
<div class="row col-12"> <div class="row col-12">
<q-input <q-input filled stack-label v-model="msg.StuName" label="学员姓名" class="col-10" hint="提示:需输入学员姓名查询学员列表"
filled @keyup.enter.native="getStu" />
stack-label
v-model="msg.StuName"
label="学员姓名"
class="col-10"
hint="提示:需输入学员姓名查询学员列表"
@keyup.enter.native="getStu"
/>
<div class="col-2 q-pt-md"> <div class="col-2 q-pt-md">
<q-btn <q-btn size="sm" color="accent" label="查询" @click="getStu" class="q-ml-md" />
size="sm"
color="accent"
label="查询"
@click="getStu"
class="q-ml-md"
/>
</div> </div>
</div> </div>
<div class="row col-12"> <div class="row col-12">
<q-select <q-select filled v-model="stuInfo" stack-label option-value="StuId" option-label="StuName"
filled :options="stuOptions" label="学员列表" class="col-10">
v-model="stuInfo"
stack-label
option-value="StuId"
option-label="StuName"
:options="stuOptions"
label="学员列表"
class="col-10"
>
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -55,7 +28,7 @@ ...@@ -55,7 +28,7 @@
</template> </template>
<template v-slot:option="scope"> <template v-slot:option="scope">
<q-item v-bind="scope.itemProps" v-on="scope.itemEvents"> <q-item v-bind="scope.itemProps" v-on="scope.itemEvents">
<q-item-section > <q-item-section>
<div class="flex"> <div class="flex">
<span>{{ scope.opt.StuName }}</span> <span>{{ scope.opt.StuName }}</span>
<span v-if="scope.opt.State===3">(重)</span> <span v-if="scope.opt.State===3">(重)</span>
...@@ -66,13 +39,7 @@ ...@@ -66,13 +39,7 @@
</template> </template>
</q-select> </q-select>
<div class="col-2 q-pt-md"> <div class="col-2 q-pt-md">
<q-btn <q-btn size="sm" color="accent" label="添加" @click="save" class="q-ml-md" />
size="sm"
color="accent"
label="添加"
@click="save"
class="q-ml-md"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -86,11 +53,11 @@ ...@@ -86,11 +53,11 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
getCanAppointmentStuList_V2, getCanAppointmentStuList_V2,
setAdminScrollMakeUp setAdminScrollMakeUp
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
export default { export default {
model: { model: {
prop: "show", prop: "show",
event: "changeshow" event: "changeshow"
...@@ -133,14 +100,8 @@ export default { ...@@ -133,14 +100,8 @@ export default {
this.$emit("changeshow", val); this.$emit("changeshow", val);
}, },
getStu() { getStu() {
// if (!this.msg.StuName) {
// this.$q.notify({ this.msg.NextCourseGradeNo = this.saveObj.Ranks,
// message: "请输入学生姓名",
// position: "top"
// });
// return;
// }
this.msg.NextCourseGradeNo=this.saveObj.Ranks,
this.msg.CourseGradeId = this.saveObj.CourseGradeId; this.msg.CourseGradeId = this.saveObj.CourseGradeId;
getCanAppointmentStuList_V2(this.msg).then(res => { getCanAppointmentStuList_V2(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -163,7 +124,7 @@ export default { ...@@ -163,7 +124,7 @@ export default {
StuId: this.stuInfo.StuId, StuId: this.stuInfo.StuId,
GuestId: this.stuInfo.GuestId, GuestId: this.stuInfo.GuestId,
CourseId: this.saveObj.CourseId, CourseId: this.saveObj.CourseId,
CourseGradeNo:this.saveObj.Ranks, CourseGradeNo: this.saveObj.Ranks,
CourseGradeId: this.saveObj.CourseGradeId CourseGradeId: this.saveObj.CourseGradeId
}; };
setAdminScrollMakeUp(saveMsg).then(res => { setAdminScrollMakeUp(saveMsg).then(res => {
...@@ -177,12 +138,12 @@ export default { ...@@ -177,12 +138,12 @@ export default {
AppointType: 1, AppointType: 1,
AppointmentId: res.Data AppointmentId: res.Data
}); });
this.msg.StuName=[] this.msg.StuName = []
this.stuInfo = ""; this.stuInfo = "";
this.stuOptions = []; this.stuOptions = [];
} }
}); });
} }
} }
}; };
</script> </script>
\ No newline at end of file
...@@ -14,15 +14,16 @@ ...@@ -14,15 +14,16 @@
<div>{{ dateObj.date }}</div> <div>{{ dateObj.date }}</div>
</template> </template>
</q-field> </q-field>
<!-- 详情显示内容 start--> <!-- 详情显示内容 start-->
<div class="col-12" v-if="editType == 2"> <div class="col-12" v-if="editType == 2">
<Detail :dateObj="dateObj" :saveObj="saveObj" :auth="auth" :CourseChapterName="CourseChapterName" @success="detailSuccessHandle" <Detail :dateObj="dateObj" :saveObj="saveObj" :auth="auth" :CourseChapterName="CourseChapterName"
@close="detailCloseHandle" /> @success="detailSuccessHandle" @close="detailCloseHandle" />
</div> </div>
<!-- 详情显示内容 end --> <!-- 详情显示内容 end -->
<q-select filled stack-label use-input option-value="CourseId" option-label="CourseName" <q-select filled stack-label use-input option-value="CourseId" option-label="CourseName"
v-model="teaClassMsg.CourseId" ref="CourseId" :options="CourseList" label="课程" :dense="false" v-model="saveMsg.CourseId" ref="CourseId" :options="CourseList" label="课程" :dense="false" class="col-12"
class="col-12" emit-value map-options @filter="filterCourse" emit-value map-options @filter="filterCourse"
@input="getCanTeacherTimeList(), getChapterTree(), changeCourse()" v-if="editType == 1"> @input="getCanTeacherTimeList(), getChapterTree(), changeCourse()" v-if="editType == 1">
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
...@@ -32,36 +33,38 @@ ...@@ -32,36 +33,38 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<select-tree v-show="teaClassMsg.CourseId > 0 && editType == 1" :treeData="chapterList" <select-tree v-show="saveMsg.CourseId > 0 && editType == 1" :treeData="chapterList"
:defaultArray="returnString" nodeKey="ChapterId" labelKey="ChapterName" childrenKey="ChildList" :defaultArray="returnString" nodeKey="ChapterId" labelKey="ChapterName" childrenKey="ChildList"
tipText="章节" @getChild="getChapter" class="col-12" ref="selectTree"></select-tree> tipText="章节" @getChild="getChapter" class="col-12" ref="selectTree"></select-tree>
<div class="row col-12 q-col-gutter-md"> <div class="row col-12 q-col-gutter-md">
<q-select v-show="teaClassMsg.CourseId > 0 && editType == 1" filled v-model="teaClassMsg.TeacherId" <q-select v-show="saveMsg.CourseId > 0 && editType == 1" filled v-model="saveMsg.TeacherId"
option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师" option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师"
class="col-6" @input="getCanTeacherTimeList" /> class="col-6" @input="getCanTeacherTimeList" />
<q-select v-show=" <q-select v-show="
teaClassMsg.CourseId > 0 && saveMsg.CourseId > 0 &&
teaClassMsg.TeacherId && saveMsg.TeacherId &&
teacherTimeList.length > 0 && teacherTimeList.length > 0 &&
editType == 1 editType == 1
" filled v-model="saveMsg.RoomId" option-value="RoomId" option-label="RoomName" " filled v-model="saveMsg.RoomId" option-value="RoomId" option-label="RoomName"
:options="ClassRoomList" emit-value map-options label="教室" :disable="addStuList.length > 0" :options="ClassRoomList" emit-value map-options label="教室" :disable="addStuList.length > 0"
class="col-6"> class="col-6">
<template v-slot:selected-item="scope"> <template v-slot:selected-item="scope">
<div class="row col-12 flex justify-between"> <span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></div> <div class="row col-12 flex justify-between">
<span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></div>
</template> </template>
<template v-slot:option="scope"> <template v-slot:option="scope">
<q-item v-bind="scope.itemProps" v-on="scope.itemEvents"> <q-item v-bind="scope.itemProps" v-on="scope.itemEvents">
<q-item-section> <q-item-section>
<q-item-label class="row flex justify-between"> <span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></q-item-label> <q-item-label class="row flex justify-between">
<span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
</div> </div>
<template v-if="editType==1">
<q-field filled label-slot stack-label class="col-12" v-if="teaClassMsg.TeacherId > 0"> <q-field filled label-slot stack-label class="col-12" v-if="saveMsg.TeacherId > 0 &&editType==1 ">
<template #label> <template #label>
<div class="row flex"> <div class="row flex">
上课时段 上课时段
...@@ -93,18 +96,9 @@ ...@@ -93,18 +96,9 @@
</div> </div>
</template> </template>
</q-field> </q-field>
<div class="row col-12" v-show=" </template>
(editType == 1 && checkChapter.ChapterId > 0) || <div class="row col-12" v-if="(saveObj&& saveObj.ClassType==3)||editType==1">
(saveObj.ClassType == 3 && saveObj.AppointState == 1) <div class="row col-12" >
">
<div class="row col-6">
<q-input filled stack-label v-model="stuMsg_v2.StuName" label="学员姓名" @keyup.enter.native="getStu_V2"
class="col-9" hint="提示:需输入学员姓名查询学员列表" />
<div class="col-3 q-pt-md q-pl-md">
<q-btn size="sm" color="accent" label="查询" @click="getStu_V2" />
</div>
</div>
<div class="row col-6">
<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="CourseId" :options="stuList" label="学员列表" :dense="false" class="col-6" @filter="filterStu"> ref="CourseId" :options="stuList" label="学员列表" :dense="false" class="col-6" @filter="filterStu">
...@@ -131,10 +125,78 @@ ...@@ -131,10 +125,78 @@
</q-select> </q-select>
</div> </div>
<div class="col-3 q-pt-md q-pl-md"> <div class="col-3 q-pt-md q-pl-md">
<q-btn size="sm" color="accent" label="添加" @click="subscribeCourse" :loading="addLoading" <q-btn size="sm" color="accent" label="添加" @click="subscribeCourse" />
:disable="!stuInfo.StuId || stuInfo.StuId <= 0" />
</div> </div>
</div> </div>
<div class="row col-12">
<table>
<thead>
<tr>
<th>
姓名
</th>
<th>
报名课程
</th>
<th>
最近一次上课章节
</th>
<th>
消课编号/章节
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody v-for="(item,index) in saveMsg.ChooseStuList" :key="index">
<tr>
<td>
{{item.StuName}}
</td>
<td>
{{item.CourseName}}
</td>
<td>
<template v-if="item.AppointmentId==0">
{{item.CourseChapterNoName}}
</template>
</td>
<td>
<template v-if="item.AppointmentId>0">
{{item.CourseChapterNoName}}
</template>
<template v-else>
<q-select filled stack-label use-input option-value="ChapterNo" option-label="ChapterName"
v-model="item.CourseGradeNo" ref="ChapterGradeNo" :options="item.CourseChapterList"
label="消课章节" :dense="false" emit-value map-options class="col-4">
<template v-slot:option="{ itemProps, itemEvents, opt, }">
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
<q-item-label v-html="opt.ChapterName"></q-item-label>
</q-item-section>
<q-item-section side>
<q-item-label v-html="opt.CourseRateName"></q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</template>
</td>
<td>
<a v-if="item.AppointmentId==0" @click="DeleteStu(index)">删除</a>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<q-btn size="sm" color="accent" label="保存" @click="SaveStuAppointment" :loading="addLoading" />
</td>
</tr>
</tfoot>
</table>
</div>
</div> </div>
<q-field filled label="已约学员" stack-label disable class="col-12" <q-field filled label="已约学员" stack-label disable class="col-12"
v-if="editType == 1 && addStuList.length > 0"> v-if="editType == 1 && addStuList.length > 0">
...@@ -146,7 +208,6 @@ ...@@ -146,7 +208,6 @@
</q-field> </q-field>
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="changeDig(false)" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="changeDig(false)" />
...@@ -160,11 +221,13 @@ ...@@ -160,11 +221,13 @@
GetCanTeacherClassTimeList, GetCanTeacherClassTimeList,
getCanAppointmentStuList_V2, getCanAppointmentStuList_V2,
setAdminScrollAppointment_V2, setAdminScrollAppointment_V2,
setAdminScrollAppointment_V3,
getScrollCourseChapterName, getScrollCourseChapterName,
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
import { import {
queryCourseDropdownList, queryCourseDropdownList,
queryChapterTree queryChapterTree,
queryChapterList,
} from "../../../api/course/index"; } from "../../../api/course/index";
import { import {
queryClassRoomList queryClassRoomList
...@@ -211,13 +274,14 @@ ...@@ -211,13 +274,14 @@
} }
}, },
watch: { watch: {
show(val) { show: {
handler(val) {
this.addLoading = false; this.addLoading = false;
this.addStuList = []; this.addStuList = [];
if (val) { if (val) {
this.stuInfo = ""; this.stuInfo = "";
this.teaClassMsg.CourseId = 0; this.saveMsg.CourseId = 0;
this.teaClassMsg.TeacherId = 0; this.saveMsg.TeacherId = 0;
this.chapterList = []; this.chapterList = [];
this.teacherTimeList = []; this.teacherTimeList = [];
this.courseCheckList = []; this.courseCheckList = [];
...@@ -225,23 +289,53 @@ ...@@ -225,23 +289,53 @@
this.allStuList = []; this.allStuList = [];
this.stuMsg_v2.StuName = ""; this.stuMsg_v2.StuName = "";
this.checkChapter = {}; this.checkChapter = {};
if(this.editType==2&&this.saveObj.ClassType==3){ if (this.editType == 2 && this.saveObj.ClassType == 3) {
this.getScrollCourseChapterName() this.getScrollCourseChapterName();
this.getStu_V2();
} }
} }
},
deep: true
},
saveObj: {
handler(val) {
if (val) {
this.saveMsg.Date = this.dateObj.date;
this.saveMsg.TeacherId = this.saveObj.Tid;
this.saveMsg.ShiftSort = this.saveObj.ShiftSort;
this.saveMsg.RoomId = this.saveObj.RoomId;
this.saveMsg.CourseId = this.saveObj.CourseId;
this.saveMsg.CourseGradeNo = this.saveObj.Ranks;
this.saveMsg.CourseGradeId = this.saveObj.CourseGradeId;
this.saveMsg.ChapterNo = this.saveObj.ChapterNo;
this.saveMsg.ChooseStuList = [];
if (this.saveObj.GuestList && this.saveObj.GuestList.length > 0) {
this.saveObj.GuestList.forEach(gItem => {
var cObj = {
StuId: gItem.StuId,
StuName: gItem.GuestName,
GuestId: gItem.GuestId,
LearnCourseId: gItem.LearnCourseId,
CourseName: gItem.LearnCourseName,
CourseGradeNo: gItem.CourseGradeNo,
CourseChapterNoName: gItem.CourseChapterNoName,
AppointmentId: gItem.AppointmentId,
CourseGradeId: gItem.CourseGradeId,
CourseChapterList: [],
}
this.saveMsg.ChooseStuList.push(cObj);
})
} }
}
},
deep: true
},
}, },
data() { data() {
return { return {
CourseList: [], //关联课程下拉数据 CourseList: [], //关联课程下拉数据
AllCourseList: [], //所有课程列表 AllCourseList: [], //所有课程列表
teacherTimeList: [], teacherTimeList: [],
teaClassMsg: {
Date: "",
TeacherId: 0,
CourseId: 0
},
stuList: [], stuList: [],
allStuList: [], allStuList: [],
stuMsg_v2: { stuMsg_v2: {
...@@ -250,20 +344,15 @@ ...@@ -250,20 +344,15 @@
CourseGradeId: 0 CourseGradeId: 0
}, },
detailObj: {}, detailObj: {},
detailMsg: {
StuId: 0,
GuestId: 0
},
saveMsg: { saveMsg: {
Date: "", Date: "",
TeacherId: 0, TeacherId: 0,
ShiftSort: "", ShiftSort: "",
StuId: 0, RoomId: 0,
GuestId: 0,
CourseId: 0, CourseId: 0,
CourseGradeId: 0, ChapterNo: 0,
CourseGradeNo: 0, CourseGradeNo: 0,
RoomId: 0 ChooseStuList: []
}, },
stuInfo: "", stuInfo: "",
checkStuList: [], checkStuList: [],
...@@ -274,12 +363,15 @@ ...@@ -274,12 +363,15 @@
returnString: [], //章节默认值 returnString: [], //章节默认值
addStuList: [], //新增时展示用 addStuList: [], //新增时展示用
ClassRoomList: [], //教室下拉 ClassRoomList: [], //教室下拉
CourseChapterName:"", CourseChapterName: "",
}; };
}, },
mounted() { created() {
this.getCourseList(); this.getCourseList();
this.getClassRoomList(); this.getClassRoomList();
},
mounted() {
}, },
methods: { methods: {
//获取教室下拉 //获取教室下拉
...@@ -317,7 +409,7 @@ ...@@ -317,7 +409,7 @@
}); });
}, },
changeCourse() { changeCourse() {
this.teaClassMsg.TeacherId = 0; this.saveMsg.TeacherId = 0;
this.checkChapter = {}; this.checkChapter = {};
this.checkStuList = []; this.checkStuList = [];
this.stuInfo = ""; this.stuInfo = "";
...@@ -336,14 +428,18 @@ ...@@ -336,14 +428,18 @@
} }
}); });
}, },
//获取老师的空闲上课时段 //获取老师的空闲上课时段
getCanTeacherTimeList() { getCanTeacherTimeList() {
this.teaClassMsg.Date = this.dateObj.date; this.saveMsg.Date = this.dateObj.date;
this.courseCheckList = []; this.courseCheckList = [];
this.stuInfo = ""; this.stuInfo = "";
if (this.teaClassMsg.TeacherId == 0) return; if (this.saveMsg.TeacherId == 0) return;
GetCanTeacherClassTimeList(this.teaClassMsg).then(res => { var qMsg = {
Date: this.saveMsg.Date,
TeacherId: this.saveMsg.TeacherId,
CourseId: this.saveMsg.CourseId
};
GetCanTeacherClassTimeList(qMsg).then(res => {
this.teacherTimeList = res.Data; this.teacherTimeList = res.Data;
if (res.Data.length > 0) { if (res.Data.length > 0) {
this.saveMsg.RoomId = res.Data[0].RoomId; this.saveMsg.RoomId = res.Data[0].RoomId;
...@@ -383,16 +479,24 @@ ...@@ -383,16 +479,24 @@
this.stuMsg_v2.NextCourseGradeNo = this.saveObj.Ranks; this.stuMsg_v2.NextCourseGradeNo = this.saveObj.Ranks;
this.stuMsg_v2.CourseGradeId = this.saveObj.CourseGradeId; this.stuMsg_v2.CourseGradeId = this.saveObj.CourseGradeId;
} }
if ((this.stuMsg_v2.CourseGradeId && this.stuMsg_v2.CourseGradeId > 0) ||
(this.stuMsg_v2.NextCourseGradeNo && this.stuMsg_v2.NextCourseGradeNo > 0)) {
getCanAppointmentStuList_V2(this.stuMsg_v2).then(res => { getCanAppointmentStuList_V2(this.stuMsg_v2).then(res => {
this.stuList = JSON.parse(JSON.stringify(res.Data)); this.stuList = JSON.parse(JSON.stringify(res.Data));
this.allStuList = JSON.parse(JSON.stringify(res.Data)); this.allStuList = JSON.parse(JSON.stringify(res.Data));
}); });
}
},
//删除选择的学生
DeleteStu(index) {
this.saveMsg.ChooseStuList.splice(index, 1);
}, },
//获取章节 //获取章节
getChapterTree() { getChapterTree() {
if (this.teaClassMsg.CourseId == 0) return; if (!this.saveMsg.CourseId) return;
if (this.saveMsg.CourseId == 0) return;
const msg = { const msg = {
CourseId: this.teaClassMsg.CourseId CourseId: this.saveMsg.CourseId
}; };
queryChapterTree(msg).then(res => { queryChapterTree(msg).then(res => {
this.chapterList = res.Data; this.chapterList = res.Data;
...@@ -420,10 +524,17 @@ ...@@ -420,10 +524,17 @@
return; return;
} }
}); });
this.teaClassMsg.TeacherId = 0; this.saveMsg.ChapterNo = this.checkChapter.ChapterNo;
this.saveMsg.TeacherId = 0;
this.teacherTimeList = []; this.teacherTimeList = [];
//获取学生列表
this.getStu_V2();
}, },
//添加学员
subscribeCourse() { subscribeCourse() {
if (this.editType == 1) {
if (this.stuInfo.AppointDate) { if (this.stuInfo.AppointDate) {
if ( if (
new Date(this.dateObj.date).getTime() < new Date(this.dateObj.date).getTime() <
...@@ -437,8 +548,6 @@ ...@@ -437,8 +548,6 @@
return; return;
} }
} }
if (this.editType == 1) {
if (this.courseCheckList.length === 0) { if (this.courseCheckList.length === 0) {
this.$q.notify({ this.$q.notify({
message: "请选择上课时段", message: "请选择上课时段",
...@@ -476,27 +585,32 @@ ...@@ -476,27 +585,32 @@
} }
} }
this.saveMsg.Date = this.dateObj.date; this.saveMsg.Date = this.dateObj.date;
this.saveMsg.StuId = this.stuInfo.StuId;
this.saveMsg.StuName = this.stuInfo.StuName;
this.saveMsg.GuestId = this.stuInfo.GuestId;
this.saveMsg.CourseId = this.teaClassMsg.CourseId;
this.saveMsg.TeacherId = this.teaClassMsg.TeacherId;
this.saveMsg.CourseGradeNo = this.checkChapter.ChapterGradeNo; this.saveMsg.CourseGradeNo = this.checkChapter.ChapterGradeNo;
this.saveMsg.CourseGradeId = this.checkChapter.CourseRate; this.saveMsg.CourseGradeId = this.checkChapter.CourseRate;
this.saveMsg.ShiftSort = newCourseCheckList.map(e => e.Sort).toString(); this.saveMsg.ShiftSort = newCourseCheckList.map(e => e.Sort).toString();
} else if (this.editType == 2) {
this.saveMsg.Date = this.dateObj.date;
this.saveMsg.StuId = this.stuInfo.StuId;
this.saveMsg.StuName = this.stuInfo.StuName;
this.saveMsg.GuestId = this.stuInfo.GuestId;
this.saveMsg.CourseId = 0;
this.saveMsg.TeacherId = this.saveObj.Tid;
this.saveMsg.CourseGradeNo = this.saveObj.Ranks;
this.saveMsg.CourseGradeId = this.saveObj.CourseGradeId;
this.saveMsg.ShiftSort = this.saveObj.ShiftSort;
} }
var sObj = {
StuId: this.stuInfo.StuId,
StuName: this.stuInfo.StuName,
GuestId: this.stuInfo.GuestId,
LearnCourseId: this.stuInfo.CourseId,
CourseName: this.stuInfo.CourseName,
CourseChapterNoName: this.stuInfo.CourseChapterNoName,
AppointmentId: 0,
//学员消课编号
CourseChapterList: [],
};
sObj.CourseGradeId = this.stuInfo.CourseRate;
sObj.CourseGradeNo = "";
this.getCourseChapterList(sObj);
this.saveMsg.ChooseStuList.push(sObj);
},
//保存约课
SaveStuAppointment() {
this.addLoading = true; this.addLoading = true;
setAdminScrollAppointment_V2(this.saveMsg) setAdminScrollAppointment_V3(this.saveMsg)
.then(res => { .then(res => {
this.addLoading = false; this.addLoading = false;
if (res.Code == 1) { if (res.Code == 1) {
...@@ -504,48 +618,50 @@ ...@@ -504,48 +618,50 @@
message: "操作成功", message: "操作成功",
position: "top" position: "top"
}); });
if (this.editType == 1) {
this.addStuList.push(this.stuInfo.StuName); // this.$emit("success");
} this.detailCloseHandle();
if (this.editType == 2) {
this.saveObj.GuestList.push({
GuestName: this.stuInfo.StuName,
AppointmentId: res.Data
});
}
this.stuInfo = "";
this.stuMsg_v2.StuName = "";
this.$emit("success");
} }
}) })
.catch(() => { .catch(() => {
this.addLoading = false; this.addLoading = false;
}); });
}, },
//获取课程章节列表
getCourseChapterList(item) {
queryChapterList({
CourseId: item.LearnCourseId,
IsQRoot: 1
}).then(res => {
if (res.Code == 1) {
item.CourseChapterList = res.Data;
}
});
},
//刷新弹窗
detailSuccessHandle(val) { detailSuccessHandle(val) {
// this.getStu_V2();
this.stuMsg_v2.StuName = ""; this.stuMsg_v2.StuName = "";
this.stuList = []; this.stuList = [];
this.allStuList = []; this.allStuList = [];
this.$emit("success"); this.$emit("success");
}, },
//关闭详情弹窗
detailCloseHandle() { detailCloseHandle() {
this.changeDig(false); this.changeDig(false);
this.$emit("success"); this.$emit("success");
}, },
getScrollCourseChapterName(){ getScrollCourseChapterName() {
const msg={ const msg = {
CourseId:this.saveObj.CourseId, CourseId: this.saveObj.CourseId,
CourseGradeId:this.saveObj.CourseGradeId, CourseGradeId: this.saveObj.CourseGradeId,
CourseGradeNo:this.saveObj.Ranks, CourseGradeNo: this.saveObj.Ranks,
} }
getScrollCourseChapterName(msg).then(res=>{ getScrollCourseChapterName(msg).then(res => {
this.CourseChapterName=res.Data this.CourseChapterName = res.Data
}) })
} }
} }
}; };
</script> </script>
<style> <style>
.q-calendar-daily__day-interval:hover { .q-calendar-daily__day-interval:hover {
...@@ -575,7 +691,6 @@ ...@@ -575,7 +691,6 @@
.q-calendar-daily__day:hover { .q-calendar-daily__day:hover {
background: rgba(0, 0, 255, 0.1); background: rgba(0, 0, 255, 0.1);
} }
</style> </style>
<style> <style>
.upload-assiatant-box .q-uploader__list { .upload-assiatant-box .q-uploader__list {
...@@ -589,5 +704,4 @@ ...@@ -589,5 +704,4 @@
.timeItem { .timeItem {
margin: 10px 0; margin: 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