Commit 7d525ae8 authored by 黄奎's avatar 黄奎

页面修改

parent 9f6265b4
...@@ -232,6 +232,17 @@ export function saveClass(data) { ...@@ -232,6 +232,17 @@ export function saveClass(data) {
}) })
} }
/**
* 批量添加上课计划
* @param {JSON数据} data
*/
export function batchSaveClassPlan(data) {
return request({
url: '/Class/BatchSetClassPlan',
method: 'post',
data
})
}
/** /**
......
...@@ -66,11 +66,12 @@ ...@@ -66,11 +66,12 @@
font-size: 12px; font-size: 12px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.planTimeLi2 tbody::before{
.planTimeLi2 tbody::before {
content: ''; content: '';
display: table-row; display: table-row;
height: 20px; height: 20px;
} }
</style> </style>
<template> <template>
...@@ -350,15 +351,15 @@ ...@@ -350,15 +351,15 @@
</div> </div>
<div class="row wrap"> <div class="row wrap">
<div class="col-12"> <div class="col-12">
<q-input filled type="textarea" :rows="3" stack-label maxlength="2000" v-model="objOption.InnerRemark" :dense="false" <q-input filled type="textarea" :rows="3" stack-label maxlength="2000" v-model="objOption.InnerRemark"
class="col-12 q-pr-lg q-pb-lg" label="对内备注" /> :dense="false" class="col-12 q-pr-lg q-pb-lg" label="对内备注" />
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading" <q-btn :label="BtnStr" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
@click="saveCourse" /> @click="saveCourse" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
...@@ -376,6 +377,7 @@ ...@@ -376,6 +377,7 @@
getTeacherDropDownList, getTeacherDropDownList,
getSchoolDropdown, getSchoolDropdown,
saveClass, saveClass,
batchSaveClassPlan,
getClassInfo, getClassInfo,
queryClassRoomList queryClassRoomList
} from '../../api/school/index' } from '../../api/school/index'
...@@ -489,6 +491,7 @@ ...@@ -489,6 +491,7 @@
checkedDays: [], checkedDays: [],
//默认上课时间数组 //默认上课时间数组
DefaultPlanTimeList: [], DefaultPlanTimeList: [],
BtnStr: "立即提交",
} }
}, },
created() { created() {
...@@ -598,7 +601,7 @@ ...@@ -598,7 +601,7 @@
saveCourse() { saveCourse() {
this.$refs.ClassName.validate(); this.$refs.ClassName.validate();
this.$refs.ClassPersion.validate(); this.$refs.ClassPersion.validate();
if (!this.$refs.ClassName.hasError && !this.$refs.ClassPersion.hasError) { if (!this.$refs.ClassName.hasError && !this.$refs.ClassPersion.hasError) {
if (this.objOption.IsOpenCommission == 1) { if (this.objOption.IsOpenCommission == 1) {
if (this.objOption.CommissionValue == '') { if (this.objOption.CommissionValue == '') {
...@@ -610,6 +613,7 @@ ...@@ -610,6 +613,7 @@
return; return;
} }
} }
this.BtnStr = "正在保存班级信息";
this.objOption.ClassStepPriceList = this.ladderPriceList; this.objOption.ClassStepPriceList = this.ladderPriceList;
//选中的日期或星期 //选中的日期或星期
this.objOption.WeekDayList = this.checkedDays; this.objOption.WeekDayList = this.checkedDays;
...@@ -617,16 +621,41 @@ ...@@ -617,16 +621,41 @@
this.objOption.DefaultPlanTimeList = this.DefaultPlanTimeList; this.objOption.DefaultPlanTimeList = this.DefaultPlanTimeList;
this.saveCourseLoading = true; this.saveCourseLoading = true;
saveClass(this.objOption).then(res => { saveClass(this.objOption).then(res => {
this.saveCourseLoading = false if (res.Code == 1) {
this.$q.notify({ //有上课计划
icon: 'iconfont icon-chenggong', if (res.Data && res.Data.ClassPlanList && res.Data.ClassPlanList.length > 0) {
color: 'accent', this.BtnStr = "正在检查排班是否存在冲突";
timeout: 2000, var newMsg = {
message: '数据保存成功!', ClassId: res.Data.ClassId,
position: 'top' PlanList: res.Data.ClassPlanList,
}) }
this.$emit("success") batchSaveClassPlan(newMsg).then(res => {
this.closeSaveForm() this.saveCourseLoading = false
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeCourseForm()
}
})
} else {
this.saveCourseLoading = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeCourseForm()
}
}
}).catch(() => { }).catch(() => {
this.saveCourseLoading = false this.saveCourseLoading = false
}) })
......
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