<%@ 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 type="text/javascript">
function typeEdit(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择一条您要配置的员工记录。");
		return;
	}
	var nid=$("#insurNo_"+getCheckedValue("sid")).val();
	iframeWindow("<s:url action='salaryInsurNoOperate'/>?oper=edit&insurNo.id="+nid+"&insurNo.emplInfo.id="+getCheckedValue("sid"),550,450,"设置员工薪资账号",refreshWindow);
}
function typeDel(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择一条您要删除的记录。");
		return;
	}
	var nid=$("#insurNo_"+getCheckedValue("sid")).val();
	if(nid==""){
		msgAlert("您选择的员工还没有设置薪资账号，无需删除。");
		return;	
	}
	msgConfirm("您确认要删除该员工的薪资账号信息吗？",function(){
		iframeWindow("<s:url action='salaryInsurNoOperate'/>?oper=delete&insurNo.id="+nid,400,200,"删除员工薪资账号信息",refreshWindow);
	});
}

function typeImport(){
	openUrl("<s:url action='salaryInsurNoImport'/>","导入薪资账号");
}

</script>
</head>

<body>
<div class="body_list">
<s:include value="../common/body.jsp" />
<s:form action="salaryInsurNoList" 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="6">查询条件</td>
    </tr>
    <tr class="form_item">
      <td width="18%">工号：<s:textfield name="insurNo.emplInfo.emplNo" title="工号必须为数字。"  cssStyle="width:100px;"/></td>
      <td width="19%">姓名：
        <s:textfield name="insurNo.emplInfo.name" cssStyle="width:100px;"/></td>
      <td width="20%">部门：
       <s:textfield name="insurNo.emplInfo.emplOrg.name" readonly="true" onClick="codeTree('emplOrgTree',gi('eimpOrgId'),this)" cssStyle="width:100px;" cssClass="find_input"/>
          <s:hidden name="insurNo.emplInfo.emplOrg.id" id="eimpOrgId"/>
      </td>
      <td width="19%">状态：
        <s:select name="existFlag" headerKey="" headerValue="" cssStyle="width:100px;"
       		list="#{'true':'已设置', 'false':'未设置'}"/>
      </td>
      <td width="15%"><s:checkbox name="showOffJob" fieldValue="true"/> 显示离职员工</td>
      <td width="9%" 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="typeEdit()" value="设 置"/>
        <input type="button" name="edit" onclick="typeDel()" value="删 除"/>
		<input type="button" name="edit" onclick="typeImport()" 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="7%">工号</td>
      <td width="6%">姓名</td>
      <td width="16%">部门</td>
      <td width="7%">状态</td>
      <td width="10%">开户行</td>
      <td width="13%">银行卡号</td>
      <td width="8%">结算中心</td>
	  <s:iterator value="#request.SysCodeFinder.find('SALARY_INSUR_NO_TYPE')">
      <td class="nowrap"><s:property value="codeName"/></td>
      </s:iterator>
	  <td width="11%">备注</td>
      </tr>
    <s:iterator value="emplInsurList" status="st">
        <s:set name="row_cls" value=""/><s:if test="#st.Even"><s:set name="row_cls" value="%{'row_a'}"/></s:if>
		<s:set name="insurNoObj" value="top[1]"/>
        <tr class="list_data <s:property value='#row_cls'/>">
          <td align="center"><input type="radio" name="array" value="<s:property value='top[0].id'/>" lang="sid"/></td>
          <td class="center"><s:property value="top[0].emplNo"/></td>
          <td class="center"><s:property value="top[0].name"/></td>
          <td><s:property value="top[0].emplOrg.fullName"/></td>
          <td class="center">
          	<s:if test="#insurNoObj==null">未设置</s:if>
            <s:else>已设置</s:else>
          </td>
          <td class="center"><s:property value="#insurNoObj.cardBank"/></td>
          <td class="center"><s:property value="#insurNoObj.cardNo"/></td>
          <td class="center"><s:property value="#insurNoObj.costCenter"/></td>
		  
		  <s:iterator value="#request.SysCodeFinder.find('SALARY_INSUR_NO_TYPE')">
		  	<td class="nowrap center"><s:property value="#insurNoObj.getDetByTypeId(id).accNo"/></td>
		  </s:iterator>
          <td><s:property value="#insurNoObj.descr"/></td>
        </tr>
    </s:iterator>
  </table>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="list_page">
    <tr>
      <td style="text-align:left;"><span class="info">提示：您可以在菜单<strong>“系统→系统编码管理”</strong>下维护社保账号类型。</span></td>
	  <td><cm:pager/></td>
    </tr>
  </table>

</s:form>
</div>
</body>
</html>