employee_group.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:6k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex"%>
  2. <%@ taglib uri="/vnex_employee_group.tld" prefix="employeeGroup"%>
  3. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  4. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  5. <%
  6.      String pageTo = "/mainctrl/employeegroup/home?a";
  7.      String start = "1";
  8.      if(request.getParameter("start") != null)
  9.         start = request.getParameter("start");
  10. %>
  11. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  12. <HTML>
  13. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  14. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  15. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  16. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  17. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  18. <script language="JavaScript">
  19. function addToGroup(form)
  20. {
  21.    if(checkIt(form))
  22.    {
  23.       form.action = "/mainctrl/employeegroup/create";
  24.       form.submit();
  25.    }
  26. }
  27.  
  28. function checkIt(form)
  29. {
  30.    if(isEmpty(form.groupName.value) || isEmptyStr(form.groupName.value))
  31.    {
  32.       alert("组名不能为空.");
  33.       form.groupName.focus();
  34.       return false;
  35.    }
  36.    if(isContainInvalidChar(form.groupName.value, "'"))
  37.    {
  38.       alert("组名中不能包含单引号");
  39.       form.groupName.focus();
  40.       return false;
  41.    }
  42.    return true;
  43. }
  44. function deleteThem(form)
  45. {
  46.    if(form.groupIds == null)
  47.    {
  48.       alert("目前尚未有记录可供删除");
  49.       return;
  50.    }
  51.    if(!isChecked(form.groupIds))
  52.    {
  53.       alert("请至少选择一条记录进行删除");
  54.       return;
  55.    }
  56.    if(confirm("是否删除所选组别?"))
  57.    {
  58.       form.action="/mainctrl/employeegroup/delete";
  59.       form.submit();
  60.    }   
  61. }
  62. function SelectAll(form)
  63. {
  64.   for (var i=0;i<form.elements.length;i++)
  65.   {
  66.     var e = form.elements[i];
  67.     if (e.name != 'C1')
  68.        e.checked = form.C1.checked;
  69.   }
  70. }
  71. </script>
  72. <DIV align=center>
  73. <form name="form1" method="post" action="">
  74.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  75.     <TBODY>
  76.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  77.     <TR> 
  78.         <TD colSpan=3 align="center"><br>
  79.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  80.             <tr> 
  81.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  82.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  83.                   <tr bgcolor="#666666"> 
  84.                       <td colspan="2"><font class="strongw">
  85.                        <a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;
  86.                        <a href="/mainctrl/public/main"><font color="#ffffff">公用信息</font></a>&gt;&gt;
  87.                        员工通讯组</font>
  88.                       </td>
  89.                   </tr>
  90.                 </table>
  91.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  92.                    <tr bgcolor="#fafafa" height="30">
  93.                       <td><strong>&nbsp;添加新组名:(不可以重名)</strong>
  94.                  <input type="text" name="groupName" maxlength="50" size="15" class="text">&nbsp;
  95.                  <input type="button" name="button1" value="新增" class="text" onclick="addToGroup(this.form)">
  96.               </td>
  97.                    </tr>
  98.                 </table>
  99.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  100.                    <tr bgcolor="#fafafa" height="30">
  101.                       <td colspan="2">&nbsp;
  102.                           <input type="button" name="Button2" value="删除" onClick="deleteThem(this.form)" class="text">
  103.                       </td>
  104.                    </tr>
  105.                    <tr> 
  106.                       <td height="12" width="7%" align="center"><strong>选择</strong></td>
  107.                       <td height="12" align="center"><strong>通讯组</strong></td>
  108.                    </tr>
  109.                    <employeeGroup:employeeGroupList>
  110.                    <vnex:items paging="true">
  111.                    <tr bgcolor="<vnex:itemsColor />">
  112.                       <td height="12" width="7%" align="center">
  113.                          <input type="checkbox" name="groupIds" value="<employeeGroup:employeeGroupAttribute attribute="group_id" />">
  114.                       </td>
  115.                       <td height="12" align="center">
  116.                          <a href="/mainctrl/employeegroup/detail?groupId=<employeeGroup:employeeGroupAttribute attribute="group_id" />&backStart=<%=start%>">
  117.                          <employeeGroup:employeeGroupAttribute attribute="group_name" /></a>
  118.                       </td>
  119.                    </tr>   
  120.                    </vnex:items> 
  121.                    <tr bgcolor="#e0e0e0">
  122.                       <td width="7%" align="center"><input type="checkbox" name="C1" onclick="SelectAll(this.form)"></td>
  123.                       <td>&nbsp;&nbsp;全选</td>
  124.                    </tr>
  125.                    <tr bgcolor="#fafafa">
  126.                       <td colspan="2" height="12" align="left">&nbsp;
  127.                         <vnex:pagingTag pageName="<%=pageTo%>" />
  128.                       </td>
  129.                    </tr> 
  130.                    </employeeGroup:employeeGroupList>
  131.                 </table>
  132.                </td>
  133.             </tr>
  134.           </table>
  135.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  136.        </TD>
  137.      </TR>
  138.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  139.     </TBODY> 
  140.   </TABLE>
  141.     <BR>
  142.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  143. </form>
  144. </DIV>
  145. </BODY>
  146. </HTML>