You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

470 lines
13 KiB

<%@page import="com.zky.para.Para"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%><%@include file="/auth.jsp"%>
<%@page language="java" contentType="text/html;charset=utf-8"%>
<jsp:useBean id="getPara" scope="application" class="com.zky.para.SyncPara"/>
<%
//String filevalidity=(String)request.getAttribute("filevalidity");
String secret="";
String schoolid = (String)request.getAttribute("schoolid");
String areaid1 = Common.convertNull(request.getParameter("areaid"));
// String deptid1 = Common.convertNull(request.getParameter("deptid"));
String frameworkid1 = Common.convertNull(request.getParameter("frameworkid"));
String schoolid1=Common.convertNull(request.getParameter("schoolid"));
String employeeId=(String)request.getAttribute("writeempid");
String employeeId1=Common.convertNull(request.getParameter("writeempid"));
String filevalidity=(String)request.getAttribute("filevalidity");
String fileTitle=(String)request.getAttribute("fileTitle");
String fileCode=(String)request.getAttribute("fileCode");
String fileName=(String)request.getAttribute("fileName");
String fileDescribe=(String)request.getAttribute("fileDescribe");
String purpose=(String)request.getAttribute("purpose");
String remark=(String)request.getAttribute("remark");
//String manageDeptId=(String)request.getAttribute("")
HashFmlBuf bufs=(HashFmlBuf)request.getAttribute("bufEmployee"); //读取学生编号
HashFmlBuf bufschool=(HashFmlBuf)request.getAttribute("writeDepartment"); //通过区县读取学校
// HashFmlBuf bufWriteEmp=(HashFmlBuf)request.getAttribute("bufEmployee");
String areaid=(String)request.getAttribute("areaid");
String studentid=(String)request.getAttribute("studentid");
%>
<html>
<head>
<title>文件管理</title>
<link rel="stylesheet" type="text/css" href="../../css/font.css">
<script src="/js/check.js"></script>
<link rel="stylesheet" type="text/css" href="../../js/2k3Grid.css">
<link rel="stylesheet" type="text/css" href="../../js/2k3Menu.css">
<link rel="stylesheet" type="text/css" href="../../js/2k3Dialog.css">
<style type="text/css">
select
{
width:155px;
}
</style>
<script>
function checkNumber()
{
if(form1.fileCode.value!="" && !parseInt(form1.fileCode.value))
{
alert("文件编号只能输入数字");
form1.fileCode.value="";
form1.fileCode.focus();
return ;
}
if(form1.filevalidity.value!="" && !parseInt(form1.filevalidity.value))
{
alert("有效期只能输入数字");
form1.filevalidity.value="";
form1.filevalidity.focus();
return ;
}
}
function setValue()
{
<%
if(!Common.isNull(frameworkid1))
{
out.println("form1.frameworkid.value='" + frameworkid1 + "';");
}
if(!Common.isNull(areaid1))
{
out.println("form1.areaid.value='" + areaid1 + "';");
}
if(!Common.isNull(schoolid1))
{
out.println("form1.schoolid.value='" + schoolid1 + "';");
}
if(!Common.isNull(employeeId1))
{
out.println("form1.writeempid.value='" + schoolid1 + "';");
}
if(!Common.isNull(fileCode))
{
out.println("form1.fileCode.value='" + fileCode + "';");
}
if(!Common.isNull(fileName))
{
out.println("form1.fileName.value='" + fileName + "';");
}
if(!Common.isNull(filevalidity))
{
out.println("form1.filevalidity.value='" + filevalidity + "';");
}
if(!Common.isNull(fileTitle))
{
out.println("form1.fileTitle.value='" + fileTitle + "';");
}
if(!Common.isNull(fileDescribe))
{
out.println("form1.fileDescribe.value='" + fileDescribe + "';");
}
if(!Common.isNull(remark))
{
out.println("form1.remark.value='" + remark + "';");
}
if(!Common.isNull(purpose))
{
out.println("form1.purpose.value='" + purpose + "';");
}
%>
}
function queryStatistics(operate)
{
form1.operate.value=operate;
}
function check(operate)
{
form1.operate.value=operate;
if(operate=="createFile"){
if(form1.frameworkid.value=="")
{
alert("地市不能为空");
form1.frameworkid.focus();
return false;
}
if(form1.areaid.value=="")
{
alert("区县不能为空");
form1.areaid.focus();
return false;
}
if(form1.schoolid.value=="")
{
alert("部门不能为空");
form1.schoolid.focus();
return false;
}
if(form1.writeempid.value=="")
{
alert("作者不能为空");
form1.writeempid.focus();
return false;
}
if(form1.filesecret.value=="")
{
alert("密级不能为空");
form1.filesecret.focus();
return false;
}
if(form1.fileCode.value=="")
{
alert("文件编号不能为空");
form1.fileCode.focus();
return false;
}
if(form1.fileName.value=="")
{
alert("文件名称不能为空");
form1.fileName.focus();
return false;
}
if(form1.filevalidity.value=="")
{
alert("文件有效期不能为空");
form1.filevalidity.focus();
return false;
}
}
//if(form1.typeInfo.value=="")
//{
//alert("类型不能为空");
//form1.typeInfo.focus();
//return false;
//}
//if(form1.typeInfo.value==1 || form1.typeInfo.value==4)
//{
form1.submit();
}
function getClass(parasm){
var optiontext="";
for (i = 1; i < document.getElementById(parasm).length; i++) {
if (document.getElementById(parasm).options[i].selected == true) {
optiontext = document.getElementById(parasm).options[i].value;
}
}
if(optiontext!=""){
//通过区县读取学校
if(parasm=="areaid"){
location="/servlet/FileWriteManage?operate=readAridSchool&areaid="+optiontext;
}
if(parasm=="schoolid"){
location="/servlet/FileWriteManage?operate=readEmployeeByDepartment&schoolid="+optiontext+"&areaid=<%=areaid%>";
}
if (parasm=="typeInfo") {
if (
document.getElementById(parasm).value=="2" || document.getElementById(parasm).value=="3" || document.getElementById(parasm).value=="5"||
document.getElementById(parasm).value=="6"||document.getElementById(parasm).value=="7" || document.getElementById(parasm).value=="8" ||
document.getElementById(parasm).value=="9") {
//document.getElementById("termInfo").disabled=true;
}else {
//document.getElementById("termInfo").disabled=false;
}
}
}
}
function checklength(el,size){
if(el.value.length > size){
alert("字数超过限制");
}
el.value = el.value.substring(0,size);
}
function checkval(){
if (form1.classtu.value == "") {
alert("请选择班级!");
return false;
}
}
</script>
</head>
<body onload="setValue();">
<br>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" class="box">
<tr>
<td valign="top"><table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="25%" background="/images/tab_search_01.jpg"><table width="80%" height="23" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="/images/little_red.jpg" width="12" height="12"></td>
<td width="97%" class="font12b">&nbsp;文件管理</td>
</tr>
</table></td>
<td width="82%" background="/images/tab_search_03.jpg"><img src="/images/tab_search_02.jpg" width="12" height="23"></td>
</tr>
</table>
<form name="form1" method="post" action="/servlet/FileWriteManage">
<input type="hidden" name="operate" />
<br>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="/images/little.gif" width="12" height="12"></td>
<td width="97%" class="font12">请输入查询条件</td>
</tr>
</table>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="d8e9fe" class="table02">
<tr bgcolor="#FFFFFF">
<td class="cell1">所属地市</td>
<td class="cell2">
<select class='aselect' name="frameworkid" id="frameworkid" onchange="getClass('frameworkid')">
<%=Para.getSj(getPara)%>
</select><font color="#ff0000">*</font>
</td>
<td class="cell1">所属区县</td>
<td class="cell2">
<select class='aselect' name="areaid" id="areaid" onchange="getClass('areaid')">
<%=Para.getQj(getPara,frameworkid1)%>
</select><font color="#ff0000">*</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1">写作部门</td>
<td class="cell2">
<select class='aselect' name="schoolid" id="schoolid" onchange="getClass('schoolid')">
<%
if(bufschool!=null && bufschool.getRowCount()>0){
%>
<option value="">--请选择--</option>
<%
for(int i=0;i<bufschool.getRowCount();i++){
%>
<option value="<%=bufschool.fget("DEPARTID",i) %>" <%if(bufschool.fget("DEPARTID",i).equals(schoolid)){%> selected="selected" <%} %>><%=bufschool.fget("DEPARTNAME",i) %></option>
<%
}
}else{
%>
<option value="">无部门信息</option>
<%
}
%>
</select><font color="#ff0000">*</font>
</td>
<td class="cell1">写作员工</td>
<td class="td1">
<select class='aselect' name="writeempid" id="writeempid">
<%
if(bufs!=null && bufs.getRowCount()>0){
%>
<option value="">--请选择--</option>
<%
for(int i=0;i<bufs.getRowCount();i++){
%>
<option value="<%=bufs.fget("EMPID",i) %>" <%if(bufs.fget("EMPID",i).equals(employeeId)){%> selected="selected" <%} %>><%=bufs.fget("EMPNAME",i) %></option>
<%
}
}else{
%>
<option value="">无职工信息</option>
<%
}
%>
</select>
<font color="#ff0000">*</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1">文件编号</td>
<td class="cell2">
<input type="text" name="fileCode" onblur="checkNumber()" maxlength="12"><font color="#ff0000">*</font>
</td>
<td class="cell1">文件名称</td>
<td class="cell2">
<input type="text" name="fileName" maxlength="12"><font color="#ff0000">*</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="cell1">密级</td>
<td class="cell2">
<select class='aselect' name="filesecret" value="<%=secret%>">
<%
if (secret.equals("")){
out.println(Para.getStatic(getPara,"SECURITYLVL"));
%>
<script>
form1.filesecret.value='<%=secret%>';
</script>
<%
}else{
out.println(getPara.getSParaFilter("td_s_static","data_code","dataname","type_code","SECURITYLVL","data_code",secret));
}
%>
</select><font color="#ff0000">*</font>
</td>
<td class="cell1">有效期</td>
<td class="td1">
<input type="text" name="filevalidity" onblur="checkNumber()" maxlength="12">
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td style="color: #41247B" colspan="4">
标题
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td colspan="4">
<textarea onblur="checklength(this,200)" maxlength="300" name="fileTitle" id="fileTitle" rows="3" cols="93"></textarea>
<font color="red">(注限200字符内)</font>
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td style="color: #41247B" colspan="4">
描述
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td colspan="4">
<textarea onblur="checklength(this,200)" maxlength="300" name="fileDescribe" id="fileDescribe" rows="3" cols="93"></textarea>
<font color="red">(注限200字符内)</font>
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td style="color: #41247B" colspan="4">
用途
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td colspan="4">
<textarea onblur="checklength(this,200)" maxlength="300" name="purpose" id="purpose" rows="3" cols="93"></textarea>
<font color="red">(注限200字符内)</font>
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td style="color: #41247B" colspan="4">
备注:
</td>
</tr>
<tr bgcolor="#FFFFFF" class="tr2">
<td colspan="4">
<textarea onblur="checklength(this,200)" maxlength="300" name="remark" id="remark" rows="3" cols="93"></textarea>
<font color="red">(注限200字符内)</font>
</td>
</tr>
</table>
<br>
<br>
<br>
<table width="90%" align="center">
<tr align="center">
<td><input type="button" name="button1" value=" 提交 " class="box_button" onclick="check('createFile');"/>&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
<%@include file="/foot.jsp"%>
</body>
</html>