SelectGroup.js 873 B

123456789101112131415161718192021222324252627282930313233
  1. var inputData;
  2. $.parser.onComplete = function (context) {
  3. inputData = top.$("#" + windowID).data("inputData");
  4. $("#dgWeekGroupList").cmsXDataTable("loadData", { rows: inputData.weekListGroup, total: inputData.weekListGroup.length });
  5. }
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgWeekGroupList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this);
  10. });
  11. return d;
  12. }
  13. function confirm() {
  14. var d = validChoose();
  15. if (d.length == 0) {
  16. $.messager.alert("系统提示", "请选择排课组。");
  17. return;
  18. }
  19. if (d.length > 1) {
  20. $.messager.alert("系统提示", "只能选择一个排课组。");
  21. return;
  22. }
  23. top.$("#" + windowID).data("resultData", {
  24. weekList: inputData.weekList,
  25. weekListGroup: d[0]
  26. });
  27. top.$("#" + windowID).dialog("close");
  28. }