GraduationCourseCreate.js 2.8 KB

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