📄 meet.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>会议列表</title>
<script src="${pageContext.request.contextPath}/Jsp_file/meet/Calendar.js"></script>
<script src="${pageContext.request.contextPath}/Js_file/addmeet.js"></script>
<link href="${pageContext.request.contextPath}/Css_file/oa.css" rel="stylesheet" type="text/css" />
<script>
var xmlHttp;
function createHttpRequest(){
if (window.ActiveXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}else if (window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
}
//send server time
function sendtime(url){
if(!(form1.mstarttime.value=='')&&!(form1.mendtime.value=='')){
createHttpRequest();
url=url+'&tbegin='+form1.mstarttime.value;
url=url+'&tend='+form1.mendtime.value;
//alert(url);
xmlHttp.open("get",url,true);
xmlHttp.onreadystatechange=callback;
xmlHttp.send(null);
}
}
//recive from server
function callback(){
if (xmlHttp.readyState == 4){
if (xmlHttp.status == 200){
var xmldoc=xmlHttp.responseXML;
//获取xml文档的room节点列表
var list=xmldoc.getElementsByTagName("room");
//取得页面的下拉框
var displayselect=document.form1.rmid;
//遍历多个room节点
form1.rmid.length=0;
if(list.length>0){
for(var i=0;i<list.length;i++){
var rid = list[i].getAttribute("rid");
var rname = list[i].getAttribute("rname");
form1.rmid.options[form1.rmid.length]=new Option(rname,rid);
}
}else{
alert('这段时间的会议室都被占用,请选择其他时间!');
}
}
}
}
var flag=false;
function choie(){
if(flag==true || form1.rmid.length==0){
sendtime('${pageContext.request.contextPath}/meet.do?task=roomlist');
flag=false;
}
}
</script>
<script>
var FileMaxSize =5120;
function addFile(){
var Rows=tableFiles.rows;//类似数组的Rows
if (tableFiles.rows.length==3) {
document.getElementById("file").innerHTML="<font color=\"red\">最多只能传三个附件</font>";
return;
}else if(!(tableFiles.rows.length==3)){
document.getElementById("file").innerHTML="";
}
var newRow=tableFiles.insertRow(tableFiles.rows.length);//插入新的一行
var Cells=newRow.cells;//类似数组的Cells
var newCell=Rows(newRow.rowIndex).insertCell(Cells.length);
newCell.align="left";
newCell.innerHTML= "<input type=file name=uploadFile["+(tableFiles.rows.length-1) + "].file value=''/> <input type=button name=\"btndele\" value=\"删除\" onclick=delFile(tableFiles.rows.length-1)>";
}
function delFile(id){
tableFiles.deleteRow(tableFiles.rows.length-1);
document.getElementById("file").innerHTML="";
}
function checkfile(thisfile,id){
var fso, f, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(thisfile);
if (f.size>1024*FileMaxSize) {
alert("添加的附件大小不能大于5M!");
delFile(id);
}
}
function dele(path,name,rmid){
if(confirm("确认要删除?")){
window.location.href="${pageContext.request.contextPath}/meet.do?task=delpath&path="+path+"&name="+name+"&rmid="+rmid;
}
}
</script>
<script>
function check(){
var mtitle = form1.mtitle.value;
var mpeople=form1.mpeople.value;
var mstarttime=form1.mstarttime.value;
var mendtime=form1.mendtime.value;
var rmid = form1.rmid.value;
var addmeet =meetForm.addmeet;
if(mtitle==""){
document.getElementById("title").innerHTML="<font color=\"red\">主题不能为空</font>";
form1.mtitle.focus();
return;
}else{
document.getElementById("title").innerHTML="";
}
if(mpeople==0){
document.getElementById("people").innerHTML="<font color=\"red\">请选择一个主持人</font>";
form1.mpeople.focus();
return;
}else{
document.getElementById("people").innerHTML="";
}
if(mstarttime==''){
document.getElementById("starttime").innerHTML="<font color=\"red\">开始时间不能为空</font>";
form1.mstarttime.focus();
return;
}else{
document.getElementById("starttime").innerHTML="";
}
if(mendtime==''){
document.getElementById("endtime").innerHTML="<font color=\"red\">结束时间不能为空</font>";
form1.mendtime.focus();
return ;
}else{
document.getElementById("endtime").innerHTML="";
}
if(mstarttime>=mendtime){
document.getElementById("starttime").innerHTML="<font color=\"red\">结束时间不能小于或等于开始时间</font>";
form1.mendtime.focus();
return;
}else{
document.getElementById("starttime").innerHTML="";
}
if(addmeet.options.length==0){
document.getElementById("unos").innerHTML="<font color=\"red\">参与人员不能为空</font>";
form1.addmeet.focus();
return ;
}else{
document.getElementById("unos").innerHTML="";
for(var i=0;i<addmeet.options.length;i++){
addmeet.options[i].selected=true;
}
}
if(rmid==""){
document.getElementById("addr").innerHTML="<font color=\"red\">请选择会议地点</font>";
form1.rmid.focus();
return;
}else{
document.getElementById("addr").innerHTML="";
}
form1.submit();
}
</script>
</head>
<body onload="sendtime('${pageContext.request.contextPath}/meet.do?task=roomlist&rmid=<bean:write property='mid' name='meetForm' />')">
<html:form action="/meet" styleId="form1" enctype="multipart/form-data">
<html:hidden property="mid" />
<html:hidden property="task" />
<html:hidden property="mstatus" value="0" />
<div class="t">
<table width="100%" cellspacing="0" cellpadding="0" class="tr3 f_one">
<tr class="tr3 f_one">
<th>
会议主题:
</th>
<th>
<html:text property="mtitle" name="meetForm" />
<SPAN id="title"></span>
</th>
</tr>
<tr class="tr3 f_one">
<th>
会议主持人:
</th>
<th>
<html:select property="mpeople" name="meetForm">
<html:option value="0">===请选择==</html:option>
<logic:present name="listuser1" scope="request">
<logic:iterate id="plan" name="listuser1" scope="request">
<html:option value="${plan.uno}">${plan.uname}</html:option>
</logic:iterate>
</logic:present>
</html:select>
<SPAN id="people"></span>
</th>
</tr>
<tr class="tr3 f_two">
<th>
会议时间:
</th>
<th>
<html:text property="mstarttime" readonly="true" onclick="javascript:setDayHM(this); " name="meetForm" />
至
<html:text property="mendtime" readonly="true" onclick="javascript:setDayHM(this); " name="meetForm" />
<SPAN id="starttime"></span><SPAN id="endtime"></span>
</th>
</tr>
<tr class="tr3 f_one">
<th>
会议参与者:
</th>
<th>
<table>
<tr>
<th width=3%>
<FONT style="color: blue" size="2">所有员工列表:</font>
<html:select property="arryusername" multiple="true" style="width: 120px;height: 100px">
<logic:present name="listuser" scope="request">
<logic:iterate id="plan" name="listuser" scope="request">
<html:option value="${plan.uno}">${plan.uname}</html:option>
</logic:iterate>
</logic:present>
</html:select>
</th>
<th width=3%>
<input type="button" name="rightmove" value=">>" style="width=60px">
<br>
<br>
<input type="button" name="leftmove" value="<<" style=" width=60px">
</th>
<th>
<FONT style="color: blue" size="2">要参与的员工列表:</font>
<br>
<html:select property="addmeet" multiple="true" style="width: 120px;height: 100px" name="meetForm">
<logic:equal name="meetForm" property="task" value="edit">
<logic:present name="addmeet" scope="request">
<logic:iterate id="plan" name="addmeet" scope="request">
<html:option value="${plan.uno}">${plan.uname}</html:option>
</logic:iterate>
</logic:present>
</logic:equal>
</html:select>
</th>
</tr>
</table>
<SPAN id="unos"></span>
</th>
</tr>
<tr class="tr3 f_two">
<th>
会议地点:
</th>
<th>
<html:select property="rmid" onclick="choie();">
</html:select>
<SPAN id="addr"></span>
</th>
</tr>
<tr class="tr3 f_one">
<th>
会议内容:
</th>
<th>
<html:textarea cols="50" rows="5" property="mcontent"></html:textarea>
</th>
</tr>
<tr>
<th>
附件:
</th>
<th align="left">
<logic:equal name="meetForm" property="task" value="add">
<input type="button" name="hh" value="添加附件" onClick="addFile()" />
<span id="file"></span>
<table align="left" id="tableFiles"></table>
</logic:equal>
<logic:equal name="meetForm" property="task" value="edit">
<logic:lessThan name="size" value="3">
<input type="button" name="hh" value="添加附件" onClick="addFile()" />
<span id="file"></span>
<table align="left" id="tableFiles"></table>
</logic:lessThan>
</logic:equal>
</br>
<logic:equal name="meetForm" property="task" value="edit">
<logic:present name="filelist" scope="request">
<logic:iterate id="files" name="filelist">
<html:link href="${pageContext.request.contextPath}/downLoadServlet?filepath=${files.maffixpath}">${files.maffixname}</html:link>
<input type="button" name="btndele" value="删除" onclick="dele('${files.maffixpath}','${files.maffixname}','<bean:write property='mid' name='meetForm' />');" />
<br>
</logic:iterate>
</logic:present>
</logic:equal>
</th>
</tr>
</table>
</div>
<br>
<div style="text-align:center;margin-bottom:25px;">
<input type="button" class="btn" value=" 保存 " onclick="check();">
<input type="button" class="btn" value=" 返回 " onclick="javascript:window.history.back();" />
</div>
</html:form>
<script>
init();
var moveright =document.getElementById("rightmove");
moveright.onclick=right;
var moveleft= document.getElementById("leftmove");
moveleft.onclick=left;
</script>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -