RetakePlanPrescanGeneral.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. //获取选中的数据
  7. function validChoose() {
  8. var d = [];
  9. $.each($("#dgRetakePlanStudentList").cmsXDataTable("getSelections"), function (index) {
  10. d.push(this.FinallyScoreID);
  11. });
  12. return d;
  13. }
  14. //刷新
  15. function reload() {
  16. //课程类型
  17. var courseTypeIDs = document.getElementsByName("CourseTypeID");
  18. if (courseTypeIDs.length > 0) {
  19. var courseTypeIDList = "";
  20. for (i = 0; i < courseTypeIDs.length; i++) {
  21. if (courseTypeIDs[i].checked) {
  22. var courseType = courseTypeIDs[i].value;
  23. courseTypeIDList = courseTypeIDList + courseType + ',';
  24. }
  25. }
  26. jsonString = "({'QueryParamsDatas':'" + $.getDataGridParams("dgRetakePlanStudentList").QueryParamsDatas
  27. + "|@|CourseTypeID|*|" + courseTypeIDList + "|@|" + "'})";
  28. $("#dgRetakePlanStudentList").cmsXDataTable("load", eval(jsonString));
  29. }
  30. else {
  31. $("#dgRetakePlanStudentList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanStudentList"));
  32. }
  33. }
  34. //重修任务生成
  35. function RetakePlan_Generate() {
  36. var d = validChoose();
  37. if (d == "") {
  38. $.messager.alert("系统提示", "请选择您要生成的信息。");
  39. return;
  40. }
  41. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/RetakePlanPrescanGeneral/Generate?MNU=" + mnu;
  42. $.popupTopWindow('重修任务生成', redirectTo, 420, 230, null, d);
  43. }
  44. //导出Excel
  45. function RetakePlan_Export() {
  46. $("#formQuery").submit();
  47. }
  48. //联动查询
  49. function queryStandard(data) {
  50. queryClass();
  51. reload();
  52. }
  53. function queryCollege(data) {
  54. var campusID = $("#CampusDropdown").combogridX("getValue");
  55. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  56. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  57. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  58. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  59. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  60. queryClass();
  61. reload();
  62. }
  63. function queryClass() {
  64. var jsonString = "";
  65. var parameterString = "";
  66. var campusID = $("#CampusDropdown").combogridX("getValue");
  67. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  68. var educationID = $("#DictionaryEducation").combobox("getValue");
  69. var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  70. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  71. var learningFormID = $("#DictionaryLearningform").combobox("getValue");
  72. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  73. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  74. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  75. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  76. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  77. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  78. if (parameterString != "") {
  79. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  80. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  81. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  82. } else {
  83. $("#ClassmajorDropdown").combogridX("reload");
  84. $("#StandardDictionaryDropDown").combogridX("reload");
  85. }
  86. reload();
  87. }