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

📄 edituser.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 window_onload(){
  var exception = thisForm.exception.value;
  if(exception != ""){
    alert(exception);
  }
  selectByValue("deptId", "$!user.getDeptId()");
  #if($user.getUserId().toString().equals("0"))
    thisForm.showPassWord.disabled = false;
  #else
    thisForm.showPassWord.disabled = true;
  #end
}
function submit_onclick(){
  if (check()){
    //thisForm.account.value = trim(thisForm.account.value);
    thisForm.submit();
  }
}
function check(){
  if (trim(thisForm.account.value) == ""){
    alert("请填写人员帐号!");
    thisForm.account.focus();
    return false;
  }
  if(!checkString(thisForm.account.value))
  {
    alert('人员帐号不能包含特殊字符!');
    return false;
  }
  if (trim(thisForm.userName.value) == ""){
    alert("请填写人员姓名!");
    thisForm.userName.focus();
    return false;
  }
  if (trim(thisForm.deptId.value) == ""){
    alert("请选择人员所属部门(如果没有部门则请先建立部门)!");
    thisForm.deptId.focus();
    return false;
  }
  if (trim(thisForm.roleId.value) == ""){
    alert("请选择人员所属角色(如果没有角色则请先建立角色)!");
    thisForm.roleId.focus();
    return false;
  }
  thisForm.showPassWord.value=ignoreSpaces(thisForm.showPassWord.value);
  if (thisForm.showPassWord.value=="" && thisForm.showPassWord.disabled==false){
    alert("请您输入用户密码!");
    thisForm.showPassWord.focus();
    return false;
  }
  if (trim(thisForm.showPassWord.value).length>0 && trim(thisForm.showPassWord.value).length<5){
    alert("为了确保安全,用户的密码位数应该在五位以上,请重输!");
    thisForm.showPassWord.focus();
    return false;
  }
  return true;
}
function chkPassword_onclick(){
  if(thisForm.chkPwd.checked){
    thisForm.showPassWord.disabled = false;
  }
  else{
    thisForm.showPassWord.disabled = true;
  }
}
function doReturn(){
  history.back();
}
function DoCal(elTarget) {
  if (!window.showModalDialog)	return;
  var sRtn;
  //指定起始、结束年份以及缺省日期
  var defaultValue = elTarget.value;
  if(defaultValue == "")
    defaultValue = "1970-1-1";
  sRtn = showModalDialog("$request.getContextPath()/include/calendar.jsp?beginYear=1920&endYear=2020&defaultDate=" + defaultValue, "", "help=no;status=no;center=yes;dialogWidth=200pt;dialogHeight=180pt");

  if (sRtn!="")
	elTarget.value = sRtn;
 }
</script>
</head>
<body  onload="window_onload();">
<form action="$request.getContextPath()/useradmin.do?method=saveuser" method="post" name="thisForm">
<input type=hidden name=userId value="$!user.getUserId()">
<input type=hidden name=unitId value="$!userinfo.getUnit().getUnitId()">
<input type=hidden name=status value=0>
<input type=hidden name=passWord value="$!user.getPassWord()">
<input type=hidden name=exception value="$!exception">
<table width="90%" border="0"  align="center" cellpadding="0" cellspacing="0">
<tr><td><img src="$request.getContextPath()/image/p_you.jpg" width="67" height="57"></td></tr>
</table>
<p><hr width="90%" size="1" color=black></p>
<table width="60%" border="0"  align="center" cellpadding="0" cellspacing="0">
<tr>
  <td align=right><font color="#FF0000">*</font>&nbsp;所属部门:</td>
  <td>
     <select name=deptId style="padding:0; width: 130; height: 51; background-color:#DEDFDE; font-size:9pt" >
     #foreach($dept in $!deptlist)
       <option value="$!dept.getUnitId()">$!dept.getUnitName()</option>
     #end
  </td>
  <td align=right><font color="#FF0000">*</font>&nbsp;帐号:</td>
  <td>
    <input type="text" name="account" maxlength="15" value="$!user.getAccount()" size=15>
  </td>
</tr>
<tr>
  <td align=right><font color="#FF0000">*</font>&nbsp;姓名:</td>
  <td>
    <input type="text" name="userName" maxlength="10" value="$!user.getUserName()"  size=15>
  </td>
  <td align=right><font color="#FF0000">*</font>&nbsp;密码:</td>  
  <td>
    #if($user.getUserId().toString().equals("0"))
      <input type="password" name="showPassWord" maxlength="15" value="" onkeypress="return handleEnter(this, event)" size=15>
    #else
	  <input type="password" name="showPassWord" maxlength="15" value="" size=15>
      <input type="checkbox" style="border:0" id=chkPwd name=chkPwd onclick="chkPassword_onclick()" title="选中修改密码">
    #end
  </td>
</tr>
<tr>
  <td align=right><font color="#FF0000">*</font>&nbsp;所属角色:</td>
  <td>
      <select name="roleId" style="padding:0; width: 130; height: 51; background-color:#DEDFDE; font-size:9pt" >
      #foreach($role in $!rolelist)
       <option value="$!role.getRoleId()">$!role.getRoleName()</option>
      #end
      </select>
  </td>
  <td align=right>性别:</td>
  <td>
      <select name="sex" style="padding:0; width: 130; height: 51; background-color:#DEDFDE; font-size:9pt" >
      <option value="0">男</option>
      <option value="1">女</option>
      </select>
  </td>
</tr>
<tr >
  <td align=right>职务:</td>
  <td >
    <input type="text" name="position" maxlength="15" value="$!user.getPosition()"  size=15>
  </td>
  <td align=right>办公电话:</td>
  <td>
    <input type="text" name="officeTel" maxlength="15" value="$!user.getOfficeTel()"  size=15>
  </td>
</tr>
<tr>
  <td align=right>住宅电话:</td>
  <td>
    <input type="text" name="homeTel" maxlength="15" value="$!user.getHomeTel()"  size=15>
  </td>
  <td align=right>手机:</td>
  <td>
    <input type="text" name="mobile" maxlength="15" value="$!user.getMobile()"  size=15>
  </td>
</tr>
<!--tr>
  <td align=right>备注:</td>
  <td colspan=3>
    <input type="text" name="memo" maxlength="15" value="$!user.getMemo()"  size=43>
  </td>
</tr-->
<tr height=8><td colspan=4><hr size=1 color=black></td></tr>
<tr>
  <td align=center colspan=4>
    <input type=button  onclick="submit_onclick()" value="保&nbsp;存">
    &nbsp;&nbsp;
    <input type=button  onclick="doReturn()"  value="取&nbsp;消">
  </td>
</tr>
</table>
<p><hr width="90%" size="1" color=black></p>
</form>
</body>
</html>

⌨️ 快捷键说明

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