<%@ 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 changeApplyType(){
	var isLeave=$("#applyTypeId").val()=="<s:property value='@com.hrmex.web.constants.ConstantCode$AttApplyType@LEAVE'/>";
	$("#leaveTypeTB").css("display",isLeave?"":"none");
}

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

<body>
<s:include value="../common/body.jsp" />

<s:form action="attApplyApproveConfOperate" namespace="/att" onsubmit="return checkForm(this)" >
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr class="form_tr">
      <td align="right"><span class="required">•</span>申请单类型：</td>
      <td valign="top">
   		 <s:select onchange="changeApplyType()" cssStyle="width:225px;" id="applyTypeId" title="申请单类型 为必填项"  name="conf.applyType.id"  list='#request.SysCodeFinder.find("ATT_APPLY_TYPE")' headerKey="" headerValue="" listKey="id" listValue="codeName"/>
      </td>
    </tr>
    <tbody id="leaveTypeTB" style="display:;">
    <tr class="form_tr">
      <td align="right" valign="top">请假单类型：</td>
      <td valign="top">
      	<s:textfield name="conf.attLeaveType.name" readonly="true" cssClass="find_input" onClick="codeTable('attLeaveTypeTable',gn('conf.attLeaveType.id'),this)" cssStyle="width:225px;"/>
      	<s:hidden name="conf.attLeaveType.id"/>
        <div class="info" style="margin:5px 0 0 0; width:225px;">
        	提示：如果“请假单类型”为空，则该流程对所有类型的请假单都适用。    
        </div>
      </td>
    </tr>
    </tbody>
    <tr class="form_tr">
      <td align="right" valign="top"><span class="required">•</span>适用部门：</td>
      <td valign="top">
        <s:textfield name="conf.emplOrg.name" title="适用部门为必填项" readonly="true" onClick="codeTree('emplOrgTree',gn('conf.emplOrg.id'),this)" cssStyle="width:225px;" cssClass="find_input"/>
      	<s:hidden name="conf.emplOrg.id"/>
        <div class="info" style="margin:5px 0 0 0; width:225px;">
        	提示：如果适用部门选择（根节点）公司，则该配置对所有员工都适用。    
        </div>   
      </td>
    </tr>
    <tr class="form_tr">
      <td align="right"><span class="required">•</span>审批流程：</td>
      <td valign="top">
             <s:textfield name="conf.attApproveFlow.name" readonly="true" cssClass="find_input" onClick="codeTable('attApproveFlowTable',gn('conf.attApproveFlow.id'),this)" cssStyle="width:225px;"/>
      		<s:hidden name="conf.attApproveFlow.id"/>   
      </td>
    </tr>
    <tbody id="yearBody" style="display:none;">
    </tbody>
    <tr class="form_tr">
      <td width="36%" align="right">&nbsp;</td>
      <td width="64%" valign="top"><s:if test="oper=='edit'">
          <input type="submit" name="button" id="button" value="修 改" />
        </s:if>
        <s:if test="oper=='add'">
          <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="conf.id" />
        <s:hidden name="oper"/></td>
    </tr>
  </table>
</s:form>
</body>
</html>