Commit 3e9708b0 authored by zhengke's avatar zhengke

修改

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