var url = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedule/Edit"; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function reload() { $("#dgClassmajorList").cmsXDataTable("load", $.getDataGridParams("dgClassmajorList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgClassmajorList").cmsXDataTable("getSelections"), function (index) { d.push(this); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { var fullUrl = url + '?classmajorID=' + rowdata.ClassmajorID + '&grademajorID=' + rowdata.GrademajorID + '&collegeID=' + rowdata.CollegeID + '&yearID=' + rowdata.SchoolyearID + '&standardID=' + rowdata.StandardID + '&FromMNU=' + mnu; $.popupTopWindow('手动排课', fullUrl, window.screen.availWidth, window.screen.availHeight - 60, reload); } //修改按钮 function Classmajor_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改的班级信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } var fullUrl = url + '?classmajorID=' + d[0].ClassmajorID + '&grademajorID=' + d[0].GrademajorID + '&collegeID=' + d[0].CollegeID+ '&yearID=' + d[0].SchoolyearID + '&MNU=' + mnu; $.popupTopWindow('手动排课', fullUrl, window.screen.availWidth, window.screen.availHeight - 20, reload); } function QueryCampusDropdownList(data) { $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + ""); reload(); } //function QueryCollegeDropdownList(data) { // reload(); //} //function QueryStandardDropdownList(data) { // reload(); //} function QueryEducationDropdownList(data) { reload(); } function QueryLearningformDropdownList(data) { reload(); } //function QuerySchoolyearDropdownList(data) { // reload(); //} function queryCollege(data) { //var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':"; jsonString += "'CollegeDropdown|*|" + collegeID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); $("#DictionaryStandard").combogridX("reload", eval(jsonString)); // if (campusID != nonSelect) { // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; // $("#CollegeDropdown").combogridX("reload", eval(jsonString)); // } queryClass(); reload(); } function queryGrademajor() { queryClass(); } function queryClass() { var jsonString = ""; var parameterString = ""; //var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); //var educationID = $("#Education").combobox("getValue"); var schoolYearID = $("#DictionarySchoolyear").combobox("getValue"); var standardID = $("#DictionaryStandard").combogridX("getValue"); //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue"); //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|"; //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#DictionaryStandard").combogridX("reload", eval(jsonString)); //$("#cgClassmajor").combogridX("reload", eval(jsonString)); } else { $("#DictionaryStandard").combogridX("reload"); //$("#cgClassmajor").combogridX("reload"); } reload(); }