ApproveList.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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_Approve() {
  10. var d = validChooseAll();
  11. if (d.length == 0) {
  12. $.messager.alert("系统提示", "请选择您要审核的信息。");
  13. return;
  14. }
  15. var firstStatus = d[0].RecordStatus;
  16. if ($.grep(d, function (x) { return x.RecordStatus != firstStatus }).length > 0) {
  17. $.messager.alert("系统提示", "请选择相同状态的记录进行审核。");
  18. return;
  19. }
  20. var firstID = d[0].RetakePlanStudentID;
  21. $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=ER_RetakePlanStudent&FormID=' + firstID,
  22. 400, 300, RetakePlan_Approve_Confirm);
  23. }
  24. function RetakePlan_Approve_Confirm(action) {
  25. if (!action) return;
  26. if (action.ActionID == "") return;
  27. var d = validChoose().join(',');
  28. $.post(CMS_SystemConfig.VirtualDirectoryPath + "/RetakePlan/ApproveStudent", { retakePlanStudentIDs: d, actionID: action.Action, comment: action.Comment },
  29. function (data) {
  30. $.messager.alert("系统提示", data.Message);
  31. if (data.IsSuccess) {
  32. reload();
  33. }
  34. }, 'json');
  35. }
  36. function RetakePlan_Excel() {
  37. var d = validChoose().join(',');
  38. $("[name='SelectedID']").val(d);
  39. $(document.forms[0]).submit();
  40. }
  41. //获取选中的数据
  42. function validChoose() {
  43. var d = [];
  44. $.each($("#dgRetakePlanStudentList").cmsXDataTable("getSelections"), function (index) {
  45. d.push(this.RetakePlanStudentID);
  46. });
  47. return d;
  48. }
  49. function validChooseAll() {
  50. var d = [];
  51. $.each($("#dgRetakePlanStudentList").cmsXDataTable("getSelections"), function (index) {
  52. d.push(this);
  53. });
  54. return d;
  55. }
  56. function queryStandard() {
  57. if ($.data($("#cbgCollege")[0], "combogridX") && $.data($("#ddlYear")[0], "combobox")) {
  58. var parameterString = "";
  59. var collegeID = $("#cbgCollege").combogridX("getValue");
  60. var year = $("#ddlYear").combobox("getValue");
  61. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  62. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|";
  63. if (parameterString != "") {
  64. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  65. $("#cbgStandard").combogridX("reload", eval(jsonString));
  66. } else {
  67. $("#cbgStandard").combogridX("reload");
  68. }
  69. }
  70. }
  71. function queryClassmajor() {
  72. if ($.data($("#cbgCollege")[0], "combogridX") && $.data($("#ddlYear")[0], "combobox") && $.data($("#cbgStandard")[0], "combogridX")) {
  73. var parameterString = "";
  74. var collegeID = $("#cbgCollege").combogridX("getValue");
  75. var year = $("#ddlYear").combobox("getValue");
  76. var standard = $("#cbgStandard").combogridX("getValue");
  77. var educationID = $("#DictionaryEducation").combobox("getValue");
  78. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  79. var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  80. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  81. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|";
  82. if (standard != nonSelect && standard != "") parameterString += "DictionaryStandard|*|" + standard + "|@|";
  83. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  84. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  85. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  86. if (parameterString != "") {
  87. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  88. $("#cbgClassmajor").combogridX("reload", eval(jsonString));
  89. } else {
  90. $("#cbgClassmajor").combogridX("reload");
  91. }
  92. }
  93. }