RecruitSpecialtyBatchAdd.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //刷新
  2. function reload() {
  3. $("#dgSpecialtyNoAddList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyNoAddList"));
  4. }
  5. //获取选中的数据
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgSpecialtyNoAddList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this.SpecialtyID);
  10. });
  11. return d;
  12. }
  13. //确定生成成功后不关闭弹出页面
  14. function formSuccessReloadNoClose(data) {
  15. if (data.IsSuccess == true) {
  16. reload();
  17. }
  18. $.messager.alert("系统提示", data.Message);
  19. }
  20. //确定
  21. function RecruitSpecialtyBatchAdd_Confirm() {
  22. var semesterID = $("#SemesterID").combogridX("getValue");
  23. if (semesterID == "" || semesterID == "-1" || semesterID == null) {
  24. $.messager.alert("系统提示", "请选择要新增的学期。");
  25. return;
  26. }
  27. var gradeID = $("#GradeID").combogridX("getValue");
  28. if (gradeID == "" || gradeID == "-1" || gradeID == null) {
  29. $.messager.alert("系统提示", "请选择要新增的年级。");
  30. return;
  31. }
  32. var collegeID = $("#CollegeID").combogridX("getValue");
  33. if (collegeID == "" || collegeID == "-1" || collegeID == null) {
  34. $.messager.alert("系统提示", "请选择要新增的" + college + "。");
  35. return;
  36. }
  37. var d = validChoose();
  38. if (d == "") {
  39. $.messager.alert("系统提示", "请选择您要新增的专业信息。");
  40. return;
  41. }
  42. $("#specialtyIDs").val(JSON.stringify(d));
  43. $(document.forms[0]).submit();
  44. }
  45. //联动
  46. function queryCollege(data) {
  47. reload();
  48. }