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

📄 editrole.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);
 }
 var allCHK = document.body.all.tags('INPUT');
 var content = thisForm.content.value;
 if(content != ""){
   var strIds = content.split(",");
   for(k=0;k<strIds.length;k++){
     for(i=0;i<allCHK.length;i++){
       if(allCHK[i].type.toUpperCase()=="CHECKBOX"  &&  allCHK[i].name=="box"  && allCHK[i].value==strIds[k]) {
         allCHK[i].checked=true ;
       }
     }
   }
 }
}
function submit_onclick(){
  if (check()){
    thisForm.submit();
  }
}
function check(){
  if (thisForm.roleName.value == ""||trim(thisForm.roleName.value)==""){
    alert("请填写角色名称!");
    thisForm.roleName.focus();
    return false;
  }
  thisForm.content.value=getRole();
  thisForm.submit();
}
function doReturn(){
  history.back();
}
function getRole(){
  var allCHK = document.body.all.tags('INPUT');
  var lstr = "" ;
  for(i=0;i<allCHK.length;i++){
    if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].checked==true){
       if (lstr==""){
          lstr = allCHK[i].value;}
       else {lstr= lstr + "," + allCHK[i].value;     }
     }
  }
  return lstr ;
}
function getchk(ckName,bselect){
  var allCHK = document.body.all.tags('INPUT');
  var lstr = "" ;
  for(i=0;i<allCHK.length;i++){
     if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].name=="box" && !(allCHK[i].value=="411")) {
        allCHK[i].checked=bselect ;
     }
  }
}
function getselect(ckName,bselect){
  var allCHK = document.body.all.tags('INPUT');
  if(ckName==212 || ckName==213 || ckName==214){
    for(i=0;i<allCHK.length;i++){
      if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].name=="box" && (allCHK[i].value=="211" || allCHK[i].value=="215" || allCHK[i].value=="216")) {
         if (bselect) allCHK[i].checked=true ;
      }
    }
  }
  if(ckName==222 || ckName==225 || ckName==226){
    for(i=0;i<allCHK.length;i++){
      if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].name=="box" && (allCHK[i].value=="221" || allCHK[i].value=="223" || allCHK[i].value=="224")) {
         if (bselect) allCHK[i].checked=true ;
      }
    }
  }
  if(ckName==232 || ckName==235 || ckName==236){
    for(i=0;i<allCHK.length;i++){
      if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].name=="box" && (allCHK[i].value=="231" || allCHK[i].value=="233" || allCHK[i].value=="234")) {
         if (bselect) allCHK[i].checked=true ;
      }
    }
  }
  if(ckName==244 || ckName==245 || ckName==246){
    for(i=0;i<allCHK.length;i++){
      if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].name=="box" && (allCHK[i].value=="241" || allCHK[i].value=="242" || allCHK[i].value=="243")) {
         if (bselect) allCHK[i].checked=true ;
      }
    }
  }
  if(ckName==112 || ckName==113){
    for(i=0;i<allCHK.length;i++){
      if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].name=="box" && (allCHK[i].value=="111" || allCHK[i].value=="114" || allCHK[i].value=="115")) {
         if (bselect) allCHK[i].checked=true ;
      }
    }
  }
  if(ckName==122 || ckName==123){
    for(i=0;i<allCHK.length;i++){
      if(allCHK[i].type.toUpperCase()=="CHECKBOX" && allCHK[i].name=="box" && (allCHK[i].value=="121" || allCHK[i].value=="124" || allCHK[i].value=="125")) {
         if (bselect) allCHK[i].checked=true ;
      }
    }
  }
}
</script>
</head>
<body onload="init()" scroll="no">
<br><br><br>
<form action="$request.getContextPath()/roleAction.do" method="post" name="thisForm">
<input type=hidden name=method value="saveRole">
<input type=hidden name=roleId value="$!role.getRoleId()">
<input type=hidden name=exception value="$!exception">
<input type=hidden name=unitId value="$!userinfo.getUnit().getUnitId()">
<input type=hidden name=content value="$!role.getContent()">
<input type=hidden name=fileType value="$!role.getFileType()">
<table width="90%" border="0" cellspacing="1" cellpadding="3" bgcolor="#000000" align=center>
  <tr height=28  bgcolor="#F0F0F0">
    <td align=center colspan=6><font color=black size=3><b>角&nbsp;色&nbsp;编&nbsp;辑</b></font></td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF">
    <td align=right ><font color="#FF0000">*</font>角色名称:</td>
    <td colspan=5><input type="text" name="roleName" maxlength="15"  value="$!role.getRoleName()" class="inputStyle"></td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF">
    <td align=right>&nbsp;角色描述:</td>
    <td colspan=5><input type="text" name="memo" maxlength="50" value="$!role.getMemo()" class="inputStyle"></td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF">
      <td align=right>功&nbsp;能&nbsp;组:</td>
      <td align=center>系统功能</td>
      <td align=center  colspan=4>权限设置&nbsp;&nbsp;&nbsp;<input name="quanxuan" type="checkbox" value="quanxuan" onclick="getchk(this.value,this.checked)" style="border:#000000">全选</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td rowspan=4>发文管理</td>
      <td><input name="box" type="checkbox" value="211">发文登记</td>
      <td><input name="box" type="checkbox" value="212" onclick="getselect(this.value,this.checked)">创建</td>
      <td><input name="box" type="checkbox" value="213" onclick="getselect(this.value,this.checked)">修改</td>
      <td width=15%><input name="box" type="checkbox" value="215" onclick="getselect(this.value,this.checked)">查看</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td><input name="box" type="checkbox" value="221">审核文件</td>
      <td><input name="box" type="checkbox" value="222" onclick="getselect(this.value,this.checked)">审核</td>
      <td>&nbsp;</td>
      <td><input name="box" type="checkbox" value="223">查看</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td><input name="box" type="checkbox" value="231">待发文件</td>
      <td><input name="box" type="checkbox" value="232" onclick="getselect(this.value,this.checked)">发送</td>
      <td>&nbsp;</td>
      <td><input name="box" type="checkbox" value="233">查看</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td><input name="box" type="checkbox" value="241">已发文件</td>
      <td><input name="box" type="checkbox" value="244" onclick="getselect(this.value,this.checked)">补发</td>
      <td><input name="box" type="checkbox" value="246" onclick="getselect(this.value,this.checked)">汇总</td>
      <td><input name="box" type="checkbox" value="242">查看</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td rowspan=2>收文管理</td>
      <td><input name="box" type="checkbox" value="111">待签文件</td>
      <td><input name="box" type="checkbox" value="112" onclick="getselect(this.value,this.checked)">签收</td>
      <td><input name="box" type="checkbox" value="113" onclick="getselect(this.value,this.checked)">退文</td>
      <td><input name="box" type="checkbox" value="114">查看</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td><input name="box" type="checkbox" value="121">已签文件</td>
      <td><input name="box" type="checkbox" value="122" onclick="getselect(this.value,this.checked)">打印</td>
      <td><input name="box" type="checkbox" value="123" onclick="getselect(this.value,this.checked)">汇总</td>
      <td><input name="box" type="checkbox" value="124">查看</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td>查询统计</td>
      <td><input name="box" type="checkbox" value="312">文件查询</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
  </tr>
  <tr height=25  bgcolor="#FFFFFF" align=center>
      <td rowspan=5>系统管理</td>
      <td><input name="box" type="checkbox" value="411">系统管理</td>
      <td>&nbsp;&nbsp;&nbsp;&nbsp;<input name="box" type="checkbox" value="412">用户字典</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
  </tr>
</table>
<table align=center width=95% border=0>
  <tr>
    <td><hr width="100%" size="1" color=black></td>
  </tr>
  <tr>
    <td align=right><input type=button  onclick="submit_onclick()"  value="保 存" >&nbsp;&nbsp;<input type=button  onclick="doReturn()"   value="取 消">&nbsp;&nbsp;&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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