Commit e012c224 authored by 黄奎's avatar 黄奎
parents 92d5f9de 7c2d4382
...@@ -89,3 +89,43 @@ export function SetAppointmentStuTransfer(data) { ...@@ -89,3 +89,43 @@ export function SetAppointmentStuTransfer(data) {
data data
}) })
} }
/**
* 获取可重上课的学生列表
*/
export function getCanAppointmentAgainList(data) {
return request({
url: '/Scroll/GetCanAppointmentAgainList',
method: 'post',
data
})
}
/**
* 学员重上课
*/
export function setAppointmentAgain(data) {
return request({
url: '/Scroll/SetAppointmentAgain',
method: 'post',
data
})
}
/**
* 获取可补课学生列表
*/
export function getCanMakeupStuList(data) {
return request({
url: '/Scroll/GetCanMakeupStuList',
method: 'post',
data
})
}
/**
* 学员补课
*/
export function setAppointmentMakeup(data) {
return request({
url: '/Scroll/SetAppointmentMakeup',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -54,7 +54,12 @@ ...@@ -54,7 +54,12 @@
</q-field> </q-field>
<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.Ranks }}/{{ saveObj.TotalPlanNum }} <span class="q-ml-sm" v-if="saveObj.ClassType == 3">({{ saveObj.CourseGradeName }})</span></div> <div>
{{ saveObj.Ranks }}/{{ saveObj.TotalPlanNum }}
<span class="q-ml-sm" v-if="saveObj.ClassType == 3"
>({{ saveObj.CourseGradeName }})</span
>
</div>
</template> </template>
</q-field> </q-field>
<q-field <q-field
...@@ -66,18 +71,35 @@ ...@@ -66,18 +71,35 @@
> >
<template v-slot:control> <template v-slot:control>
<div> <div>
<span v-if="saveObj.AppointState == 1" style="color:#ef5350">待确认</span <span v-if="saveObj.AppointState == 1" style="color:#ef5350"
><span v-if="saveObj.AppointState == 2" style="color:#21ba45">已确认</span> >待确认</span
><span v-if="saveObj.AppointState == 2" style="color:#21ba45"
>已确认</span
>
</div> </div>
<q-btn <q-btn
color="accent" color="accent"
size="xs" size="xs"
label="确认" label="确认"
v-if="saveObj.AppointState == 1&&saveObj.GuestList.length>=saveObj.ScrollMinNum&&auth.IsEdit" v-if="
saveObj.AppointState == 1 &&
saveObj.GuestList.length >= saveObj.ScrollMinNum &&
auth.IsEdit
"
@click="confirmSub" @click="confirmSub"
class="q-ml-md" class="q-ml-md"
/> />
<q-badge rounded color="red" label="未成班" style="position:absolute;top:0;right:0" class="q-ml-sm" v-if="saveObj.AppointState == 1&&saveObj.GuestList.length<saveObj.ScrollMinNum"/> <q-badge
rounded
color="red"
label="未成班"
style="position:absolute;top:0;right:0"
class="q-ml-sm"
v-if="
saveObj.AppointState == 1 &&
saveObj.GuestList.length < saveObj.ScrollMinNum
"
/>
</template> </template>
</q-field> </q-field>
<q-field <q-field
...@@ -110,7 +132,7 @@ ...@@ -110,7 +132,7 @@
v-if="saveObj.ClassType == 3" 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 <q-btn
color="accent" color="accent"
...@@ -126,21 +148,43 @@ ...@@ -126,21 +148,43 @@
label="取消预约" label="取消预约"
@click="cancelSub()" @click="cancelSub()"
:disable="checkStuType2.length == 0" :disable="checkStuType2.length == 0"
class="q-mr-sm"
/>
<q-btn
color="accent"
size="xs"
label="补课"
@click="showRelenishDig = true"
class="q-mr-sm"
/>
<q-btn
color="accent"
size="xs"
label="重学"
@click="showReStudyDig = true"
class="q-mr-sm"
/> />
</div> </div>
<div class="row"> <div class="row">
<q-checkbox <q-checkbox
v-model="checkStuType2" v-model="checkStuType2"
v-for="(item, index) in saveObj.GuestList" v-for="(x, y) in saveObj.GuestList"
:key="index" :key="y"
:label="item.GuestName" :val="x.AppointmentId"
:val="item.AppointmentId" >
/> {{ x.GuestName }}
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</q-checkbox>
</div> </div>
</div> </div>
<div v-else> <div v-else>
{{ saveObj.GuestList.map(e => e.GuestName).toString() }} <span v-for="(x, y) in saveObj.GuestList" :key="y">
{{ x.GuestName }}
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
</div> </div>
</template> </template>
</q-field> </q-field>
...@@ -153,12 +197,32 @@ ...@@ -153,12 +197,32 @@
> >
<template v-slot:control> <template v-slot:control>
<div> <div>
{{ saveObj.GuestList.map(e => e.GuestName).toString() }} <span v-for="(x, y) in saveObj.GuestList" :key="y">
{{ x.GuestName }}
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
</div> </div>
</template> </template>
</q-field> </q-field>
</div> </div>
<ChangeCourse v-model="showChangeDig" :saveObj="CourseObj" @success="ChangeCourseSuccessHandle"/> <ChangeCourse
v-model="showChangeDig"
:saveObj="CourseObj"
@success="ChangeCourseSuccessHandle"
/>
<ReStudy
v-model="showReStudyDig"
:saveObj="saveObj"
:date="dateObj.date"
@success="ReStudyHandle"
></ReStudy>
<Relenish
v-model="showRelenishDig"
:saveObj="saveObj"
:date="dateObj.date"
@success="RelenishHandle"
></Relenish>
</div> </div>
</template> </template>
<script> <script>
...@@ -167,9 +231,13 @@ import { ...@@ -167,9 +231,13 @@ import {
SetSureAppointment SetSureAppointment
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
import ChangeCourse from "./changeCourse"; import ChangeCourse from "./changeCourse";
import ReStudy from "./reStudy";
import Relenish from "./replenish.vue";
export default { export default {
components: { components: {
ChangeCourse ChangeCourse,
ReStudy,
Relenish
}, },
props: { props: {
dateObj: { dateObj: {
...@@ -180,20 +248,22 @@ export default { ...@@ -180,20 +248,22 @@ export default {
type: Object, type: Object,
default: null default: null
}, },
auth:{ auth: {
type:Object, type: Object,
default:()=>{ default: () => {
return { return {
IsEdit:false IsEdit: false
} };
} }
} }
}, },
data() { data() {
return { return {
checkStuType2: [] ,// checkStuType2: [], //
showChangeDig:false, showChangeDig: false,
CourseObj:{} showReStudyDig: false,
showRelenishDig: false,
CourseObj: {}
}; };
}, },
methods: { methods: {
...@@ -210,14 +280,14 @@ export default { ...@@ -210,14 +280,14 @@ export default {
message: "操作成功", message: "操作成功",
position: "top" position: "top"
}); });
this.checkStuType2.map((e)=>{ this.checkStuType2.map(e => {
this.saveObj.GuestList.map((_e,_i)=>{ this.saveObj.GuestList.map((_e, _i) => {
if(e==_e.AppointmentId){ if (e == _e.AppointmentId) {
this.saveObj.GuestList.splice(_i,1) this.saveObj.GuestList.splice(_i, 1);
} }
}) });
}) });
this.checkStuType2=[] this.checkStuType2 = [];
this.$emit("success"); this.$emit("success");
} }
}); });
...@@ -251,16 +321,27 @@ export default { ...@@ -251,16 +321,27 @@ export default {
}); });
}, },
//显示调课弹窗 //显示调课弹窗
showChangeCourse(){ showChangeCourse() {
this.CourseObj={ this.CourseObj = {
date:this.dateObj.date, date: this.dateObj.date,
ids:this.checkStuType2.toString() ids: this.checkStuType2.toString()
} };
this.showChangeDig=true this.showChangeDig = true;
}, },
ChangeCourseSuccessHandle(){ ChangeCourseSuccessHandle() {
this.$emit("close"); this.$emit("close");
},
ReStudyHandle(val) {
let arr = this.saveObj.GuestList || [];
arr.push(val);
this.$set(this.saveObj, "GuestList", arr);
this.$emit("success");
},
RelenishHandle(val) {
let arr = this.saveObj.GuestList || [];
arr.push(val);
this.$set(this.saveObj, "GuestList", arr);
this.$emit("success");
} }
} }
}; };
......
<template>
<div>
<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>
<q-space />
<q-btn icon="close" flat round dense @click="changeDig(false)" />
</q-card-section>
<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="reStuMsg.StuName"
label="学员姓名"
class="col-10"
/>
<div class="col-2 q-pt-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"
/>
<div class="col-2 q-pt-md">
<q-btn
size="sm"
color="accent"
label="添加"
@click="save"
class="q-ml-md"
/>
</div>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="changeDig(false)" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
getCanAppointmentAgainList,
setAppointmentAgain
} from "../../../api/studyabroad/subscribe.js";
export default {
model: {
prop: "show",
event: "changeshow"
},
props: {
saveObj: {
type: Object,
default: null
},
date: {
type: String,
default: ""
},
show: {
type: Boolean,
default: false
}
},
watch: {
show(val) {
if (val) {
this.stuOptions = [];
}
}
},
data() {
return {
reStuMsg: {
StuName: "",
ChapterNo: 0,
CourseGradeId: 0
},
stuInfo: "",
stuOptions: []
};
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
getStu() {
if (!this.reStuMsg.StuName) {
this.$q.notify({
message: "请输入学生姓名",
position: "top"
});
return;
}
this.reStuMsg.ChapterNo = this.saveObj.Ranks;
this.reStuMsg.CourseGradeId = this.saveObj.CourseGradeId;
getCanAppointmentAgainList(this.reStuMsg).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,
TeacherId: this.saveObj.Tid,
ShiftSort: this.saveObj.ShiftSort,
StuId: this.stuInfo.StuId,
GuestId: this.stuInfo.GuestId,
CourseId: this.saveObj.CourseId,
ChapterNo: this.saveObj.Ranks,
CourseGradeId: this.saveObj.CourseGradeId
};
setAppointmentAgain(saveMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.$emit("success", {
GuestName: this.stuInfo.StuName,
AppointType:3,
AppointmentId: res.Data
});
this.stuInfo = "";
this.stuOptions = [];
this.getStu();
}
});
}
}
};
</script>
<template>
<div>
<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>
<q-space />
<q-btn icon="close" flat round dense @click="changeDig(false)" />
</q-card-section>
<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-select
filled
v-model="stuInfo"
stack-label
use-input
option-value="StuId"
option-label="StuName"
:options="stuOptions"
label="学员列表"
class="col-10"
@filter="filterStu"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</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"
/>
</div>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="changeDig(false)" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
getCanMakeupStuList,
setAppointmentMakeup
} from "../../../api/studyabroad/subscribe.js";
export default {
model: {
prop: "show",
event: "changeshow"
},
props: {
saveObj: {
type: Object,
default: null
},
date: {
type: String,
default: ""
},
show: {
type: Boolean,
default: false
}
},
watch: {
show(val) {
if (val) {
this.getStu();
this.stuOptions = [];
this.AllStuOptions = [];
}
}
},
data() {
return {
reStuMsg: {
ChapterNo: 0
},
stuInfo: "",
stuOptions: [],
AllStuOptions: []
};
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
getStu() {
const msg = {
ChapterNo: this.saveObj.Ranks
};
getCanMakeupStuList(msg).then(res => {
if (res.Code == 1) {
this.stuOptions = JSON.parse(JSON.stringify(res.Data));
this.AllStuOptions = JSON.parse(JSON.stringify(res.Data));
}
});
},
//筛选学生
filterStu(val, update) {
update(() => {
if (val === "") {
this.stuOptions = JSON.parse(JSON.stringify(this.AllStuOptions));
} else {
const needle = val.toLowerCase();
this.stuOptions = this.AllStuOptions.filter(
v => v.StuName.toLowerCase().indexOf(needle) > -1
);
}
});
},
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,
ChapterNo: this.saveObj.Ranks,
CourseGradeId: this.saveObj.CourseGradeId
};
setAppointmentMakeup(saveMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.$emit("success", {
GuestName: this.stuInfo.StuName,
AppointType: 2,
AppointmentId: res.Data
});
this.stuInfo = "";
this.stuOptions = [];
this.getStu();
}
});
}
}
};
</script>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<q-btn icon="close" flat round dense @click="changeDig(false)" /> <q-btn icon="close" flat round dense @click="changeDig(false)" />
</q-card-section> </q-card-section>
<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"> <div class="row col q-mr-lg q-col-gutter-md" >
<q-field filled label="日期" stack-label class="col-12"> <q-field filled label="日期" stack-label class="col-12">
<template v-slot:control> <template v-slot:control>
<div>{{ dateObj.date }}</div> <div>{{ dateObj.date }}</div>
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
v-show=" v-show="
(editType == 1 || (editType == 1 ||
(saveObj.ClassType == 3 && saveObj.AppointState == 1)) && (saveObj.ClassType == 3 && saveObj.AppointState == 1)) &&
auth.IsEdit auth.IsEdit&&showAddStu()
" "
> >
<div class="col-10"> <div class="col-10">
...@@ -544,6 +544,13 @@ export default { ...@@ -544,6 +544,13 @@ export default {
detailCloseHandle() { detailCloseHandle() {
this.changeDig(false); this.changeDig(false);
this.$emit("success"); this.$emit("success");
},
showAddStu() {
if (new Date(this.dateObj.date).getTime() < new Date(QCalendar.today()).getTime()) {
return false;
} else {
return true;
}
} }
} }
}; };
......
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:clearable="false" :clearable="false"
@change="changeDate" @change="changeDate"
:picker-options="pickerOptions"
> >
</el-date-picker> </el-date-picker>
</template> </template>
...@@ -117,6 +116,7 @@ ...@@ -117,6 +116,7 @@
locale="zh-CN" locale="zh-CN"
class="calendar-container " class="calendar-container "
bordered bordered
no-scroll
hour24-format hour24-format
:interval-start="8" :interval-start="8"
:interval-count="15" :interval-count="15"
...@@ -258,10 +258,12 @@ ...@@ -258,10 +258,12 @@
}}</span> }}</span>
</div> </div>
<div class="flex no-wrap" v-if="__item.ClassType !== 2"> <div class="flex no-wrap" v-if="__item.ClassType !== 2">
<span class="detailLabel">学员:</span <span class="detailLabel">学员:</span>
><span>{{ <span v-for="(x, y) in __item.GuestList" :key="y">
__item.GuestList.map(e => e.GuestName).toString() {{ x.GuestName }}
}}</span> <span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
</div> </div>
<div class="flex no-wrap" v-if="__item.ClassType == 3"> <div class="flex no-wrap" v-if="__item.ClassType == 3">
<span class="detailLabel"> <span class="detailLabel">
...@@ -358,9 +360,11 @@ ...@@ -358,9 +360,11 @@
<div class="flex no-wrap" v-if="__item.ClassType !== 2"> <div class="flex no-wrap" v-if="__item.ClassType !== 2">
<span class="detailLabel">学员:</span <span class="detailLabel">学员:</span
><span>{{ ><span v-for="(x, y) in __item.GuestList" :key="y">
__item.GuestList.map(e => e.GuestName).toString() {{ x.GuestName }}
}}</span> <span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
</div> </div>
<div class="flex no-wrap" v-if="__item.ClassType == 3"> <div class="flex no-wrap" v-if="__item.ClassType == 3">
<span class="detailLabel"> <span class="detailLabel">
...@@ -411,7 +415,6 @@ ...@@ -411,7 +415,6 @@
</template> </template>
</q-calendar> </q-calendar>
</div> </div>
<SubscribeForm <SubscribeForm
v-model="showForm" v-model="showForm"
:editType="editType" :editType="editType"
...@@ -447,11 +450,11 @@ export default { ...@@ -447,11 +450,11 @@ export default {
}, },
pickerOptions: { pickerOptions: {
disabledDate: time => { disabledDate: time => {
// let timeRange = this.config.AppointDay * 24 * 60 * 60 * 1000; let timeRange = this.config.AppointDay * 24 * 60 * 60 * 1000;
// let _maxTime = Date.now() - 8.64e7 + timeRange; // 最大时间 let _maxTime = Date.now() - 8.64e7 + timeRange; // 最大时间
// return ( return (
// time.getTime() < Date.now() - 8.64e7 || time.getTime() > _maxTime time.getTime() < Date.now() - 8.64e7 || time.getTime() > _maxTime
// ); );
} }
}, },
viewType: "week", viewType: "week",
...@@ -548,7 +551,8 @@ export default { ...@@ -548,7 +551,8 @@ export default {
this.msg.EndDate = this.$refs.calendar.lastEnd; this.msg.EndDate = this.$refs.calendar.lastEnd;
this.getData(); this.getData();
this.getAppointmentConfig(); this.getAppointmentConfig();
const ActionMenuList = JSON.parse(localStorage.getItem("loginUserInfo")).data.ActionMenuList const ActionMenuList = JSON.parse(localStorage.getItem("loginUserInfo"))
.data.ActionMenuList;
const res = ActionMenuList.find(e => { const res = ActionMenuList.find(e => {
return e.FunctionCode == "subscribe_edit"; return e.FunctionCode == "subscribe_edit";
}); });
...@@ -697,6 +701,7 @@ export default { ...@@ -697,6 +701,7 @@ export default {
}, },
onClickIntervalHeader2(data) {}, onClickIntervalHeader2(data) {},
showDetail(data, date, tid) { showDetail(data, date, tid) {
console.log(700, data);
this.showForm = true; this.showForm = true;
this.editType = 2; this.editType = 2;
this.dateObj.date = date; this.dateObj.date = date;
......
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