| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>创建日程 </title>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/shares/js/jquery-1.6.4.min.js">
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/oa/scheduleManager.js"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
- <link rel="stylesheet" type="text/css" href="/shares/css/yw/master1/${sessionScope.loginFrom}/jquery.jscrollpane.codrops1.css" />
- <!-- the mousewheel plugin -->
- <script type="text/javascript" src="/shares/js/yw/master1/jquery.mousewheel.js"></script>
- <!-- the jScrollPane script -->
- <script type="text/javascript" src="/shares/js/yw/master1/jquery.jscrollpane.min.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/scroll-startstop.events.jquery.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/scroll.js"></script>
- <script type="text/javascript">
- $(function () {
- $("#schedule_level").ligerComboBox({
- isShowCheckBox: true,
- initText:'${requestScope.schedule.schedule_level}',
- initValue:'${requestScope.schedule.schedule_level_}',
- data: [
- { text: '重要/紧急', id: '1' },
- { text: '重要/不紧急', id: '2' },
- { text: '不重要/紧急', id: '3' },
- { text: '不重要/不紧急', id: '4' },
- { text: '未指定', id: '0' }
- ], valueFieldID: 'schedule_level_'
- });
-
- $("#schedule_type").ligerComboBox({
- selectBoxHeight:50,
- initText:'${requestScope.schedule.schedule_type}',
- initValue:'${requestScope.schedule.schedule_type_}',
- data: [
- { text: '工作事务', id: '2' },
- { text: '个人事务', id: '1' }
- ], valueFieldID: 'schedule_type_'
- });
-
- $("#schedule_start_date").ligerDateEditor({ showTime: true, labelAlign: 'left', showTime:true, width:131,height:21});
- $("#schedule_end_date").ligerDateEditor({ showTime: true, labelAlign: 'left', showTime:true, width:131,height:21});
- });
- function getDate(){
- var d=new Date();
- return d.getYear()+( d.getMonth()+1)+d.getDate()+'08:00';
- alert(d.getYear()+( d.getMonth()+1)+d.getDate()+'08:00');
- }
- function checkForm(){
- $("#timeMsgBox").empty();
- $("#schedule_end_date_msg").empty();
- $("#error_date_msg").empty();
- $("#error_date_msg_").empty();
- clearMsg();
- var rs = $.validate({
- name : "schedule_title",
- model : [ {
- type : "require",
- msg : "日程标题不能为空!"
- }, {
- type : "len",
- min : 1,
- max : 20,
- msg : "日程标题称长度不能超过20个字!"
- } ]
- });
- var rs = $.validate({
- name : "schedule_start_date",
- model : [ {
- type : "require",
- msg : "请选择正确的开始时间格式!",
- msgBox : "schedule_start_date_msg"
- } ]
- }) && rs;
- var rs = $.validate({
- name : "schedule_end_date",
- model : [ {
- type : "require",
- msg : "请选择正确的结束时间格式!",
- msgBox : "schedule_end_date_msg"
- } ]
- }) && rs;
- var rs = $.validate({
- name : "schedule_detail",
- model : [ {
- type : "len",
- min:0,
- max:270,
- msg : "事务内容长度不能超过270个字!"
- } ]
- }) && rs;
- if (rs) {
- if ($("#_day").val().match(/^[1-9]\d*$/) == null && $("#_day").val().replace(/(^\s*)|(\s*$)/g, "") != ""){
- $("#timeMsgBox").append("<font color=\"red\"> 提前提醒天数应为正整数!</font>");
- document.all._day.focus();
- return false;
- }else if ($("#_hour").val().match(/^[1-9]\d*$/) == null && $("#_hour").val().replace(/(^\s*)|(\s*$)/g, "") != ""){
- $("#timeMsgBox").append("<font color=\"red\"> 提前提醒小时应为正整数!</font>");
- document.all._hour.focus();
- return false;
- }else if ($("#_minute").val().match(/^[1-9]\d*$/) == null && $("#_minute").val().replace(/(^\s*)|(\s*$)/g, "") != ""){
- $("#timeMsgBox").append("<font color=\"red\"> 提前提醒分钟应为正整数!</font>");
- document.all._minute.focus();
- return false;
- //}else if (new Date(Date.parse($("#schedule_start_date").val().replace("-","/"))).getHours() <= 7 || new Date(Date.parse($("#schedule_start_date").val().replace("-","/"))).getHours() >= 22){
- //$("#error_date_msg_").append("<font color=\"red\"> 开始时间应在8:00 - 22:00之间!</font>");
- //document.all.schedule_start_date.focus();
- //return false;
- //}else if (new Date(Date.parse($("#schedule_end_date").val().replace("-","/"))).getHours() >= 22 || new Date(Date.parse($("#schedule_end_date").val().replace("-","/"))).getHours() <= 7){
- //$("#error_date_msg").append("<font color=\"red\"> 结束时间应在8:00 - 22:00之间!</font>");
- //document.all.schedule_end_date.focus();
- //return false;
- }else if (new Date(Date.parse($("#schedule_end_date").val().replace("-","/"))) <= new Date(Date.parse($("#schedule_start_date").val().replace("-","/")))){
- $("#error_date_msg").append("<font color=\"red\">结束时间不能早于或等于开始时间!</font>");
- document.all.schedule_end_date.focus();
- return false;
- } else {
- document.getElementById("sub_id").disabled="true";
- return true;
- }
- } else {
-
- return false;
- }
-
-
- }
- function refresh(type,userId){
- //alert(type + "==" + userId);
- if(type == "1"){
- if(userId != null && userId != ""){
- window.parent.window.$('#calendar').empty();
- window.parent.window.loadSelect(userId,"text");
- window.parent.dialog3.hidden();
- } else {
- //window.parent.$.ligerDialog.close();
- //parent.location.loadSelect($("#userId").val(),"text");
- parent.location.reload();
- }
- }
- }
- function back_(){
- var backType = $('#backType').val();
- if("0" == backType){
- window.location.href="MTScheduleAction.do?task=schedule&viewName=${viewName}";
- }else{
- window.location.href="MTScheduleAction.do?task=operate&viewName=${viewName}&userId=${requestScope.schedule.userId }";
- }
- }
- </script>
- </head> <style type="text/css">
- body {
- overflow:hidden;
- background:#fff;
- }
- </style>
- <body onload="refresh('${type}', '${userId}');" ontouchmove="event.preventDefault();">
- <form action="MTScheduleAction.do" method="post" onsubmit="return checkForm();" >
- <input type="hidden" id="task" name="task" value="create">
- <input type="hidden" id="userId" name="userId" value="${requestScope.schedule.userId }">
- <div class="s_title b10 f6">
- <img src="/shares/images/master1/gg_ico.png" width="27" height="26" /> 创建日程
- <div class="article_title"><input class="art_back" name="" title="返回" onclick="back_();" type="button" />
- <input class="art_sub" title="提交" name="" type="submit" value="" id="sub_id"/></div></div>
- <input type="hidden" id="viewName" name="viewName" value="${viewName}"/>
- <input type="hidden" id="backType" name="backType" value="${backType}"/>
- <div id="jp-container" class="jp-container liuyan">
- <ul><li></li>
- <li>
- <span class="span_l f7">日程标题<FONT COLOR="red">*</FONT>:</span>
- <input class="text_input1" name="schedule_title" id="schedule_title" value="${requestScope.schedule.schedule_title }" type="text" />
- </li>
- <li>
- <span class="span_l f7">开始时间<FONT COLOR="red">*</FONT>:</span><span class="span_l f7">
- <input style="color: #737373;" name="schedule_start_date" id="schedule_start_date" value="${requestScope.schedule.schedule_start_date }" type="text" />
- <input type="hidden" id="schedule_start_date_msg" name="schedule_start_date_msg" />
- <div id="error_date_msg_" style="display: inline;"></span></div>
- </li>
- <li>
- <span class="span_l f7">结束时间<FONT COLOR="red">*</FONT>:</span><span class="span_l f7">
- <input style="color: #737373;" name="schedule_end_date" id="schedule_end_date" value="${requestScope.schedule.schedule_end_date }" type="text" />
- <input type="hidden" id="schedule_end_date_msg" name="schedule_end_date_msg" />
- <div id="error_date_msg" style="display: inline;"></div></span>
- </li>
- <li>
- <span class="span_l f7">优先级:</span><span class="span_l f7">
- <input style="color: #737373;" name="schedule_level" style="width: 121px;" id="schedule_level" value="${requestScope.schedule.schedule_level }" type="text" />
- <input type="hidden" id="schedule_level_" name="schedule_level_" /></span>
- </li>
- <li>
- <span class="span_l f7">日程事务类型:</span><span class="span_l f7">
- <input style="color: #737373;" name="schedule_type" id="schedule_type" style="width: 121px;" value="${requestScope.schedule.schedule_type }" type="text" />
- <input type="hidden" id="schedule_type_" name="schedule_type_" /></span>
- </li>
- <li>
- <span class="span_l f7">事务内容:</span>
- <textarea class="textarea1" id="schedule_detail" name="schedule_detail" rows="4" cols="85">${requestScope.schedule.schedule_detail }</textarea>
- </li>
- <li>
- <span class="span_l f7">提醒时间:</span><span class="span_c f7" >
- 提前 <input type="text" class="select_input1" style="width:20px;height:24px;" name="_day" id="_day" value="${requestScope.schedule._day }"> 天
- <input type="text" class="text_input1" style="width:20px;height:24px;" id="_hour" name="_hour" value="${requestScope.schedule._hour }"> 小时
- <input type="text" class="select_input1" style="width:20px;height:24px;" id="_minute" name="_minute" value="${requestScope.schedule._minute }"> 分钟提醒
- <div id="timeMsgBox" style="display: inline;"></div></span>
- </li>
- <li>
- <span class="span_l f7">提醒方式:</span><span class="span_r f7" >
- <input type="checkbox" class="radio_input1" name="alarm_type1" id="alarm_type1" <c:if test="${requestScope.schedule.alarm_type1 == 1 }"> checked="checked"</c:if> > 短信
- <input type="checkbox" class="radio_input1" name="alarm_type2" id="alarm_type2" <c:if test="${requestScope.schedule.alarm_type2 == 1 }"> checked="checked"</c:if> > 邮件
- </span>
- </li>
- </ul>
- </div>
- </form><%@ include file="/include/message.jsp"%>
- </body>
- </html>
|