<%@ 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 changeApprover(){
	var isApp=$("#apprType").val()=="<s:property value='@com.hrmex.web.constants.ConstantCode$AttApproverType@CUSTOM_APPROVER'/>";
	if(isApp){
		$("#approverBody").show();
		$("#approverName").attr("disabled",false);
	}else{
		$("#approverBody").hide();
		$("#approverName").attr("disabled",true);
	}
	return true;
}

$(function(){
	changeApprover();
});

</script>
</head>

<body>
<div class="body_form">
<s:include value="../common/body.jsp" />
<s:form action="attApproveFlowNodeOperate" namespace="/att"  onsubmit="return checkForm(this)">

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr class="form_tr">
      <td align="right" valign="top"><span class="required">•</span>节点序号：</td>
      <td valign="top"><s:textfield name="node.stepNo" title="节点序号为必填项，且必须为数字。" cssStyle="width:225px;"/>
      	<div class="info">用于指定该节点在审批流程中的位置</div>
      </td>
    </tr>
    <tr class="form_tr">
      <td align="right" valign="top"><span class="required">•</span>节点名称：</td>
      <td valign="top"><s:textfield name="node.name" title="节点名称为必填项。" cssStyle="width:225px;"/>
      
      <div class="info">例如：部门领导审批</div>
      </td>
    </tr>
    <tr class="form_tr">
      <td align="right" valign="top"><span class="required">•</span>审批类型：</td>
      <td valign="top"><s:select id="apprType" cssStyle="width:225px;" title="审批类型为必填项"  name="node.approverType.id"  list='#request.SysCodeFinder.find("ATT_APPROVER_TYPE")' onchange="changeApprover()" headerKey="" headerValue="" listKey="id" listValue="codeName"/>
      </td>
    </tr>
    <tbody id="approverBody">
    <tr class="form_tr">
      <td width="30%" align="right" valign="top"><span class="required">•</span>审批人：</td>
      <td width="70%" valign="top">
      <s:textfield title="审批人 为必填项" name="node.approver.name" cssStyle="width:225px;" cssClass="find_input" readonly="true" onClick="codeTable('emplInfoTable',gi('addMid'),this)" id="approverName"/><s:hidden name="node.approver.id" id="addMid" />
      </td>
       </tr>
     </tbody>
     <tr class="form_tr">
       <td width="30%" align="right" valign="top">审批条件：</td>
       <td width="70%" valign="top">大于等于<s:textfield name="node.enableCondition" title="审批条件必须为数值，最多1位小数。" cssStyle="width:40px;"/>
       小时的申请单需要该节点审批。
         <div class="info">如果不填写则表示全部申请单都需要该节点审批。</div>
        </td>
     </tr>
    <tr class="form_tr">
      <td width="30%" align="right">&nbsp;</td>
      <td width="70%" 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="node.id" />
          <s:hidden name="node.attApproveFlow.id" />
          <s:hidden name="oper" />
        </td>
    </tr>
  </table>

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