MinorGraduationStandard.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/MinorGraduationStandard/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgMinorGraduationStandardList").cmsXDataTable("load", $.getDataGridParams("dgMinorGraduationStandardList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgMinorGraduationStandardList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.MinorGraduationStandardID);
  16. });
  17. return d;
  18. }
  19. //标准生成
  20. function MinorGraduationStandard_Generate() {
  21. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/MinorGraduationStandard/Generate?MNU=" + mnu;
  22. $.popupTopWindow('毕业标准生成', redirectTo, 420, 280, null, null);
  23. }
  24. //修改
  25. function MinorGraduationStandard_Update() {
  26. var d = validChoose();
  27. if (d == "") {
  28. $.messager.alert("系统提示", "请选择您要修改的信息。");
  29. return;
  30. }
  31. if (d.length > 1) {
  32. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  33. return;
  34. }
  35. var redirectTo = url + "?minorGraduationStandardID=" + d + "&MNU=" + mnu;
  36. $.popupTopWindow('毕业标准修改', redirectTo, 640, 350, null, null);
  37. }
  38. //删除
  39. function MinorGraduationStandard_Delete() {
  40. var d = validChoose().join(',');
  41. if (d == "") {
  42. $.messager.alert("系统提示", "请选择您要删除的信息。");
  43. return;
  44. }
  45. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  46. if (r) {
  47. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorGraduationStandard/Delete', { minorGraduationStandardIDs: d }, function (data) {
  48. if (data == "删除成功。") {
  49. $.messager.alert("系统提示", data);
  50. $("#dgMinorGraduationStandardList").cmsXDataTable('load');
  51. } else {
  52. $.messager.alert("系统提示", data);
  53. }
  54. });
  55. }
  56. });
  57. }
  58. //学生信息明细
  59. function editStudentCount(rowindex, rowdata) {
  60. var inschoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
  61. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/MinorGraduationStandard/Detail?inschoolStatus=" + inschoolStatus
  62. + "&grademajorID=" + rowdata.GrademajorID + "&MNU=" + mnu;
  63. $.popupTopWindow('年级专业学生明细', redirectTo, 750, 420, null, null);
  64. }
  65. //设置列颜色为红色
  66. function SetRedColumn(index, row, value) {
  67. return " <span style=\"color: red;\">" + value + "</span>";
  68. }
  69. //Excel导出
  70. function MinorGraduationStandard_Export() {
  71. var d = validChoose().join(',');
  72. $("[name='SelectedID']").val(d);
  73. $("#formQuery").submit();
  74. }
  75. //联动查询
  76. function queryStandard(data) {
  77. queryClass();
  78. reload();
  79. }
  80. function queryCollege(data) {
  81. var campusID = $("#CampusDropdown").combogridX("getValue");
  82. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  83. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  84. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  85. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  86. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  87. queryClass();
  88. reload();
  89. }
  90. function queryClass() {
  91. var jsonString = "";
  92. var parameterString = "";
  93. var campusID = $("#CampusDropdown").combogridX("getValue");
  94. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  95. var educationID = $("#DictionaryEducation").combogridX("getValue");
  96. var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  97. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  98. var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
  99. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  100. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  101. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  102. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  103. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  104. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  105. if (parameterString != "") {
  106. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  107. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  108. } else {
  109. $("#StandardDictionaryDropDown").combogridX("reload");
  110. }
  111. reload();
  112. }