<%@ 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">
function approveOper(isPass){
	msgConfirm("您确认对工资条数据执行审核"+(isPass?"":"不")+"通过操作吗？",function(){
		$("#operId").val(isPass?"freezeApprove":"unfreeze"); 
		$("#operForm").get(0).submit();
	});
}
</script>
</head>

<body>
<s:include value="../common/body.jsp" />
<s:form id="operForm" action="salaryMonthOperate" namespace="/salary"  onsubmit="return checkForm(this)">
  <table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr class="form_item">
      <td width="41%">考勤月份：
        <s:property value="monthPay.salaryMonth"/></td>
      <td width="59%"> 考勤日期：
        <s:date name="monthBeginEnd.begin" format="yyyy-MM-dd"/>
        至
        <s:date name="monthBeginEnd.end" format="yyyy-MM-dd"/></td>
    </tr>
  </table>
  <table width="850" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line">
    <tr class="list_title">
      <td width="138">部门</td>
      <td width="87">上月末人数</td>
      <td width="87">本月末人数</td>
      <td width="80">离职人数</td>
      <td width="79">入职人数</td>
      <td width="130">上月薪资（税前）</td>
      <td width="137">本月薪资（税前）</td>
      <td width="110">差异（税前）</td>
    </tr>
    <s:iterator value="totalDTO" status="st">
      <s:set name="row_cls" value=""/>
      <s:if test="#st.index==totalDTO.size()-1">
        <s:set name="row_cls" value="%{'row_a'}"/>
      </s:if>
      <tr class="list_data center <s:property value='#row_cls'/>">
        <td><s:property value="orgName"/></td>
        <td><s:property value="lastEmplNum"/>
          人</td>
        <td><s:property value="currEmplNum"/>
          人</td>
        <td><s:property value="leaveEmplNum"/>
          人</td>
        <td><s:property value="incompEmplNum"/>
          人</td>
        <td style="text-align:right; padding-right:10px;"><s:property value="lastSalary"/></td>
        <td style="text-align:right; padding-right:10px;"><s:property value="currSalary"/></td>
        <td style="text-align:right; padding-right:10px;"><s:property value="diffSalary"/></td>
      </tr>
    </s:iterator>
  </table>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr class="form_tr">
      <td width="37%" align="right">&nbsp;</td>
      <td width="63%" valign="top"><s:if test="monthPay.unFreeze">
          <input type="submit" name="edit" value="封帐申请"/>
        </s:if>
        <s:if test="monthPay.unCheck">
          <input type="button" name="edit" onclick="approveOper(true)" value="审核通过"/>
		  <input type="button" name="edit" onclick="approveOper(false)"  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="monthPay.salaryMonth" />
        <s:hidden id="operId" name="oper" />
        <input name="do" type="hidden" value="true" />
        </td>
    </tr>
  </table>
</s:form>
</body>
</html>