AdminApproval.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/DifferentDynamicApproval/Edit?a=1";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. });
  7. //新增
  8. function DifferentDynamicApply_Add() {
  9. showDialog();
  10. }
  11. //联动查询
  12. function queryStandard(data) {
  13. queryClass();
  14. reload();
  15. }
  16. function queryCollege(data) {
  17. var campusID = $("#CampusDropdown").combogridX("getValue");
  18. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  19. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  20. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  21. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  22. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  23. // if (campusID != nonSelect) {
  24. // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  25. // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  26. // }
  27. queryClass();
  28. reload();
  29. }
  30. function queryClass() {
  31. var jsonString = "";
  32. var parameterString = "";
  33. var campusID = $("#CampusDropdown").combogridX("getValue");
  34. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  35. //var educationID = $("#Education").combobox("getValue");
  36. var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  37. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  38. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  39. //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  40. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  41. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  42. //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  43. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  44. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  45. //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  46. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  47. if (parameterString != "") {
  48. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  49. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  50. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  51. } else {
  52. $("#ClassmajorDropdown").combogridX("reload");
  53. $("#StandardDictionaryDropDown").combogridX("reload");
  54. }
  55. reload();
  56. }
  57. function reload() {
  58. $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
  59. }
  60. //获取选中的数据
  61. function validChoose() {
  62. var d = [];
  63. $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
  64. d.push(this.EntityID);
  65. });
  66. return d;
  67. }
  68. //点击列表更新
  69. function edit(rowindex, rowdata) {
  70. showDialog(rowdata.EntityID, "look");
  71. }
  72. //修改按钮
  73. function DifferentDynamicApproval_Approve() {
  74. var d = validChoose();
  75. if (d.length == 0) {
  76. $.messager.alert("系统提示", "请选择您要审核的异动申请信息!");
  77. return;
  78. }
  79. var firstID = d[0];
  80. $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=CF_DifferentDynamic&FormID=' + firstID,
  81. 400, 300, DifferentDynamicApproval_Approve_Confirm);
  82. }
  83. function DifferentDynamicApproval_Approve_Confirm(action) {
  84. if (!action) return;
  85. if (action.ActionID == "") return;
  86. var d = validChoose().join(',');
  87. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/DifferentDynamicApproval/AdminApprove", { ids: d, actionID: action.Action, comment: action.Comment },
  88. function (data) {
  89. $.messager.alert("系统提示", data.Message);
  90. if (data.IsSuccess) {
  91. reload();
  92. }
  93. }, 'json');
  94. }
  95. function showDialog(id, type) {
  96. var redirectTo = url;
  97. if (id) {
  98. redirectTo = redirectTo + '&id=' + id;
  99. }
  100. if (type == "look") {
  101. redirectTo = redirectTo + '&MNU=' + mnu + '&isView=1';
  102. }
  103. else {
  104. redirectTo = redirectTo + '&MNU=' + mnu
  105. }
  106. $.popupTopWindow('异动申请信息', redirectTo, 800, 590, null, null);
  107. }
  108. function DifferentDynamicApproval_Export() {
  109. $("#formQuery").submit();
  110. }
  111. function QueryCampusDropdownList(data) {
  112. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  113. reload();
  114. }
  115. function QueryCollegeDropdownList(data) {
  116. reload();
  117. }