GraduationStandardBatchAdd.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //刷新
  2. function reload() {
  3. $("#dgGrademajorList").cmsXDataTable("load", $.getDataGridParams("dgGrademajorList"));
  4. }
  5. //获取选中的数据
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgGrademajorList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this.GrademajorID);
  10. });
  11. return d;
  12. }
  13. //获取选中的数据All
  14. function validChooseAll() {
  15. var d = [];
  16. $.each($("#dgGrademajorList").cmsXDataTable("getSelections"), function (index) {
  17. d.push(this);
  18. });
  19. return d;
  20. }
  21. //确定生成成功后不关闭弹出页面
  22. function formSuccessReloadNoClose(data) {
  23. if (data.IsSuccess == true) {
  24. reload();
  25. }
  26. $.messager.alert("系统提示", data.Message);
  27. }
  28. //确定
  29. function GraduationStandardBatchAdd_Confirm() {
  30. var d = validChoose();
  31. if (d == "") {
  32. $.messager.alert("系统提示", "请选择您要新增的年级专业信息。");
  33. return;
  34. }
  35. $("#grademajorIDList").val(JSON.stringify(d));
  36. $(document.forms[0]).submit();
  37. }
  38. //设置列颜色为红色
  39. function SetRedColumn(index, row, value) {
  40. return " <span style=\"color: red;\">" + value + "</span>";
  41. }
  42. //联动查询
  43. function queryCampus(data) {
  44. var campusID = $("#CampusDropdown").combogridX("getValue");
  45. if (campusID != nonSelect) {
  46. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  47. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  48. }
  49. queryClass();
  50. }
  51. function queryCollege(data) {
  52. var campusID = $("#CampusDropdown").combogridX("getValue");
  53. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  54. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  55. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  56. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  57. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  58. queryClass();
  59. }
  60. function querySchoolyear(data) {
  61. queryClass();
  62. }
  63. function queryStandard(data) {
  64. queryClass();
  65. }
  66. function queryClass() {
  67. var jsonString = "";
  68. var parameterString = "";
  69. var campusID = $("#CampusDropdown").combogridX("getValue");
  70. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  71. var schoolYearID = $("#DictionarySchoolyear").combobox("getValue");
  72. var standardID = $("#DictionaryStandard").combogridX("getValue");
  73. var educationID = $("#DictionaryEducation").combogridX("getValue");
  74. var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
  75. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  76. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  77. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  78. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  79. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  80. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  81. if (parameterString != "") {
  82. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  83. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  84. }
  85. else {
  86. $("#DictionaryStandard").combogridX("reload");
  87. }
  88. reload();
  89. }