CheckingResult.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/CheckingResult/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgCheckingResultList").cmsXDataTable("load", $.getDataGridParams("dgCheckingResultList"));
  10. }
  11. //获取选中的数据All
  12. function validChooseAll() {
  13. var d = [];
  14. $.each($("#dgCheckingResultList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this);
  16. });
  17. return d;
  18. }
  19. //获取选中的数据
  20. function validChoose() {
  21. var d = [];
  22. $.each($("#dgCheckingResultList").cmsXDataTable("getSelections"), function (index) {
  23. d.push(this.StudentRecordChangeHistoryID);
  24. });
  25. return d;
  26. }
  27. //撤消
  28. function CheckingResult_Cancel() {
  29. var id = validChoose().join(',');
  30. if (id == "") {
  31. $.messager.alert("系统提示", "请选择您要撤消的信息。");
  32. return;
  33. }
  34. var d = validChooseAll();
  35. if ($.grep(d, function (v, i) { return v.ApprovalStatus == startStatusID || v.ApprovalStatus == backpointStatusID || v.ApprovalStatus == endStatusID; }).length > 0) {
  36. $.messager.alert("系统提示", "只能对待审状态的信息进行撤消。");
  37. return;
  38. }
  39. $.messager.confirm("系统提示", "您确定要撤消选择的信息?", function (r) {
  40. if (r) {
  41. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/CheckingResult/Cancel', { studentRecordChangeHistoryIDs: id }, function (data) {
  42. if (data.IsSuccess) {
  43. $.messager.alert("系统提示", data.Message);
  44. $("#dgCheckingResultList").cmsXDataTable('load');
  45. } else {
  46. $.messager.alert("系统提示", data.Message);
  47. }
  48. });
  49. }
  50. });
  51. }
  52. //设置列颜色为红色
  53. function SetRedColumn(index, row, value) {
  54. return " <span style=\"color: red;\">" + value + "</span>";
  55. }
  56. //Excel导出
  57. function CheckingResult_Export() {
  58. $("#formQuery").submit();
  59. }