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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>发起任务</title>
  7. <link href="common.css" rel="stylesheet" type="text/css">
  8. <script>
  9. function openWin(url,width,height)
  10. {
  11.   var newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=50,left=120,width="+width+",height="+height);
  12. }
  13. function changeexpression(i)
  14. {
  15. frmAnnounce.expression.value = i;
  16. if (i==0)
  17. {
  18. expressspan.innerHTML = "";
  19. return;
  20. }
  21. expressspan.innerHTML = "<img align=absmiddle src=forum/images/emot/em"+i+".gif>";
  22. }
  23. function setPerson(deptCode, deptName, user)
  24. {
  25. if (frmAnnounce.person.value=="") {
  26. frmAnnounce.person.value = user;
  27. frmAnnounce.jobCode.value = deptCode;
  28. }
  29. else {
  30. frmAnnounce.person.value += "," + user;
  31. frmAnnounce.jobCode.value += "," + deptCode;
  32. }
  33. }
  34. function frmAnnounce_onsubmit() {
  35. frmAnnounce.content.value = IframeID.document.body.innerHTML;
  36. }
  37. function window_onload() {
  38. cws_Size(320);
  39. }
  40. var attachCount = 1;
  41. function AddAttach() {
  42. updiv.insertAdjacentHTML("BeforeEnd", "<table width=100%><tr>附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件&nbsp;&nbsp;<input type='file' name='filename" + attachCount + "' size=40><td></td></tr></table>");
  43. attachCount += 1;
  44. }
  45. </script>
  46. </head>
  47. <%
  48. String priv="task";
  49. if (!privilege.isUserPrivValid(request,priv))
  50. {
  51. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  52. return;
  53. }
  54. %>
  55. <body leftmargin="0" topmargin="5" onLoad="window_onload()">
  56. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  57. <%@ include file="task_inc_menu_top.jsp"%>
  58. <br>
  59. <%
  60. String op = fchar.getNullStr(request.getParameter("op"));
  61. if (op.equals(""))
  62. {
  63. out.print(fchar.Alert("您未选择操作方式!"));
  64. return;
  65. }
  66. String typedesc = "";//类型描述
  67. int type=0;
  68. if (op.equals("new"))
  69. {
  70. type = 0;
  71. typedesc = "发起新任务";
  72. priv="task";
  73. if (!privilege.isUserPrivValid(request,priv))
  74. {
  75. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  76. return;
  77. }
  78. }
  79. if (op.equals("newsubtask"))
  80. {
  81. type = 1;
  82. typedesc = "发起子任务";
  83. priv="task";
  84. if (!privilege.isUserPrivValid(request,priv))
  85. {
  86. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  87. return;
  88. }
  89. }
  90. if (op.equals("addresult"))
  91. {
  92. type = 2;
  93. typedesc = "汇报办理结果";
  94. }
  95. if (op.equals("hurry"))
  96. {
  97. type = 3;
  98. typedesc = "催办";
  99. }
  100. String parentid = fchar.getNullStr(request.getParameter("parentid"));
  101. String privurl=fchar.UnicodeToGB(request.getParameter("privurl"));
  102. String person = fchar.UnicodeToGB(fchar.getNullStr(request.getParameter("person")));
  103. %>
  104. <table width="498" border="0" align="center" cellpadding="4" cellspacing="0" class="main">
  105.   <form id="frmAnnounce" name=frmAnnounce method="post" action="task_add_do.jsp?op=<%=op%>" enctype="MULTIPART/FORM-DATA" onSubmit="return frmAnnounce_onsubmit()">
  106.     <TBODY>
  107.       <tr> 
  108.         <td class="right-title"> <font color="#FFFFFF">&nbsp;<span id=expressspan></span></font>&nbsp;<font color="#FFFFFF"><%=typedesc%> 
  109.           <input type=hidden name=type value="<%=type%>">
  110.           <input type=hidden name=op value="<%=op%>">
  111.           <input type=hidden name=expression value="0">
  112.           <input type=hidden name=parentid value="<%=parentid%>">
  113.           <input type=hidden name=privurl value="<%=privurl%>">
  114.           </font></td>
  115.       </tr>
  116.     </TBODY>
  117.     <TBODY>
  118.       <tr> 
  119.         <td width="486"> 任务标题 
  120.         <input name="title" type="text" id="topic" size="55"  title="不得超过 25 个汉字或50个英文字符" maxlength="80">
  121.         <span class="tablebody1">
  122.         <input name="jobCode" type="hidden">
  123.         </span> <span class="tablebody1">
  124.         <input name="person" type="hidden">
  125.         </span></td>
  126.       </tr>
  127.       <tr>
  128.         <td>表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;情
  129.           <iframe src="task_iframe_emote.jsp" height="25" width="610" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></iframe>
  130.             
  131.           <a href="#" onClick="changeexpression(0)">取消表情&nbsp;</a></td>
  132.       </tr>
  133.       <tr> 
  134.         <td><table width="100%" border=0 cellspacing=0 cellpadding=0>
  135.             <tr> 
  136.               <td class=tablebody1 valign=top height=30> 附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件 
  137.                 <input type="file" name="filename" size=40>
  138.                 <input name="content" type="hidden"> <input name="button" type=button onClick="AddAttach()" value="增加附件"></td>
  139.             </tr>
  140.           </table><div id=updiv name=updiv></div></td>
  141.       </tr>
  142.       <tr> 
  143.         <td><%@ include file="editor_full/editor.jsp"%></td>
  144.       </tr>
  145.       
  146.       <tr> 
  147.         <td align="center">
  148.             <input name="submit" type=submit value="发起任务">
  149.             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  150.           <input name="reset" type=reset value=" 重 设 ">          </td>
  151.       </tr>
  152.     </TBODY>
  153.   </form>
  154. </table>
  155. </body>
  156. </html>