<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>項目竣工审批</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
        var validateForm;
        function doSubmit(obj){
            // 回调函数，在编辑和保存动作时，供openDialog调用提交表单。
            if(validateForm.form()){
                if(obj == 1) {
                    $("#flag").val("yes");
                }else {
                    $("#flag").val("no");
                }
                $("#inputForm").submit();
                return true;
            }

            return false;
        }
        $(document).ready(function() {
            validateForm = $("#inputForm").validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });

            laydate.render({
                elem: '#contractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus' //响应事件。如果没有传入event，则按照默认的click
            });
            laydate.render({
                elem: '#effectiveDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus' //响应事件。如果没有传入event，则按照默认的click
            });
            laydate.render({
                elem: '#closingDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus' //响应事件。如果没有传入event，则按照默认的click
            });
        });


	</script>
	<style type="text/css">
		.controls{
			margin-top: 7px;
		}
	</style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">

	<div class="ibox">
		<div class="ibox-tools">
			<a class="collapse-link">
				<i class="fa fa-chevron-up"></i>
			</a>
			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
				<i class="fa fa-wrench"></i>
			</a>
			<ul class="dropdown-menu dropdown-user">
				<li><a href="javascript:void(0)">选项1</a>
				</li>
				<li><a href="javascript:void(0)">选项2</a>
				</li>
			</ul>
			<a class="close-link">
				<i class="fa fa-times"></i>
			</a>
		</div>
		<div class="ibox-title" style="height: 50px;">
			<h7 style="font-size: 20px;">
				項目竣工审批
			</h7>
		</div>

		<div class="ibox-content">
			<sys:message content="${message}"/>

<form:form id="inputForm" modelAttribute="workProjectCompletionInfo" action="${ctx}/workprojectcompletion/workProjectCompletion/saveAudit" method="post" class="form-horizontal">
	<form:hidden path="id"/>
	<form:hidden path="act.taskId"/>
	<form:hidden path="act.taskName"/>
	<form:hidden path="act.taskDefKey"/>
	<form:hidden path="act.procInsId"/>
	<form:hidden path="act.procDefId"/>
	<form:hidden id="flag" path="act.flag"/>
	<sys:message content="${message}"/>
	<c:set var="status" value="${workProjectCompletionInfo.act.status}" />
	<c:set var="createBy.id" value="${workProjectCompletionInfo.createBy.id}" />

	<div class="control-group">
		<label class="control-label">項目名称：</label>
		<div class="controls">
			<a href="javascript:void(0)" onclick="openDialogView('查看项目竣工信息', '${ctx}/workprojectcompletion/workProjectCompletion/lookForm?id=${workProjectCompletionInfo.id}&projectId=${workProjectCompletionInfo.projectId}','80%','80%')" >
					${workFullManage.fullProjectName}</a>

		</div>
	</div>
	<div class="control-group">
		<label class="control-label">项目编号：</label>
		<div class="controls">
				${workFullManage.fullProjectNumber}
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">创建日期：</label>
		<div class="controls">
			<fmt:formatDate value="${workFullManage.createDate}" pattern="yyyy-MM-dd"/>

		</div>
	</div>
	<%--<c:if test="${not empty status}">--%>
		<div class="control-group">
			<label class="control-label">审批意见：</label>
			<div class="controls">
				<form:textarea path="act.comment" class="form-control" rows="3" maxlength="20"/>
			</div>
		</div>
	<%--</c:if>--%>
	<div class="wrapper wrapper-content">
		<act:flowChart procInsId="${workProjectCompletionInfo.processInstanceId}"/>
		<act:histoicFlow procInsId="${workProjectCompletionInfo.processInstanceId}"/>
	</div>


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