var url = CMS_SystemConfig.VirtualDirectoryPath + "/SelectCourseOpenControlSetting/Edit"; var bathval = ""; var mnu; $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }); function SelectCourseControl_Export() { $(document.forms[0]).submit(); } //新增 function SelectCourseControl_Add() { redirectTo = url + "?MNU=" + mnu; $.popupTopWindow("限选控制新增", redirectTo, 650, 300, null, null); } function reload() { $("#dgOpenControlSettingList").cmsXDataTable("load", $.getDataGridParams("dgOpenControlSettingList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgOpenControlSettingList").cmsXDataTable("getSelections"), function (index) { d.push(this.SelectCourseOpenControlSettingID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { redirectTo = url + "?selectCourseOpenControlSettingID=" + rowdata.SelectCourseOpenControlSettingID + "&MNU=" + mnu + "&isView=1"; $.popupTopWindow("限选控制信息", redirectTo, 650, 300, null, null); } //修改按钮 function SelectCourseControl_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改的信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } redirectTo = url + "?selectCourseOpenControlSettingID="+ d+ "&MNU=" + mnu; $.popupTopWindow("限选控制修改", redirectTo, 650, 300, null, null); } //删除 function SelectCourseControl_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SelectCourseOpenControlSetting/Delete', { openControlSettingIDs: d }, function (data) { if (data == "删除成功!") { $.messager.alert("系统提示", data); $("#dgOpenControlSettingList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function queryCollege(data) { $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + ""); } //联动查询 function queryStandard(data) { queryClass(); reload(); } function queryCollege(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString)); // if (campusID != nonSelect) { // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; // $("#CollegeDropdown").combogridX("reload", eval(jsonString)); // } queryClass(); reload(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); //var educationID = $("#Education").combobox("getValue"); var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue"); var standardID = $("#StandardDictionaryDropDown").combogridX("getValue"); //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#ClassmajorDropdown").combogridX("reload", eval(jsonString)); } else { $("#ClassmajorDropdown").combogridX("reload"); } reload(); }