EvaluationStudentSettingBatchAdd.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //刷新
  2. function reload() {
  3. $("#dgEducationMissionClassNoAddList").cmsXDataTable("load", $.getDataGridParams("dgEducationMissionClassNoAddList"));
  4. }
  5. //获取选中的数据
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgEducationMissionClassNoAddList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this.EducationMissionClassID);
  10. });
  11. return d;
  12. }
  13. //获取选中的数据All
  14. function validChooseAll() {
  15. var d = [];
  16. $.each($("#dgEducationMissionClassNoAddList").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 EvaluationStudentSettingBatchAdd_Confirm() {
  30. var schoolyearID = $("#SchoolyearID").combobox("getValue");
  31. if (schoolyearID == "" || schoolyearID == "-1" || schoolyearID == null) {
  32. $.messager.alert("系统提示", "请选择学年学期。");
  33. return;
  34. }
  35. var d = validChooseAll();
  36. if (d.length == 0) {
  37. $.messager.alert("系统提示", "请选择您要新增的信息。");
  38. return;
  39. }
  40. $("#educationMissionClassViewList").val(JSON.stringify(d));
  41. $(document.forms[0]).submit();
  42. }
  43. //设置列颜色为红色
  44. function SetRedColumn(index, row, value) {
  45. return " <span style=\"color: red;\">" + value + "</span>";
  46. }
  47. //联动查询
  48. function queryCampus(data) {
  49. var campusID = $("#CampusDropdown").combogridX("getValue");
  50. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  51. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  52. queryClass();
  53. }
  54. function queryCollege(data) {
  55. var campusID = $("#CampusDropdown").combogridX("getValue");
  56. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  57. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  58. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  59. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  60. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  61. queryClass();
  62. }
  63. function queryDepartment(data) {
  64. var departmentID = $("#DepartmentDropdown").combogridX("getValue"); //combobox
  65. var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})";
  66. $("#StaffComboGrid").combogridX("reload", eval(jsonString));
  67. reload();
  68. }
  69. function queryGrade(data) {
  70. queryClass();
  71. }
  72. function queryStandard(data) {
  73. queryClass();
  74. }
  75. function queryClass() {
  76. var jsonString = "";
  77. var parameterString = "";
  78. var campusID = $("#CampusDropdown").combogridX("getValue");
  79. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  80. var gradeID = $("#DictionaryGrade").combogridX("getValue");
  81. var standardID = $("#DictionaryStandard").combogridX("getValue");
  82. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  83. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  84. if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|";
  85. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  86. if (parameterString != "") {
  87. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  88. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  89. }
  90. else {
  91. $("#DictionaryStandard").combogridX("reload");
  92. }
  93. reload();
  94. }