RetakePlanPrescan.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function reload() {
  7. $("#dgRetakePlanStudentList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanStudentList"));
  8. }
  9. function RetakePlan_Prescan() {
  10. $.messager.confirm("系统提示", "是否要生成待重修的学生名单?", function (r) {
  11. if (r) {
  12. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanPrescan/Generate', null, function (data) {
  13. if (data.IsSuccess) {
  14. $.messager.alert("系统提示", "生成成功。");
  15. $("#dgRetakePlanStudentList").cmsXDataTable('load');
  16. } else {
  17. $.messager.alert("系统提示", data.Message);
  18. }
  19. });
  20. }
  21. });
  22. }
  23. //重修明细
  24. function StudentDetail(rowindex, rowdata) {
  25. var s = rowdata.SchoolyearID;
  26. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/RetakePlanPrescan/StudentDetail?userID=" + rowdata.UserID + "&schoolyearID=" + rowdata.SchoolyearID + "&MNU=" + mnu;
  27. $.popupTopWindow('重修明细', redirectTo, 800, 600, null, null);
  28. }
  29. function RetakePlan_Charge() {
  30. var planStudentIDs = validChoose();
  31. $.messager.confirm("系统提示", "是否要推送应收名单?", function (r) {
  32. if (r) {
  33. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanPrescan/Charge', { planStudentIDs: planStudentIDs.join(',') }, function (data) {
  34. if (data.IsSuccess) {
  35. $.messager.alert("系统提示", "推送成功。");
  36. $("#dgRetakePlanStudentList").cmsXDataTable('load');
  37. } else {
  38. $.messager.alert("系统提示", data.Message);
  39. }
  40. });
  41. }
  42. });
  43. }
  44. //导出Excel
  45. function RetakePlan_Excel() {
  46. $("#formQuery").submit();
  47. }
  48. function RetakePlan_Add() {
  49. $.popupTopWindow('添加学生', CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanPrescan/Add?MNU=' + mnu, 600, 210);
  50. }
  51. function RetakePlan_Delete() {
  52. var planStudentIDs = validChoose();
  53. if (planStudentIDs.length == 0) {
  54. $.messager.alert("系统提示", "请选择您要删除的重修学生信息。");
  55. return;
  56. }
  57. $.messager.confirm("系统提示", "您确定要删除该重修学生信息?", function (r) {
  58. if (r) {
  59. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanPrescan/Delete', { planStudentIDs: planStudentIDs.join(',') }, function (data) {
  60. if (data.IsSuccess) {
  61. $.messager.alert("系统提示", "删除成功。");
  62. $("#dgRetakePlanStudentList").cmsXDataTable('load');
  63. } else {
  64. $.messager.alert("系统提示", data.Message);
  65. }
  66. });
  67. }
  68. });
  69. }
  70. //获取选中的数据
  71. function validChoose() {
  72. var d = [];
  73. $.each($("#dgRetakePlanStudentList").cmsXDataTable("getSelections"), function (index) {
  74. d.push(this.UserID);
  75. });
  76. return d;
  77. }
  78. function queryStandard() {
  79. if ($.data($("#cbgCollege")[0], "combogridX") && $.data($("#ddlYear")[0], "combobox")) {
  80. var parameterString = "";
  81. var collegeID = $("#cbgCollege").combogridX("getValue");
  82. var year = $("#ddlYear").combobox("getValue");
  83. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  84. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|";
  85. if (parameterString != "") {
  86. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  87. $("#cbgStandard").combogridX("reload", eval(jsonString));
  88. } else {
  89. $("#cbgStandard").combogridX("reload");
  90. }
  91. }
  92. }
  93. function queryClassmajor() {
  94. //if ($.data($("#cbgCollege")[0], "combogridX") && $.data($("#ddlYear")[0], "combobox") && $.data($("#cbgStandard")[0], "combogridX")) {
  95. var parameterString = "";
  96. var collegeID = $("#cbgCollege").combogridX("getValue");
  97. var year = $("#ddlYear").combobox("getValue");
  98. var standard = $("#cbgStandard").combogridX("getValue");
  99. var educationID = $("#DictionaryEducation").combobox("getValue");
  100. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  101. var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  102. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  103. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|";
  104. if (standard != nonSelect && standard != "") parameterString += "DictionaryStandard|*|" + standard + "|@|";
  105. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  106. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  107. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  108. if (parameterString != "") {
  109. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  110. $("#cbgClassmajor").combogridX("reload", eval(jsonString));
  111. } else {
  112. $("#cbgClassmajor").combogridX("reload");
  113. }
  114. reload();
  115. //}
  116. }