ScoreAudit.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/Score/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. function reload() {
  8. $("#dgScoreAuditList").cmsXDataTable("load", $.getDataGridParams("dgScoreAuditList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgScoreAuditList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this.FinalExaminationID);
  15. });
  16. return d;
  17. }
  18. //点击列表更新
  19. function edit(rowindex, rowdata) {
  20. var redirectTo = url + "?finalExaminationID=" + rowdata.FinalExaminationID + "&Isdisplay=true&MNU=" + mnu;
  21. $.popupTopWindow('成绩录入信息', redirectTo, 850, 550, null, null);
  22. }
  23. function SelectCollegeComboGrid() {
  24. var collegeID = $("#CollegeComboGrid").combogridX("getValue");
  25. if (collegeID != nonSelect) {
  26. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})";
  27. $("#DepartmentComboGrid").combogridX("reload", eval(jsonString));
  28. }
  29. reload();
  30. }
  31. //学生成绩录入名单
  32. function StudentList(rowindex, rowdata) {
  33. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreAudit/StudentList?finalExaminationID=" + rowdata.FinalExaminationID + "&recordStatus=" + rowdata.ApprovalStatus + "&MNU=" + mnu;
  34. $.popupTopWindow('学生成绩录入名单', redirectTo, 850, 480, null, null);
  35. }
  36. //生成报表
  37. function ScoreAudit_Report() {
  38. var d = validChoose();
  39. if (d == "") {
  40. $.messager.alert("系统提示", "请选择您要生成报表的信息。");
  41. return;
  42. }
  43. if (d.length > 1) {
  44. $.messager.alert("系统提示", "只能选择单个记录生成报表。");
  45. return;
  46. }
  47. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreAudit/Report?FinalExaminationID=" + d + "&MNU=" + mnu;
  48. $.popupTopWindow('成绩单报表', redirectTo, 800, 600, null, null);
  49. }
  50. function validChooseStatus() {
  51. var d = [];
  52. $.each($("#dgScoreAuditList").cmsXDataTable("getSelections"), function (index) {
  53. d.push(this.ApprovalStatusName);
  54. });
  55. return d;
  56. }
  57. //体院
  58. function Score_GroupReport() {
  59. var d = validChoose();
  60. if (d == "") {
  61. $.messager.alert("系统提示", "请选择您要查看的成绩审核信息。");
  62. return;
  63. }
  64. if (d.length > 1) {
  65. $.messager.alert("系统提示", "只能选择单个成绩审核信息。");
  66. return;
  67. }
  68. var status = validChooseStatus();
  69. if (status != "已通过") {
  70. $.messager.alert("系统提示", "只能查看\"已通过\"的学生课程成绩报表");
  71. return;
  72. }
  73. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Score/ScoreReport?FinalExaminationID=" + d + "&MNU=" + mnu;
  74. $.popupTopWindow('学生课程成绩报表', redirectTo, 800, 600, null, null);
  75. }
  76. //审核
  77. function ScoreAudit_Audit() {
  78. var selected = $("#dgScoreAuditList").cmsXDataTable("getSelections");
  79. var d = validChoose();
  80. if (d.length == 0) {
  81. $.messager.alert("系统提示", "请选择您要审核的信息。");
  82. return;
  83. }
  84. var Status = [];
  85. for (var i = 0; i < selected.length; i++) {
  86. // if (selected[i].ApprovalStatus != 4 && selected[i].ApprovalStatus != 6) {
  87. // $.messager.alert("系统提示", "只能审核待处理的奖励信息!");
  88. // return;
  89. // }
  90. Status.push(selected[i].ApprovalStatus);
  91. }
  92. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ScoreAudit/ApprovalStatus', { ApprovalStatus: Status.join(',') }, function (data) {
  93. if (data == "成功") {
  94. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreAudit/ApprovalHandle?MNU=" + mnu + "&finalExaminationIDs=" + d;
  95. $.popupTopWindow('审核信息', redirectTo, 400, 200, null, d);
  96. } else {
  97. $.messager.alert("系统提示", data);
  98. }
  99. });
  100. }
  101. function ScoreAudit_Exce() {
  102. $("#formQuery").submit();
  103. }
  104. function GZMSScore_Report() {
  105. var d = validChoose().join(',');
  106. if (d == "") {
  107. $.messager.alert("系统提示", "请选择您要打印成绩单的录入信息。");
  108. return;
  109. }
  110. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Score/StudentResult', { finalExaminationIDList: d }, function (data) {
  111. if (data.IsSuccess) {
  112. var redirectTo = "../../Scripts/pdf.js/web/viewer.html?file=" + data.Message;
  113. $.popupTopWindow('成绩单', redirectTo, 850, 480, reload);
  114. } else {
  115. $.messager.alert("系统提示", data);
  116. }
  117. });
  118. }