123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/MinorClass/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgMinorClassList").cmsXDataTable("load", $.getDataGridParams("dgMinorClassList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgMinorClassList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ClassminorID);
- });
- return d;
- }
- function MinorClass_Generate() {
- $.messager.confirm("系统提示", "您是否要生成辅修班级?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorClass/Generate',{ }, function (data) {
- if (data == "生成成功。") {
- $.messager.alert("系统提示", data);
- $("#dgMinorClassList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function StudentList(rowindex, rowdata) {
- $.popupTopWindow('学生信息', CMS_SystemConfig.VirtualDirectoryPath + '/MinorClass/StudentList?minorClassID=' + rowdata.ClassminorID + '&MNU=' + mnu , 800, 600);
- }
- //Excel导出
- function MinorClass_Export() {
- var d = validChoose().join(',');
- $("[name='SelectedID']").val(d);
- $("#formQuery").submit();
- }
- function MinorClass_OpenClass() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要开班的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定对选择的信息进行开班?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorClass/OpenClass', { minorClassIDs: d.join(',') }, function (data) {
- if (data == "开班成功。") {
- $.messager.alert("系统提示", data);
- $("#dgMinorClassList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function MinorClass_Delete() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorClass/Delete', { minorClassIDs: d.join(',') }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", data);
- $("#dgMinorClassList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function MinorClass_CancelClass() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要取消开班的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息取消开班?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorClass/CancelOpenClass', { minorClassIDs: d.join(',') }, function (data) {
- if (data == "取消开班成功。") {
- $.messager.alert("系统提示", data);
- $("#dgMinorClassList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //联动查询
- 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));
- queryClass();
- reload();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var yearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (yearID != nonSelect) parameterString += "DictionaryGrade|*|" + yearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- } else {
- $("#StandardDictionaryDropDown").combogridX("reload");
- }
- reload();
- }
|