📄 fileinfo.jsp
字号:
<%@ page contentType="text/html;charset=GB2312"%>
<%@ page language="java"%>
<%@ taglib uri="/web-inf/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/web-inf/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/web-inf/struts-html.tld" prefix="html"%>
<%@ include file="/share/func.jsp"%>
<%@ include file="/share/share.jsp"%>
<SCRIPT TYPE="text/javascript" SRC="<%=app_path%>js/date.js" > </SCRIPT>
<html:html locale="true">
<head>
<title>案卷信息录入</title>
</head>
<body>
<p align="center"><font size="5" color="#3A5C9F">案卷信息录入</font></p>
<html:form method="POST" action="fileinfoAction">
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<% String temp="";
String temp1=(String)session.getAttribute("archivetype");
if(temp1!=null)
{
temp=temp1;
}
String category=request.getParameter("category");
String code=request.getParameter("code");
if(category==null || category.equals("") || category.equals("null")){
category="";
}
if(code==null || code.equals("") || code.equals("null")){
code="";
}
String temp_volumnno="";
if(!category.equals("") && !code.equals("")){
temp_volumnno=code+"-"+category+"-";
}
%>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" align="center" width="777" bgcolor="#3A5C9F">
<tr>
<td align="right" width="125" valign="middle">档案种类:</td>
<td align="left" width="231">
<html:select property="archivetype" onchange="javascript:location.href='/eGovernment/hreffileinfoAction.do?convert='+document.fileinfoForm.archivetype.value">
<%= getBcOptions(temp,"farchivetype")%>
</html:select><font color="#FF0000">*</font></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">工程代号:</td>
<td align="left" width="231">
<input type="text" name="code" value="<%=code%>"></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">类目号:</td>
<td>
<html:select property="category" onchange="javascript:location.href='/eGovernment/hreffileinfoAction.do?category='+document.fileinfoForm.category.value+'&convert='+document.fileinfoForm.archivetype.value+'&code='+document.fileinfoForm.code.value">
<%= getBcOptions(category,"category","fFileCategory")%>
</html:select></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">标题:</td>
<td align="left" width="231"><html:text size="20" property="volumntitle"/></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">案卷号:</td>
<td align="left" width="231">
<input type="text" name="volumnno" value="<%=temp_volumnno%>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">
<td align="left" width="561">案卷号格式如下:工程代号+"-"+类目号+"-"+流水卷号
例:2201-6300-001
</tr>
<tr>
<td align="right" width="125" valign="middle">保管期限(天):</td>
<td align="left" width="231"><html:select property="retentionperiod">
<html:option value="长久" >永久</html:option>
<html:option value="长期" >长期</html:option>
<html:option value="短期" >短期</html:option>
<% if(temp.equals("会档"))
{%>
<html:option value="50年" >50年</html:option>
<html:option value="20年" >20年</html:option>
<html:option value="15年" >15年</html:option>
<html:option value="10年" >10年</html:option>
<html:option value="5年" >5年</html:option>
<html:option value="3年" >3年</html:option>
<%}%>
</html:select>
</td>
</tr>
<tr>
<td align="right" width="125" valign="middle">起止年月:</td>
<td align="left" width="231"><html:text size="13" property="startdate" readonly="true"/>
<img align=absMiddle
alt="日期选择" border=0 height=13 id=daysOfMonth1Pos name=daysOfMonth1Pos
onMouseUp="toggleMonthPicker('daysOfMonth1','archiveForm.ret',document.fileinfoForm.startdate)"
src="<%=app_path%>js/calendaricon.gif" width=13>
<div id=daysOfMonth1 style="POSITION: absolute"></div>
至<html:text size="20" property="enddate" readonly="true"/>
<img align=absMiddle
alt="日期选择" border=0 height=13 id=daysOfMonth2Pos name=daysOfMonth2Pos
onMouseUp="toggleMonthPicker('daysOfMonth2','archiveForm.ret',document.fileinfoForm.enddate)"
src="<%=app_path%>js/calendaricon.gif" width=13>
<div id=daysOfMonth2 style="POSITION: absolute"></div></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">总页数:</td>
<td align="left" width="231"><html:text size="20" property="totalpage"/></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">总件数:</td>
<td align="left" width="231"><html:text size="20" property="totalnum"/></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">立卷单位:</td>
<td align="left" width="231"><html:text size="20" property="archiveunit"/></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">责任者:</td>
<td align="left" width="231"><html:text size="20" property="duty"/></td>
</tr>
<tr>
<td align="right" width="125" valign="middle">密级:</td>
<td align="left" width="231">
<html:select property="security" >
<html:option value="普通" >普通</html:option>
<html:option value="秘密" >秘密</html:option>
<html:option value="机密" >机密</html:option>
</html:select>
</td>
</tr>
<tr>
<td align="right" width="125" valign="middle">状态:</td>
<td align="left" width="231"><html:text size="20" property="status"/>
</td>
</tr>
<tr>
<td align="right" width="125" valign="middle">备注:</td>
<td align="left" width="231"><html:textarea cols="30" rows="4" property="remark"/></td>
</tr>
<tr>
<td align="right" width="125"></td>
<td align="left" width="231"></td>
</tr>
<tr>
<td align="right" width="125"></td>
<td align="left" width="231"><html:checkbox property="check" value="0">需要复制到下一个记录</html:checkbox></td>
</tr>
</table>
</center>
</div>
<p align="center">
<html:submit property="save" onclick="return checkout()">保存并返回首页</html:submit>
<html:submit property="save" onclick="return checkout()">保存并继续添加</html:submit>
<html:submit property="save" onclick="return checkout()">保存并添加文件</html:submit>
<html:reset>重置</html:reset>
<input type="button" value="返回" name="B4" onClick="javascript:location.href='<%=app_path%>newwelcome.jsp';">
</p>
</html:form>
<p> </p>
<p> </p>
</body>
<script language="javascript">
function checkout()
{
var code1=document.fileinfoForm.code.value;
var code2=getTrim(code1);
if(document.fileinfoForm.archivetype.value=="")
{
alert("请输入档案种类");
return false;
}
if((document.fileinfoForm.code.value).length > 4)
{
alert("工程代号不得超过4");
return false;
}
if(document.fileinfoForm.code.value=="")
{
alert("工程代号不得为空");
return false;
}
if(code2.length<code1.length)
{
alert("工程代号两边不得有空格");
return false;
}
if(document.fileinfoForm.volumnno.value=="")
{
alert("请输入案卷号");
return false;
}
//alert((document.fileinfoForm.volumnno.value).charAt(4));
if((document.fileinfoForm.volumnno.value).charAt(4)!="-" || (document.fileinfoForm.volumnno.value).charAt(9)!="-")
{
alert("案卷号输入错误");
return false;
}
// alert((document.fileinfoForm.volumnno.value).charAt(5));
if((document.fileinfoForm.volumnno.value).length!=13 )
{
alert("案卷号输入错误");
return false;
}
// alert((document.fileinfoForm.volumnno.value).charAt(6));
if(compChar1(document.fileinfoForm.code.value,document.fileinfoForm.volumnno.value))
{
//alert((document.fileinfoForm.volumnno.value).charAt(7));
alert("案卷号中工程代码段不符合!");
return false;
}
//alert((document.fileinfoForm.volumnno.value).charAt(7));
// alert(document.fileinfoForm.category.value);
if(compChar2(document.fileinfoForm.category.value,document.fileinfoForm.volumnno.value))
{
alert((document.fileinfoForm.volumnno.value).charAt(8));
alert("案卷号中类目号段不符合!");
return false;
}
if(!isNumber(document.fileinfoForm.totalpage.value))
{
alert("总页数应该是数字");
return false;
}
if(!isNumber(document.fileinfoForm.totalnum.value))
{
alert("总件数应该是数字");
return false;
}
}
function isNumber(tvlaue){
var tvlaue="1"+tvlaue;
if (isNaN(tvlaue)||(parseInt(tvlaue)<0)||(tvlaue.length<1)) {
return false;
}
return true;
}
/*
*比较字符串
* 参数输入框对象值
*/
function compChar1(s1,s2){
for (var i=0;i<s1.length;i++){
if (s1.charAt(i)!=s2.charAt(i)){
return true;
}
}
return false;
}
/*
*比较字符串
* 参数输入框对象值
*/
function compChar2(s1,s2){
for (var i=0;i<s1.length;i++){
if (s1.charAt(i)!=s2.charAt(i+5)){
return true;
}
}
return false;
}
/*
*替换左边空格
* 参数输入框对象值
*/
function getLeftTrim(sInputString){
var rtnStr;
rtnStr=""
for (var i=0;i<sInputString.length;i++){
if (sInputString.charAt(i)!=" "){
rtnStr=sInputString.substr(i);
break;
}
}
return rtnStr;
}
/*
*替换右边空格
* 参数输入框对象值
*/
function getRightTrim(sInputString){
var rtnStr;
rtnStr=""
for (var i=sInputString.length-1;i>=0;i--){
if (sInputString.charAt(i)!=" "){
rtnStr=sInputString.substring(0,i+1);
break;
}
}
return rtnStr;
}
/*
*替换左右边空格
* 参数输入框对象值
*/
function getTrim(sInputString){
sInputString=getRightTrim(sInputString); //去处字符串左边的空格
sInputString=getLeftTrim(sInputString); //去处字符串右边的空格
return sInputString;
}
</script>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -