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.

427 lines
12 KiB

<%@page import="com.zky.para.Para"%>
<%@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 fileState="";
String secret="";
String writeDate="";
String year[]=null;
String schoolid = (String)request.getAttribute("schoolid");
String areaid1 = Common.convertNull(request.getParameter("areaid"));
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"));
HashFmlBuf bufs=(HashFmlBuf)request.getAttribute("bufEmployee"); //读取学生编号
String areaid=(String)request.getAttribute("areaid");
HashFmlBuf bufschool=(HashFmlBuf)request.getAttribute("writeDepartment"); //通过区县读取学校
%>
<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 textToUpperCase(){
if(event.keyCode>=65 && event.keyCode<=90 || event.type=="change"){
event.srcElement.value = event.srcElement.value.toUpperCase();
}
}
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 + "';");
}
%>
}
function check(operate,fileid) {
form1.operate.value=operate;
if (operate == "addFile") {
form1.action="/servlet/FileWriteManage?operate=toWriteFile";
}
if (operate == "examineFile") {
form1.action = "/servlet/FileWriteManage?operate=examineFile&fileId=" +fileid;
}
if (operate == "editFile") {
form1.action = "/servlet/FileWriteManage?operate=editFile&fileId=" +fileid;
}
if (operate == "queryPage"){
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;
}
}
form1.button1.disabled=true;
//form1.button2.disabled=true;
//if (form1.button3) form1.button3.disabled=true;
form1.submit();
}
function selectChange(i)
{
form1.action = "/zhyw/smwj/fileManage.jsp";
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=readAridSchoolManage&areaid="+optiontext;
}
if(parasm=="schoolid"){
location="/servlet/FileWriteManage?operate=readEmployeeByDepartmentManage&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;
}
}
}
}
</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" value=""/>
<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>
</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>
</td>
<td class="cell1">状态</td>
<td class="cell2">
<select class='aselect' name="filestate" value="<%=fileState%>">
<%
if (secret.equals("")){
out.println(Para.getStatic(getPara,"FILEEXAMINESTATE"));
%>
<script>
form1.filesecret.value='<%=secret%>';
</script>
<%
}else{
out.println(getPara.getSParaFilter("td_s_static","data_code","dataname","type_code","FILEEXAMINESTATE","data_code",fileState));
}
%>
</select>
</td>
</tr>
</table>
<br>
<table width="90%" align="center">
<tr align="center">
<td>
<input type="button" name="button1" value=" 查询 " class="box_button" onclick="check('queryPage');"/>&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" name="button2" value=" 新建 " class="box_button" onclick="check('addFile');"/>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<br>
<%
HashFmlBuf buf = (HashFmlBuf) request.getAttribute("filesInfo");
if (buf != null) {
int rowcount = buf.getRowCount();
%>
<center>
<div style="width:90%; height:280px;overflow: auto;">
<div id="myGrid" class="2k3Grid" borderWidth="0" contextMenu="mnuGridContextMenu" altRowColor="oldLace">
<div class="gridHead">
<!--div align="left"><span width="5%">共检索到<%=rowcount%>条记录</span></div-->
<div class="gridRow">
<span>序号</span>
<span>操作</span>
<span>文件编号</span>
<span>文件名称</span>
<span>文件状态</span>
<span>文件密级</span>
<span>写作部门</span>
<span>写作职工</span>
<span>写作日期</span>
</div>
</div>
<div class="gridBody">
<%
for (int i=0; i<rowcount; i++) {
String tempDeptid = buf.fget("file_id",i);
String tempstate = buf.fget("file_state",i);
String tempFrameworkid = buf.fget("frameworkid",i);
String file_secret=buf.fget("file_secret_id",i);
if(file_secret.equals("1"))
{
file_secret="秘密";
}
else if(file_secret.equals("2"))
{
file_secret="机密";
}
else
{
file_secret="绝密";
}
String disabled = "";
if (tempstate.equals("2")) {
tempstate = "未审核";
disabled = "";
}
else if(tempstate.equals("0"))
{
tempstate = "未通过";
disabled = "";
}
else {
tempstate = "审核通过";
disabled = "disabled";
}
%>
<div class="gridRow">
<span><%=i+1%><input type="checkbox" name="deptids" value="<%=tempDeptid%>" <%=disabled%>></span>
<span>
<input type="button" value="审核" onclick="check('examineFile','<%=buf.fget("file_id",i)%>')" <%
if(buf.fget("file_state",i).equals("1")){
%>class="" disabled="disabled"<%} else{%> class="box_button"<%} %>/>&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" <%
if(buf.fget("file_state",i).equals("1")){
%>class="" disabled="disabled"<%} else{%> class="box_button"<%} %> value="修改" onclick="check('editFile','<%=buf.fget("file_id",i)%>')"/>
</span>
<span>&nbsp;&nbsp;<a target="_blank" title="预览" href="/servlet/FileWriteManage?operate=showFileInfo&fileId=<%=tempDeptid%>"><%=tempDeptid%></a></span>
<span><%=buf.fget("file_name",i)%></span>
<span><%=tempstate%></span>
<span><%=file_secret%></span>
<span><%=buf.fget("departname",i) %></span>
<span><%=buf.fget("empname",i) %></span>
<span><%
writeDate=buf.fget("file_write_date",i);
year=writeDate.split(" ");
%>
<%=year[0]%></span>
</div>
<%
}
%>
</div>
<!-- gridBody end -->
</div>
<!-- myGrid end -->
</div>
<tag:PageLinkTag operate="query" scope="request" width="90%" align="center"/>
</form>
<table width="90%" align="center">
<tr align="center">
<td></td>
</tr>
</table>
<%
}
%>
<%@include file="/foot.jsp"%>
</body>
</html>