ExaminationSubjectCollegeControl.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationSubjectCollegeControl/Edit";
  2. var mnu;
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //获取选中的数据
  8. function validChoose() {
  9. var d = [];
  10. $.each($("#dgExaminationSubjectCollegeControlList").cmsXDataTable("getSelections"), function (index) {
  11. d.push(this.ExaminationSubjectCollegeControlID);
  12. });
  13. return d;
  14. }
  15. function ExaminationSubjectCollegeControl_Add() {
  16. redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationSubjectCollegeControl/Add" +"?MNU=" + mnu;
  17. $.popupTopWindow("专业报考限制新增", redirectTo, 800, 400, null, null);
  18. }
  19. function ExaminationSubjectCollegeControl_Update() {
  20. var d = validChoose();
  21. if (d.length == 0) {
  22. $.messager.alert("系统提示", "请选择您要修改的信息。");
  23. return;
  24. }
  25. if (d.length > 1) {
  26. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  27. return;
  28. }
  29. redirectTo = url + "?examinationSubjectCollegeControlID=" + d + "&MNU=" + mnu;
  30. $.popupTopWindow("专业报考限制修改", redirectTo, 600, 350, null, null);
  31. }
  32. function ExaminationSubjectCollegeControl_Delete() {
  33. var d = validChoose();
  34. if (d.length == 0) {
  35. $.messager.alert("系统提示", "请选择您要删除的信息。");
  36. return;
  37. }
  38. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  39. if (r) {
  40. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationSubjectCollegeControl/Delete', { examinationSubjectCollegeControlIDs: d.join(',') }, function (data) {
  41. if (data == "删除成功。") {
  42. $.messager.alert("系统提示", data);
  43. $("#dgExaminationSubjectCollegeControlList").cmsXDataTable('load');
  44. } else {
  45. $.messager.alert("系统提示", data);
  46. }
  47. });
  48. }
  49. });
  50. }
  51. function ExaminationSubjectCollegeControl_Export() {
  52. var d = validChoose().join(',');
  53. $("[name='SelectedID']").val(d);
  54. $("#formQuery").submit();
  55. }
  56. function queryClass() {
  57. var jsonString = "";
  58. var parameterString = "";
  59. //var campusID = $("#CampusDropdown").combogridX("getValue");
  60. var collegeID = $("#cgCollege").combogridX("getValue");
  61. //var educationID = $("#Education").combobox("getValue");
  62. var schoolYearID = $("#ddlYear").combobox("getValue");
  63. var standardID = $("#ddlStandard").combogridX("getValue");
  64. //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  65. //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  66. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  67. //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  68. if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  69. if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  70. //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  71. if (parameterString != "") {
  72. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  73. $("#ddlStandard").combogridX("reload", eval(jsonString));
  74. $("#cgClassmajor").combogridX("reload", eval(jsonString));
  75. } else {
  76. $("#ddlStandard").combogridX("reload");
  77. $("#cgClassmajor").combogridX("reload");
  78. }
  79. reload();
  80. }
  81. function queryCollege(data) {
  82. //var campusID = $("#CampusDropdown").combogridX("getValue");
  83. var collegeID = $("#cgCollege").combogridX("getValue");
  84. var jsonString = "({'QueryParamsDatas':";
  85. jsonString += "'CollegeDropdown|*|" + collegeID + "|@|'})";
  86. $("#cgCollege").combogridX("reload", eval(jsonString));
  87. $("#ddlStandard").combogridX("reload", eval(jsonString));
  88. // if (campusID != nonSelect) {
  89. // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  90. // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  91. // }
  92. queryClass();
  93. reload();
  94. }
  95. function reload() {
  96. $("#dgExaminationSubjectCollegeControlList").cmsXDataTable("load", $.getDataGridParams("dgExaminationSubjectCollegeControlList"));
  97. }
  98. function validChoose() {
  99. var d = [];
  100. $.each($("#dgExaminationSubjectCollegeControlList").cmsXDataTable("getSelections"), function (index) {
  101. d.push(this.ExaminationSubjectCollegeControlID);
  102. });
  103. return d;
  104. }