EducationMissionClassConjunctionList.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. var educationMissionIDs;
  2. var windowID;
  3. $(function () {
  4. $("#EducationMissionClassID").combobox({
  5. onSelect: function (data) {
  6. $("#ClassName").val(data.Text);
  7. }
  8. });
  9. })
  10. $.parser.onComplete = function () {
  11. $(function () {
  12. windowID = $.SystemGeneral.getUrlParam("WindowID");
  13. educationMissionIDs = top.$("#" + windowID).data("inputData");
  14. reload();
  15. });
  16. };
  17. function reload() {
  18. $("#hidEducationMissionClassIDs").val(educationMissionIDs.join(','));
  19. $("#dgEducationMissionClassConjunctionList").cmsXDataTable("load", $.getDataGridParams("dgEducationMissionClassConjunctionList"));
  20. }
  21. //获取下拉菜单
  22. function dgEducationMissionClassConjunctionList_LoadSuccess(educationMissionClassViewList) {
  23. if (educationMissionClassViewList.rows.length == 0) {
  24. return;
  25. }
  26. var dataList = [];
  27. $.each(educationMissionClassViewList.rows, function (index, value) {
  28. dataList.push({ "Text": value.Name, "Value": value.EducationMissionClassID });
  29. });
  30. $("#EducationMissionClassID").combobox("loadData", dataList);
  31. $("#Name").val(educationMissionClassViewList.rows[0].MissionClassClassmajorName);//初始化合班名称
  32. }
  33. //获取选中的数据
  34. function validChoose() {
  35. var d = [];
  36. $.each($("#dgEducationMissionClassConjunctionList").cmsXDataTable("getSelections"), function (index) {
  37. d.push(this);
  38. });
  39. return d;
  40. }
  41. //保存
  42. function EducationMissionClass_ConjunctionSave() {
  43. var educationMissionClassViewList = $("#dgEducationMissionClassConjunctionList").cmsXDataTable("getRows");
  44. $(document.forms[0]).submit();
  45. }