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

📄 user_editor.jsp

📁 Jbuilder2006开发的严格按MVC设计模式组织开发过程
💻 JSP
字号:
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@taglib uri="/WEB-INF/struts-nested.tld" prefix="nested"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/tops.tld" prefix="tops"%>
<%@page contentType="text/html; charset=GBK"%>
<html:html>
  <head>
  <html:base/>
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  <tops:includeCSS fileName="style"/>
  <tops:includeJs fileName="common"/>
  <tops:includeJs fileName="keyCode"/>
    <tops:includeJs fileName="validateForm"/>
  <tops:includeAjaxRequiredFiles fileName="AjaxTopsSystemUser"/>
  <tops:ajaxUniqueDataValidate ajaxActionName="AjaxTopsSystemUser" ajaxMethodName="isLogonidExist" elementId="loginId" uniqueDataNotPresentMsg="恭喜你,可以使用该帐号!" uniqueDataPresentMsg="对不起,该帐号已经存在!" uniqueDataNotPresentSubmit="false"/>
  <tops:ajaxSuggest ajaxActionName="AjaxTopsSystemUser" ajaxMethodName="loadEmForSuggest" elementId="userName" otherEvent="splict()"/>
<script language="JavaScript" type="text/javascript">
function splict(){
  var str=document.all.userName.value;
  var name=str.substring(0,str.indexOf("_"));
  var id=str.substring(str.indexOf("_")+1,str.length);
  document.all.userName.value=name;
  document.all.emId.value=id;
}
function selectWgChanged(){
  var wgname=document.all.wgUuid.options[document.all.wgUuid.selectedIndex].text;
  parent.parent.topFrame.document.all.tbMsg.style.display="";
  AjaxTopsSystemUser.wgChanged(document.all.wgUuid.value,WgChangedFinish);
}

function WgChangedFinish(data){
  for(var i=0;i<data.length;i++){
    var obj=document.getElementsByName(data[i].funcCode);
    if(data[i].virtualEnabled==true){
      obj[0].checked=true;
    }else{
      obj[0].checked=false;
    }
  }
  parent.parent.topFrame.document.all.tbMsg.style.display="none";
}

function systemChanged(sysId){
  var sysObj=document.getElementsByName(sysId);
  var moduleIndex=0,operatorIndex=0;
  if(sysObj[0].checked==true){
    while(true){
      moduleIndex++;
      var strmoduleIndex=moduleIndex.toString();
      while(strmoduleIndex.length<2){
        strmoduleIndex='0'+strmoduleIndex;
      }
      var moduleObj=document.getElementsByName(sysId+"."+strmoduleIndex);
      if(moduleObj[0]==null || typeof(moduleObj)=="undefined"){
        break;
      }else{
        moduleObj[0].checked=true;
        operatorIndex=0;
        while(true){
          operatorIndex++;
          var stroperatorIndex=operatorIndex.toString();
          while(stroperatorIndex.length<2){
            stroperatorIndex='0'+stroperatorIndex;
          }
          var operatorObj=document.getElementsByName(sysId+"."+strmoduleIndex+"."+stroperatorIndex);
          if(operatorObj[0]==null || typeof(operatorObj)=="undefined"){
            break;
          }else{
            operatorObj[0].checked=true;
          }
        }
      }
    }
  }else{
    while(true){
      moduleIndex++;
      var strmoduleIndex=moduleIndex.toString();
      while(strmoduleIndex.length<2){
        strmoduleIndex='0'+strmoduleIndex;
      }
      var moduleObj=document.getElementsByName(sysId+"."+strmoduleIndex);
      if(moduleObj[0]==null || typeof(moduleObj)=="undefined"){
        break;
      }else{
        moduleObj[0].checked=false;
        operatorIndex=0;
        while(true){
          operatorIndex++;
          var stroperatorIndex=operatorIndex.toString();
          while(stroperatorIndex.length<2){
            stroperatorIndex='0'+stroperatorIndex;
          }
          var operatorObj=document.getElementsByName(sysId+"."+strmoduleIndex+"."+stroperatorIndex);
          if(operatorObj[0]==null || typeof(operatorObj)=="undefined"){
            break;
          }else{
            operatorObj[0].checked=false;
          }
        }
      }
    }
  }
}

function moduleChanged(moduleId){
  var moduleObj=document.getElementsByName(moduleId);
  var operatorIndex=0;
  if(moduleObj[0].checked==true){
    while(true){
      operatorIndex++;
      var stroperatorIndex=operatorIndex.toString();
      while(stroperatorIndex.length<2){
        stroperatorIndex='0'+stroperatorIndex;
      }
      var operatorObj=document.getElementsByName(moduleId+"."+stroperatorIndex);
      if(operatorObj[0]==null || typeof(operatorObj)=="undefined"){
        break;
      }else{
        operatorObj[0].checked=true;
      }
    }
  }else{
    while(true){
      operatorIndex++;
      var stroperatorIndex=operatorIndex.toString();
      while(stroperatorIndex.length<2){
        stroperatorIndex='0'+stroperatorIndex;
      }
      var operatorObj=document.getElementsByName(moduleId+"."+stroperatorIndex);
      if(operatorObj[0]==null || typeof(operatorObj)=="undefined"){
        break;
      }else{
        operatorObj[0].checked=false;
      }
    }
  }
}

</script>
  </head>
  <body>
  <html:form action="/actTopsSystemUser" method="post">
    <html:hidden property="id"/>
    <html:hidden property="method"/>
    <input type="hidden" name="departmentid" value="<%=request.getAttribute("deptId")%>"/>
    <tops:showPageFunction pageFunction="系统维护——用户管理 "/>
    <tops:toolbar>
      <tops:toolbutton caption="保存" image="page_save" confirm="确定保存该用户信息吗?" checkAtClient="true"/>
      <tops:toolbutton caption="返回" image="arrow_undo" onClick="history.go(-1)"/>
    </tops:toolbar>
    <table width="100%" border="0" cellpadding="0" cellspacing="1">
      <tr>
        <td colspan="8" align="center" nowrap class="head">用户信息</td>
      </tr>
      <tr>
        <td align="center" height="20" width="12%">员工姓名</td>
        <td width="35%">
          <tops:formEditor property="userName" tabsequence="1" other="style='width:100%'"/>
          <html:hidden property="emId"/>
        </td>
        <td align="center">帐号是否启用</td>
        <td>
          <tops:formSelector property="enable">
            <tops:formSelectOption value="1" label="是"/>
            <tops:formSelectOption value="0" label="否"/>
          </tops:formSelector>
        </td>
      </tr>
      <tr>
        <td align="center" height="20">系统帐号</td>
        <td>
          <tops:formEditor property="loginId" required="true" tabsequence="2" attributename="系统帐号"/>
          <input type="button" value="验证帐号" onclick="AjaxTopsSystemUser_isLogonidExist()"/>
        </td>
        <td align="center">登陆密码</td>
        <td colspan="3">
          <tops:formEditor property="pwd" required="true" tabsequence="3" attributename="登陆密码"/>
        </td>
      </tr>
      <tr>
        <td align="center">最后登陆时间</td>
        <td>
          <tops:formEditor property="fd_RecentLoginTime" readonlymethods="addresult-modifyresult"/>
        </td>
        <td align="center" height="20">工作组</td>
        <td colspan="3">
          <tops:formSelector property="wgUuid" other="onchange='selectWgChanged()'">
            <tops:formSelectOption value="" label="--请选择工作组--"/>
            <tops:formSelectOption listName="wgList" labelProperty="wgName" valueProperty="id"/>
          </tops:formSelector>
        </td>
      </tr>
    </table>
    <table cellpadding="0" cellspacing="1" border="0" width="100%">
      <tr>
        <td align="center" nowrap class="head">用  户 权 限</td>
      </tr>
    </table>
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
      <tr>
        <td width="80%" align="center">
          <table cellpadding="0" cellspacing="0" border="0" width="80%">
            <tr align="left">
              <td height="20">
                 <logic:notEmpty name="functionList">
                <%boolean flag = false;                %>
                  <logic:iterate id="system" name="functionList" indexId="index">
                    <logic:equal value="0" name="system" property="funcLevel">
                      <br/>
                      <span><font color="#00000" size="+1" style="font:bold"> <logic:equal value="true" name="system" property="virtualEnabled"> <input type="checkbox" value="<bean:write name="system" property="funcCode"/>" style="border:0" name="<bean:write name="system" property="funcCode"/>" onclick="systemChanged('<bean:write name="system" property="funcCode"/>')" checked/> </logic:equal> <logic:notEqual value="true" name="system" property="virtualEnabled"> <input type="checkbox" value="<bean:write name="system" property="funcCode"/>" style="border:0" name="<bean:write name="system" property="funcCode"/>" onclick="systemChanged('<bean:write name="system" property="funcCode"/>')"/> </logic:notEqual> <bean:write name="system" property="funcCode"/>(<bean:write name="system" property="funcName"/>)</font></span>
                    </logic:equal>
                    <logic:notEqual value="0" name="system" property="funcLevel">
                    <logic:equal value="否" name="system" property="isSubFunction">
                      <br/>
                      &nbsp;&nbsp;
                      &nbsp;&nbsp;
                    <%flag = !flag;                    %>
                      <span> <%if(flag==true){ %> <font color="#CC6666" style="font:bold"> <%}else{ %> <font color="#CC9966" style="font:bold"> <%} %> ☆ <logic:equal value="true" name="system" property="virtualEnabled"> <input type="checkbox" value="<bean:write name="system" property="funcCode"/>" style="border:0" name="<bean:write name="system" property="funcCode"/>" onclick="systemChanged('<bean:write name="system" property="funcCode"/>')" checked/> </logic:equal> <logic:notEqual value="true" name="system" property="virtualEnabled"> <input type="checkbox" value="<bean:write name="system" property="funcCode"/>" style="border:0" name="<bean:write name="system" property="funcCode"/>" onclick="systemChanged('<bean:write name="system" property="funcCode"/>')"/> </logic:notEqual> <bean:write name="system" property="funcCode"/>(<bean:write name="system" property="funcName"/>)</font></span>
                      &nbsp;&nbsp;
                      &nbsp;&nbsp;
                    </logic:equal>
                    <logic:equal value="是" name="system" property="isSubFunction">
                      <div>                        &nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;
                        <span> <font color="#666699">★ <logic:equal value="true" name="system" property="virtualEnabled"> <input type="checkbox" value="<bean:write name="system" property="funcCode"/>" style="border:0" name="<bean:write name="system" property="funcCode"/>" onclick="systemChanged('<bean:write name="system" property="funcCode"/>')" checked/> </logic:equal> <logic:notEqual value="true" name="system" property="virtualEnabled"> <input type="checkbox" value="<bean:write name="system" property="funcCode"/>" style="border:0" name="<bean:write name="system" property="funcCode"/>" onclick="systemChanged('<bean:write name="system" property="funcCode"/>')"/> </logic:notEqual> <bean:write name="system" property="funcCode"/>(<bean:write name="system" property="funcName"/>)</font> </span>
                      </div>
                    </logic:equal>
                    </logic:notEqual>
                  </logic:iterate>
                </logic:notEmpty>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </html:form>
  </body>
</html:html>

⌨️ 快捷键说明

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