CheckingCollect.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/CheckingCollect/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgCheckingCollectList").cmsXDataTable("load", $.getDataGridParams("dgCheckingCollectList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgCheckingCollectList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.StudentRecordChangeHistoryID);
  16. });
  17. return d;
  18. }
  19. //查看明细
  20. function edit(rowindex, rowdata) {
  21. var redirectTo = url + "?studentRecordChangeHistoryID=" + rowdata.StudentRecordChangeHistoryID + "&MNU=" + mnu + "&type=detail";
  22. $.popupTopWindow('校对记录明细', redirectTo, 640, 320, null, null);
  23. }
  24. //删除
  25. function CheckingCollect_Delete() {
  26. var d = validChoose().join(',');
  27. if (d == "") {
  28. $.messager.alert("系统提示", "请选择您要删除的信息。");
  29. return;
  30. }
  31. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  32. if (r) {
  33. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/CheckingCollect/Delete', { studentRecordChangeHistoryIDs: d }, function (data) {
  34. if (data.IsSuccess) {
  35. $.messager.alert("系统提示", data.Message);
  36. $("#dgCheckingCollectList").cmsXDataTable('load');
  37. } else {
  38. $.messager.alert("系统提示", data.Message);
  39. }
  40. });
  41. }
  42. });
  43. }
  44. //设置列颜色为红色
  45. function SetRedColumn(index, row, value) {
  46. return " <span style=\"color: red;\">" + value + "</span>";
  47. }
  48. //Excel导出
  49. function CheckingCollect_Export() {
  50. $("#formQuery").submit();
  51. }
  52. //联动查询
  53. function queryCampus(data) {
  54. var campusID = $("#CampusDropdown").combogridX("getValue");
  55. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  56. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  57. queryClass();
  58. }
  59. function queryCollege(data) {
  60. var campusID = $("#CampusDropdown").combogridX("getValue");
  61. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  62. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  63. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  64. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  65. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  66. queryClass();
  67. }
  68. function queryGrade(data) {
  69. queryClass();
  70. }
  71. function queryStandard(data) {
  72. queryClass();
  73. }
  74. function queryLearnSystem(data) {
  75. queryClass();
  76. }
  77. function queryGrademajor(data) {
  78. queryClass();
  79. }
  80. function queryClass() {
  81. var jsonString = "";
  82. var parameterString = "";
  83. var campusID = $("#CampusDropdown").combogridX("getValue");
  84. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  85. var gradeID = $("#DictionaryGrade").combogridX("getValue");
  86. var standardID = $("#DictionaryStandard").combogridX("getValue");
  87. var educationID = $("#DictionaryEducation").combogridX("getValue");
  88. var learningformID = $("#DictionaryLearningform").combogridX("getValue");
  89. var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  90. var grademajorID = $("#GrademajorComboGrid").combogridX("getValue");
  91. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  92. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  93. if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|";
  94. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  95. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  96. if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|";
  97. if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@|";
  98. if (grademajorID != nonSelect) parameterString += "GrademajorComboGrid|*|" + grademajorID + "|@|";
  99. if (parameterString != "") {
  100. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  101. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  102. $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  103. $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
  104. }
  105. else {
  106. $("#DictionaryStandard").combogridX("reload");
  107. $("#GrademajorComboGrid").combogridX("reload");
  108. $("#ClassmajorComboGrid").combogridX("reload");
  109. }
  110. reload();
  111. }