LevelScore.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. function queryCollege(data) {
  2. queryClass();
  3. }
  4. function ExaminationSubjectSelect() {
  5. var jsonString = "";
  6. var parameterString = "";
  7. var examinationSubjectSelectID = $("#ExaminationSubjectDropdown").combogridX("getValue");
  8. if (examinationSubjectSelectID != nonSelect) {
  9. parameterString += "ExaminationSubjectDropdown|*|" + examinationSubjectSelectID + "|@|";
  10. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  11. $("#ScorelevelDropdown").combogridX("reload", eval(jsonString));
  12. }
  13. reload();
  14. }
  15. function queryStandard(data) {
  16. queryClass();
  17. }
  18. function queryClass() {
  19. var jsonString = "";
  20. var parameterString = "";
  21. //var campusID = $("#CampusDropdown").combogridX("getValue");
  22. var collegeID = $("#CollegeComboGrid").combogridX("getValue");
  23. var educationID = $("#DictionaryEducation").combobox("getValue");
  24. var schoolYearID = $("#DictionarySchoolyear").combobox("getValue");
  25. var standardID = $("#DictionaryStandard").combogridX("getValue");
  26. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  27. var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  28. //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  29. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  30. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  31. if (schoolYearID != nonSelect) parameterString += "DictionarySchoolyear|*|" + schoolYearID + "|@|";
  32. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  33. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  34. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  35. if (parameterString != "") {
  36. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  37. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  38. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  39. } else {
  40. $("#ClassmajorDropdown").combogridX("reload");
  41. $("#DictionaryStandard").combogridX("reload");
  42. }
  43. reload();
  44. }
  45. function reloadClassmajor() {
  46. if ($("#ClassmajorDropdown").length > 0 && $.data($("#ClassmajorDropdown")[0], "combogridX")) {
  47. var collegeID = null;
  48. var yearID = null;
  49. var standardID = null;
  50. if ($("#CollegeComboGrid").length > 0 && $.data($("#CollegeComboGrid")[0], "combogridX")) {
  51. collegeID = $("#CollegeComboGrid").combogridX("getValue");
  52. }
  53. if ($("#DictionarySchoolyear").length > 0 && $.data($("#DictionarySchoolyear")[0], "combobox")) {
  54. yearID = $("#DictionarySchoolyear").combobox("getValue");
  55. }
  56. if ($("#DictionaryStandard").length > 0 && $.data($("#DictionaryStandard")[0], "combogridX")) {
  57. standardID = $("#DictionaryStandard").combogridX("getValue");
  58. }
  59. if (collegeID == nonSelect) {
  60. collegeID = null;
  61. }
  62. if (yearID == nonSelect) {
  63. yearID = null;
  64. }
  65. if (standardID == nonSelect) {
  66. standardID = null;
  67. }
  68. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID
  69. + "|@|DictionarySchoolyear|*|" + yearID + "|@|DictionaryStandard|*|" + standardID + "|@|'})";
  70. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  71. }
  72. }
  73. function reload() {
  74. $("#dgLevelScoreList").cmsXDataTable("load", $.getDataGridParams("dgLevelScoreList"));
  75. }
  76. $(function () {
  77. mnu = $.SystemGeneral.getUrlParam("MNU");
  78. })
  79. // 获取选中的数据
  80. function validChoose() {
  81. var d = [];
  82. $.each($("#dgLevelScoreList").cmsXDataTable("getSelections"), function (index) {
  83. d.push(this.LevelScoreID);
  84. });
  85. return d;
  86. }
  87. //批量修改执行前触发事件
  88. SystemBatchModifyControl.OnSubmit = function (a) {
  89. if (document.getElementById("TotalScoreTextBox_div")!=null&&document.getElementById("TotalScoreTextBox_div").style.display != "none") {
  90. var TotalScore = $("#TotalScore_TextBox").val();
  91. var regExp = /^\d+(\.\d+)?$/;
  92. if (!regExp.test(TotalScore)) {
  93. $.messager.alert("系统提示", "请输入正确的分数。");
  94. return false;
  95. }
  96. }
  97. }
  98. function LevelScore_Add() {
  99. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/LevelScore/Edit?MNU=" + mnu;
  100. $.popupTopWindow('增加过级成绩', redirectTo, 650, 385, null, null);
  101. }
  102. function LevelScore_Update() {
  103. var d = validChoose();
  104. if (d == "") {
  105. $.messager.alert("系统提示", "请选择您要修改的成绩信息。");
  106. return;
  107. }
  108. if (d.length > 1) {
  109. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  110. return;
  111. }
  112. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/levelScore/Edit?levelScoreID=" + d + "&MNU=" + mnu;
  113. $.popupTopWindow('过级成绩信息', redirectTo, 650, 430, null, null);
  114. }
  115. function LevelScore_Delete() {
  116. var records = $("#dgLevelScoreList").cmsXDataTable("getSelections");
  117. var msg = "";
  118. var d = validChoose().join(',');
  119. if (d == "") {
  120. $.messager.alert("系统提示", "请选择您要删除的信息!!");
  121. return;
  122. }
  123. $.messager.confirm("系统提示", msg + "您确定要删除所勾选的信息?", function (r) {
  124. if (r) {
  125. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/levelScore/Delete', { levelScoreIDs: d }, function (data) {
  126. if (data == "删除成功") {
  127. $.messager.alert("系统提示", "删除成功!");
  128. $("#dgLevelScoreList").cmsXDataTable('load');
  129. } else {
  130. $.messager.alert("系统提示", data);
  131. }
  132. });
  133. }
  134. });
  135. // $.post(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudent/Verification', { newStudentIDs: d }, function (data) {
  136. // if (data == "1") {
  137. // msg = "所选信息存在已分配的新生,";
  138. // }
  139. // $.messager.confirm("系统提示", msg + "您确定要删除所选择的新生信息?", function (r) {
  140. // if (r) {
  141. // $.post(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudent/Delete', { newStudentIDs: d }, function (data) {
  142. // if (data == "删除成功") {
  143. // $.messager.alert("系统提示", "删除成功!");
  144. // $("#dgLevelScoreList").cmsXDataTable('load');
  145. // } else {
  146. // $.messager.alert("系统提示", data);
  147. // }
  148. // });
  149. // }
  150. // });
  151. // });
  152. }
  153. function LevelScore_Export() { $("#formQuery").submit(); }
  154. function LevelScore_Import() {
  155. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/LevelScore/Import?MNU=' + mnu;
  156. $.popupTopWindow('过级成绩导入', redirectTo, 400, 180, null, null);
  157. }