diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js index 79cddea67..883428f9e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js @@ -129,16 +129,27 @@ var bootstrap = function ($, learun) { if (ELCheckMark == 1) { return learun.alert.warning("该项已审核!"); } - learun.layerForm({ - id: 'formteacherRoom', - title: '新增考场', - url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId, - width: 850, - height: 500, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); + var param ={}; + param.EPId = EPId; + param.EPLId = EPLId; + //判断是否已新增班级 + var data= learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass?queryJson='+JSON.stringify(param)); + + if (data.data.length > 0) { + learun.layerForm({ + id: 'formteacherRoom', + title: '新增考场', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId, + width: 850, + height: 500, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } else { + return learun.alert.warning("请先添加班级!"); + } + } else { return learun.alert.warning("请选择考试课程!"); }