Commit 3e9708b0 authored by zhengke's avatar zhengke

修改

parent a9c0e924
......@@ -123,16 +123,12 @@
</template>
<template v-else>
<q-field filled class="q-pr-lg">
 <template v-slot:control>
<el-date-picker
type="dates"
style="width:100%"
v-model="objOption.ClassDateList"
value-format="yyyy-MM-dd"
placeholder="开班时间">
</el-date-picker>
</template>
</q-field>
 <template v-slot:control>
<el-date-picker type="dates" style="width:100%" v-model="objOption.ClassDateList"
value-format="yyyy-MM-dd" placeholder="开班时间">
</el-date-picker>
</template>
</q-field>
</template>
</div>
<div class="col-6">
......@@ -234,7 +230,8 @@
</div>
<div class="col-6">
<q-input filled stack-label maxlength="6" v-model="objOption.ClassHours" :dense="false"
class="col-6 q-pr-lg q-pb-lg" label="学习课时(课程)" @keyup.native="checkInteger(objOption,'ClassHours')" disable />
class="col-6 q-pr-lg q-pb-lg" label="学习课时(课程)" @keyup.native="checkInteger(objOption,'ClassHours')"
disable />
</div>
</div>
<div class="row wrap" v-if="objOption.ClassStyle==1">
......@@ -443,7 +440,7 @@
CompleteProgress: 0, //完成进度
ClassType: 1, //班级类型
ClassHourMinute: 45, //课时分钟数
ClassDateList:[], //开班时间
ClassDateList: [], //开班时间
},
optionTitle: "",
saveCourseLoading: false,
......@@ -626,6 +623,33 @@
saveCourse() {
this.$refs.ClassName.validate();
this.$refs.ClassPersion.validate();
if (this.DefaultPlanTimeList.length == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择学习时段`
})
return;
} else {
for (let i = 0; i < this.DefaultPlanTimeList.length; i++) {
if (this.DefaultPlanTimeList[i].DateList.length == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择第${i+1}行周几`
})
return
}
if (this.DefaultPlanTimeList[i].DateList.length == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择第${i+1}行周几`
})
return
}
}
}
if (!this.$refs.ClassName.hasError && !this.$refs.ClassPersion.hasError) {
if (this.objOption.IsOpenCommission == 1) {
if (this.objOption.CommissionValue == '') {
......@@ -648,13 +672,13 @@
if (res.Code == 1) {
//有上课计划
if (res.Data && res.Data.ClassPlanList && res.Data.ClassPlanList.length > 0) {
this.BtnStr = "正在检查排班是否存在冲突";
var newMsg = {
ClassId: res.Data.ClassId,
PlanList: res.Data.ClassPlanList,
}
var NewClassId = res.Data.ClassId;
if(this.objOption.ClassDateList.length<2){
if (this.objOption.ClassDateList.length < 2) {
this.BtnStr = "正在检查排班是否存在冲突";
var newMsg = {
ClassId: res.Data.ClassId,
PlanList: res.Data.ClassPlanList,
}
var NewClassId = res.Data.ClassId;
batchSaveClassPlan(newMsg).then(res => {
this.saveCourseLoading = false
if (res.Code == 1) {
......@@ -695,6 +719,7 @@
}
}
}).catch(() => {
this.BtnStr="立即提交"
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