MinorGraduationApprove.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/MinorGraduationApprove/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgMinorGraduationApproveList").cmsXDataTable("load", $.getDataGridParams("dgMinorGraduationApproveList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgMinorGraduationApproveList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.MinorGraduationApplyID);
  16. });
  17. return d;
  18. }
  19. //审核
  20. function MinorGraduationApprove_Approve() {
  21. var minorGraduationApplyIDs = validChoose();
  22. if (minorGraduationApplyIDs.length == 0) {
  23. $.messager.alert("系统提示", "请选择您要审核的信息。");
  24. return;
  25. }
  26. if (minorGraduationApplyIDs.length > 1) {
  27. //批量审核
  28. var approveID = minorGraduationApplyIDs[0];
  29. $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=ER_MinorGraduationApply&FormID=' + approveID,
  30. 400, 300, MinorGraduationApprove_ApproveConfirm);
  31. }
  32. else {
  33. var minorGraduationApplyID = minorGraduationApplyIDs;
  34. //单个审核
  35. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/MinorGraduationApprove/Approve?MNU=" + mnu + "&minorGraduationApplyID=" + minorGraduationApplyID;
  36. $.popupTopWindow('毕业审核', redirectTo, 450, 300, null, null);
  37. }
  38. }
  39. //确定(审核)
  40. function MinorGraduationApprove_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 + "/MinorGraduationApprove/ApproveConfirm", { minorGraduationApplyIDs: 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. //设置列颜色为红色
  57. function SetRedColumn(index, row, value) {
  58. return " <span style=\"color: red;\">" + value + "</span>";
  59. }
  60. //Excel导出
  61. function MinorGraduationApprove_Export() {
  62. var d = validChoose().join(',');
  63. $("[name='SelectedID']").val(d);
  64. $("#formQuery").submit();
  65. }
  66. //联动查询
  67. function queryStandard(data) {
  68. queryClass();
  69. reload();
  70. }
  71. function queryCollege(data) {
  72. var campusID = $("#CampusDropdown").combogridX("getValue");
  73. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  74. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  75. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  76. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  77. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  78. queryClass();
  79. reload();
  80. }
  81. function queryClass() {
  82. var jsonString = "";
  83. var parameterString = "";
  84. var campusID = $("#CampusDropdown").combogridX("getValue");
  85. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  86. var educationID = $("#DictionaryEducation").combogridX("getValue");
  87. var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  88. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  89. var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
  90. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  91. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  92. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  93. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  94. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  95. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  96. if (parameterString != "") {
  97. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  98. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  99. } else {
  100. $("#StandardDictionaryDropDown").combogridX("reload");
  101. }
  102. reload();
  103. }