[#ftl]
<!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>
<!--框架必需start-->
<script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/qui/libs/js/framework.js"></script>
<link href="${ctx}/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" id="skin" prePath="${ctx}/qui/"/>
<link rel="stylesheet" type="text/css" id="customSkin"/>
<!--框架必需end-->

<!-- 表单验证start -->
<link rel="stylesheet" href="${ctx}/qui/libs/js/form/validform/css/style.css" type="text/css" media="all" />
<script src="${ctx}/qui/libs/js/form/validform/validform.js" type="text/javascript"></script>
<!-- 表单验证end -->

<!--表单异步提交start-->
<script src="${ctx}/qui/libs/js/form/form.js" type="text/javascript"></script>
<!--表单异步提交end-->

<!-- 树组件start -->
<script type="text/javascript" src="${ctx}/qui/libs/js/tree/ztree/ztree.js"></script>
<link type="text/css" rel="stylesheet" href="${ctx}/qui/libs/js/tree/ztree/ztree.css"></link>
<!-- 树组件end -->

<!-- 树形下拉框start -->
<script type="text/javascript" src="${ctx}/qui/libs/js/form/selectTree.js"></script>
<!-- 树形下拉框end -->


</head>
<body onload="init();">
	<form id="myFormId" action="${ctx}/task/completeTask.do" method="post" target="frmright">
	<div class="box1" id="formContent" whiteBg="true">
	<input type="hidden" name="taskId" value="${approvalCmd.taskId}"/>
	<input type="hidden" name="nextNodeId" value="${approvalCmd.nextNodeId}"/>
	<input type="hidden" id="voteAgree" name="voteAgree" value="${voteAgree!2}"/>
	<input type="hidden" id="checkId" name="checkId" value="${checkId!''}"/>
	
	<input type="hidden" name="currentNodeId" value="${approvalCmd.currentNodeId}"/>
	<table class="tableStyle" formMode="view">
		<tr>
			<td width="200">执行路径:</td>
			<td>${approvalCmd.flowName}</td>
		</tr>

		<tr>
			<td>审批意见:</td>
			<td><textarea name="voteContent" id="voteContent"></textarea></td>
		</tr>

		[#if approvalCmd.nextNodeType=="userTask"] 
		<tr>
			<td colspan="2"><input type="hidden" name="selectUsers" value="${approvalCmd.userIds}" datatype="*" nullmsg="下阶段处理人找不到,请联系管理员进行添加后再重新提交审批!"/></td>
		</tr>
		[/#if]
		<tr>
			<td colspan="2">
				<input type="submit"  value="确定" />
				<input type="button" value="取消" onclick="top.Dialog.close()"/>
			</td>
		</tr>
	</table>
	</div>
	</form>
<!-- 异步提交start -->
<script type="text/javascript">
function init(){

	//alert(top.frmright);
	document.getElementById("voteContent").value=top.frmright.document.getElementById("opinion").value;
	
}

function initComplete(){
	//top.frmright.document.getElementById("content").innerHTML=text;
	//alert(window.parent.location.document.getElementById('content').content);
    //表单提交
	$("#myFormId").Validform({
		tiptype:3,//表示在右边显示
		ajaxPost:true,
		showAllError:true,
		callback:function(responseText){
			$.Hidemsg();
			if(responseText.status=="y"){
				top.Dialog.alert(responseText.info,function(){
	            	closeWin();
	            });
			}else{
				top.Dialog.alert(responseText.info,function(){
	            	return false;
	            });
			}
			
		}
	});
}

function oncheck(){
	alert($("#selectUsers").attr("relValue"));
}

//重置
function closeWin(){
	window.parent.location.reload();
	//关闭窗口
	top.Dialog.close();
}
</script>
<!-- 异步提交end -->	
</body>
</html>