SetTime.js 1016 B

123456789101112131415161718192021222324252627
  1. function SetTime_Confirm() {
  2. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  3. var dateObj = {
  4. ExaminationDate: $("#ExaminationDate").val(),
  5. StartTime: $("#StartTime").val(),
  6. EndTime: $("#EndTime").val()
  7. };
  8. if (dateObj.ExaminationDate == "") dateObj.ExaminationDate = null;
  9. if (dateObj.StartTime == "") dateObj.StartTime = null;
  10. if (dateObj.EndTime == "") dateObj.EndTime = null;
  11. if (dateObj.ExaminationDate && dateObj.StartTime && dateObj.EndTime) {
  12. var date = dateObj.ExaminationDate;
  13. date = date.replace(/-/g, "/");
  14. var stime = date + " " + dateObj.StartTime;
  15. var etime = date + " " + dateObj.EndTime;
  16. stime = new Date(stime);
  17. etime = new Date(etime);
  18. if (stime > etime) {
  19. $.messager.alert("系统提示", "开始时间不能大于结束时间");
  20. return;
  21. }
  22. }
  23. top.$("#" + windowID).data("resultData", dateObj);
  24. top.$("#" + windowID).dialog("close");
  25. }