<%@ 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 typeAdd(){
	iframeWindow("<s:url action='attApplyApproveConfOperate'/>?oper=add",550,500,"添加申请单审批配置",refreshWindow);
}
function typeEdit(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择一条您要修改的记录。");
		return;
	}
	iframeWindow("<s:url action='attApplyApproveConfOperate'/>?oper=edit&conf.id="+getCheckedValue("sid"),550,500,"修改申请单审批配置",refreshWindow);
}
function typeDel(){
	if(getCheckedCount("sid")!=1){
		msgAlert("请选择一条您要删除的记录。");
		return;
	}
	msgConfirm("您确认要删除该记录吗？",function(){
		iframeWindow("<s:url action='attApplyApproveConfDelete'/>?conf.id="+getCheckedValue("sid"),400,200,"删除申请单审批配置",refreshWindow);
	});
}

</script>
</head>

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

 <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="81%">申请单类型：<s:select name="conf.applyType.id" list='#request.SysCodeFinder.find("ATT_APPLY_TYPE")' headerKey="" headerValue="" listKey="id" listValue="codeName" cssStyle="width:100px;"/></td>
      <td width="19%">
        <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="delete" 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="4%" align="center"><input type="radio" name="array" onclick="checkedAll(this)" value="checkbox" /></td>
      <td width="16%">申请单类型</td>
      <td width="16%">适用部门</td>
      <td width="13%">审批流程</td>
      <td width="51%">审批流程明细</td>
      </tr>
    <s:iterator value="confList" 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>
          	<s:property value="applyType.codeName"/>
            <s:if test="attLeaveType!=null">
             &nbsp;[<s:property value="attLeaveType.name"/>]
            </s:if>
          </td>
          <td>
          	<s:property value="emplOrg.fullName"/>
          </td>
          <td class="center"><s:property value="attApproveFlow.name"/></td>          
          <td style="padding:0px;">
           		<s:if test="attApproveFlow.nodeSet!=null && attApproveFlow.nodeSet.size()>0">
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <s:iterator value="attApproveFlow.nodeSet" status="st1">
                      <tr class="list_data <s:property value='#row_cls1'/>">
                        <td width="7%" class="center"><s:property value="stepNo"/></td>
                        <td width="21%" class="center"><s:property value="name"/></td>
                        <td width="41%" class="center"><s:property value="approverType.codeName"/></td>
                        <td width="15%" class="center"><s:property value="approver.name"/>&nbsp;</td>
                        <td width="16%" class="center">
                        	<s:property value="enableCondition"/>
                        	<s:if test="enableCondition!=null">小时</s:if>&nbsp;
                        </td>
                      </tr>
                    </s:iterator>
                </table>
                </s:if>
                <s:else>&nbsp;</s:else>      
          </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>