StudentList.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function queryClass() {
  7. var jsonString = "";
  8. var parameterString = "";
  9. //var campusID = $("#CampusDropdown").combogridX("getValue");
  10. var collegeID = $("#cgCollege").combogridX("getValue");
  11. //var educationID = $("#Education").combobox("getValue");
  12. var schoolYearID = $("#ddlYear").combobox("getValue");
  13. var standardID = $("#ddlStandard").combogridX("getValue");
  14. //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  15. //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  16. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  17. //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  18. if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  19. if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  20. //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  21. if (parameterString != "") {
  22. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  23. $("#ddlStandard").combogridX("reload", eval(jsonString));
  24. $("#cgClassmajor").combogridX("reload", eval(jsonString));
  25. } else {
  26. $("#ddlStandard").combogridX("reload");
  27. $("#cgClassmajor").combogridX("reload");
  28. }
  29. reload();
  30. }
  31. function reloadClassmajor() {
  32. if ($("#cgClassmajor").length > 0 && $.data($("#cgClassmajor")[0], "combogridX")) {
  33. var collegeID = null;
  34. var yearID = null;
  35. var standardID = null;
  36. if ($("#cgCollege").length > 0 && $.data($("#cgCollege")[0], "combogridX")) {
  37. collegeID = $("#cgCollege").combogridX("getValue");
  38. }
  39. if ($("#ddlYear").length > 0 && $.data($("#ddlYear")[0], "combobox")) {
  40. yearID = $("#ddlYear").combobox("getValue");
  41. }
  42. if ($("#ddlStandard").length > 0 && $.data($("#ddlStandard")[0], "combogridX")) {
  43. standardID = $("#ddlStandard").combogridX("getValue");
  44. }
  45. if (collegeID == nonSelect) {
  46. collegeID = null;
  47. }
  48. if (yearID == nonSelect) {
  49. yearID = null;
  50. }
  51. if (standardID == nonSelect) {
  52. standardID = null;
  53. }
  54. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID
  55. + "|@|DictionaryGrade|*|" + yearID + "|@|DictionaryStandard|*|" + standardID + "|@|'})";
  56. $("#cgClassmajor").combogridX("reload", eval(jsonString));
  57. }
  58. //queryClass();
  59. }
  60. function queryCollege(data) {
  61. //var campusID = $("#CampusDropdown").combogridX("getValue");
  62. var collegeID = $("#cgCollege").combogridX("getValue");
  63. var jsonString = "({'QueryParamsDatas':";
  64. jsonString += "'CollegeDropdown|*|" + collegeID + "|@|'})";
  65. $("#cgCollege").combogridX("reload", eval(jsonString));
  66. $("#ddlStandard").combogridX("reload", eval(jsonString));
  67. // if (campusID != nonSelect) {
  68. // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  69. // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  70. // }
  71. queryClass();
  72. reload();
  73. }
  74. function queryGrademajor() {
  75. queryClass();
  76. }
  77. function reloadStandard() {
  78. var url = CMS_SystemConfig.VirtualDirectoryPath + "~/Grademajor/StandardBindComboGridOptions";
  79. var collegeID = $("#cgCollege").combogridX("getValue");
  80. if (collegeID != nonSelect) url += "&collegeID=" + collegeID;
  81. $("#ddlStandard").combogridX("reload", url);
  82. //queryClass();
  83. }
  84. function reload() {
  85. $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
  86. }
  87. function StudentList_Export() {
  88. $("#formQuery").attr("action", "Excel");
  89. $(document.forms[0]).submit();
  90. }
  91. function StudentList_Import() {
  92. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/Import?MNU=' + mnu;
  93. $.popupTopWindow('学生缴费名单导入', redirectTo, 400, 300, null, null);
  94. }
  95. function validChoose() {
  96. var d = [];
  97. $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
  98. d.push(this);
  99. });
  100. return d;
  101. }
  102. function SelectExaminationSubjectDropdown(data) {
  103. var jsonString = "({'QueryParamsDatas':'ExaminationTypeDropdown|*|" + data.ExaminationTypeID + "|@|'})";
  104. $("#ddlExaminationSubject").combogridX("reload", eval(jsonString));
  105. reload();
  106. }
  107. function StudentList_PicExport() {
  108. $("#formQuery").attr("action", "ExportStudentPic");
  109. $("#formQuery").submit();
  110. }
  111. function ExamineApply_Cancel() {
  112. var d = validChoose();
  113. if (d.length == 0) {
  114. $.messager.alert("系统提示", "请选择您要撤销报名的考试科目。");
  115. return;
  116. }
  117. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/ApplyCancel?ExaminationRegistrationIDs=' + $.map(d, function (x) { return x.ExaminationRegistrationID; }).join(','), function (data) {
  118. if (data == "撤销成功") {
  119. $.messager.alert("系统提示", "撤销成功!");
  120. $("#dgStudentList").cmsXDataTable('load');
  121. } else {
  122. $.messager.alert("系统提示", data);
  123. }
  124. });
  125. }