Commit c2c949ad authored by 黄奎's avatar 黄奎

11111

parent 9dd7cee1
......@@ -141,6 +141,7 @@ export function getCanAppointmentStuList_V2(data) {
data
})
}
/**
* 新增约课
*/
......@@ -151,6 +152,18 @@ export function setAdminScrollAppointment_V2(data) {
data
})
}
/**
* 新增约课
*/
export function setAdminScrollAppointment_V3(data) {
return request({
url: '/Scroll/SetAdminScrollAppointment_V3',
method: 'post',
data
})
}
/**
* 补录约课
*/
......
......@@ -9,7 +9,8 @@
<q-field filled label="教室" stack-label class="col-6">
<template v-slot:control>
<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>
</q-field>
<q-field filled label="课程" stack-label class="col-6">
......@@ -48,7 +49,7 @@
<span v-if="saveObj.ClassType == 3">{{ saveObj.Ranks||0 }}次课</span>
<span class="q-ml-sm"
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>
</template>
</q-field>
......@@ -74,22 +75,12 @@
<div>{{ saveObj.ScrollMinNum }}</div>
</template>
</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">
<template v-slot:control>
<div v-if="saveObj.AppointState == 1 && auth.IsEdit">
<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" />
<q-btn color="accent" size="xs" label="取消预约" @click="cancelSub()" :disable="checkStuType2.length == 0"
class="q-mr-sm" />
......@@ -106,7 +97,7 @@
<div class="row col-12 relative-position" v-else>
<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="showMakeUpDig = true" class="q-ml-sm" />
<q-btn style="display:none;" color="accent" size="xs" label="补录" @click="showMakeUpDig = true" class="q-ml-sm" />
</div>
<span v-for="(x, y) in saveObj.GuestList" :key="y">
......@@ -132,7 +123,8 @@
<ChangeCourse v-model="showChangeDig" :saveObj="CourseObj" @success="ChangeCourseSuccessHandle" />
<MakeUp v-model="showMakeUpDig" :saveObj="saveObj" :date="dateObj.date" @success="makeUpHandle"></MakeUp>
<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>
</template>
<script>
......@@ -168,7 +160,7 @@
};
}
},
CourseChapterName:{
CourseChapterName: {
type: String,
default: ""
}
......@@ -179,7 +171,7 @@
showChangeDig: false,
showMakeUpDig: false,
showCancelDig: false,
showRoomDig:false,
showRoomDig: false,
CourseObj: {}
};
},
......@@ -277,7 +269,7 @@
},
roomHandle(val) {
this.$set(this.saveObj, "RoomName", val.Name);
this.$emit("success",val);
this.$emit("success", val);
},
isShowTag(arr, min) {
let n = 0;
......@@ -292,10 +284,9 @@
return false;
}
},
modifyRoom(){
this.showRoomDig=true
modifyRoom() {
this.showRoomDig = true
}
}
};
</script>
</script>
\ No newline at end of file
<template>
<div>
<q-dialog
v-model="show"
persistent
transition-show="scale"
transition-hide="scale"
@input="changeDig"
>
<q-dialog v-model="show" persistent transition-show="scale" transition-hide="scale" @input="changeDig">
<q-card style="width: 600px;max-width:900px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">补录</div>
......@@ -16,36 +10,15 @@
<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-12">
<q-input
filled
stack-label
v-model="msg.StuName"
label="学员姓名"
class="col-10"
hint="提示:需输入学员姓名查询学员列表"
@keyup.enter.native="getStu"
/>
<q-input filled stack-label v-model="msg.StuName" label="学员姓名" class="col-10" hint="提示:需输入学员姓名查询学员列表"
@keyup.enter.native="getStu" />
<div class="col-2 q-pt-md">
<q-btn
size="sm"
color="accent"
label="查询"
@click="getStu"
class="q-ml-md"
/>
<q-btn size="sm" color="accent" label="查询" @click="getStu" class="q-ml-md" />
</div>
</div>
<div class="row col-12">
<q-select
filled
v-model="stuInfo"
stack-label
option-value="StuId"
option-label="StuName"
:options="stuOptions"
label="学员列表"
class="col-10"
>
<q-select filled v-model="stuInfo" stack-label option-value="StuId" option-label="StuName"
:options="stuOptions" label="学员列表" class="col-10">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
......@@ -54,25 +27,19 @@
</q-item>
</template>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps" v-on="scope.itemEvents">
<q-item-section >
<div class="flex">
<span>{{ scope.opt.StuName }}</span>
<span v-if="scope.opt.State===3">(重)</span>
<span class="q-ml-sm">{{ scope.opt.CourseName }}</span>
</div>
</q-item-section>
</q-item>
<q-item v-bind="scope.itemProps" v-on="scope.itemEvents">
<q-item-section>
<div class="flex">
<span>{{ scope.opt.StuName }}</span>
<span v-if="scope.opt.State===3">(重)</span>
<span class="q-ml-sm">{{ scope.opt.CourseName }}</span>
</div>
</q-item-section>
</q-item>
</template>
</q-select>
<div class="col-2 q-pt-md">
<q-btn
size="sm"
color="accent"
label="添加"
@click="save"
class="q-ml-md"
/>
<q-btn size="sm" color="accent" label="添加" @click="save" class="q-ml-md" />
</div>
</div>
</div>
......@@ -86,103 +53,97 @@
</div>
</template>
<script>
import {
getCanAppointmentStuList_V2,
setAdminScrollMakeUp
} from "../../../api/studyabroad/subscribe.js";
export default {
model: {
prop: "show",
event: "changeshow"
},
props: {
saveObj: {
type: Object,
default: null
},
date: {
type: String,
default: ""
import {
getCanAppointmentStuList_V2,
setAdminScrollMakeUp
} from "../../../api/studyabroad/subscribe.js";
export default {
model: {
prop: "show",
event: "changeshow"
},
show: {
type: Boolean,
default: false
}
},
watch: {
show(val) {
if (val) {
this.stuOptions = [];
}
}
},
data() {
return {
msg: {
StuName: "",
NextCourseGradeNo: 0,
CourseGradeId: 0
props: {
saveObj: {
type: Object,
default: null
},
date: {
type: String,
default: ""
},
stuInfo: "",
stuOptions: []
};
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
show: {
type: Boolean,
default: false
}
},
getStu() {
// if (!this.msg.StuName) {
// this.$q.notify({
// message: "请输入学生姓名",
// 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;
watch: {
show(val) {
if (val) {
this.stuOptions = [];
}
});
},
save() {
if (!this.stuInfo.StuId) {
this.$q.notify({
message: "请选择学生",
position: "top"
});
return;
}
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
},
data() {
return {
msg: {
StuName: "",
NextCourseGradeNo: 0,
CourseGradeId: 0
},
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({
message: "操作成功",
message: "请选择学生",
position: "top"
});
this.$emit("success", {
GuestName: this.stuInfo.StuName,
AppointType: 1,
AppointmentId: res.Data
});
this.msg.StuName=[]
this.stuInfo = "";
this.stuOptions = [];
return;
}
});
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