?? editunit.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>單位名稱 </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>單位序號 </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>管理員帳號 </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>打印份數 </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>管理員密碼 </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>單位電話 </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>請確認密碼 </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>郵政編碼 </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>單位聯系人 </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>電子信箱 </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>單位地址 </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>備注信息 </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="保 存" onclick="submit_onclick()">
<input type=button name=back value="返 回" 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 + -