📄 docadd.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.recordset.DocKindRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.DocTypeRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.SendOrganRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.DocSecrecyRankRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.DocUrgentDegreeRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.DocTransactionTypeRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.AcceptDocumentInfoRecordSet" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat" %>
<%@ page import="cn.com.aheadsoft.util.ObjectID" %>
<jsp:useBean id="userinfo" scope="session" class="cn.com.aheadsoft.util.UserInfo"/>
<jsp:useBean id="upm" scope="session" class="cn.com.aheadsoft.manage.UserPurviewManage"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<title>来文录入</title>
<%
/*int q2 = upm.getUserPopInt(userinfo,"1","2","q");
int i2 = upm.getUserPopInt(userinfo,"1","2","i");
int u2 = upm.getUserPopInt(userinfo,"1","2","u");
int d2 = upm.getUserPopInt(userinfo,"1","2","d");*/ //replace by zenghongli 2004.9.8
int i2 = upm.getUserPopInt(userinfo,"1","2","i");
%>
<script src="/krm/jsp/jscript/Calendar.js"></script>
<script language="JavaScript">
<!--
organ = new Array();
<%
SendOrganRecordSet recordset6 = (SendOrganRecordSet)request.getAttribute("SendOrgan");
if(recordset6 != null && recordset6.size() > 0) {
int i = 0;
while(recordset6.next()) {
out.println("organ["+String.valueOf(i)+"]=new Array();");
out.println("organ["+String.valueOf(i)+"][0]='"+StringFormat.Source2GB(recordset6.getSO_Name())+"';");
out.println("organ["+String.valueOf(i)+"][1]='"+StringFormat.Source2GB(recordset6.getSO_AB())+"';");
i++;
}
}
%>
kind = new Array();
<%
DocKindRecordSet recordset5 = (DocKindRecordSet)request.getAttribute("DocKind");
if(recordset5 != null && recordset5.size() > 0) {
int i = 0;
while(recordset5.next()) {
out.println("kind["+String.valueOf(i)+"]=new Array();");
out.println("kind["+String.valueOf(i)+"][0]='"+StringFormat.Source2GB(recordset5.getDK_Name())+"';");
out.println("kind["+String.valueOf(i)+"][1]='"+StringFormat.Source2GB(recordset5.getDT_ID())+"';");
i++;
}
}
%>
type = new Array();
<%
DocTypeRecordSet recordset4 = (DocTypeRecordSet)request.getAttribute("DocType");
if(recordset4 != null && recordset4.size() > 0) {
int i = 0;
while(recordset4.next()) {
out.println("type["+String.valueOf(i)+"]=new Array();");
out.println("type["+String.valueOf(i)+"][0]='"+StringFormat.Source2GB(recordset4.getDT_Name())+"';");
out.println("type["+String.valueOf(i)+"][1]='"+StringFormat.Source2GB(recordset4.getDT_ID())+"';");
i++;
}
}
%>
function atSubmit(obj) {
index=obj.ADI_SendOrgan.selectedIndex;
values=obj.ADI_SendOrgan.options[index].value;
for(i=0;i<organ.length;i++) {
if(organ[i][0]==values) {
obj.ADI_SendOrganFlag.value=organ[i][1];
break;
}
}
if(obj.ADI_Title.value!=null && obj.ADI_Title.value=="") {
obj.ADI_Title.focus();
alert("请填写标题!");
return false;
}
if(obj.ADI_SN.value!=null && obj.ADI_SN.value=="") {
obj.ADI_SN.focus();
alert("请填写文号!");
return false;
}
if(obj.ADI_Date.value!=null && obj.ADI_Date.value=="") {
obj.ADI_Date.focus();
alert("请选择成文日期!");
return false;
}
now = new Date().getTime();
str1 = obj.ADI_Date.value.replace(/-/gi,'/');
if((new Date(str1).getTime())>now) {
alert("成文日期不可以为当前日期之后!");
obj.ADI_Date.value="";
return false;
}
if(obj.ADI_Kind.value!=null && obj.ADI_Kind.value=="") {
obj.ADI_Kind.focus();
alert("请选择来文种类!");
return false;
}
if(obj.ADI_Signer.value!=null && obj.ADI_Signer.value=="") {
obj.ADI_Signer.focus();
alert("请填写签发人!");
return false;
}
if(obj.ADI_FirstOrgan.value!=null && obj.ADI_FirstOrgan.value=="") {
obj.ADI_FirstOrgan.focus();
alert("请填写主送!");
return false;
}
if(obj.ADI_SendOrganFlag.value!=null && obj.ADI_SendOrganFlag.value=="") {
alert("请选择来文单位!");
return false;
}
}
function selectkind() {
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
len=document.acceptdoc.ADI_Kind.options.length;
if(len>0){
for(i=len-1;i>=0;i--)
document.acceptdoc.ADI_Kind.remove(i);
}
index=document.acceptdoc.ADI_Type.selectedIndex;
values=document.acceptdoc.ADI_Type.options[index].value;
for(i=0;i<type.length;i++) {
if(type[i][0]==values) {
for(j=0;j<kind.length;j++) {
if(type[i][1]==kind[j][1]) {
optionnew=document.createElement("option");
optionnew.text=kind[j][0];
optionnew.value=kind[j][0];
if(isIE) {
document.acceptdoc.ADI_Kind.add(optionnew);
}else {
document.acceptdoc.ADI_Kind.appendChild(optionnew);
}
}
}
break;
}
}
}
function openWin(url) {
window.open(url,'','toolbar=no,location=no,menubar=no,resizable=1,scrollbars=yes,left=0,top=0,width=600,height=400');
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="selectkind()" >
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td class="trA"> 您的位置:公文管理 >> 收文管理 >> <font class="fontcolor">收文登记</font></td>
</tr>
<tr >
<td height="8"></td>
</tr>
<tr>
<td align="center">
<table border="0" width="98%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
<form action="/krm/servlet/AcceptDocServlet" method="post" name="acceptdoc" onsubmit="return atSubmit(this)">
<tr>
<td colspan="8" class="tdA">来文登记</td>
</tr>
<%
AcceptDocumentInfoRecordSet recordset = (AcceptDocumentInfoRecordSet)request.getAttribute("AcceptDoc");
if(recordset == null) {
String docid = ObjectID.getID();
%>
<tr >
<td width="68" class="common" > 标题</td>
<td colspan="3" class="common" > <input type="text" class="biglong" name="ADI_Title">
</td>
<input type="hidden" name="ADI_ID" value="<%= docid %>">
</tr>
<tr >
<td width="68" class="common" > 文号</td>
<td width="377" class="common" > <input type="text" class="long" name="ADI_SN">
</td>
<td width="68" class="common" > 成文日期</td>
<td width="402" class="common" > <input type="text" class="middle" name="ADI_Date" readonly="true" alt"成文日期">
<a href="javascript:show_calendar('acceptdoc.ADI_Date');"><image src="/krm/jsp/image/selectdate.gif" border="0"></a></td>
</tr>
<tr >
<td width="68" class="common" > 密级</td>
<td class="common" > <select name="ADI_Secrecy" alt"秘密等级">
<%
DocSecrecyRankRecordSet recordset1 = (DocSecrecyRankRecordSet)request.getAttribute("SecrecyRank");
if(recordset1 != null && recordset1.size() > 0) {
while(recordset1.next()) {
%>
<option value="<%= StringFormat.Source2GB(recordset1.getDSR_Name()) %>"><%= StringFormat.Source2GB(recordset1.getDSR_Name()) %></option>
<%
}
}
%>
</select></td>
<td class="common" nowrap> 保密期限</td>
<td class="common" > <input type="text" class="middle" name="ADI_SecrecyTime">
</td>
</tr>
<tr >
<td width="68" class="common" > 紧急程度</td>
<td class="common" > <select style="font-size:9pt;font-color:#FFFFFF" name="ADI_Urgent" alt"紧急程度">
<%
DocUrgentDegreeRecordSet recordset2 = (DocUrgentDegreeRecordSet)request.getAttribute("UrgentDegree");
if(recordset2 != null && recordset2.size() > 0) {
while(recordset2.next()) {
%>
<option value="<%= StringFormat.Source2GB(recordset2.getDUD_Name()) %>"><%= StringFormat.Source2GB(recordset2.getDUD_Name()) %></option>
<%
}
}
%>
</select> </td>
<td class="common" nowrap > 办理类别</td>
<td class="common" > <select style="font-size:9pt;font-color:#FFFFFF" name="ADI_TransactionType" alt"办理类别">
<%
DocTransactionTypeRecordSet recordset3 = (DocTransactionTypeRecordSet)request.getAttribute("TransactionType");
if(recordset3 != null && recordset3.size() > 0) {
while(recordset3.next()) {
%>
<option value="<%= StringFormat.Source2GB(recordset3.getDTT_Name()) %>"><%= StringFormat.Source2GB(recordset3.getDTT_Name()) %></option>
<%
}
}
%>
</select></td>
</tr>
<tr >
<td width="68" class="common" nowrap > 来文类别</td>
<td class="common" > <select style="font-size:9pt;font-color:#FFFFFF" name="ADI_Type" alt"公文类别" onchange="selectkind()">
<%
if(recordset4 != null && recordset4.size() > 0) {
recordset4.beforefirst();
while(recordset4.next()) {
%>
<option value="<%= StringFormat.Source2GB(recordset4.getDT_Name()) %>"><%= StringFormat.Source2GB(recordset4.getDT_Name()) %></option>
<%
}
}
%>
</select></td>
<td class="common" > 来文种类</td>
<td class="common" > <select style="font-size:9pt;font-color:#FFFFFF" name="ADI_Kind" alt"公文种类">
</select> </td>
</tr>
<tr >
<td width="68" class="common" > 来文单位</td>
<td class="common" > <select name="ADI_SendOrgan" alt"来文机关">
<%
if(recordset6 != null && recordset6.size() > 0) {
recordset6.beforefirst();
while(recordset6.next()) {
%>
<option value="<%= StringFormat.Source2GB(recordset6.getSO_Name()) %>"><%= StringFormat.Source2GB(recordset6.getSO_Name()) %></option>
<%
}
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -