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

📄 addcontractinput.jsp

📁 JSP物业管理系统 一份比较完整的物业管理系统源码。 对于初学者可以有一定的借鉴。
💻 JSP
字号:
<!-- 系统名称:光大花园物业管理系统 -->
<!-- 程序名称:AddContractInput.jsp -->
<!-- 程序类型:jsp文件 -->
<!-- 功能简述:增加合同输入页面 -->
<!-- 作    者:韩立锋 -->
<!-- 公    司:长春中联	-->
<!-- 完成时间:2001/09/05 -->
<!-- 修 改 人:毕锋 -->
<!-- 修改内容:页面	,增加字段-->
<!-- 修改时间:2001/11/19/29 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/pmsApp/css/wuye.css" type="text/css">
<title>增加合同</title>
<script language="JavaScript" src="/pmsApp/common/wuye.js"></script>
<script language="JavaScript" src="/pmsApp/common/admin.js"></script>
<%
String kindname = (String)request.getParameter("kindname");
String kindnum = (String)request.getParameter("kindnum");
%>
<script lanuage="JavaScript">
<!--
function MM_swapImgRestore() {// v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() {// v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) {// v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() {// v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
//获取系统时间
function existedData() {
	now=new Date();
	y=now.getYear();
	m=1+now.getMonth();
	d=now.getDate();

	
    for(var i = 0; i < 10; i++) {
      if(document.form1.signyear[i].value == y) {
        document.form1.signyear[i].selected = true;
        break;
      }
    }
	for(var i = 0; i < 12; i++) {
      if(document.form1.signmonth[i].value == m) {
        document.form1.signmonth[i].selected = true;
        break;
      }
    }
    for(var i = 0; i < 31; i++) {
      if(document.form1.signday[i].value == d)
	  {
        document.form1.signday[i].selected = true;
        break;
      }
    }
    
}

//判断是否含有非法字符
function ChkUnvialble(num){
	for(i=0;i<10;i++){
		if(!((num.charAt(i)>=0)&&(num.charAt(i)<=9))&&(!((num.charAt(i)>="a")&&(num.charAt(i)<="z")))&&(!((num.charAt(i)>="A")&&(num.charAt(i)<="Z"))))
		{
			return false;
		}
	}
}
function CheckForm(inputForm) 
{
	Nvoid(inputForm);
	if (inputForm.contracttopic.value==""){
        alert("请输入合同标题");
        inputForm.contracttopic.focus();
        return false;
    }
	if (inputForm.contracttopic.value.length>20){
        alert("合同标题不能超过20个字");
        inputForm.contracttopic.focus();
        return false;
    }
    if (inputForm.contractnumb.value==""){
        alert("请输入合同编号");
        inputForm.contractnumb.focus();
        return false;
    }
	if (inputForm.contractnumb.value.length>21){
        alert("合同编号不能超过21个字符");
        inputForm.contractnumb.focus();
        return false;
    }
    if (inputForm.contractnumb.value!="") {
  		if (ChkUnvialble(inputForm.contractnumb.value)==false) {
  			alert("文书编号含有非法字符!");
	  		inputForm.contractnumb.focus();
	  		return false;
  		}
  	}
	if (inputForm.cooperatecom.value.length>20){
        alert("合作单位不能超过20个字");
        inputForm.cooperatecom.focus();
        return false;
    }
    if (inputForm.location.value==""){
        alert("请输入合同存放位置");
        inputForm.location.focus();
        return false;
    }
	if (inputForm.location.value.length>50){
        alert("存放位置不能超过50个字");
        inputForm.location.focus();
        return false;
    }
	if (inputForm.signman.value.length>10){
        alert("合同签订人不能超过10个字");
        inputForm.signman.focus();
        return false;
    }
	if (inputForm.remark.value.length>100){
        alert("备注不能超过100个字");
        inputForm.remark.focus();
        return false;
    }
	inputForm.signdate.value=inputForm.signyear.value+'-'+inputForm.signmonth.value+'-'+inputForm.signday.value;
	
	handleForm(form1);
}



function handleForm(inputForm) 
{
	var str="";
	var del2="☆";
	var del ="※";
	for (i=0; i<inputForm.elements.length; i++)
	{
                if ((inputForm.elements[i].name!="txId")&&(inputForm.elements[i].name!="inputString")&&(inputForm.elements[i].type!="button"))
		{
                if ((inputForm.elements[i].name.toUpperCase() != "提交") &&
			(inputForm.elements[i].name.toUpperCase() != "复位"))
		{
			if ((inputForm.elements[i].type == "radio") ||
				(inputForm.elements[i].type == "checkbox"))
			{
				if (inputForm.elements[i].checked)
				{
					str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
				}
			}
			else if (inputForm.elements[i].type == "select-one")
			{
				str = str+inputForm.elements[i].name
						+del2+inputForm.elements[i].options[inputForm.elements[i].selectedIndex].value+del;
			}
			else 
			{
				str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
			}
                        }
		}
	} 
	str=str.substr(0,str.length-del.length);			
	inputStr=str;
	
	inputForm.inputString.value=str;
	inputForm.submit();
}
</script>
</head>
<body bgColor="#FFFFFF" leftMargin="0" topMargin="0" vLink="#003399" marginwidth="0" marginheight="0" background="/pmsApp/images/bg2.gif" onLoad="this.focus();MM_preloadImages('/pmsApp/images/button_new_over.gif','/pmsApp/images/button_save_over.gif','/pmsApp/images/button_modify_over.gif','/pmsApp/images/button_del_over.gif','/pmsApp/images/button_query_over.gif','/pmsApp/images/button_cancel_over.gif')" >
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="/pmsApp/servlet/common.PMS">
<table width="100%" border="0" cellspacing="0" cellpadding="2">  	
  	<input type="hidden" name="txId" id="txId" value="3002">
	<input type="hidden" name="inputString" id="inputString" >
  <tr> 
      <td height="28" background="/pmsApp/images/toolbar2.gif" valign="top"><img src="/pmsApp/images/blank.gif" width="10" height="1"><img src="/pmsApp/images/button_new_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_modify_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_del_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_split.gif" width="8" height="20"><img src="/pmsApp/images/button_query_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_split.gif" width="8" height="20"></td>
  </tr>
</table>
  <br>
  <table width="279"  border="1"  align="center" bgcolor="#FFFFFF" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" height="22">
    <tr>
      <td align="center" bgcolor="#eeffee">增加合同资料</td>
  </tr>
</table><br>
  <table width="98%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#808080" bordercolordark="#FFFFFF">
    <input type="hidden" name="contractkind" value="<%=kindname%>">
    <tr> 
      <td align="center" width="19%">合同标题</td>
      <td width="34%"> 
        <input type="text" name="contracttopic" size="30" maxlength="20">
        <font color="#FF3300">*</font> </td>
      <td align="center" width="14%">合同编号</td>
      <td width="33%"> 
        <input type="text" name="contractnumb" size="30" maxlength="21">
        <font color="#FF3300">*</font> </td>
    </tr>
    <tr> 
      <td align="center" width="19%">合作单位</td>
      <td width="34%"> 
        <input type="text" name="cooperatecom" size="30" maxlength="20">
      </td>
      <td align="center" width="14%">合同内容</td>
      <td width="33%"> 
        <input type="file" name="content" >
      </td>
    </tr>
    <tr> 
      <td align="center" width="19%">存放位置</td>
      <td width="34%"> 
        <input type="text" name="location" size="30" maxlength="50">
        <font color="#FF3300">*</font> </td>
      <td align="center" width="14%">合同签订人</td>
      <td width="33%"> 
        <input type="text" name="signman" size="20" maxlength="10">
      </td>
    </tr>
    <tr>
      <td align="center" width="19%">合同签订日期</td>
      <td width="34%"> 
        <select name="signyear">
          <option value="2001">2001</option>
          <option value="2002">2002</option>
          <option value="2003">2003</option>
          <option value="2004">2004</option>
          <option value="2005">2005</option>
          <option value="2006">2006</option>
          <option value="2007">2007</option>
          <option value="2008">2008</option>
          <option value="2009">2009</option>
          <option value="2010">2010</option>
        </select>
        <select name="signmonth">
          <option value="01">1</option>
          <option value="02">2</option>
          <option value="03">3</option>
          <option value="04">4</option>
          <option value="05">5</option>
          <option value="06">6</option>
          <option value="07">7</option>
          <option value="08">8</option>
          <option value="09">9</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
        </select>
        <select name="signday">
          <option value="01" >1</option>
          <option value="02" >2</option>
          <option value="03" >3</option>
          <option value="04" >4</option>
          <option value="05" >5</option>
          <option value="06" >6</option>
          <option value="07" >7</option>
          <option value="08" >8</option>
          <option value="09" >9</option>
          <option value="10" >10</option>
          <option value="11" >11</option>
          <option value="12" >12</option>
          <option value="13" >13</option>
          <option value="14" >14</option>
          <option value="15" >15</option>
          <option value="16" >16</option>
          <option value="17" >17</option>
          <option value="18" >18</option>
          <option value="19" >19</option>
          <option value="20" >20</option>
          <option value="21" >21</option>
          <option value="22" >22</option>
          <option value="23" >23</option>
          <option value="24" >24</option>
          <option value="25" >25</option>
          <option value="26" >26</option>
          <option value="27" >27</option>
          <option value="28" >28</option>
          <option value="29" >29</option>
          <option value="30" >30</option>
          <option value="31" >31</option>
        </select>
        <input type="hidden" name="signdate" size="20">
      </td>
      <td align="center" width="14%">合同期限</td>
      <td width="33%"> 
        <input type="text" name="textfield" size="30" maxlength="20">
      </td>
    </tr>
    <tr> 
      <td width="19%" height="50" align="center">备&nbsp;&nbsp;&nbsp;&nbsp;注 </td>
      <td colspan="3" height="50"> 
        <textarea rows="5" name="remark" cols="80"></textarea>
      </td>
    </tr>
    <input type="hidden" name="kindnum" value="<%=kindnum%>">
    <input type="hidden" name="kindname" value="<%=kindname%>">
  </table>
<SCRIPT language=Javascript> existedData(); </SCRIPT><br>
<table width="200" border="1"  align="center" bgcolor="#d4d0c8" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="2">
  <tr> 
    <td align="center"><a style="cursor:hand" onclick="CheckForm(form1)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image91','','/pmsApp/images/button_save_over.gif',1)"           ><img name="Image91" border="0" src="/pmsApp/images/button_save.gif" width="55" height="20"></a><a href="javascript:history.back()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','/pmsApp/images/button_cancel_over.gif',1)"><img name="Image2" border="0" src="/pmsApp/images/button_cancel.gif" width="55" height="20"></a></td> 
  </tr> 
</table>
</form> 
</body> 
</html> 

⌨️ 快捷键说明

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