<%@ 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="../resources/js/calendar/calendar.js"></script>
<script language="javascript">
function changeAccount(){
	var $kind=$("#accountId");
	var $detBody=$("#detBody");
	if($kind.val()==""){
		$detBody.html("&nbsp;");
	}else{
		$detBody.html("加载工资帐套...");
		$.get("<s:url action='salaryConfDet'/>?salaryConf.id=<s:property value='salaryConf.id'/>&salaryConf.salaryAccount.id="
			+$kind.val()+"&zid="+getCodeUniqueID(),function(data){
			$detBody.html(data);
		});
	}
}

$(function(){
	changeAccount();
});
</script>
</head>

<body>
<s:include value="../common/body.jsp" />
<s:form action="salaryConfOperate" namespace="/salary"  onsubmit="return checkForm(this)">

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr class="form_tr">
      <td align="right">工号：</td>
      <td valign="top"><s:property value="salaryConf.emplInfo.emplNo"/></td>
    </tr>
    <tr class="form_tr">
      <td align="right">姓名：</td>
      <td valign="top"><s:property value="salaryConf.emplInfo.name"/>
      </td>
    </tr>
    <tr class="form_tr">
      <td align="right">部门：</td>
      <td valign="top"><s:property value="salaryConf.emplInfo.emplOrg.name"/>

      </td>
    </tr>
    <tr class="form_tr">
      <td align="right"><span class="required">•</span>薪资级别：</td>
      <td valign="top">
       <s:select cssStyle="width:200px;" title="薪资级别 为必填项" name="salaryConf.salaryLevel.id" 
       		list='salaryLevelList' headerKey="" headerValue="" listKey="id" listValue="name"/>
      </td>
    </tr>
    <tr class="form_tr">
      <td align="right"><span class="required">•</span>生效月份：</td>
      <td valign="top">
        <s:if test="oper=='edit' and salaryConf.adjust">
			<s:property value="salaryConf.beginMonth"/>
        </s:if>
        <s:else>
        	<s:textfield title="生效月份 为必填项" name="salaryConf.beginMonth" readonly="true" onClick="showCalendar('yyyyMM',this)" 
            	cssClass="date_input" cssStyle="width:200px;"/>        
        </s:else>
      </td>
    </tr>  
     <tr class="form_tr">
       <td align="right"><span class="required">•</span>薪资帐套：</td>
       <td valign="top">
       	<s:select id="accountId" cssStyle="width:200px;" title="薪资帐套 为必填项" name="salaryConf.salaryAccount.id" 
        	onchange="changeAccount()" list='salaryAccountList' headerKey="" headerValue="" listKey="id" listValue="name"/>       
       </td>
     </tr>
    <tr class="form_tr">
      <td colspan="2" align="center" id="detBody">&nbsp;</td>
    </tr>
    <tr class="form_tr">
      <td width="37%" align="right">&nbsp;</td>
      <td width="63%" valign="top">
        <s:if test="oper=='edit' || oper=='planEdit'">
          <input type="submit" name="button" id="button" value="修 改" />
          </s:if>
        <s:if test="oper=='add' || oper=='planAdd'">
          <input type="submit" name="button" id="button" value="添 加" />
          </s:if>
        &nbsp; 
        <!-- back begin -->
        <input name="winID" type="hidden" value="${param.winID}" />
        <input type="button" onclick="iframeWindowClose('${param.winID}')" name="button" id="button" value="返 回" />  
        <!-- back end -->
        <s:hidden name="salaryConf.id" />
        <s:hidden name="oper" />
        <s:hidden name="salaryConf.emplInfo.emplOrg.name"/>
		<s:hidden name="salaryConf.emplInfo.name"/>
      	<s:hidden name="salaryConf.emplInfo.id" />
        <s:hidden name="salaryConf.emplInfo.emplNo"/>
        </td>
    </tr>
  </table>
    
</s:form>
</body>
</html>