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

📄 editunit.vm

📁 负责公文的传输及一些处理功能
💻 VM
字号:
<HTML>
<HEAD>
<title>单位信息</title>
<link rel="stylesheet" type="text/css" href="$request.getContextPath()/csslib/style.css">
<script Language="JavaScript" src="$request.getContextPath()/jslib/function.js"></script>
<script language="javascript">
function init(){
     var exception = thisForm.exception.value;
     if(exception != ""){
       alert(exception);
     }
	if(thisForm.unitId.value=="" || thisForm.unitId.value==null){
		thisForm.printNumber.value="5";
		thisForm.managerPwd.disabled = false;
    	thisForm.pwdConfirm.disabled = false;
		thisForm.chkPwd.disabled = true;
	}else{
		thisForm.managerPwd.disabled = true;
    	thisForm.pwdConfirm.disabled = true;
		thisForm.chkPwd.disabled = false;
	}
}
function submit_onclick(){
	if (check()){
		if(thisForm.unitId.value=="" || thisForm.unitId.value==null){
			thisForm.fatherId.value="$!userinfo.getUnit().getUnitId()";
			thisForm.unitId.value="0";
		}
	thisForm.action="$request.getContextPath()/viewListUnit.do?method=saveUnit";
    thisForm.submit();
  }
}
function check(){
  if(trim(thisForm.unitName.value)==""){
    alert("单位名称不能为空!");
    thisForm.unitName.focus();
    return false;;
  }
  if(trim(thisForm.managerAccount.value)==""){
    alert("单位管理员帐号不能为空!");
    thisForm.managerAccount.focus();
    return false;;
  }
  if((thisForm.telephone.value=="")||(trim(thisForm.telephone.value)=="")){
    alert("单位电话不能为空!");
    thisForm.telephone.focus();
    return false;;
  }
  if((thisForm.unitMaster.value=="")||(trim(thisForm.unitMaster.value)=="")){
    alert("单位联系人不能为空!");
    thisForm.unitMaster.focus();
    return false;;
  }
  if(!isInt(thisForm.unitXh.value)){
    alert("单位序号应该录入整数!");
    thisForm.unitXh.value="";
    thisForm.unitXh.focus();
    return false;;
  }
  if(thisForm.managerAccount.value==""){
    alert("单位管理员帐号不能为空!");
    thisForm.managerAccount.focus();
    return false;;
  }
  if(!isInt(trim(thisForm.printNumber.value))){
    alert("打印份数应该录入整数!");
    thisForm.printNumber.value="";
    thisForm.printNumber.focus();
    return false ;
  }
  if(isIncludePoint(thisForm.printNumber.value)){
    alert("打印份数不能包含小数点!");
    thisForm.printNumber.value="";
    thisForm.printNumber.focus();
    return false ;
  }
  if(!isInt(trim(thisForm.printNumber.value)) || trim(thisForm.printNumber.value)=="" ){
      alert("所访问页数必须是整数!");
	  thisForm.printNumber.focus();
      return false;
  }
  if(thisForm.chkPwd.disabled == true || thisForm.chkPwd.checked ){
      if(thisForm.managerPwd.value==""){
          alert("用户的密码不能为空!");
          thisForm.managerPwd.focus();
          return false;
       }
       if(thisForm.managerPwd.value.length>0 && thisForm.managerPwd.value.length<5){
          alert("为了确保安全,用户的密码位数应该在五位以上,请重输!");
          thisForm.managerPwd.focus();
          return false;
        }
	   if(thisForm.pwdConfirm.value==""){
          alert("请输入确认密码!");
          thisForm.pwdConfirm.focus();
          return false;
       }
       if (thisForm.managerPwd.value != thisForm.pwdConfirm.value){
           alert("两次输入密码不一致!");
           thisForm.managerPwd.focus();
           return false;
		}
	}else{
		thisForm.managerPwd.disabled = true;
	}
    return true;
}
function chkPassword_onclick(){
  if(thisForm.chkPwd.checked){
    thisForm.managerPwd.disabled = false;
    thisForm.pwdConfirm.disabled = false;
  }
  else{
    thisForm.managerPwd.disabled = true;
    thisForm.pwdConfirm.disabled = true;
  }
}
</script>
</HEAD>
</style>
<body scroll=no onload="init()">
<br>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr><td><img src="$request.getContextPath()/image/point.gif" >直属单位信息</td></tr>
</table>
<p><hr width="95%" size="1" color=black></p>
<form  method="post" name="thisForm" >
<input type=hidden name=unitId value="$!unit.unitId">
<input type=hidden name=fatherId value="$!unit.fatherId">
<input type=hidden name=allFatherId value="$!userinfo.getUnit().getAllFatherId(),$!userinfo.getUnit().getUnitId()">
<input type=hidden name=unitType  value="0">
<input type=hidden name=unitStyle  value="1">
<input type=hidden name=exception value="$!exception">
<table cellSpacing=0 cellPadding=0 width=600  border=0 bgColor=#000000 align="center">
  <tr>
    <td align=center>
       <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#7c8aa4" align="center">
            <TBODY>
               <tr bgcolor="#ffffff" height=28>
                   <td width="20%" align=right><font color=red>*</font>单位名称&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td colspan=3 ><input type="text" name="unitName" maxlength=100 value="$!unit.unitName" class="inputStyle" style="width:435"></td>
               </tr>
               <tr bgcolor='#FFFFFF' height=28>
                   <td width="20%" align=right>单位序号&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td><input type="text" name="unitXh" maxlength=50 value="$!unit.unitXh" class="inputStyle"  style="width:140"></td>
                   <td align=right><font color=red>*</font>管理员帐号&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td><input type="text" name="managerAccount" maxlength=50 value="$!unit.managerAccount" class="inputStyle" style="width:140"></td>
               </tr>
               <tr bgcolor='#FFFFFF' height=28>
                   <td align=right>打印份数&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td><input type="text" name="printNumber" maxlength=50 value="$!unit.printNumber" class="inputStyle" style="width:140"></td>
                    <td align=right><font color=red>*</font>管理员密码&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td>
                      <input type="password" name="managerPwd" maxlength="15" value="" class="inputStyle" style="width:140">
                   </td>
               </tr>
			   <tr bgcolor='#FFFFFF' height=28>
                   <td align=right><font color=red>*</font>单位电话&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td><input type="text" name="telephone" maxlength=50 value="$!unit.telephone" class="inputStyle" style="width:140"></td>
                    <td align=right><font color=red>*</font>请确认密码&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td>
                      <input type="password" name="pwdConfirm" maxlength="15" value="" class="inputStyle" style="width:140">
                      <input type="checkbox" style="border:0" id=chkPwd name=chkPwd onclick="chkPassword_onclick()" title="选中修改密码">
                   </td>
             </tr>
               <tr bgcolor='#FFFFFF' height=28>
                   <td align=right>邮政编码&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td ><input type="text" name="postcode" maxlength=50 value="$!unit.postcode" class="inputStyle" style="width:140"></td>
                   <td align=right><font color=red>*</font>单位联系人&nbsp;&nbsp;&nbsp;&nbsp;</td>
                   <td><input type="text" name="unitMaster" maxlength=50 value="$!unit.unitMaster" class="inputStyle" style="width:140"></td>
               </tr>
               <tr bgcolor='#FFFFFF' height=28>
                  <td align=right>电子信箱&nbsp;&nbsp;&nbsp;&nbsp;</td>
                  <td colspan=3><input type="text" name="unitEmail" maxlength=100 value="$!unit.unitEmail" class="inputStyle"  style="width:435"></td>
               </tr>
               <tr bgcolor='#FFFFFF' height=28>
                  <td align=right>单位地址&nbsp;&nbsp;&nbsp;&nbsp;</td>
                  <td colspan=3><input type="text" name="addRess" maxlength=100 value="$!unit.addRess" class="inputStyle"  style="width:435"></td>
               </tr>
               <tr bgcolor='#FFFFFF' height=28>
                  <td align=right>备注信息&nbsp;&nbsp;&nbsp;&nbsp;</td>
                  <td colspan=3><input type="text" name="memo" maxlength=100 value="$!unit.memo" class="inputStyle"  style="width:435"></td>
               </tr>
               <tr align="center" valign="bottom">
                  <td align=center  colspan="4" height=20 bgcolor='#FFFFFF'>
					<input type=button name=save value="保&nbsp;存" onclick="submit_onclick()">
                    <input type=button name=back value="返&nbsp;回" onclick="history.back()">
                  </td>
               </tr>
            </TBODY>
       </TABLE>
    </TD>
  </TR>
</table>
</form>
<p><hr width="95%" size="1" color=black></p>
</body>
</html>

⌨️ 快捷键说明

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