123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Grademajor/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgGrademajorList").cmsXDataTable("load", $.getDataGridParams("dgGrademajorList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgGrademajorList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.GrademajorID);
- });
- return d;
- }
- //(年级专业复制)批量新增
- function Grademajor_BatchAdd() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Grademajor/BatchAdd?MNU=" + mnu;
- $.popupTopWindow('年级专业复制', redirectTo, 700, 320, null, null);
- }
- //新增
- function Grademajor_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('年级专业复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/Grademajor/CopyAdd?grademajorID=' + d[0] + '&MNU=' + mnu, 700, 420, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('年级专业新增', redirectTo, 700, 420, null, null);
- }
- }
- //修改按钮
- function Grademajor_Update() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?grademajorID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow('年级专业修改', redirectTo, 700, 420, null, null);
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?grademajorID=" + rowdata.GrademajorID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('年级专业信息', redirectTo, 700, 420, null, null);
- }
- //批量修改(重写)
- SystemBatchModifyControl.OnSubmit = function () {
- //年级
- if (document.getElementById("GradeIDDictionaryDropDownList_div").style.display != "none") {
- var r = false;
- var d = validChoose().join(',');
- var gradeID = $("#GradeID_DictionaryDropDownList").combobox("getValue");
- var semesterID = null;
- if (d == "") {
- return;
- }
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Grademajor/BatchModifyControl', { grademajorIDs: d, gradeID: gradeID, semesterID: semesterID }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgGrademajorList").cmsXDataTable('load');
- }
- else {
- return true;
- }
- });
- return r;
- }
- //学期
- else if (document.getElementById("SemesterIDDictionaryDropDownList_div").style.display != "none") {
- var r = false;
- var d = validChoose().join(',');
- var gradeID = null;
- var semesterID = $("#SemesterID_DictionaryDropDownList").combobox("getValue");
- if (d == "") {
- return;
- }
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Grademajor/BatchModifyControl', { grademajorIDs: d, gradeID: gradeID, semesterID: semesterID }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgGrademajorList").cmsXDataTable('load');
- }
- else {
- return true;
- }
- });
- return r;
- }
- }
- //删除
- function Grademajor_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Grademajor/Delete', { grademajorIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgGrademajorList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //Excel导出
- function Grademajor_Export() {
- $("#formQuery").submit();
- }
- //Excel导入
- function Grademajor_Import() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Grademajor/Import?MNU=' + mnu;
- $.popupTopWindow('年级专业信息导入', redirectTo, 420, 300, reload);
- }
- //年级专业对应的班级明细
- function editClassmajorCount(rowindex, rowdata) {
- var inSchoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Grademajor/ClassmajorList?inSchoolStatus=" + inSchoolStatus + "&grademajorID=" + rowdata.GrademajorID + "&MNU=" + mnu;
- $.popupTopWindow('年级专业班级明细', redirectTo, 850, 540, null, null);
- }
- //年级专业学生明细
- function editStudentCount(rowindex, rowdata) {
- var inSchoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Grademajor/ClassStudentListView?inSchoolStatus=" + inSchoolStatus + "&grademajorID=" + rowdata.GrademajorID + "&MNU=" + mnu;
- $.popupTopWindow('年级专业学生明细', redirectTo, 850, 540, null, null);
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- queryClass();
- }
- 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));
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- queryClass();
- }
- function queryStandard(data) {
- queryClass();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningformID = $("#DictionaryLearningform").combogridX("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- }
- else {
- $("#DictionaryStandard").combogridX("reload");
- }
- reload();
- }
|