SpecialtyAuditing.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/SpecialtyAuditing/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgSpecialtyAuditingList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyAuditingList"));
  10. }
  11. //获取选中的数据All
  12. function validChooseAll() {
  13. var d = [];
  14. $.each($("#dgSpecialtyAuditingList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this);
  16. });
  17. return d;
  18. }
  19. //获取选中的数据
  20. function validChoose() {
  21. var d = [];
  22. $.each($("#dgSpecialtyAuditingList").cmsXDataTable("getSelections"), function (index) {
  23. d.push(this.SpecialtyApplyID);
  24. });
  25. return d;
  26. }
  27. //查看
  28. function edit(rowindex, rowdata) {
  29. var redirectTo = url + "?specialtyApplyID=" + rowdata.SpecialtyApplyID + "&MNU=" + mnu + "&type=detail";
  30. $.popupTopWindow('专业审核信息', redirectTo, 680, 365, null, null);
  31. }
  32. //删除
  33. function SpecialtyAuditing_Delete() {
  34. var d = validChoose().join(',');
  35. if (d == "") {
  36. $.messager.alert("系统提示", "请选择您要删除的信息。");
  37. return;
  38. }
  39. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  40. if (r) {
  41. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SpecialtyAuditing/Delete', { specialtyApplyIDs: d }, function (data) {
  42. if (data.IsSuccess) {
  43. $.messager.alert("系统提示", data.Message);
  44. $("#dgSpecialtyAuditingList").cmsXDataTable('load');
  45. } else {
  46. $.messager.alert("系统提示", data.Message);
  47. }
  48. });
  49. }
  50. });
  51. }
  52. //审核
  53. function SpecialtyAuditing_Approve() {
  54. var specialtyApplyIDs = validChoose();
  55. if (specialtyApplyIDs.length == 0) {
  56. $.messager.alert("系统提示", "请选择您要审核的信息。");
  57. return;
  58. }
  59. if (specialtyApplyIDs.length > 1) {
  60. //批量审核
  61. var approveID = specialtyApplyIDs[0];
  62. $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=CF_SpecialtyApply&FormID=' + approveID,
  63. 400, 300, SpecialtyAuditing_ApproveConfirm);
  64. }
  65. else {
  66. var specialtyApplyID = specialtyApplyIDs;
  67. //单个审核
  68. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SpecialtyAuditing/Approve?MNU=" + mnu + "&specialtyApplyID=" + specialtyApplyID;
  69. $.popupTopWindow('专业审核', redirectTo, 680, 400, null, null);
  70. }
  71. }
  72. //确定(审核)
  73. function SpecialtyAuditing_ApproveConfirm(action) {
  74. if (!action) {
  75. return;
  76. }
  77. if (action.ActionID == "") {
  78. return;
  79. }
  80. var approveIDs = validChoose().join(',');
  81. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/SpecialtyAuditing/ApproveConfirm", { specialtyApplyIDs: approveIDs, actionID: action.Action, comment: action.Comment },
  82. function (data) {
  83. if (data.IsSuccess) {
  84. reload();
  85. }
  86. $.messager.alert("系统提示", data.Message);
  87. }, 'json');
  88. }
  89. //流程步骤详细信息(暂时不用)
  90. function editState(rowindex, rowdata) {
  91. redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SpecialtyAuditing/ApproveWorkflowList?specialtyApplyID=" + rowdata.SpecialtyApplyID + "&MNU=" + mnu;
  92. $.popupTopWindow("审核历史", redirectTo, 800, 600, null, null);
  93. }
  94. //Excel导出
  95. function SpecialtyAuditing_Export() {
  96. $("#formQuery").submit();
  97. }
  98. //联动查询
  99. function queryCampus(data) {
  100. var campusID = $("#CampusDropdown").combogridX("getValue");
  101. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  102. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  103. reload();
  104. }
  105. function queryCollege(data) {
  106. var campusID = $("#CampusDropdown").combogridX("getValue");
  107. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  108. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  109. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  110. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  111. reload();
  112. }
  113. function queryGrade(data) {
  114. reload();
  115. }
  116. function queryStandard(data) {
  117. reload();
  118. }