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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex"%>
  2. <%@ taglib uri="/vnex_employee_group.tld" prefix="employee"%>
  3. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  4. <%@ page import="com.vnex.intranet.util.FieldUtil" %>
  5. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  6. <jsp:useBean id="employeeGroupProxy" scope="application" class="com.vnex.intranet.employee.proxy.EmployeeGroupProxyBean" />
  7. <jsp:useBean id="egvb" scope="request" class="com.vnex.intranet.employee.value.EmployeeGroupValueBean" />
  8. <%
  9.     int groupId = Integer.parseInt(request.getParameter("groupId"));
  10.     egvb = employeeGroupProxy.getGroupDetail(groupId);
  11.     String condition = egvb.generateCondition(false);
  12.     String employeeCondition = egvb.generateCondition(true);
  13.     String backStart = request.getParameter("backStart");
  14.     String start = "1";
  15.     String pageTo = "/mainctrl/employeegroup/detail?groupId="+groupId+"&backStart="+backStart;
  16.     if(request.getParameter("start") != null)
  17.        start = request.getParameter("start");
  18. %>
  19. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  20. <HTML>
  21. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  22. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  23. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  24. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  25. <script language="JavaScript">
  26. function modify(form)
  27. {
  28.    if(checkIt(form))
  29.    {
  30.       form.action = "/mainctrl/employeegroup/modify?groupId=<%=groupId%>&start=<%=start%>";
  31.       form.submit();
  32.    }
  33. }
  34.  
  35. function releaseAll(listObj)
  36. {
  37.    for(i=0;i<listObj.length;i++)
  38.    {
  39.       listObj.options[i].selected = false;
  40.    }
  41. }
  42. function checkIt(form)
  43. {
  44.    if(isEmpty(form.groupName.value) || isEmptyStr(form.groupName.value))
  45.    {
  46.       alert("组名不能为空.");
  47.       form.groupName.focus();
  48.       return false;
  49.    }
  50.    if(isContainInvalidChar(form.groupName.value, "'"))
  51.    {
  52.       alert("组名中不能包含单引号");
  53.       form.groupName.focus();
  54.       return false;
  55.    }
  56.    if("<%=egvb.getGroupName()%>" == form.groupName.value)
  57.    {
  58.       alert("你没有做任何改动");
  59.       form.groupName.focus();
  60.       return false;
  61.    }
  62.    return true;
  63. }
  64. function addMember(form)
  65. {
  66.    if(isSelectedFromList(form.employeeId))
  67.    {
  68.      form.action="/mainctrl/employeegroup/addmember?groupId=<%=groupId%>";
  69.      form.submit();
  70.    }
  71.    else  
  72.      alert("请选择至少一位成员再进行添加操作");  
  73. }
  74. function removeMember(form)
  75. {
  76.    if(form.empIds == null)
  77.    {
  78.       alert("目前尚未有成员可供删除");
  79.       return;
  80.    }
  81.    if(!isChecked(form.empIds))
  82.    {
  83.       alert("请至少选择一位成员再进行删除");
  84.       return;
  85.    }
  86.    if(confirm("是否删除所选成员?"))
  87.    {
  88.      form.action="/mainctrl/employeegroup/deletemember?groupId=<%=groupId%>"
  89.      form.submit();
  90.    }  
  91. }
  92. function deleteIt(form)
  93. {
  94.    if(confirm("是否删除本记录?"))
  95.    {
  96.      form.action="/mainctrl/employeegroup/deleteOne?groupId=<%=groupId%>";
  97.      form.submit();
  98.    }  
  99. }
  100. function SelectAll(form)
  101. {
  102.   for (var i=0;i<form.elements.length;i++)
  103.   {
  104.     var e = form.elements[i];
  105.     if (e.name != 'C1')
  106.        e.checked = form.C1.checked;
  107.   }
  108. }
  109. </script>
  110. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  111. <DIV align=center>
  112. <form name="form1" method="post" action="">
  113. <input type="hidden" name="backStart" value="<%=backStart%>">
  114.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  115.     <TBODY>
  116.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  117.     <TR> 
  118.         <TD colSpan=3 align="center"><br>
  119.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  120.             <tr> 
  121.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  122.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  123.                   <tr bgcolor="#666666"> 
  124.                         <td colspan="2"><font class="strongw">
  125.                         <a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;
  126.                         <a href="/mainctrl/public/main"><font color="#ffffff">公用信息</font></a>&gt;&gt;
  127.                         <a href="/mainctrl/employeegroup/home"><font color="#ffffff">员工通讯组</font></a>&gt;&gt;
  128.                         组别详细信息</font>
  129.                         </td>
  130.                   </tr>
  131.                    <tr bgcolor="#ffffff" height="30">
  132.                       <td><strong>&nbsp;&nbsp;&nbsp;组名:</strong> 
  133.                         <input type="text" name="groupName" maxlength="50" size="20" class="text" value="<%=FieldUtil.filterQuotTag(egvb.getGroupName())%>">&nbsp;
  134.                         <input type="button" name="button1" value="修改组名" class="text" onclick="modify(this.form)" style="width:60px">
  135.                         &nbsp;&nbsp;
  136.                         <input type="button" name="button2" value="删除" class="text" onclick="deleteIt(this.form)">
  137.                         &nbsp;&nbsp;
  138.                         <input type="button" name="button5" value="返回" class="text" onclick="location='/mainctrl/employeegroup/home?start=<%=backStart%>'">
  139.               </td>
  140.            </tr>
  141.          </table>   
  142.                  <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  143.                       <tr bgcolor="#fafafa">
  144.                     <td width="33%"><strong>&nbsp;&nbsp;请为此通讯组选择组内成员:</strong><br>&nbsp;&lt;&lt;按住Ctrl键可多选&gt;&gt;</td>
  145.                     <td>   
  146.                         <select name="employeeId" size="8" multiple style="width:144px">
  147.                           <employee:employeeTag queryStr="<%=condition%>" />
  148.                         </select>&nbsp;
  149.                          <input type="button" class="text" name="button3" value="添加新成员" onclick="addMember(this.form)" style="width:70px">
  150.                     </td>
  151.                    </tr>  
  152.                 </table>  
  153.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  154.                    <tr bgcolor="#fafafa" height="30">
  155.                       <td colspan="6">&nbsp;
  156.                          <input type="button" class="text" name="button4" value="删除成员" onclick="removeMember(this.form)" style="width:60px">
  157.                       </td>
  158.                    </tr>
  159.                             <tr align="center">
  160.                               <td width="7%"><strong>选择</strong></td>
  161.                               <td align="center"><strong>姓名</strong></td>
  162.                               <td align="center"><strong>办公室电话</strong></td>
  163.                               <td align="center"><strong>手机</strong></td>
  164.                               <td align="center"><strong>传真</strong></td>
  165.                               <td align="center"><strong>E-Mail</strong></td>
  166.                             </tr>
  167.                             <employee:employeeList queryStr="<%=employeeCondition%>">
  168.                             <vnex:items paging="true">
  169.                             <tr bgcolor="<vnex:itemsColor />" align="center">
  170.                               <td width="7%"><input type="checkbox" name="empIds" value="<employee:employeeAttribute attribute="id"/>"></td>
  171.                               <td align="center"><employee:employeeAttribute attribute="name"/></td>
  172.                               <td align="center"><employee:employeeAttribute attribute="office_telephone"/></td>
  173.                               <td align="center"><employee:employeeAttribute attribute="mobile"/></td>
  174.                               <td align="center"><employee:employeeAttribute attribute="fax"/></td>
  175.                               <td align="center"><a href="mailto:<employee:employeeAttribute attribute="email"/>"><employee:employeeAttribute attribute="email"/></a></td>
  176.                            </tr>
  177.                            </vnex:items>
  178.                            <tr bgcolor="#e0e0e0">
  179.                               <td width="7%" align="center"><input type="checkbox" name="C1" onclick="SelectAll(this.form)"></td>
  180.                               <td colspan="5">&nbsp;&nbsp;全选
  181.                               </td>
  182.                           </tr>
  183.                           <tr bgcolor="#fafafa">
  184.                               <td colspan="6">&nbsp;
  185.                                 <vnex:pagingTag pageName="<%=pageTo%>" />
  186.                               </td>
  187.                           </tr>
  188.                           </employee:employeeList>  
  189.                   </table> 
  190.               </td>
  191.             </tr>
  192.           </table>
  193.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  194.        </TD>
  195.      </TR>
  196.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  197.     </TBODY> 
  198.   </TABLE>
  199.     <BR>
  200.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  201. </form>
  202. </DIV>
  203. </BODY>
  204. </HTML>