<%@ 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 type="text/javascript">
function typeAdd(){
	iframeWindow("<s:url action='salaryTaxRateOperate'/>?oper=add",550,550,"添加所得税率",refreshWindow);
}
function typeEdit(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择一条您要修改的记录。");
		return;
	}
	iframeWindow("<s:url action='salaryTaxRateOperate'/>?oper=edit&taxRate.id="+getCheckedValue("sid"),550,550,"修改所得税率",refreshWindow);
}
function typeDel(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择一条您要删除的记录。");
		return;
	}
	msgConfirm("您确认要删除该记录吗？",function(){
		iframeWindow("<s:url action='salaryTaxRateOperate'/>?oper=delete&taxRate.id="+getCheckedValue("sid"),400,200,"删除所得税率",refreshWindow);
	});
}

</script>
</head>

<body>
<div class="body_list">
<s:include value="../common/body.jsp" />
<s:form action="salaryTaxRateList" id="queryForm" namespace="/salary">

 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line">
    <tr class="form_title">
      <td colspan="2">查询条件</td>
    </tr>
    <tr class="form_item">
      <td width="73%">考勤月份：
   		  <s:textfield name="taxRate.beginMonth" readonly="true" onClick="showCalendar('yyyyMM',this)" 
            	cssClass="date_input" cssStyle="width:100px;"/>
       </td>
      <td width="27%" 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="add" onclick="typeAdd()" value="添 加"/>
		<input type="button" name="edit" onclick="typeEdit()" value="修 改"/>
        <input type="button" name="edit" onclick="typeDel()" 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="15%">启用月份</td>
      <td width="16%">终止月份</td>
      <td width="20%">起征金额</td>
      <td width="19%">应纳税所得额（元）</td>
      <td width="9%">税率</td>
      <td width="18%">速算扣除数（元）</td>
      </tr>
    <s:iterator value="taxRateList" 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="beginMonth"/>&nbsp;</td>
          <td class="center"><s:property value="endMonth"/>&nbsp;</td>
          <td class="center"><s:property value="startAmt"/>&nbsp;</td>
          <td colspan="3" style="padding:0;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <s:iterator value="detSet">
              <tr>
                <td width="41%" align="right" style="padding-right:10px;">超过&nbsp;<s:property value="taxAmt"/></td>
                <td width="20%" align="right" style="padding-right:10px;"><s:property value="taxRate"/></td>
                <td width="39%" align="right" style="padding-right:10px;"><s:property value="taxSub"/></td>
              </tr>
          	  </s:iterator>
          	</table>
          </td>
        </tr>
    </s:iterator>
  </table>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="list_page">
    <tr>
      <td width="60%" style="text-align:left;"><span class="info"><strong>注意：</strong>多条所得税配置记录的启用月份、终止月份不能重叠，且应该具有连续性。</span></td>
      <td width="40%"><cm:pager/></td>
    </tr>
  </table>

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