SpecialtySelector.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. function reload() {
  2. $("#dgSpecialtyList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyList"));
  3. }
  4. //获取选中的数据
  5. function validChoose() {
  6. var d = [];
  7. $.each($("#dgSpecialtyList").cmsXDataTable("getSelections"), function (index) {
  8. d.push(this);
  9. });
  10. return d;
  11. }
  12. function QueryStandardDropdownList(data) {
  13. reload();
  14. }
  15. function QueryEducationDropdownList(data) {
  16. reload();
  17. }
  18. function QueryLearningformDropdownList(data) {
  19. reload();
  20. }
  21. function Specialty_Confirm() {
  22. var d = validChoose();
  23. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  24. var maxSelect = $.SystemGeneral.getUrlParam("MaxSelect");
  25. if (!maxSelect || isNaN(maxSelect)) maxSelect = 0;
  26. if (d.length == 0) {
  27. $.messager.alert("系统提示", "请选择专业。");
  28. return;
  29. }
  30. if (maxSelect > 0 && d.length > maxSelect) {
  31. $.messager.alert("系统提示", "只能选择" + maxSelect + "项记录。");
  32. return;
  33. }
  34. top.$("#" + windowID).data("resultData", d);
  35. top.$("#" + windowID).dialog("close");
  36. }