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">
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
<span v-if="saveObj.ClassType == 3">{{ saveObj.Ranks||0 }}次课</span> <span v-if="saveObj.ClassType == 3">{{ saveObj.Ranks||0 }}次课</span>
<span class="q-ml-sm" <span class="q-ml-sm"
v-if="saveObj.ClassType == 3&&saveObj.CourseGradeName">({{ saveObj.CourseGradeName }})</span> v-if="saveObj.ClassType == 3&&saveObj.CourseGradeName">({{ saveObj.CourseGradeName }})</span>
<span class="q-ml-md">{{CourseChapterName}}</span> <span class="q-ml-md">{{CourseChapterName}}</span>
</div> </div>
</template> </template>
</q-field> </q-field>
...@@ -74,22 +75,12 @@ ...@@ -74,22 +75,12 @@
<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">
<div class="q-mt-sm flex justify-start"> <div class="q-mt-sm flex justify-start">
<q-btn color="accent" size="xs" label="调课" @click="showChangeCourse" :disable="checkStuType2.length == 0" <q-btn color="accent" size="xs" label="调课" @click="showChangeCourse" :disable="checkStuType2.length == 0"
class="q-mr-sm" /> class="q-mr-sm" />
<q-btn color="accent" size="xs" label="取消预约" @click="cancelSub()" :disable="checkStuType2.length == 0" <q-btn color="accent" size="xs" label="取消预约" @click="cancelSub()" :disable="checkStuType2.length == 0"
class="q-mr-sm" /> class="q-mr-sm" />
...@@ -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">
...@@ -54,25 +27,19 @@ ...@@ -54,25 +27,19 @@
</q-item> </q-item>
</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>
<span class="q-ml-sm">{{ scope.opt.CourseName }}</span> <span class="q-ml-sm">{{ scope.opt.CourseName }}</span>
</div> </div>
</q-item-section> </q-item-section>
</q-item> </q-item>
</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,103 +53,97 @@ ...@@ -86,103 +53,97 @@
</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"
},
props: {
saveObj: {
type: Object,
default: null
},
date: {
type: String,
default: ""
}, },
show: { props: {
type: Boolean, saveObj: {
default: false type: Object,
} default: null
}, },
watch: { date: {
show(val) { type: String,
if (val) { default: ""
this.stuOptions = [];
}
}
},
data() {
return {
msg: {
StuName: "",
NextCourseGradeNo: 0,
CourseGradeId: 0
}, },
stuInfo: "", show: {
stuOptions: [] type: Boolean,
}; default: false
}, }
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
}, },
getStu() { watch: {
// if (!this.msg.StuName) { show(val) {
// this.$q.notify({ if (val) {
// message: "请输入学生姓名", this.stuOptions = [];
// position: "top"
// });
// return;
// }
this.msg.NextCourseGradeNo=this.saveObj.Ranks,
this.msg.CourseGradeId = this.saveObj.CourseGradeId;
getCanAppointmentStuList_V2(this.msg).then(res => {
if (res.Code == 1) {
this.stuOptions = res.Data;
} }
});
},
save() {
if (!this.stuInfo.StuId) {
this.$q.notify({
message: "请选择学生",
position: "top"
});
return;
} }
const saveMsg = { },
Date: this.date, data() {
TeacherId: this.saveObj.Tid, return {
ShiftSort: this.saveObj.ShiftSort, msg: {
StuId: this.stuInfo.StuId, StuName: "",
GuestId: this.stuInfo.GuestId, NextCourseGradeNo: 0,
CourseId: this.saveObj.CourseId, CourseGradeId: 0
CourseGradeNo:this.saveObj.Ranks, },
CourseGradeId: this.saveObj.CourseGradeId stuInfo: "",
stuOptions: []
}; };
setAdminScrollMakeUp(saveMsg).then(res => { },
if (res.Code == 1) { methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
getStu() {
this.msg.NextCourseGradeNo = this.saveObj.Ranks,
this.msg.CourseGradeId = this.saveObj.CourseGradeId;
getCanAppointmentStuList_V2(this.msg).then(res => {
if (res.Code == 1) {
this.stuOptions = res.Data;
}
});
},
save() {
if (!this.stuInfo.StuId) {
this.$q.notify({ this.$q.notify({
message: "操作成功", message: "请选择学生",
position: "top" position: "top"
}); });
this.$emit("success", { return;
GuestName: this.stuInfo.StuName,
AppointType: 1,
AppointmentId: res.Data
});
this.msg.StuName=[]
this.stuInfo = "";
this.stuOptions = [];
} }
}); const saveMsg = {
Date: this.date,
TeacherId: this.saveObj.Tid,
ShiftSort: this.saveObj.ShiftSort,
StuId: this.stuInfo.StuId,
GuestId: this.stuInfo.GuestId,
CourseId: this.saveObj.CourseId,
CourseGradeNo: this.saveObj.Ranks,
CourseGradeId: this.saveObj.CourseGradeId
};
setAdminScrollMakeUp(saveMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.$emit("success", {
GuestName: this.stuInfo.StuName,
AppointType: 1,
AppointmentId: res.Data
});
this.msg.StuName = []
this.stuInfo = "";
this.stuOptions = [];
}
});
}
} }
} };
}; </script>
</script> \ 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