<%@ 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');
                    $("#inputForm").submit();
                    return true;
                }else{
                    $('#flag').val('no');
                }
            }

            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: '#incomeDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus', //响应事件。如果没有传入event，则按照默认的click
                type : 'date'
            });
            $("#attachment_btn").click(function () {
                $("#attachment_file").click();
            });
        });
    </script>
</head>
<body>
    <div class="single-form">
        <div class="container">
            <form:form id="inputForm" modelAttribute="projectAssess" action="${ctx}/project/projectAssess/saveAudit" method="post" class="form-horizontal">
                <form:hidden path="id"/>
                <form:hidden path="home"/>
                <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 path="projectId"/>
                <form:hidden id="flag" path="act.flag"/>
                <div class="form-group layui-row first">
                    <div class="form-group-label"><h2>基本信息</h2></div>
                    <div class="layui-item layui-col-sm6">
                        <label class="layui-form-label double-line">项目名称：</label>
                        <div class="layui-input-block">
                            <input htmlEscape="false" id="projectName" name="projectName" readonly="readonly" class="form-control layui-input" value="${projectAssess.projectName}"/>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6">
                        <label class="layui-form-label double-line">公司名称：</label>
                        <div class="layui-input-block">
                            <input htmlEscape="false" id="companyName" name="companyName" readonly="readonly" class="form-control layui-input" value="${projectAssess.companyName}"/>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6">
                        <label class="layui-form-label double-line">所属部门：</label>
                        <div class="layui-input-block">
                            <input htmlEscape="false" id="officeName" name="officeName" readonly="readonly" class="form-control layui-input" value="${projectAssess.officeName}"/>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6">
                        <label class="layui-form-label double-line">信息提供人及类型：</label>
                        <div class="layui-input-block">
                            <input htmlEscape="false" id="informationSupplyType" name="informationSupplyType" readonly="readonly" class="form-control layui-input" value="${projectAssess.informationSupplyType}"/>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6">
                        <label class="layui-form-label double-line">项目类型：</label>
                        <div class="layui-input-block">
                            <input htmlEscape="false" id="projectType" name="projectType" readonly="readonly" class="form-control layui-input" value="${projectAssess.projectType}"/>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm12 with-textarea">
                        <label class="layui-form-label  double-line">项目概况：</label>
                        <div class="layui-input-block">
                            <form:textarea path="projectOverview" readonly="true" id="projectOverview" htmlEscape="false" maxlength="500" rows="4"  value="${projectAssess.projectOverview}"  class="form-control" placeholder="项目概况(项目类型、建设地点、是否涉及生态红线、环境风险等级、敏感程度等)"/>
                        </div>
                    </div>

                    <div class="layui-item layui-col-sm6 ">
                        <label class="layui-form-label double-line"><span class="require-item">*</span>难易程度：</label>
                        <div class="layui-input-block">
                            <form:select path="projectComplexity" cssClass="form-control required simple-select">
                                <form:option value="" label=""/>
                                <form:option value="正常" label="正常" />
                                <form:option value="较难" label="较难" />
                                <form:option value="难" label="难" />
                            </form:select>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6 ">
                        <label class="layui-form-label double-line"><span class="require-item">*</span>技术支撑力量：</label>
                        <div class="layui-input-block">
                            <input htmlEscape="false" id="technicalSupport" name="technicalSupport" readonly="readonly" class="form-control layui-input" value="${projectAssess.technicalSupport}"/>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6 ">
                        <label class="layui-form-label double-line"><span class="require-item">*</span>政策法规相符性：</label>
                        <div class="layui-input-block">
                            <input htmlEscape="false" id="policiesRegulations" name="policiesRegulations" readonly="readonly" class="form-control layui-input" value="${projectAssess.policiesRegulations}"/>
                        </div>
                    </div>

                    <div class="layui-item layui-col-sm6 ">
                        <div class="layui-item layui-col-sm12 with-textarea">
                            <label class="layui-form-label  double-line">敏感情况：</label>
                            <div class="layui-input-block">
                                <form:textarea path="sensitiveSituation" readonly="true" id="sensitiveSituation" htmlEscape="false" maxlength="500" rows="4" value="${projectAssess.sensitiveSituation}" class="form-control"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6 ">
                        <div class="layui-item layui-col-sm12 with-textarea">
                            <label class="layui-form-label  double-line">环境风险：</label>
                            <div class="layui-input-block">
                                <form:textarea path="environmentalRisk" readonly="true" id="environmentalRisk" htmlEscape="false" maxlength="500" rows="4" value="${projectAssess.environmentalRisk}" class="form-control"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm6 ">
                        <div class="layui-item layui-col-sm12 with-textarea">
                            <label class="layui-form-label  double-line">其他：</label>
                            <div class="layui-input-block">
                                <form:textarea path="otherRisk" id="otherRisk" readonly="true" htmlEscape="false" maxlength="500" rows="4" value="${projectAssess.otherRisk}" class="form-control"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group layui-row">
                    <div class="form-group-label"><h2>审批意见</h2></div>
                    <div class="layui-item layui-col-xs12 with-textarea" >
                        <label class="layui-form-label">审批意见：</label>
                        <div class="layui-input-block">
                            <form:textarea path="act.comment" class="form-control" rows="4" maxlength="500" />
                            <input type="file" name="upload_files" style="display: none;">
                        </div>
                    </div>
                </div>
                <div class="form-group layui-row">
                    <div class="form-group-label"><h2>审批流程</h2></div>
                    <div class="layui-item layui-col-xs12 form-table-container" >
                        <act:flowChart procInsId="${projectAssess.act.procInsId}"/>
                        <act:histoicFlow procInsId="${projectAssess.act.procInsId}"/>
                    </div>
                </div>

                <div class="form-group layui-row page-end"></div>
	        </form:form>
        </div>
    </div>
</body>
</html>