ChangeResult.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChangeResult/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgChangeResultList").cmsXDataTable("load", $.getDataGridParams("dgChangeResultList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgChangeResultList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.StudentChangeID);
  16. });
  17. return d;
  18. }
  19. //查看明细
  20. function edit(rowindex, rowdata) {
  21. var redirectTo = url + "?studentChangeID=" + rowdata.StudentChangeID + "&MNU=" + mnu + "&type=detail";
  22. $.popupTopWindow('异动结果信息', redirectTo, 720, 550, null, null);
  23. }
  24. //删除
  25. function ChangeResult_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 + '/ChangeResult/Delete', { studentChangeIDs: d }, function (data) {
  34. if (data.IsSuccess) {
  35. $.messager.alert("系统提示", data.Message);
  36. $("#dgChangeResultList").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 ChangeResult_Export() {
  50. $("#formQuery").submit();
  51. }
  52. //Excel导入
  53. function ChangeResult_Import() {
  54. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/ChangeResult/Import?MNU=' + mnu;
  55. $.popupTopWindow('学籍异动信息导入', redirectTo, 420, 300, reload);
  56. }
  57. //联动查询
  58. function queryCampus(data) {
  59. var campusID = $("#CampusDropdown").combogridX("getValue");
  60. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  61. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  62. queryClass();
  63. }
  64. function queryCollege(data) {
  65. var campusID = $("#CampusDropdown").combogridX("getValue");
  66. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  67. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  68. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  69. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  70. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  71. queryClass();
  72. }
  73. function queryGrade(data) {
  74. queryClass();
  75. }
  76. function queryStandard(data) {
  77. queryClass();
  78. }
  79. function queryLearnSystem(data) {
  80. queryClass();
  81. }
  82. function queryGrademajor(data) {
  83. queryClass();
  84. }
  85. function queryClass() {
  86. var jsonString = "";
  87. var parameterString = "";
  88. var campusID = $("#CampusDropdown").combogridX("getValue");
  89. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  90. var gradeID = $("#DictionaryGrade").combogridX("getValue");
  91. var standardID = $("#DictionaryStandard").combogridX("getValue");
  92. var educationID = $("#DictionaryEducation").combogridX("getValue");
  93. var learningformID = $("#DictionaryLearningform").combogridX("getValue");
  94. var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  95. //var grademajorID = $("#GrademajorComboGrid").combogridX("getValue");
  96. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  97. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  98. if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|";
  99. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  100. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  101. if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|";
  102. if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@|";
  103. //if (grademajorID != nonSelect) parameterString += "GrademajorComboGrid|*|" + grademajorID + "|@|";
  104. if (parameterString != "") {
  105. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  106. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  107. //$("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  108. $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
  109. }
  110. else {
  111. $("#DictionaryStandard").combogridX("reload");
  112. //$("#GrademajorComboGrid").combogridX("reload");
  113. $("#ClassmajorComboGrid").combogridX("reload");
  114. }
  115. reload();
  116. }