Commit acda4087 authored by 罗超's avatar 罗超

2

parent 71d4be04
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
</script> </script>
<style> <style>
@import url("//at.alicdn.com/t/font_2077629_w1o8daso6r9.css"); @import url("//at.alicdn.com/t/font_2077629_5htvfk5d53o.css");
@font-face { @font-face {
font-family: "din"; font-family: "din";
src: url("./assets/font/DIN-Bold.otf") format("opentype"); src: url("./assets/font/DIN-Bold.otf") format("opentype");
......
...@@ -160,4 +160,14 @@ export function setAdminScrollMakeUp(data) { ...@@ -160,4 +160,14 @@ export function setAdminScrollMakeUp(data) {
method: 'post', method: 'post',
data data
}) })
}
/**
* 取消已确认的约课
*/
export function cancelSureAppointment(data) {
return request({
url: '/Scroll/CancelSureAppointment',
method: 'post',
data
})
} }
\ No newline at end of file
<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">
<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 }}
</q-checkbox>
</div>
</template>
</q-field>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="changeDig(false)" />
<q-btn label="确定" dense color="accent" @click="save" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
cancelSureAppointment
} 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
}
},
data() {
return {
msg: {
Date: "",
TeacherId: 0,
StuIds: 0,
ShiftSort: "",
},
selectStu: []
};
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
save() {
if (this.selectStu.length == 0) {
this.$q.notify({
message: "请选择学生",
position: "top"
});
return;
}
const msg = {
Date: this.date,
TeacherId: this.saveObj.Tid,
ShiftSort: this.saveObj.ShiftSort,
AppointIds: this.selectStu.toString()
};
cancelSureAppointment(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.$emit("success",this.selectStu);
this.selectStu = []
this.changeDig(false)
}
});
}
}
};
</script>
...@@ -101,9 +101,11 @@ ...@@ -101,9 +101,11 @@
</q-checkbox> </q-checkbox>
</div> </div>
</div> </div>
<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="showMakeUpDig = 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" />
</div> </div>
<span v-for="(x, y) in saveObj.GuestList" :key="y"> <span v-for="(x, y) in saveObj.GuestList" :key="y">
{{ x.GuestName }} {{ x.GuestName }}
...@@ -127,6 +129,7 @@ ...@@ -127,6 +129,7 @@
</div> </div>
<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>
</div> </div>
</template> </template>
<script> <script>
...@@ -136,10 +139,12 @@ ...@@ -136,10 +139,12 @@
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
import ChangeCourse from "./changeCourse"; import ChangeCourse from "./changeCourse";
import MakeUp from "./makeUp.vue" import MakeUp from "./makeUp.vue"
import CancelSub from './deleteStu'
export default { export default {
components: { components: {
ChangeCourse, ChangeCourse,
MakeUp MakeUp,
CancelSub
}, },
props: { props: {
dateObj: { dateObj: {
...@@ -164,6 +169,7 @@ ...@@ -164,6 +169,7 @@
checkStuType2: [], // checkStuType2: [], //
showChangeDig: false, showChangeDig: false,
showMakeUpDig: false, showMakeUpDig: false,
showCancelDig: false,
CourseObj: {} CourseObj: {}
}; };
}, },
...@@ -249,6 +255,16 @@ ...@@ -249,6 +255,16 @@
this.$set(this.saveObj, "GuestList", arr); this.$set(this.saveObj, "GuestList", arr);
this.$emit("success"); this.$emit("success");
}, },
cancelHandle(val) {
val.map(e => {
this.saveObj.GuestList.map((_e, _i) => {
if (e == _e.AppointmentId) {
this.saveObj.GuestList.splice(_i, 1);
}
});
});
this.$emit("success");
},
isShowTag(arr, min) { isShowTag(arr, min) {
let n = 0; let n = 0;
arr.map(e => { arr.map(e => {
......
...@@ -356,7 +356,8 @@ ...@@ -356,7 +356,8 @@
dateObj: {}, dateObj: {},
saveObj: {}, saveObj: {},
auth: { auth: {
IsEdit: false IsEdit: false,
addBefore:false,//新增今天以前的约课
} }
}; };
}, },
...@@ -381,6 +382,15 @@ ...@@ -381,6 +382,15 @@
} else { } else {
this.auth.IsEdit = false; this.auth.IsEdit = false;
} }
const res2 = ActionMenuList.find(e => {
return e.FunctionCode == "subscribe_addBefore";
});
if (res2) {
this.auth.addBefore = true;
} else {
this.auth.addBefore = false;
}
}, },
methods: { methods: {
badgeClasses(event, type, TeacherId) { badgeClasses(event, type, TeacherId) {
......
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