<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="cm" uri="/commons-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>离职员工管理</title>
<link href="../resources/style/base.css" rel="stylesheet" type="text/css"/>
<s:include value="../common/head.jsp" />
<script language="javascript" src="../code/vm/ExtCodeJs.htm"></script>
<script language="javascript" src="../resources/js/calendar/calendar.js"></script>
<script type="text/javascript">

function emplEdit(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择一条您要查看详细信息的员工记录。");
		return;
	}
	var name=gi("name__"+getCheckedValue("sid")).innerHTML;
	openUrl("<s:url action='emplInfoDetail'/>?emplInfo.id="+getCheckedValue("sid"),name+" 的详细信息");
}

function emplBack(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择需要复职的员工记录。");
		return;
	}
	iframeWindow("<s:url namespace='/employe' action='emplLeaveOperate'/>?oper=add&leave.emplInfo.id="+getCheckedValue("sid"),550,500,"添加复职记录",refreshWindow);
}

</script>
</head>

<body>
<div class="body_list">
  <s:include value="../common/body.jsp" />
  <s:form action="emplInfoListOff" id="queryForm" onsubmit="return checkForm(this)">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line">
      <tr class="form_title">
        <td colspan="4">查询条件</td>
      </tr>
      <tr class="form_item">
        <td>工号：
          <s:textfield name="emplInfo.emplNo" title="工号必须为数字。"  cssStyle="width:100px;"/></td>
        <td> 部门：
          <s:textfield name="emplInfo.emplOrg.name" readonly="true" onClick="codeTree('emplOrgTree',gi('eimpOrgId'),this)" cssStyle="width:100px;" cssClass="find_input"/>
          <s:hidden name="emplInfo.emplOrg.id" id="eimpOrgId"/></td>
        <td width="31%">入职日期：
          <s:textfield name="incompBegin" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="incompBegin" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
          至
          <s:textfield name="incompEnd" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="incompEnd" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield></td>
        <td width="21%"> 用工形式：
          <s:select cssStyle="width:100px;" name="emplInfo.employType.id"  list='#request.SysCodeFinder.find("EMPL_EMPLOY_TYPE")'   headerKey="" headerValue="" listKey="id" listValue="codeName"/></td>
      </tr>
      <tr class="form_item1">
        <td>姓名：
          <s:textfield name="emplInfo.name" cssStyle="width:100px;"/></td>
        <td> 职务：
          <s:select cssStyle="width:100px;" name="emplInfo.job.id"  list='#request.SysCodeFinder.find("EMPL_JOB")'  headerKey="" headerValue="" listKey="id" listValue="codeName"/></td>
        <td>转正日期：
          <s:textfield name="regularBegin" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="regularBegin" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
          至
          <s:textfield name="regularEnd" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="regularEnd" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield></td>
        <td> 工作地区：
          <s:select cssStyle="width:100px;" name="emplInfo.workArea.id"  list='#request.SysCodeFinder.find("EMPL_WORK_AREA")'  headerKey="" headerValue="" listKey="id" listValue="codeName"/></td>
      </tr>
      <tr class="form_item1">
        <td width="19%">学历：
          <s:select cssStyle="width:100px;" name="emplInfo.eduLevel.id"  list='#request.SysCodeFinder.find("EMPL_EDU_LEVEL")'  headerKey="" headerValue="" listKey="id" listValue="codeName"/></td>
        <td width="29%">参加工作：
          <s:textfield name="firstBegin" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="firstBegin" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
          至
          <s:textfield name="firstEnd" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="firstEnd" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield></td>
        <td width="31%">最后工作：
          <s:textfield name="terminateBegin" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="terminateBegin" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
          至
          <s:textfield name="terminateEnd" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="terminateEnd" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield></td>
        <td align="center"><input name="q" value=" 查 询 " onclick="query()" type="button" /></td>
      </tr>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"  style="margin:15px 0 5px 0;" >
      <tr>
        <td><input type="button" name="edit" onclick="emplEdit()" value="详细信息"/>
          &nbsp;
          <input type="button" name="edit" onclick="emplBack()" value="复 职"/></td>
      </tr>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line">
      <tr class="list_title">
        <td width="3%" align="center"><input type="radio" name="array" onclick="checkedAll(this)" value="checkbox" /></td>
        <td width="8%">工号</td>
        <td width="6%">姓名</td>
        <td width="14%">部门</td>
        <td width="7%">职务</td>
        <td width="8%">用工形式</td>
        <td width="6%">学历</td>
        <td width="8%">工作地区</td>
        <td width="8%">出生日期</td>
        <td width="8%">参加工作</td>
        <td width="8%">入职日期</td>
        <td width="7%">转正日期</td>
        <td width="9%">最后工作日</td>
      </tr>
      <s:iterator value="emplInfoList" status="st">
        <s:set name="row_cls" value=""/>
        <s:if test="#st.Even">
          <s:set name="row_cls" value="%{'row_a'}"/>
        </s:if>
        <tr class="list_data <s:property value='#row_cls'/>">
          <td align="center"><input type="radio" name="array" value="<s:property value='id'/>" lang="sid"/></td>
          <td class="center"><s:property value="emplNo"/></td>
          <td class="center" id="name__<s:property value='id'/>"><s:property value="name"/></td>
          <td><s:property value="emplOrg.fullName"/></td>
          <td class="center"><s:property value="job.codeName"/></td>
          <td class="center"><s:property value="employType.codeName"/></td>
          <td class="center"><s:property value="eduLevel.codeName"/></td>
          <td class="center"><s:property value="workArea.codeName"/></td>
          <td class="center"><s:date name="birthDate" format="yyyy-MM-dd"/></td>
          <td class="center"><s:date name="firstWorkDate" format="yyyy-MM-dd"/></td>
          <td class="center"><s:date name="inCompDate" format="yyyy-MM-dd"/></td>
          <td class="center"><s:date name="regularDate" format="yyyy-MM-dd"/></td>
          <td class="center"><s:date name="terminateDate" format="yyyy-MM-dd"/></td>
        </tr>
      </s:iterator>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="list_page">
      <tr>
        <td><cm:pager/></td>
      </tr>
    </table>
  </s:form>
</div>
</body>
</html>