ExecutablePlanBatchAdd.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //刷新
  2. function reload() {
  3. $("#dgSpecialtyPlanNoAddList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyPlanNoAddList"));
  4. }
  5. //获取选中的数据
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgSpecialtyPlanNoAddList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this.SpecialtyPlanID);
  10. });
  11. return d;
  12. }
  13. //获取选中的数据All
  14. function validChooseAll() {
  15. var d = [];
  16. $.each($("#dgSpecialtyPlanNoAddList").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 SetRedColumn(index, row, value) {
  30. return " <span style=\"color: red;\">" + value + "</span>";
  31. }
  32. //联动查询
  33. function queryCampus(data) {
  34. var campusID = $("#CampusDropdown").combogridX("getValue");
  35. if (campusID != nonSelect) {
  36. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  37. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  38. }
  39. else {
  40. $("#CollegeDropdown").combogridX("reload");
  41. }
  42. queryClass();
  43. }
  44. function queryCollege(data) {
  45. var campusID = $("#CampusDropdown").combogridX("getValue");
  46. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  47. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  48. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  49. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  50. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  51. queryClass();
  52. }
  53. function querySchoolyear(data) {
  54. queryClass();
  55. }
  56. function queryStandard(data) {
  57. queryClass();
  58. }
  59. function queryGrademajor(data) {
  60. queryClass();
  61. }
  62. function queryClass() {
  63. var jsonString = "";
  64. var parameterString = "";
  65. var campusID = $("#CampusDropdown").combogridX("getValue");
  66. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  67. var schoolYearID = $("#DictionarySchoolyear").combogridX("getValue"); //combobox
  68. var standardID = $("#DictionaryStandard").combogridX("getValue");
  69. var educationID = $("#DictionaryEducation").combogridX("getValue");
  70. var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
  71. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  72. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  73. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  74. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  75. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  76. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  77. if (parameterString != "") {
  78. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  79. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  80. $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  81. }
  82. else {
  83. $("#DictionaryStandard").combogridX("reload");
  84. $("#GrademajorComboGrid").combogridX("reload");
  85. }
  86. reload();
  87. }
  88. //确定
  89. function ExecutablePlanCreate_Confirm() {
  90. var d = validChooseAll();
  91. if (d == "") {
  92. $.messager.alert("系统提示", "请选择您要生成的信息。");
  93. return;
  94. }
  95. $("#specialtyPlanViewList").val(JSON.stringify(d));
  96. $(document.forms[0]).submit();
  97. }