ExaminationPlanAdd.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. var mnu;
  2. var examinationPlanID;
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. examinationPlanID = null;
  6. });
  7. function ExaminationPlan_Save() {
  8. $(document.forms[0]).submit();
  9. }
  10. function queryCollege(data) {
  11. queryClass();
  12. }
  13. function ExaminationPlan_ClassroomAdd() {
  14. if (!$(document.forms[0]).valid()) return;
  15. isFromAddButton = true;
  16. //ExaminationPlanAdd_Save();
  17. // if (checkModify()) {
  18. // isFromAddButton = true;
  19. // ExaminationPlan_Save();
  20. // } else {
  21. $.popupTopWindow('新增考场', CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationPlan/AddClassroomLayout?MNU=' + mnu, 800, 600, ExaminationPlan_ClassroomAdd_Confirm);
  22. // }
  23. }
  24. function ExaminationPlan_Save_Complete(data) {
  25. $('a').removeAttr('disabled', 'disabled');
  26. $('#loading').hide();
  27. // if (!isFromAddButton && !isFromEditButton) {
  28. // $.messager.alert('系统信息', data.Message, null, function () {
  29. // if (data.IsSuccess) {
  30. // var dialogId = $.SystemGeneral.getUrlParam('WindowID');
  31. // dialogId = (dialogId == null || dialogId == '') ? 'sysWindow' : dialogId;
  32. // top.$('#' + dialogId).window('close');
  33. // var tab = top.$('#index_center_tabs').tabs('getSelected');
  34. // var $iframe = tab.panel('body').find("iframe");
  35. // if ($iframe[0].contentWindow.reload)
  36. // $iframe[0].contentWindow.reload();
  37. // }
  38. // });
  39. // } else {
  40. // if (!data.IsSuccess) {
  41. // $.messager.alert('系统信息', data.Message);
  42. // } else {
  43. // if (isFromAddButton) {
  44. $.popupTopWindow('新增考场', CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationPlan/AddClassroomLayout?MNU=' + mnu + '&ExaminationPlanID=' + examinationPlanID, 800, 600, ExaminationPlan_ClassroomAdd_Confirm);
  45. //isFromAddButton = false;
  46. // } else if (isFromEditButton) {
  47. // $.popupTopWindow('编辑考场', CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationPlan/ClassroomLayout?MNU=' + mnu + '&ExaminationPlanID=' + examinationPlanID + '&ExaminationRoomLayoutID=' + rowData.ExaminationRoomLayoutID,
  48. // 800, 600, ExaminationPlan_ClassroomAdd_Confirm);
  49. // }
  50. // }
  51. // }
  52. }
  53. function QueryCollegeComboGridList(data) {
  54. // var collegeID = $("#CollegeID").combogridX("getValue");
  55. // //var yearID = document.getElementsByName("GradeYearID")[0].value;
  56. // var parameterString = "";
  57. // //$("#StandardID").combogridX("setValue", "-1");
  58. // if (collegeID != nonSelect) {
  59. // parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  60. // }
  61. // var schoolyearID = $("#SchoolyearID").combobox("getValue");
  62. // if (schoolyearID != nonSelect) {
  63. // parameterString += "DictionaryGrade|*|" + schoolyearID + "|@|";
  64. // }
  65. // if (parameterString != "") {
  66. // jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  67. // $("#StandardID").combogridX("reload", eval(jsonString));
  68. // } else {
  69. // $("#StandardID").combogridX("reload");
  70. // }
  71. }
  72. function setFormChanged() {
  73. isChanged = true;
  74. }
  75. //成教页面,处理考试时间的快速选择
  76. function setDateTime() {
  77. var timeSegmentValue = eval("(" + $("#ddlTimeSegment").combobox('getValue') + ")");
  78. if (timeSegmentValue != "-1") {
  79. $("#ExaminationDate").val(timeSegmentValue.ExaminationDateString);
  80. $("#StartTime").val(timeSegmentValue.StartTimeString + ":00");
  81. $("#EndTime").val(timeSegmentValue.EndTimeString + ":00");
  82. }
  83. }
  84. function ExaminationPlan_ClassroomAdd_Confirm(roomList) {
  85. window.location.reload();
  86. }
  87. function queryClass() {
  88. // var jsonString = "";
  89. // var parameterString = "";
  90. // var campusID = $("#CampusDropdown").combogridX("getValue");
  91. // //var collegeID = $("#CollegeDropdown").combogridX("getValue");
  92. // //var educationID = $("#Education").combobox("getValue");
  93. // var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  94. // //var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  95. // //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  96. // if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  97. // //if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  98. // //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  99. // if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  100. // if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  101. // //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  102. // if (parameterString != "") {
  103. // jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  104. // //$("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  105. // $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  106. // } else {
  107. // $("#ClassmajorDropdown").combogridX("reload");
  108. // $("#StandardDictionaryDropDown").combogridX("reload");
  109. // }
  110. }