Commit 33735eab authored by 罗超's avatar 罗超

222

parent 26abd68f
......@@ -88,4 +88,44 @@ export function SetAppointmentStuTransfer(data) {
method: 'post',
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
......@@ -81,7 +81,6 @@ export default {
show(val) {
if (val) {
this.msg.StartDate = this.saveObj.date;
console.log(99, this.saveObj);
this.getData();
}
}
......
......@@ -54,7 +54,12 @@
</q-field>
<q-field filled label="进度" stack-label class="col-6">
<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>
</q-field>
<q-field
......@@ -66,18 +71,35 @@
>
<template v-slot:control>
<div>
<span v-if="saveObj.AppointState == 1" style="color:#ef5350">待确认</span
><span v-if="saveObj.AppointState == 2" style="color:#21ba45">已确认</span>
<span v-if="saveObj.AppointState == 1" style="color:#ef5350"
>待确认</span
><span v-if="saveObj.AppointState == 2" style="color:#21ba45"
>已确认</span
>
</div>
<q-btn
color="accent"
size="xs"
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"
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>
</q-field>
<q-field
......@@ -110,7 +132,7 @@
v-if="saveObj.ClassType == 3"
>
<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">
<q-btn
color="accent"
......@@ -126,21 +148,43 @@
label="取消预约"
@click="cancelSub()"
: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 class="row">
<q-checkbox
v-model="checkStuType2"
v-for="(item, index) in saveObj.GuestList"
:key="index"
:label="item.GuestName"
:val="item.AppointmentId"
/>
v-for="(x, y) in saveObj.GuestList"
:key="y"
:val="x.AppointmentId"
>
{{ x.GuestName }}
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</q-checkbox>
</div>
</div>
<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>
</template>
</q-field>
......@@ -153,12 +197,32 @@
>
<template v-slot:control>
<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>
</template>
</q-field>
</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>
</template>
<script>
......@@ -167,9 +231,13 @@ import {
SetSureAppointment
} from "../../../api/studyabroad/subscribe.js";
import ChangeCourse from "./changeCourse";
import ReStudy from "./reStudy";
import Relenish from "./replenish.vue";
export default {
components: {
ChangeCourse
ChangeCourse,
ReStudy,
Relenish
},
props: {
dateObj: {
......@@ -180,20 +248,22 @@ export default {
type: Object,
default: null
},
auth:{
type:Object,
default:()=>{
auth: {
type: Object,
default: () => {
return {
IsEdit:false
}
IsEdit: false
};
}
}
},
data() {
return {
checkStuType2: [] ,//
showChangeDig:false,
CourseObj:{}
checkStuType2: [], //
showChangeDig: false,
showReStudyDig: false,
showRelenishDig: false,
CourseObj: {}
};
},
methods: {
......@@ -210,14 +280,14 @@ export default {
message: "操作成功",
position: "top"
});
this.checkStuType2.map((e)=>{
this.saveObj.GuestList.map((_e,_i)=>{
if(e==_e.AppointmentId){
this.saveObj.GuestList.splice(_i,1)
}
})
})
this.checkStuType2=[]
this.checkStuType2.map(e => {
this.saveObj.GuestList.map((_e, _i) => {
if (e == _e.AppointmentId) {
this.saveObj.GuestList.splice(_i, 1);
}
});
});
this.checkStuType2 = [];
this.$emit("success");
}
});
......@@ -251,16 +321,27 @@ export default {
});
},
//显示调课弹窗
showChangeCourse(){
this.CourseObj={
date:this.dateObj.date,
ids:this.checkStuType2.toString()
}
this.showChangeDig=true
showChangeCourse() {
this.CourseObj = {
date: this.dateObj.date,
ids: this.checkStuType2.toString()
};
this.showChangeDig = true;
},
ChangeCourseSuccessHandle(){
ChangeCourseSuccessHandle() {
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
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 {
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 = [];
}
}
},
data() {
return {
reStuMsg: {
ChapterNo: 0
},
stuInfo: "",
stuOptions: []
};
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
getStu() {
const msg = {
ChapterNo: this.saveObj.Ranks
};
getCanMakeupStuList(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,
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 @@
<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">
<div class="row col q-mr-lg q-col-gutter-md" >
<q-field filled label="日期" stack-label class="col-12">
<template v-slot:control>
<div>{{ dateObj.date }}</div>
......@@ -138,7 +138,7 @@
v-show="
(editType == 1 ||
(saveObj.ClassType == 3 && saveObj.AppointState == 1)) &&
auth.IsEdit
auth.IsEdit&&showAddStu()
"
>
<div class="col-10">
......@@ -545,6 +545,13 @@ export default {
detailCloseHandle() {
this.changeDig(false);
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 @@
value-format="yyyy-MM-dd"
:clearable="false"
@change="changeDate"
:picker-options="pickerOptions"
>
</el-date-picker>
</template>
......@@ -117,6 +116,7 @@
locale="zh-CN"
class="calendar-container "
bordered
no-scroll
hour24-format
:interval-start="8"
:interval-count="15"
......@@ -258,10 +258,12 @@
}}</span>
</div>
<div class="flex no-wrap" v-if="__item.ClassType !== 2">
<span class="detailLabel">学员:</span
><span>{{
__item.GuestList.map(e => e.GuestName).toString()
}}</span>
<span class="detailLabel">学员:</span>
<span v-for="(x, y) in __item.GuestList" :key="y">
{{ x.GuestName }}
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
</div>
<div class="flex no-wrap" v-if="__item.ClassType == 3">
<span class="detailLabel">
......@@ -358,9 +360,11 @@
<div class="flex no-wrap" v-if="__item.ClassType !== 2">
<span class="detailLabel">学员:</span
><span>{{
__item.GuestList.map(e => e.GuestName).toString()
}}</span>
><span v-for="(x, y) in __item.GuestList" :key="y">
{{ x.GuestName }}
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
</div>
<div class="flex no-wrap" v-if="__item.ClassType == 3">
<span class="detailLabel">
......@@ -411,7 +415,6 @@
</template>
</q-calendar>
</div>
<SubscribeForm
v-model="showForm"
:editType="editType"
......@@ -447,11 +450,11 @@ export default {
},
pickerOptions: {
disabledDate: time => {
// let timeRange = this.config.AppointDay * 24 * 60 * 60 * 1000;
// let _maxTime = Date.now() - 8.64e7 + timeRange; // 最大时间
// return (
// time.getTime() < Date.now() - 8.64e7 || time.getTime() > _maxTime
// );
let timeRange = this.config.AppointDay * 24 * 60 * 60 * 1000;
let _maxTime = Date.now() - 8.64e7 + timeRange; // 最大时间
return (
time.getTime() < Date.now() - 8.64e7 || time.getTime() > _maxTime
);
}
},
viewType: "week",
......@@ -548,7 +551,8 @@ export default {
this.msg.EndDate = this.$refs.calendar.lastEnd;
this.getData();
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 => {
return e.FunctionCode == "subscribe_edit";
});
......@@ -697,6 +701,7 @@ export default {
},
onClickIntervalHeader2(data) {},
showDetail(data, date, tid) {
console.log(700, data);
this.showForm = true;
this.editType = 2;
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