Commit eed46dfb authored by zhengke's avatar zhengke

修改

parent 5ab79951
...@@ -613,7 +613,6 @@ ...@@ -613,7 +613,6 @@
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 == '') {
...@@ -642,31 +641,33 @@ ...@@ -642,31 +641,33 @@
PlanList: res.Data.ClassPlanList, PlanList: res.Data.ClassPlanList,
} }
var NewClassId = res.Data.ClassId; var NewClassId = res.Data.ClassId;
batchSaveClassPlan(newMsg).then(res => { if(this.objOption.ClassDateList.length<2){
this.saveCourseLoading = false batchSaveClassPlan(newMsg).then(res => {
if (res.Code == 1) { this.saveCourseLoading = false
if (res.Data) { if (res.Code == 1) {
this.$q.notify({ if (res.Data) {
icon: 'iconfont icon-chenggong', this.$q.notify({
color: 'accent', icon: 'iconfont icon-chenggong',
timeout: 2000, color: 'accent',
message: '数据保存成功!但存在上课冲突数据,请调整。', timeout: 2000,
position: 'top' message: '数据保存成功!但存在上课冲突数据,请调整。',
}) position: 'top'
this.$emit('getClassFlict', NewClassId); })
} else { this.$emit('getClassFlict', NewClassId);
this.$q.notify({ } else {
icon: 'iconfont icon-chenggong', this.$q.notify({
color: 'accent', icon: 'iconfont icon-chenggong',
timeout: 2000, color: 'accent',
message: '数据保存成功!', timeout: 2000,
position: 'top' message: '数据保存成功!',
}) position: 'top'
})
}
this.$emit("success")
this.closeCourseForm()
} }
this.$emit("success") })
this.closeCourseForm() }
}
})
} else { } else {
this.saveCourseLoading = false this.saveCourseLoading = false
this.$q.notify({ this.$q.notify({
......
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