Commit 56108ccb authored by 黄奎's avatar 黄奎

学员取消

parent efe23b0f
......@@ -59,16 +59,7 @@ export function SetAdminScrollAppointment(data) {
data
})
}
/**
* 后台取消预约
*/
export function CancelAppointment(data) {
return request({
url: '/Scroll/CancelAppointment',
method: 'post',
data
})
}
/**
* 后台确认约课
*/
......@@ -174,6 +165,7 @@ export function setAdminScrollMakeUp(data) {
data
})
}
/**
* 取消已确认的约课
*/
......@@ -184,6 +176,18 @@ export function cancelSureAppointment(data) {
data
})
}
/**
* 后台取消预约
*/
export function CancelAppointment(data) {
return request({
url: '/Scroll/CancelAppointment',
method: 'post',
data
})
}
/**
* 调整上课教室
*/
......
......@@ -9,39 +9,31 @@
<div class="row wrap">
<q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id"
ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-12 q-pb-lg" emit-value
map-options/>
map-options />
</div>
<div class="row wrap">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.RoomName" ref="RoomName"
class="col-12" label="教室名称" :rules="[val => !!val || '请填写教室名称']" />
</div>
<div class="row wrap">
<q-input filled stack-label :min="0" type="number" :dense="false" v-model.number="objOption.SeatNum" ref="SeatNum"
class="col-12" label="座位数" :rules="[val => !!val||val>=0 || '请填写座位数']" />
<q-input filled stack-label :min="0" type="number" :dense="false" v-model.number="objOption.SeatNum"
ref="SeatNum" class="col-12" label="座位数" :rules="[val => !!val||val>=0 || '请填写座位数']" />
</div>
<div class="row wrap">
<el-time-select
class="q-mr-lg"
v-model="objOption.StartTime"
:picker-options="{
<el-time-select class="q-mr-lg" v-model="objOption.StartTime" :picker-options="{
start: '00:00',
step: '00:15',
end: '23:55',
maxTime:objOption.EndTime
}"
placeholder="排班开始时间(格式00:00)">
}" placeholder="排班开始时间(格式00:00)">
</el-time-select>
<el-time-select
v-model="objOption.EndTime"
:picker-options="{
<el-time-select v-model="objOption.EndTime" :picker-options="{
start: '06:00',
step: '00:15',
end: '23:55',
minTime:objOption.StartTime
}"
placeholder="排班结束时间(格式00:00)">
}" placeholder="排班结束时间(格式00:00)">
</el-time-select>
</div>
<div class="row wrap" style="padding-top:20px">
......@@ -52,18 +44,16 @@
:factory="uploadFile">
</q-uploader> -->
<div style="display:flex;flex-wrap: wrap;">
<div v-if="objOption.RoomPicList&&objOption.RoomPicList.length>0" v-for="(item,index) in objOption.RoomPicList">
<div v-if="objOption.RoomPicList&&objOption.RoomPicList.length>0"
v-for="(item,index) in objOption.RoomPicList">
<div class="ItemImgDiv">
<q-img :src="item" spinner-color="white" style="height: 100%;height:100%" />
<q-btn size="7px" @click="deleteItemImg(index)" style="position:absolute;right:-5px;top:-5px;" round color="red" icon="iconfont icon-guanbi1" />
<q-btn size="7px" @click="deleteItemImg(index)" style="position:absolute;right:-5px;top:-5px;" round
color="red" icon="iconfont icon-guanbi1" />
</div>
</div>
<el-upload
class="avatar-uploader addDutyMain"
action=""
:before-upload="uploadFile"
:show-file-list="false"
>
<el-upload class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile"
:show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
......@@ -103,10 +93,10 @@
RoomName: "", //教室名称
School_Id: 0, //校区编号
Status: -1, //状态
StartTime:"06:00",//排班开始时间
EndTime:"",//排班结束时间
SeatNum:0,//座位数
RoomPicList:[],//教室图片
StartTime: "06:00", //排班开始时间
EndTime: "", //排班结束时间
SeatNum: 0, //座位数
RoomPicList: [], //教室图片
},
optionTitle: "",
schoolList: [],
......@@ -131,10 +121,10 @@
this.objOption.RoomId = res.Data.RoomId;
this.objOption.RoomName = res.Data.RoomName;
this.objOption.School_Id = res.Data.School_Id;
this.objOption.StartTime=res.Data.StartTime||"06:00";//排班开始时间
this.objOption.EndTime=res.Data.EndTime||"";//排班结束时间
this.objOption.SeatNum=res.Data.SeatNum;//座位数
this.objOption.RoomPicList=res.Data.RoomPicList;//教室图片
this.objOption.StartTime = res.Data.StartTime || "06:00"; //排班开始时间
this.objOption.EndTime = res.Data.EndTime || ""; //排班结束时间
this.objOption.SeatNum = res.Data.SeatNum; //座位数
this.objOption.RoomPicList = res.Data.RoomPicList; //教室图片
}
});
} else {
......@@ -142,10 +132,10 @@
this.objOption.RoomId = 0;
this.objOption.RoomName = "";
this.objOption.School_Id = 0;
this.objOption.StartTime="06:00";//排班开始时间
this.objOption.EndTime="";//排班结束时间
this.objOption.SeatNum=0;//座位数
this.objOption.RoomPicList=[];//教室图片
this.objOption.StartTime = "06:00"; //排班开始时间
this.objOption.EndTime = ""; //排班结束时间
this.objOption.SeatNum = 0; //座位数
this.objOption.RoomPicList = []; //教室图片
}
},
//获取校区列表
......@@ -168,7 +158,7 @@
this.persistent = false
},
saveClassRoom() {
if(!this.objOption.StartTime){
if (!this.objOption.StartTime) {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -176,7 +166,7 @@
})
return
}
if(!this.objOption.EndTime){
if (!this.objOption.EndTime) {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -184,7 +174,7 @@
})
return
}
if(this.objOption.School_Id==-1){
if (this.objOption.School_Id == -1) {
this.$q.notify({
type: 'negative',
position: "top",
......@@ -195,7 +185,7 @@
this.$refs.RoomName.validate()
if (!this.$refs.RoomName.hasError) {
if (!Array.isArray(this.objOption.RoomPicList)) {
this.objOption.RoomPicList=[this.objOption.RoomPicList]
this.objOption.RoomPicList = [this.objOption.RoomPicList]
}
this.saveLoading = true
saveClassRoom(this.objOption).then(res => {
......@@ -232,8 +222,8 @@
})
},
//删除图片
deleteItemImg(index){
this.objOption.RoomPicList.splice(index,1);
deleteItemImg(index) {
this.objOption.RoomPicList.splice(index, 1);
}
}
}
......@@ -243,31 +233,81 @@
.avatar-uploader .el-upload {
border-radius: 6px;
cursor: pointer;
width:100%;
height:100%;
color:#8c939d;
width: 100%;
height: 100%;
color: #8c939d;
position: relative;
overflow: hidden;
}
.addDutyMain{
display:inline-block;
width:118px;
height:118px;
font-size:70px;
.addDutyMain {
display: inline-block;
width: 118px;
height: 118px;
font-size: 70px;
border: 1px dashed #d9d9d9;
line-height:120px;
line-height: 120px;
}
.ItemImgDiv {
width: 118px;
height: 118px;
position: relative;
margin: 0 10px 10px 0;
display: inline-block;
}
._delete_img {
position: absolute;
top: 0px;
height: 82px;
width: 143px;
line-height: 34px;
text-align: center;
background-color: rgba(2, 2, 2, 0.6);
display: inherit;
opacity: 0;
transition: all linear .5s
}
._delete_img i.iconfont {
display: inline-block;
width: 32px;
height: 32px;
border-radius: 50%;
color: #E95252 !important;
background-color: rgba(251, 251, 251, 0.9);
margin-top: 26px;
}
.ItemImgDiv{
width:118px;
height:118px;
._upload_box ul li {
float: left;
height: 82px;
width: 143px;
padding: 0px 20px 20px 0;
text-align: center;
position: relative;
margin:0 10px 10px 0;
display:inline-block;
cursor: pointer;
margin-right: 10px;
}
._delete_img{position: absolute;top: 0px;height:82px;width:143px;line-height: 34px;text-align: center;background-color: rgba(2, 2, 2, 0.6);display: inherit;opacity: 0;transition: all linear .5s}
._delete_img i.iconfont{display: inline-block;width: 32px;height: 32px;border-radius: 50%;color: #E95252 !important;background-color:rgba(251, 251, 251, 0.9); margin-top: 26px;}
._upload_box ul li{float: left;height:82px;width:143px;padding:0px 20px 20px 0;text-align: center;position: relative;cursor: pointer;margin-right: 10px;}
._upload_box ul li img{height:82px;width:143px;}
._upload_box ul li:hover ._delete_img{opacity: 1;}
._upload_tips{font-size: 12px;position: absolute;top: 71%;width: 100%;left: 0;text-align: center;color: #949494;}
._upload_box ul li img {
height: 82px;
width: 143px;
}
._upload_box ul li:hover ._delete_img {
opacity: 1;
}
._upload_tips {
font-size: 12px;
position: absolute;
top: 71%;
width: 100%;
left: 0;
text-align: center;
color: #949494;
}
</style>
......@@ -86,7 +86,6 @@
getTeacherList() {
getTeacherDropDownList({
LeaveStatus: 1,
IsShow: 1
}).then(res => {
this.TeacherList = res.Data;
});
......
......@@ -8,16 +8,21 @@
<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">
<q-field filled label="学员列表" stack-label>
<template v-slot:control>
<div class="row">
<q-checkbox v-model="selectStu" v-for="(x, y) in saveObj.GuestList" :key="y" :val="x.AppointmentId">
{{ x.GuestName }}
<div class="EmpLine_title">
<div class="Emp_Line"></div>
<div>请选择要取消的学员和课时状态</div>
</div>
<div class="row wrap" style="margin-top:8px;" v-for="(gItem,gIndex) in saveObj.GuestList" :key="gIndex">
<div class="col-3">
<q-checkbox v-model="gItem.IsChecked" :key="gIndex" :val="gItem.AppointmentId">
{{ gItem.GuestName }}
</q-checkbox>
</div>
</template>
</q-field>
<div class="col-6">
<q-select filled dense v-model="gItem.IsCalcStuCheck" option-value="Id" option-label="Name"
:options="optionList" emit-value map-options label="课时状态" />
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
......@@ -30,8 +35,8 @@
</template>
<script>
import {
cancelSureAppointment
} from "../../../api/studyabroad/subscribe.js";
cancelStuAppointment
} from "../../../api/scheduling/schedu.js";
export default {
model: {
prop: "show",
......@@ -59,7 +64,16 @@
StuIds: 0,
ShiftSort: "",
},
selectStu: []
selectStu: [],
optionList: [{
Id: 1,
Name: "扣除学员课时按缺勤处理"
},
{
Id: 0,
Name: "无损取消"
}
]
};
},
methods: {
......@@ -68,7 +82,20 @@
this.$emit("changeshow", val);
},
save() {
if (this.selectStu.length == 0) {
var tempChoose = [];
var selectStu = [];
if (this.saveObj.GuestList && this.saveObj.GuestList.length > 0) {
this.saveObj.GuestList.forEach(item => {
if (item.IsChecked) {
selectStu.push(item.AppointmentId);
tempChoose.push({
AppointId: item.AppointmentId,
IsCalcStuCheck: item.IsCalcStuCheck,
})
}
})
}
if (tempChoose.length == 0) {
this.$q.notify({
message: "请选择学生",
position: "top"
......@@ -79,26 +106,17 @@
Date: this.date,
TeacherId: this.saveObj.Tid,
ShiftSort: this.saveObj.ShiftSort,
AppointIds: this.selectStu.toString(),
AppointIds: selectStu.toString(),
AccountId: this.saveObj.AccountId, //新取消接口参数
ChooseStuList: [], //新取消接口参数
ChooseStuList: tempChoose, //新取消接口参数
};
if (this.selectStu && this.selectStu.length > 0) {
this.selectStu.forEach(item => {
msg.ChooseStuList.push({
AppointId: item,
IsCalcStuCheck: 0
});
})
}
cancelSureAppointment(msg).then(res => {
cancelStuAppointment(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.$emit("success", this.selectStu);
this.selectStu = []
this.$emit("success", selectStu);
this.changeDig(false)
}
});
......
......@@ -72,8 +72,9 @@
saveObj.AppointState == 1 &&
isShowTag(saveObj.GuestList, saveObj.ScrollMinNum)
" />
<!--CancelAdminAppointment(saveObj)-->
<q-btn color="accent" size="xs" label="取消" v-if="auth.IsEdit
" @click="CancelAdminAppointment(saveObj)" class="q-ml-md" :loading="saveLoading" />
" @click="showCancelDig = true" class="q-ml-md" :loading="saveLoading" />
</template>
</q-field>
<q-field filled label="最小成班人数:" stack-label class="col-6" v-if="saveObj.ClassType == 3">
......@@ -85,13 +86,6 @@
<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"
class="q-mr-sm" />
<q-btn color="accent" size="xs" label="取消预约" @click="cancelSub()" :disable="checkStuType2.length == 0"
class="q-mr-sm" />
</div>
<div class="row">
<q-checkbox v-model="checkStuType2" v-for="(x, y) in saveObj.GuestList" :key="y" :val="x.AppointmentId">
{{ x.GuestName }}
......@@ -103,12 +97,17 @@
<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 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">
<font v-if="x.State==6" style="color:#cf6a87;">
<q-tooltip>
学员消课,不计算老师课时
</q-tooltip>
{{ x.GuestName }}
</font>
<font v-else>
{{ x.GuestName }}
</font>
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
......@@ -119,7 +118,7 @@
<template v-slot:control>
<div>
<span v-for="(x, y) in saveObj.GuestList" :key="y">
{{ x.GuestName }}
{{ x.GuestName }} HH
<span v-if="x.AppointType == 2">(补)</span>
<span v-if="x.AppointType == 3">(重)</span>
</span>
......@@ -138,9 +137,7 @@
</template>
<script>
import {
CancelAppointment,
SetSureAppointment,
cancelSureAppointment
} from "../../../api/studyabroad/subscribe.js";
import ChangeCourse from "./changeCourse";
import MakeUp from "./makeUp.vue"
......@@ -198,45 +195,7 @@
modifyTeacher() {
this.showTeacherDig = true;
},
//取消预约
cancelSub() {
let that = this;
console.log("that.saveObj",that.saveObj);
const msg = {
Date: that.dateObj.date,
TeacherId: that.saveObj.Tid,
AppointIds: that.checkStuType2.toString()
};
this.$q
.dialog({
title: "提示信息",
message: "是否要取消预约",
cancel: true,
ok: "是",
cancel: "否"
})
.onOk(() => {
// CancelAppointment(msg).then(res => {
// if (res.Code == 1) {
// that.$q.notify({
// message: "操作成功",
// position: "top"
// });
// that.checkStuType2.map(e => {
// that.saveObj.GuestList.map((_e, _i) => {
// if (e == _e.AppointmentId) {
// that.saveObj.GuestList.splice(_i, 1);
// }
// });
// });
// that.checkStuType2 = [];
// that.$emit("success");
// }
// });
})
.onCancel(() => {});
},
//确认约课
confirmSub() {
if (this.saveObj.EnrollNum < this.saveObj.ScrollMinNum) {
......@@ -265,51 +224,7 @@
}
});
},
//取消预约
CancelAdminAppointment(item) {
let that = this;
var postMsg = {
AppointIds: "",
Date: this.dateObj.date,
ShiftSort: item.ShiftSort,
TeacherId: item.Tid,
AccountId: item.AccountId, //新接口取消约课参数
ChooseStuList: [], //新接口取消约课参数
};
var tempList = [];
if (item.GuestList && item.GuestList.length > 0) {
item.GuestList.forEach(subItem => {
tempList.push(subItem.AppointmentId);
postMsg.ChooseStuList.push({
AppointId: subItem.AppointmentId,
IsCalcStuCheck: 0
})
})
}
if (tempList && tempList.length > 0) {
postMsg.AppointIds = tempList.join(",");
}
this.$q
.dialog({
title: "提示信息",
message: "是否要取消本次预约",
cancel: true,
ok: "是",
cancel: "否"
})
.onOk(() => {
cancelSureAppointment(postMsg).then(res => {
if (res.Code == 1) {
that.$q.notify({
message: "操作成功",
position: "top"
});
that.$emit("close");
}
});
})
.onCancel(() => {});
},
//显示调课弹窗
showChangeCourse() {
this.CourseObj = {
......
......@@ -87,6 +87,7 @@
" @click.stop="
showDetail(__item, item.ClassDate, _item.TeacherId)
">
<el-popover placement="top-start" width="200" trigger="hover">
<div slot="reference" style="height:80vh;position:relative">
<q-badge rounded color="red" label="未成班" style="position:absolute;top:0;right:0" v-if="
......@@ -498,7 +499,7 @@
getTeacherList() {
getTeacherDropDownList({
LeaveStatus: 1,
IsShow: 1
}).then(res => {
if (res.Code == 1) {
this.TeacherList = JSON.parse(JSON.stringify(res.Data));
......
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