meetinfo.jsp
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:9k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java" pageEncoding="GBK"%>
  2. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
  3. <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
  4. <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
  5. <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html:html lang="true">
  8. <head>
  9. <title>会议纪要操作管理</title>
  10. <script src="${pageContext.request.contextPath}/Jsp_file/meet/Calendar.js"></script>
  11. <script src="${pageContext.request.contextPath}/Js_file/addmeet.js"></script>
  12. <link href="${pageContext.request.contextPath}/Css_file/oa.css" rel="stylesheet" type="text/css" />
  13. </head>
  14. <script>
  15. var   FileMaxSize =5120;
  16.     function addFile(){
  17.         var Rows=tableFiles.rows;//类似数组的Rows 
  18.         if (tableFiles.rows.length==3) {
  19.         document.getElementById("file").innerHTML="<font color="red">最多只能传三个附件</font>";
  20.          return;
  21.         }else if(!(tableFiles.rows.length==3)){
  22.          document.getElementById("file").innerHTML="";
  23.         }
  24.         var newRow=tableFiles.insertRow(tableFiles.rows.length);//插入新的一行 
  25.          var Cells=newRow.cells;//类似数组的Cells 
  26.         var newCell=Rows(newRow.rowIndex).insertCell(Cells.length); 
  27.         newCell.align="left"; 
  28.         newCell.innerHTML= "<input type=file name=uploadFile["+(tableFiles.rows.length-1) + "].file value=''/> &nbsp;&nbsp;&nbsp;<input type=button name="btndele" value="删除" onclick=delFile(tableFiles.rows.length-1)>";
  29.     }
  30.     function delFile(id){
  31.      tableFiles.deleteRow(tableFiles.rows.length-1); 
  32.      document.getElementById("file").innerHTML="";
  33.     }  
  34.    
  35.     function checkfile(thisfile,id){
  36.      var  fso,  f,  s;  
  37.      fso  =  new  ActiveXObject("Scripting.FileSystemObject");  
  38.      f  =  fso.GetFile(thisfile);  
  39.      if (f.size>1024*FileMaxSize) {
  40.         alert("添加的附件大小不能大于5M!");
  41. delFile(id);
  42.      }
  43.     }
  44.    
  45.     function dele(path,name,rmid){
  46.     if(confirm("确认要删除?")){
  47. window.location.href="${pageContext.request.contextPath}/meet.do?task=delpath&path="+path+"&name="+name+"&rmid="+rmid;
  48. }
  49. }
  50. </script>
  51. <script>
  52. function check(){
  53. var mpeople=form1.mepeople.value;
  54. var mistarttime=form1.mistarttime.value;
  55. var miendtime=form1.miendtime.value;
  56. var rmid = form1.rmid.value;
  57. var addmeet =meetinfoForm.addmeet;
  58. var minfoname = form1.minfoname.value;
  59. if(mpeople==0){
  60. document.getElementById("people").innerHTML="<font color="red">请选择一个主持人</font>";
  61. form1.mpeople.focus();
  62. return;
  63. }else{
  64. document.getElementById("people").innerHTML="";
  65. }
  66. if(mistarttime==''){
  67. document.getElementById("starttime").innerHTML="<font color="red">开始时间不能为空</font>";
  68. form1.mistarttime.focus();
  69. return;
  70. }else{
  71. document.getElementById("starttime").innerHTML="";
  72. }
  73. if(miendtime==''){
  74. document.getElementById("endtime").innerHTML="<font color="red">结束时间不能为空</font>";
  75. form1.miendtime.focus();
  76. return ;
  77. }else{
  78. document.getElementById("endtime").innerHTML="";
  79. }
  80. if(mistarttime>=miendtime){
  81. document.getElementById("starttime").innerHTML="<font color="red">结束时间不能小于或等于开始时间</font>";
  82. miendtime.focus();
  83. return;
  84. }else{
  85. document.getElementById("starttime").innerHTML="";
  86. }
  87. if(addmeet.options.length==0){
  88. document.getElementById("unos").innerHTML="<font color="red">参与人员不能为空</font>";
  89. form1.addmeet.focus();
  90. return ;
  91. }else{
  92. document.getElementById("unos").innerHTML="";
  93. for(var i=0;i<addmeet.options.length;i++){
  94. addmeet.options[i].selected=true;
  95. }
  96. }
  97. if(rmid==""){
  98. document.getElementById("addr").innerHTML="<font color="red">请选择会议地点</font>";
  99. form1.rmid.focus();
  100. return;
  101. }else{
  102. document.getElementById("addr").innerHTML="";
  103. }
  104. if(minfoname==""){
  105. document.getElementById("infoname").innerHTML="<font color="red">会议主题不能为空</font>";
  106. form1.minfoname.focus();
  107. return;
  108. }
  109. form1.submit();
  110. }
  111. </script>
  112. <body>
  113. <div class="t">
  114. <html:form action="/meetinfo" enctype="multipart/form-data" styleId="form1">
  115. <table width="100%" border="1" cellspacing="1" class="tr3 f_one">
  116. <html:hidden property="miid" />
  117. <html:hidden property="task" />
  118. <html:hidden property="miisdel" value="0" />
  119. <tr>
  120. <th>
  121. 会议主题
  122. </th>
  123. <th>
  124. <html:text property="miinfo" onfocus="this.blur();" />
  125. </th>
  126. </tr>
  127. <tr class="tr3 f_one">
  128. <th>
  129. 会议主持人:
  130. </th>
  131. <th>
  132. <html:select property="mepeople" name="meetinfoForm" onfocus="this.blur();" >
  133. <html:option value="0">===请选择==</html:option>
  134. <logic:present name="listuser1" scope="request">
  135. <logic:iterate id="plan" name="listuser1" scope="request">
  136. <html:option value="${plan.uno}">${plan.uname}</html:option>
  137. </logic:iterate>
  138. </logic:present>
  139. </html:select>
  140. <SPAN id="people"></span>
  141. </th>
  142. </tr>
  143. <tr>
  144. <th>
  145. 会议实际时间
  146. </th>
  147. <th>
  148. <html:text property="mistarttime" readonly="true" onclick="javascript:setDayHM(this);" />
  149. &nbsp;&nbsp;&nbsp;至 &nbsp;&nbsp;&nbsp;
  150. <html:text property="miendtime" readonly="true" onclick="javascript:setDayHM(this);" />
  151. <SPAN id="starttime"></span><SPAN id="endtime"></span>
  152. </th>
  153. </tr>
  154. <tr class="tr3 f_one">
  155. <th>
  156. 会议参与者:
  157. </th>
  158. <th>
  159. <table>
  160. <tr>
  161. <th width=3%>
  162. <FONT style="color: blue" size="2">所有员工列表:</font>
  163. <html:select property="arryusername" multiple="true" style="width: 120px;height: 100px">
  164. <logic:present name="userlist" scope="request">
  165. <logic:iterate id="plan" name="userlist" scope="request">
  166. <html:option value="${plan.uno}">${plan.uname}</html:option>
  167. </logic:iterate>
  168. </logic:present>
  169. </html:select>
  170. </th>
  171. <th width=3%>
  172. <input type="button" name="rightmove" value=">>" style="width=60px">
  173. <br>
  174. <br>
  175. <input type="button" name="leftmove" value="<<" style=" width=60px">
  176. </th>
  177. <th>
  178. <FONT style="color: blue" size="2">要参与的员工列表:</font>
  179. <br>
  180. <html:select property="addmeet" multiple="true" style="width: 120px;height: 100px" name="meetinfoForm">
  181. <logic:equal name="meetinfoForm" property="task" value="edit">
  182. <logic:present name="addmeet" scope="request">
  183. <logic:iterate id="plan" name="addmeet" scope="request">
  184. <html:option value="${plan.uno}">${plan.uname}</html:option>
  185. </logic:iterate>
  186. </logic:present>
  187. </logic:equal>
  188. </html:select>
  189. </th>
  190. </tr>
  191. </table>
  192. <SPAN id="unos"></span>
  193. </th>
  194. </tr>
  195. <tr>
  196. <th>
  197. 开会地点
  198. </th>
  199. <th>
  200. <html:select property="rmid" style="width:120px">
  201. <html:optionsCollection name="roomlist" label="rname" value="rmid" />
  202. </html:select>
  203. <SPAN id="addr"></span>
  204. </th>
  205. </tr>
  206. <tr>
  207. <th>
  208. 会议纪要主题
  209. </th>
  210. <th>
  211. <html:text property="minfoname" /><SPAN id="infonam"></span>
  212. </th>
  213. </tr>
  214. <tr>
  215. <th>
  216. 会议纪要内容
  217. </th>
  218. <th>
  219. <html:textarea property="minfocontent" cols="50" rows="5" />
  220. </th>
  221. </tr>
  222. <tr>
  223. <th>
  224. 上传附件
  225. </th>
  226. <th>
  227. <logic:equal name="meetinfoForm" property="task" value="edit">
  228. <logic:lessThan name="size" value="3">
  229. <input type="button" name="hh" value="添加附件" onClick="addFile()" />
  230. <span id="file"></span>
  231. <table align="left" id="tableFiles"></table>
  232. </logic:lessThan>
  233. </logic:equal>
  234. </br>
  235. <logic:equal name="meetinfoForm" property="task" value="edit">
  236. <logic:present name="filelist" scope="request">
  237. <logic:iterate id="files" name="filelist">
  238. <html:link href="${pageContext.request.contextPath}/downLoadServlet?filepath=${files.miaffixpath}">${files.miaffixname}</html:link>
  239. &nbsp;&nbsp;&nbsp;<input type="button" name="btndele" value="删除" onclick="dele('${files.miaffixpath}','${files.miaffixname}','<bean:write property='miid' name='meetinfoForm' />');" />
  240. <br>
  241. </logic:iterate>
  242. </logic:present>&nbsp;
  243. </logic:equal>
  244. </th>
  245. </tr>
  246. </table>
  247. </html:form>
  248. </div>
  249. <br>
  250. <div style="text-align:center;margin-bottom:25px;">
  251. <input type="button" class="btn" value=" 保存 " onclick="check();">
  252. <input type="button" class="btn" value=" 返回 " onclick="javascript:window.history.back();" />
  253. </div>
  254. <script>
  255. init();
  256. var moveright =document.getElementById("rightmove");
  257. moveright.onclick=right;
  258. var moveleft= document.getElementById("leftmove");
  259. moveleft.onclick=left;
  260. </script>
  261. </body>
  262. </html:html>