AuditProcess.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/AuditProcess/Edit?a=1";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. });
  7. function reload() {
  8. $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this);
  15. });
  16. return d;
  17. }
  18. //点击列表更新
  19. function edit(rowindex, rowdata) {
  20. showDialog([ rowdata ]);
  21. }
  22. //修改按钮
  23. function AuditProcess_Update() {
  24. var d = validChoose();
  25. if (d.length == 0) {
  26. $.messager.alert("系统提示", "请选择您要审核的信息!");
  27. return;
  28. }
  29. if (d.length > 1) {
  30. $.messager.alert("系统信息", "只能选择单个记录进行审核。");
  31. return;
  32. }
  33. showDialog(d);
  34. }
  35. //Excel导出
  36. function AuditProcess_Excel() {
  37. $("#formQuery").submit();
  38. }
  39. function AuditProcess_ShowBatchApprove() {
  40. $("#batchAuditDiv").css("display", "inline-block");
  41. }
  42. function AuditProcess_CloseBatchApprove() {
  43. $("#batchAuditDiv").css("display", "none");
  44. }
  45. function AuditProcess_BatchApprove() {
  46. var d = validChoose();
  47. if (d.length == 0) {
  48. $.messager.alert("系统提示", "请选择您要审核的信息!");
  49. return;
  50. }
  51. if ($.grep(d, function (x) { return x.RecordStatus != notSubmitStatus; }).length > 0) {
  52. $.messager.alert("系统提示", "只能对待处理的记录进行审核!");
  53. return;
  54. }
  55. var approveIDs = $.map(d, function (x) { return x.StudentContrastID }).join(",");
  56. var statusID = $("#Status").combobox("getValue");
  57. $.post(CMS_SystemConfig.VirtualDirectoryPath + "/AuditProcess/BatchAudit", { approveIDs: approveIDs, statusID: statusID }, function (data) {
  58. $.messager.alert("系统提示", data.Message);
  59. if (data.IsSuccess) {
  60. AuditProcess_CloseBatchApprove();
  61. reload();
  62. }
  63. });
  64. }
  65. function showDialog(id) {
  66. var redirectTo = url;
  67. if (id) {
  68. redirectTo = redirectTo + '&id=' + id[0].StudentContrastID;
  69. }
  70. redirectTo = redirectTo + '&MNU=' + mnu;
  71. $.popupTopWindow('校对信息', redirectTo, 800, 500, null, null);
  72. }
  73. function QueryCampusDropdownList(data) {
  74. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  75. reload();
  76. }
  77. function QueryCollegeDropdownList(data) {
  78. reload();
  79. }
  80. //联动查询
  81. function queryStandard(data) {
  82. queryClass();
  83. reload();
  84. }
  85. function queryCollege(data) {
  86. var campusID = $("#CampusDropdown").combogridX("getValue");
  87. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  88. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  89. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  90. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  91. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  92. // if (campusID != nonSelect) {
  93. // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  94. // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  95. // }
  96. queryClass();
  97. reload();
  98. }
  99. function queryClass() {
  100. var jsonString = "";
  101. var parameterString = "";
  102. var campusID = $("#CampusDropdown").combogridX("getValue");
  103. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  104. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  105. var schoolyearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  106. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  107. if (schoolyearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolyearID + "|@|";
  108. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  109. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  110. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  111. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  112. if (parameterString != "") {
  113. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  114. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  115. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  116. } else {
  117. $("#ClassmajorDropdown").combogridX("reload");
  118. $("#StandardDictionaryDropDown").combogridX("reload");
  119. }
  120. reload();
  121. }