⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adddocument.jsp

📁 一个oa系统
💻 JSP
字号:
<%@ page language="java" pageEncoding="gb2312"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<c:set var="a" value="填写" />
<c:if test="${flag eq '1'}">
<c:set var="a" value="修改" />
</c:if>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>${a}公文</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
body {
	margin-left: 6px;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: underline;
	color: #333333;
}
a:active {
	text-decoration: none;
	color: #333333;
}
-->
</style>
<link href="../../oa/css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {
	font-size: 14px;
	font-weight: bold;
}
.STYLE6 {font-size: 14px;
	font-weight: bold;
	color: #FFFFFF;
}
-->
</style>
</head>
<script type="text/javascript">
var cellID=0;
function addaffix(){
   cellID=cellID+1;
   var row = tab.insertRow();
   row.id="r"+cellID;
   var cell = row.insertCell();
   var ss = "<input type=\"file\" name=\"file"+cellID+"\" /><span style='border-width:0px;color:red;font-family:webdings;cursor:hand' onclick='delaffix(this)'><font size='4'>r</font></span>";
   cell.innerHTML = ss;    
}
function delaffix(obj){
   tab.deleteRow(obj.parentNode.parentNode.rowIndex);
}
function adddoc(){
	var title = document.forms[0].title.value;
	var content = document.forms[0].content.value;
	var auditor = document.forms[0].auditor.value;
	 		
	if(title == ""){
		alert("请填写公文标题!");
		return false;
	} else if(content == ""){
		alert("请填写公文内容!");
		return false;
	} else if(auditor == ""){
		alert("请选择下一步审核人!");
		return false;
	}
	return true;
}
</script>
<body>
<table width="700" border="0" cellpadding="0" cellspacing="1" bgcolor="#3868f8">
  <tr>
    <td width="698" height="25" bgcolor="#FFFFFF"><table width="700" height="25" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="697" height="25" bgcolor="#A4B5E3">
          <span class="STYLE6">&nbsp;&nbsp;&nbsp; 发送通用公告</span>        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="20" bgcolor="#FFFFFF" valign="top" style="padding-top:4px; padding-bottom:3px; padding-left:4px; padding-right:4px;">
    <form action="<%=request.getContextPath() %>/adddocument.do" method="post" enctype="multipart/form-data" onsubmit="return adddoc()">
    <input type="hidden" name="id" value="${document.id}">
    <input type="hidden" name="flag" value="${flag}">
    <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#ECE9D8" bgcolor="#3868f8">
      
      <tr>
        <td width="109" height="22" bgcolor="#FFFFFF"><div align="center">公文标题:</div></td>
        <td width="245" height="22" bgcolor="#FFFFFF" style="padding-left:4px;"><input type="text" name="title" value="${document.title}" size="32"/></td>
        <td width="70" bgcolor="#FFFFFF"><div align="center">时间:</div></td>
        <td width="258" bgcolor="#FFFFFF">&nbsp;&nbsp;
                        <c:if test="${!empty document.date}">
						    ${document.date}
						</c:if>
						<c:if test="${empty document.date}">
								<script>
									tmpDate = new Date();
									date = tmpDate.getDate();
									month = tmpDate.getMonth() + 1;
									year = tmpDate.getYear();
									document.write(year);
									document.write("年");
									document.write(month);
									document.write("月");
									document.write(date);
									document.write("日  ");
									myArray = new Array(7);
									myArray[0] = "星期日"
									myArray[1] = "星期一"
									myArray[2] = "星期二"
									myArray[3] = "星期三"
									myArray[4] = "星期四"
									myArray[5] = "星期五"
									myArray[6] = "星期六"
									weekday = tmpDate.getDay();
									if(weekday==0 | weekday==6)
									{
										document.write(myArray[weekday])
									}else
									{
										document.write(myArray[weekday])
									};																		
									</script>
						</c:if>
			</td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF" style="padding-top:8px;"><div align="center">
          公文内容:
        </div></td>
        <td height="22" colspan="3" bgcolor="#FFFFFF" style="padding-top:4px; padding-bottom:3px; padding-left:4px; padding-right:4px;"><textarea name="content" cols="80" rows="6">${document.content}</textarea></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF" style="padding-top:8px;"><div align="center">
          附件:
        </div></td>
        <td height="22" colspan="3" bgcolor="#FFFFFF" style="padding-top:4px; padding-bottom:3px; padding-left:4px; padding-right:4px;">
          <input type="button" onclick="addaffix()" value="添加附件"/><br/>
		  <table id="tab"></table>
        </td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF" style="padding-top:8px;"><div align="center">
          当前处理人:
        </div></td>
        <td height="22" colspan="3" bgcolor="#FFFFFF" style="padding-top:4px; padding-bottom:3px; padding-left:4px; padding-right:4px;"><bean:write name="realname" /></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF" style="padding-top:8px;"><div align="center">
          您的意见:
        </div></td>
        <td height="22" colspan="3" bgcolor="#FFFFFF" style="padding-top:4px; padding-bottom:3px; padding-left:4px; padding-right:4px;"><textarea name="opinion" cols="80" rows="6"></textarea></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF" style="padding-top:8px;"><div align="center">
          下一步审核人:
        </div></td>
        <td height="22" colspan="3" bgcolor="#FFFFFF" style="padding-top:4px; padding-bottom:3px; padding-left:4px; padding-right:4px;">
            <input type="text" name="tempauditor" /><input type="hidden" name="auditor" />
			<input type="button" value="选择"
							onclick="window.open('<%=request.getContextPath() %>/selStaff.do','' ,'height=255, width=272, top=300,left=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no,status=no')" />
        </td>
      </tr>
      <tr>
        <td height="30" colspan="4" bgcolor="#FFFFFF">
             &nbsp;
             <input type="submit" value="提交" /></td>
      </tr>
    </table></form></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -