<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<html>
<head>
    <title>甲供标准物资</title>
    <meta name="decorator" content="ani"/>
    <script type="text/javascript">

        $(document).ready(function () {
            $('#beginDate').datetimepicker({
                format: "YYYY-MM-DD HH:mm:ss"
            });
            $('#endDate').datetimepicker({
                format: "YYYY-MM-DD HH:mm:ss"
            });
        });

        function save() {
            var isValidate = jp.validateForm('#inputForm');//校验表单
            var val = $('#openProcessStatus').val();
            if (1 == val) {
                jp.error('项目已经开启流程，不能修改人员信息');
            }else {
                if (!isValidate) {
                    return false;
                } else {
                    jp.loading();
                    jp.post("${ctx}/sg/managementCenter/personnelTurnover/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="personnelTurnover" class="form-horizontal">
    <form:hidden path="id"/>
    <form:hidden path="openProcessStatus"/>
    <table class="table table-bordered">
        <tbody>
        <tr>
            <td class="width-15 active"><label class="">储备项目编号：</label></td>
            <td class="width-35">
                <form:input path="projectReserveId" readonly="true" htmlEscape="false" class="form-control"/>
            </td>
            <td class="width-15 active"><label class="">项目名称：</label></td>
            <td class="width-35">
                <form:input path="projectName" readonly="true" htmlEscape="false" class="form-control"/>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="">设计单位人员：</label></td>
            <td class="width-35">
                <form:input path="designUnit" htmlEscape="false" class="form-control required"/>
            </td>
            <td class="width-15 active"><label class="">项目经理审图：</label></td>
            <td class="width-35">
                <form:input path="projectManager" htmlEscape="false" class="form-control required"/>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="">技经人员审概算：</label></td>
            <td class="width-35">
                <form:input path="economicPersonnel" htmlEscape="false" class="form-control required"/>
            </td>
            <td class="width-15 active"><label class="">运行单位审图：</label></td>
            <td class="width-35">
                <form:input path="operationUnit" htmlEscape="false" class="form-control required"/>
            </td>
        </tr>
        </tbody>
    </table>
</form:form>
</body>
</html>