<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<html>
<head>
    <title>核准阶段管理</title>
    <meta name="decorator" content="ani"/>
    <%@ include file="/webpage/include/bootstraptable.jsp" %>
    <style type="text/css">
        /* 下边两行是去掉input 输入框右边的上下箭头按钮*/
        .deal::-webkit-inner-spin-button {
            -webkit-appearance: none !important;
        }

        .deal::-webkit-outer-spin-button {
            -webkit-appearance: none !important;
        }

        input[type="number"] {
            -moz-appearance: textfield;
        }
    </style>
    <script type="text/javascript">

        $(document).ready(function () {
            $('#commDate').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#compDate').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#cossDate').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#acceptanceDate').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#soilWaterDate').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#levelRiskTime').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#standStartTime').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#standTransferTime').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#standAcceptanceTime').datetimepicker({
                format: "YYYY-MM-DD"
            });
            $('#dateOfInterview').datetimepicker({
                format: "YYYY-MM-DD"
            });
        });

        function save() {
            var isValidate = jp.validateForm('#inputForm');//校验表单
            if (!isValidate) {
                return false;
            } else {
                jp.loading();
                jp.post("${ctx}/filing/constructionStage/save", $('#inputForm').serialize(), function (data) {
                    if (data.success) {
                        jp.getParent().refresh();
                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                        parent.layer.close(dialogIndex);
                        jp.success(data.msg)

                    } else {
                        jp.error(data.msg);
                    }
                })
            }

        }

    </script>
</head>
<body class="bg-white">
<form:form id="inputForm" modelAttribute="constructionStage" action="${ctx}/filing/constructionStage/save" method="post"
           class="form-horizontal">
    <form:hidden path="id"/>
    <table class="table table-bordered">
        <tbody>
        <tr>
            <td class="width-15 active"><label class="pull-right">项目编码：</label></td>
            <td class="width-35">
                <form:input path="projectCode" readonly="true" htmlEscape="false" class="form-control"/>
            </td>
            <td class="width-15 active"><label class="pull-right">单体编码：</label></td>
            <td class="width-35">
                <form:input path="monomerCode" readonly="true" htmlEscape="false" class="form-control"/>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">项目名称：</label></td>
            <td class="width-35">
                <form:input path="entryName" readonly="true" htmlEscape="false" class="form-control"/>
            </td>
            <td class="width-15 active"><label class="pull-right">工程遗留相关事项</label></td>
            <td class="width-35">
                <form:input path="mattersLeft" htmlEscape="false" class="form-control"/>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">退料及报废手续</label></td>
            <td class="width-35">
                <sys:fileUpload path="returnAndScrap" value="${constructionStage.returnAndScrap}" type="*" uploadPath="/photo"
                                readonly="false"/>
            </td>
            <td class="width-15 active"><label class="pull-right">重要的附件等扫描件</label></td>
            <td class="width-35">
                <sys:fileUpload path="importantAccessories" value="${constructionStage.importantAccessories}" type="*" uploadPath="/photo"
                                readonly="false"/>
            </td>
        </tr>
        </tbody>
    </table>
    </div>
</form:form>
</body>
</html>