<%@ page import="java.util.ArrayList,
com.sunway.spc.servlet.SelectEmployee,
org.apache.struts.util.RequestUtils"
contentType="text/html; charset=UTF-8"
%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%
SelectEmployee selectEmployee = new SelectEmployee();
ArrayList groupArray = selectEmployee.getGroup();
ArrayList employeeArray = selectEmployee.getEmployee();
ArrayList notemployee = selectEmployee.getGroupEmployee();
%>
<html>
<head>
<title>select user</title>
<link href="../script/iess.css" rel="stylesheet" type="text/css"/>
</head>
<script language="javascript">
function changeTable(obj)
{
if(obj.style.display=='none')
{
obj.style.display="";
}else
{
obj.style.display="none";
}
}
function selectPart(ids,values)
{
window.returnValue = ids+"-"+values;
window.close();
}
function checkMaterial()
{
if(window.returnValue == "")
return false;
}
</script>
<body leftmargin="4" topmargin="4" marginwidth="0" marginheight="0" onUnload="return checkMaterial()">
<form action="LineKind" method="post" id="addLine">
<table style="margin-bottom:0px!important;margin-bottom:-4px" width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="ie">
<tr>
<td width="23">
<img src="../image/left-up-coner.gif" width="23" height="30" />
</td>
<td align="left" valign="middle" style="background:url('../image/bg-blue.gif') repeat-x">
<font color="#FFFFFF">
<!-- bean:message key="employee.select.title" /-->
select user
</font>
</td>
<td width="35">
<img src="../image/colorsection.gif" width="35" height="30" />
</td>
<td width="100" align="center" valign="middle" style="background:url('../image/bg-gray.gif') repeat-x">
</td>
<!--保存按钮 -->
<td width=23>
<img src="../image/save.gif" style="cursor:pointer" οnclick="subForm()" title="submit" />
</td>
<td width="31">
<img src="../image/cancle.gif" width="31" height="30" onClick="window.close()" style="cursor:hand">
</img>
</td>
<td width="23">
<img src="../image/right-up-coner.gif" width="23" height="30" />
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#676767" class="ie">
<% if(groupArray != null)
{
for(int type=0;type<groupArray.size();type++)
{
String groupString[] = (String[]) groupArray.get(type);
%>
<tr align="left" bgcolor="#EEEEEE">
<td height="14" >
<font style="cursor:hand" οnclick="changeTable(<%="type"+groupString[0]%>)"><%=groupString[1]%></font>
<img src="../image/arrow.gif" alt="" style="cursor:hand" οnclick="changeTable(<%="type"+groupString[0]%>)"/>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#676767" style="display:none" class="ie" id=<%="type"+groupString[0]%>>
<tr align="left" bgcolor="#E3D5E3">
<%
if(employeeArray != null)
{
int flag = 1;
for(int i=0;i<employeeArray.size();i++)
{
String employeeString[] = (String[]) employeeArray.get(i);
if(employeeString[2].equals(groupString[0]))
{
if(flag % 4 ==0 && flag >1)
{
%>
<td width="25%" bgcolor="#FFFFFF">
<a href="#" title="<%=employeeString[3]%>" οnclick="selectPart('<%=employeeString[0]%>','<%=employeeString[1]%>')"><%=employeeString[1]%></a>
</td>
</tr>
<tr align="left" bgcolor="#EEEEEE">
<%
}else
{
%>
<td width="25%" bgcolor="#FFFFFF">
<a href="#" title="<%=employeeString[3]%>" οnclick="selectPart('<%=employeeString[0]%>','<%=employeeString[1]%>')"><%=employeeString[1]%></a>
</td>
<%
}
flag++;
}
}
flag--;
if(flag % 4 >0)
{
%>
<td colspan="<%=4-(flag % 4)%>" bgcolor="#FFFFFF">
<%
}
}
%>
</tr>
</table>
</td>
</tr>
<%
}
}
%>
<tr><td>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<%
if(notemployee != null)
{
int cyc = 1;
for(int i=0;i<notemployee.size();i++)
{
String employee[] = (String[]) notemployee.get(i);
if(cyc % 4 ==0 && cyc >1)
{
%>
<td width="25%" bgcolor="#FFFFFF">
<a href="#" title="<%=employee[1]%>" οnclick="selectPart('<%=employee[0]%>','<%=employee[1]%>')"><%=employee[1]%></a>
</td>
</tr>
<tr align="left" bgcolor="#EEEEEE">
<%
}else
{
%>
<td width="25%" bgcolor="#FFFFFF">
<a href="#" title="<%=employee[1]%>" οnclick="selectPart('<%=employee[0]%>','<%=employee[1]%>')"><%=employee[1]%></a>
</td>
<%
}
cyc++;
}
cyc--;
if(cyc % 4 >0)
{
%>
<td colspan="<%=4-(cyc % 4)%>" bgcolor="#FFFFFF">
<%
}
}
%>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:0px!important;margin-bottom:-4px">
<tr>
<td width="23">
<img src="../image/left-down-coner.gif" width="23" height="30"/>
</td>
<td style="background:url('../image/bg-gray-02.gif') repeat-x" width="100%"/>
<td width="177">
<img src="../image/logo.gif" width="177" height="30"/>
</td>
<td width="23">
<img src="../image/right-down-coner.gif" width="23" height="30"/>
</td>
</tr>
</table>
</form>
</body>
</html>