workplan_add.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:8k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "com.redmoon.oa.workplan.*"%>
  6. <%@ page import = "com.redmoon.oa.dept.*"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <title>工作计划类型管理</title>
  12. <link href="../common.css" rel="stylesheet" type="text/css">
  13. <script language="JavaScript" type="text/JavaScript">
  14. <!--
  15. function findObj(theObj, theDoc)
  16. {
  17.   var p, i, foundObj;
  18.   
  19.   if(!theDoc) theDoc = document;
  20.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  21.   {
  22.     theDoc = parent.frames[theObj.substring(p+1)].document;
  23.     theObj = theObj.substring(0,p);
  24.   }
  25.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  26.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  27.     foundObj = theDoc.forms[i][theObj];
  28.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  29.     foundObj = findObj(theObj,theDoc.layers[i].document);
  30.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  31.   
  32.   return foundObj;
  33. }
  34. var selUserNames = "";
  35. var selUserRealNames = "";
  36. function getSelUserNames() {
  37. return selUserNames;
  38. }
  39. function getSelUserRealNames() {
  40. return selUserRealNames;
  41. }
  42. var doWhat = "";
  43. function openWinUsers() {
  44. doWhat = "users";
  45. selUserNames = form1.users.value;
  46. selUserRealNames = form1.userRealNames.value;
  47. showModalDialog('../user_multi_sel.jsp',window.self,'dialogWidth:600px;dialogHeight:480px;status:no;help:no;')
  48. }
  49. function setUsers(users, userRealNames) {
  50. if (doWhat=="users") {
  51. form1.users.value = users;
  52. form1.userRealNames.value = userRealNames;
  53. }
  54. if (doWhat=="principal") {
  55. form1.principal.value = users;
  56. form1.principalRealNames.value = userRealNames;
  57. }
  58. }
  59. function openWinPrincipal() {
  60. doWhat = "principal";
  61. selUserNames = form1.principal.value;
  62. selUserRealNames = form1.principalRealNames.value;
  63. showModalDialog('../user_multi_sel.jsp',window.self,'dialogWidth:600px;dialogHeight:480px;status:no;help:no;')
  64. }
  65. function openWinDepts() {
  66. var ret = showModalDialog('../dept_multi_sel.jsp',window.self,'dialogWidth:480px;dialogHeight:320px;status:no;help:no;')
  67. if (ret==null)
  68. return;
  69. form1.deptNames.value = "";
  70. form1.depts.value = "";
  71. for (var i=0; i<ret.length; i++) {
  72. if (form1.deptNames.value=="") {
  73. form1.depts.value += ret[i][0];
  74. form1.deptNames.value += ret[i][1];
  75. }
  76. else {
  77. form1.depts.value += "," + ret[i][0];
  78. form1.deptNames.value += "," + ret[i][1];
  79. }
  80. }
  81. if (form1.depts.value.indexOf("<%=DeptDb.ROOTCODE%>")!=-1) {
  82. form1.depts.value = "<%=DeptDb.ROOTCODE%>";
  83. form1.deptNames.value = "全部";
  84. }
  85. }
  86. function getDepts() {
  87. return form1.depts.value;
  88. }
  89. //-->
  90. </script>
  91. <script src="../inc/calendar.js"></script>
  92. <style type="text/css">
  93. <!--
  94. .style2 {font-size: 14px}
  95. -->
  96. </style>
  97. </head>
  98. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  99. <%@ include file="workplan_inc_menu_top.jsp"%>
  100. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  101. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  102. <%
  103. String priv="workplan";
  104. if (!privilege.isUserPrivValid(request, priv)) {
  105. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  106. return;
  107. }
  108. %>
  109. <br>
  110. <table class="main" cellSpacing="1" cellPadding="2" width="600" align="center" border="0">
  111. <form action="workplan_do.jsp?op=add" name="form1" method="post" enctype="multipart/form-data">
  112.   <tbody>
  113.     <tr>
  114.       <td colspan="2" noWrap class="right-title">添加计划</td>
  115.     </tr>
  116.     <tr>
  117.       <td class="TableContent" noWrap>计划名称:</td>
  118.       <td class="TableData"><input name="title" id="title" size="36" maxLength="200"></td>
  119.     </tr>
  120.     <tr>
  121.       <td class="TableContent" noWrap>计划内容:</td>
  122.       <td class="TableData"><textarea name="content" cols="45" rows="5" wrap="yes" class="BigINPUT" id="content"></textarea></td>
  123.     </tr>
  124.     <tr>
  125.       <td class="TableContent" noWrap>有效期:</td>
  126.       <td class="TableData">开始日期:
  127. <input readonly type="text" id="beginDate" name="beginDate" size="10" onClick="showcalendar(event, this)" onFocus="showcalendar(event, this);if(this.value=='0000-00-00') this.value=''" value="0000-00-00">
  128. <br>
  129.         结束日期: 
  130. <input readonly type="text" id="endDate" name="endDate" size="10" onClick="showcalendar(event, this)" onFocus="showcalendar(event, this);if(this.value=='0000-00-00') this.value=''" value="0000-00-00"></td>
  131.     </tr>
  132.     <tr>
  133.       <td class="TableContent" noWrap>计划类型:</td>
  134.       <td class="TableData">
  135.   <%
  136.   WorkPlanTypeDb wptd = new WorkPlanTypeDb();
  137.   String opts = "";
  138.   Iterator ir = wptd.list().iterator();
  139.   while (ir.hasNext()) {
  140.    wptd = (WorkPlanTypeDb)ir.next();
  141.    opts += "<option value='" + wptd.getId() + "'>" + wptd.getName() + "</option>";
  142.   }
  143.   %>
  144.   <select name="typeId" id="typeId">
  145.   <%=opts%>
  146.       </select>   </td>
  147.     </tr>
  148.     <tr>
  149.       <td class="TableContent" noWrap>发布范围(部门):</td>
  150.       <td class="TableData"><input type="hidden" name="depts">
  151.           <textarea name="deptNames" cols="45" rows="5" readOnly wrap="yes" id="deptNames"></textarea>
  152.         &nbsp;
  153.         <input class="SmallButton" title="添加部门" onClick="openWinDepts()" type="button" value="添 加" name="button">
  154.         &nbsp;
  155.         <input class="SmallButton" title="清空部门" onClick="form1.deptNames.value='';form1.depts.value=''" type="button" value="清 空" name="button"></td>
  156.     </tr>
  157.     <tr>
  158.       <td class="TableContent" noWrap>参与人:</td>
  159.       <td class="TableData"><input name="users" id="users" type="hidden">
  160.         <textarea name="userRealNames" cols="45" rows="3" readOnly wrap="yes" id="userRealNames"></textarea>
  161.         &nbsp;
  162.         <input class="SmallButton" title="添加收件人" onClick="openWinUsers()" type="button" value="添 加" name="button">
  163.         &nbsp;
  164.         <input class="SmallButton" title="清空收件人" onClick="form1.users.value=''" type="button" value="清 空" name="button"></td>
  165.     </tr>
  166.     <tr>
  167.       <td class="TableContent" noWrap>负责人:</td>
  168.       <td class="TableData"><input name="principal" type="hidden" id="principal">
  169.         <textarea name="principalRealNames" cols="45" rows="3" readOnly wrap="virtual" id="principalRealNames"></textarea>
  170.         &nbsp;
  171.         <input class="SmallButton" title="添加收件人" onClick="openWinPrincipal()" type="button" value="添 加" name="button">
  172.         &nbsp;
  173.         <input class="SmallButton" title="清空收件人" onClick="form1.principal.value=''" type="button" value="清 空" name="button"></td>
  174.     </tr>
  175.     
  176.     <tr>
  177.       <td class="TableContent" noWrap>附件上传:</td>
  178.       <td class="TableData"><input title="选择附件文件" type="file" size="30" name="attachment"></td>
  179.     </tr>
  180.     
  181.     <tr>
  182.       <td class="TableContent" noWrap>备注:</td>
  183.       <td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"></textarea></td>
  184.     </tr>
  185.     <tr>
  186.       <td class="TableData" noWrap>提醒:</td>
  187.       <td class="TableData"><input id="smsRemind" type="checkbox" CHECKED name="isMessageRemind" value="true">
  188.           <label for="SMS_REMIND">使用内部短信提醒用户&nbsp;
  189.           <%
  190. if (com.redmoon.oa.sms.SMSFactory.isUseSMS()) {
  191. %>
  192.           <input name="isToMobile" value="true" type="checkbox" checked />
  193. 短讯提醒
  194. <%}%>
  195.           </label></td>
  196.     </tr>
  197.     <tr class="TableControl" align="middle">
  198.       <td colSpan="2" align="center" noWrap><input name="submit" type="submit" class="BigButton" value=" 提 交 ">
  199.         &nbsp;&nbsp;
  200.         <input name="button" type="reset" class="BigButton" value=" 重 填 ">
  201.         &nbsp;&nbsp;</td></tr>
  202.   </tbody>
  203.   </form>
  204. </table>
  205. </body>
  206. <script>
  207. function getDept() {
  208. return form1.depts.value;
  209. }
  210. </script>
  211. </html>