ChangeCollect.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. $("#dgChangeCollectList").cmsXDataTable("load", $.getDataGridParams("dgChangeCollectList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgChangeCollectList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this.StudentRecordChangeHistoryID);
  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 ChangeCollect_Export() {
  37. var d = validChoose().join(',')
  38. if (d != "") {
  39. document.getElementById("StudentRecordChangeHistoryID").value = d;
  40. }
  41. else {
  42. document.getElementById("StudentRecordChangeHistoryID").value = "";
  43. }
  44. $("#formQuery").submit();
  45. }
  46. //function AuditProcess_ShowBatchApprove() {
  47. // $("#batchAuditDiv").css("display", "inline-block");
  48. //}
  49. //function AuditProcess_CloseBatchApprove() {
  50. // $("#batchAuditDiv").css("display", "none");
  51. //}
  52. //function AuditProcess_BatchApprove() {
  53. // var d = validChoose();
  54. // if (d.length == 0) {
  55. // $.messager.alert("系统提示", "请选择您要审核的信息!");
  56. // return;
  57. // }
  58. // if ($.grep(d, function (x) { return x.RecordStatus != notSubmitStatus; }).length > 0) {
  59. // $.messager.alert("系统提示", "只能对待处理的记录进行审核!");
  60. // return;
  61. // }
  62. // var approveIDs = $.map(d, function (x) { return x.StudentContrastID }).join(",");
  63. // var statusID = $("#Status").combobox("getValue");
  64. // $.post(CMS_SystemConfig.VirtualDirectoryPath + "/AuditProcess/BatchAudit", { approveIDs: approveIDs, statusID: statusID }, function (data) {
  65. // $.messager.alert("系统提示", data.Message);
  66. // if (data.IsSuccess) {
  67. // AuditProcess_CloseBatchApprove();
  68. // reload();
  69. // }
  70. // });
  71. //}
  72. //function showDialog(id) {
  73. // var redirectTo = url;
  74. // if (id) {
  75. // redirectTo = redirectTo + '&id=' + id[0].StudentContrastID;
  76. // }
  77. // redirectTo = redirectTo + '&MNU=' + mnu;
  78. // $.popupTopWindow('校对信息', redirectTo, 800, 500, null, null);
  79. //}
  80. function QueryCampusDropdownList(data) {
  81. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  82. reload();
  83. }
  84. function QueryCollegeDropdownList(data) {
  85. reload();
  86. }
  87. //联动查询
  88. function queryStandard(data) {
  89. queryClass();
  90. reload();
  91. }
  92. function queryCollege(data) {
  93. var campusID = $("#CampusDropdown").combogridX("getValue");
  94. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  95. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  96. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  97. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  98. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  99. // if (campusID != nonSelect) {
  100. // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  101. // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  102. // }
  103. queryClass();
  104. reload();
  105. }
  106. function queryClass() {
  107. var jsonString = "";
  108. var parameterString = "";
  109. var campusID = $("#CampusDropdown").combogridX("getValue");
  110. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  111. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  112. var schoolyearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  113. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  114. if (schoolyearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolyearID + "|@|";
  115. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  116. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  117. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  118. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  119. if (parameterString != "") {
  120. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  121. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  122. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  123. } else {
  124. $("#ClassmajorDropdown").combogridX("reload");
  125. $("#StandardDictionaryDropDown").combogridX("reload");
  126. }
  127. reload();
  128. }