MinorApply.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/MinorRegistApprove/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgMinorApplyList").cmsXDataTable("load", $.getDataGridParams("dgMinorApplyList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgMinorApplyList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.StudentMinorRegistID);
  16. });
  17. return d;
  18. }
  19. //审核
  20. function MinorRegist_Approve() {
  21. var minorApplyIDs = validChoose();
  22. if (minorApplyIDs.length == 0) {
  23. $.messager.alert("系统提示", "请选择您要审核的信息。");
  24. return;
  25. }
  26. if (minorApplyIDs.length > 1) {
  27. //批量审核
  28. var approveID = minorApplyIDs[0];
  29. $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=EM_StudentMinorRegist&FormID=' + approveID,
  30. 400, 300, MinorRegistApprove_ApproveConfirm);
  31. }
  32. else {
  33. var minorApplyID = minorApplyIDs;
  34. //单个审核
  35. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/MinorRegistApprove/Approve?MNU=" + mnu + "&minorApplyID=" + minorApplyID;
  36. $.popupTopWindow('辅修报名审核', redirectTo, 500, 300, null, null);
  37. }
  38. }
  39. //确定(审核)
  40. function MinorRegistApprove_ApproveConfirm(action) {
  41. if (!action) {
  42. return;
  43. }
  44. if (action.ActionID == "") {
  45. return;
  46. }
  47. var approveIDs = validChoose().join(',');
  48. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/MinorRegistApprove/ApproveConfirm", { minorRegistRegistIDs: approveIDs, actionID: action.Action, comment: action.Comment },
  49. function (data) {
  50. if (data.IsSuccess) {
  51. reload();
  52. }
  53. $.messager.alert("系统提示", data.Message);
  54. }, 'json');
  55. }
  56. //Excel导出
  57. function MinorRegistApprove_Export() {
  58. var d = validChoose().join(',');
  59. $("[name='SelectedID']").val(d);
  60. $("#formQuery").submit();
  61. }
  62. //联动查询
  63. function queryStandard(data) {
  64. queryClass();
  65. reload();
  66. }
  67. function queryCollege(data) {
  68. var campusID = $("#CampusDropdown").combogridX("getValue");
  69. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  70. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  71. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  72. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  73. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  74. queryClass();
  75. reload();
  76. }
  77. function queryClass() {
  78. var jsonString = "";
  79. var parameterString = "";
  80. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  81. var yearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  82. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  83. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  84. if (yearID != nonSelect) parameterString += "DictionaryGrade|*|" + yearID + "|@|";
  85. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  86. if (parameterString != "") {
  87. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  88. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  89. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  90. } else {
  91. $("#StandardDictionaryDropDown").combogridX("reload");
  92. }
  93. reload();
  94. }