Commit 9663e5a0 authored by 罗超's avatar 罗超

1

parent da6f2123
...@@ -12,3 +12,14 @@ export function GetStuPageList(data) { ...@@ -12,3 +12,14 @@ export function GetStuPageList(data) {
}) })
} }
/**
* 创建停课申请单
* @param {JSON参数} data
*/
export function setStopClassApply(data) {
return request({
url: '/StopStudentClass/SetStudentStopClass',
method: 'post',
data
})
}
...@@ -1132,7 +1132,6 @@ ...@@ -1132,7 +1132,6 @@
} }
that.apipostDS("/api/Education/CancelCommerceConsult", msg, (res) => { that.apipostDS("/api/Education/CancelCommerceConsult", msg, (res) => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
that.$q.notify({ that.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
color: 'accent', color: 'accent',
......
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">创建停课申请单</div>
</q-card-section>
<q-card-section class="q-pt-none" style="height: 70vh">
<div class="text-caption q-mb-lg q-px-md text-grey-6">基本资料</div>
<div class="col flex items-center">
<div class="col-2 text-grey-6">
选择停课开始时间:
</div>
<el-date-picker v-model="msg.TakeEffectTime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期">
</el-date-picker>
</div>
<q-input filled type="textarea" :rows="3" style="margin-top:20px;" stack-label maxlength="2000"
v-model="msg.Remarks" :dense="false" class="col-12 q-pb-lg" label="申请备注" />
</q-card-section>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="save" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
setStopClassApply
} from '../../api/teacher/student'
export default {
props: {
setObj: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
saveLoading: false,
msg: {
Id: 0,
ClassId: 0,
CourseId: 0,
OrderGuestId: 0,
TakeEffectTime: "",
Remarks: ""
},
}
},
mounted() {
if (this.setObj) {
this.msg.ClassId = this.setObj.ClassId
this.msg.CourseId = this.setObj.CourseId
this.msg.OrderGuestId = this.setObj.Id
}
console.log(57, this.msg)
},
methods: {
closeSaveForm() {
this.$emit('close')
this.persistent = false
},
save() {
if (this.msg.TakeEffectTime == "" || !this.msg.TakeEffectTime) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择停课开始时间`
})
return
}
if (this.msg.Remarks == "" || !this.msg.Remarks) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写申请备注`
})
return
}
this.saveLoading=true
setStopClassApply(this.msg).then(res => {
this.saveLoading=false
if (res.Code === 1) {
this.$message.success("操作成功")
this.$emit("success")
} else {
this.$message.error(res.Message)
}
}).catch(err=>{
this.saveLoading=false
})
}
},
}
</script>
<style>
</style>
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<!-- <q-btn flat size="xs" color="accent" style="font-weight:400" label="停课" <q-btn flat size="xs" color="accent" style="font-weight:400" label="停课"
@click="" /> --> @click="ShowStopLesson(props.row)" v-if="props.row.GuestState===1"/>
<q-btn flat size="xs" color="accent" style="font-weight:400" label="课耗明细" @click="goUrl(props.row)" /> <q-btn flat size="xs" color="accent" style="font-weight:400" label="课耗明细" @click="goUrl(props.row)" />
<!-- <q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;"> <!-- <q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list> <q-list>
...@@ -108,8 +108,10 @@ ...@@ -108,8 +108,10 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<StopLesson-form v-if="isShowStopLesson" :setObj="stuObj" @success="reloadPage" @close="closeMenuSaveForm"/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -131,6 +133,7 @@ ...@@ -131,6 +133,7 @@
// import classForm from '../../components/course/class-form'; // import classForm from '../../components/course/class-form';
// import classinfoForm from '../../components/course/classinfo-form'; // import classinfoForm from '../../components/course/classinfo-form';
// import othercourseForm from '../../components/course/othercourse-form'; // import othercourseForm from '../../components/course/othercourse-form';
import StopLessonForm from '../../components/teacher/stopLessonForm'
export default { export default {
meta: { meta: {
title: "班级管理" title: "班级管理"
...@@ -138,7 +141,8 @@ ...@@ -138,7 +141,8 @@
components: { components: {
// classForm, // classForm,
// classinfoForm, // classinfoForm,
// othercourseForm // othercourseForm,
StopLessonForm
}, },
data() { data() {
return { return {
...@@ -221,7 +225,9 @@ ...@@ -221,7 +225,9 @@
CourseList: [], //关联课程下拉数据 CourseList: [], //关联课程下拉数据
AllCourseList: [], AllCourseList: [],
ClassList: [], //班级下拉 ClassList: [], //班级下拉
allClassList: [] allClassList: [],
isShowStopLesson:false,
stuObj:{},
} }
}, },
created() { created() {
...@@ -366,7 +372,21 @@ ...@@ -366,7 +372,21 @@
// ClassId: i.ClassId // ClassId: i.ClassId
// } // }
// }) // })
} },
//显示弹窗
ShowStopLesson(item){
this.isShowStopLesson=true;
this.stuObj=item
},
//关闭弹窗
closeMenuSaveForm() {
this.isShowStopLesson = false;
},
//刷新页面
reloadPage() {
this.isShowStopLesson = false;
this.getStuPageList();
},
} }
} }
......
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