<%@ 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() {
	        $('#arrangeTime').datetimepicker({
                format: "YYYY-MM",
                minDate:new Date()-1
		    })
		});
		function save() {
		    var projectName= $("#projectName").val();
		    var projectNumber = $("#projectNumber").val();
		    var arrangeTime = $("#arrange").val();
		    // if (null==projectNumber ||"" == projectNumber){
		    //     jp.error("请输入项目定义号!");
		    //     return false;
			// }
			if (null == arrangeTime || "" == arrangeTime){
			    jp.error("请选择时间!")
				return false;
            }
            jp.getParent().addList(projectNumber,arrangeTime,projectName);
            var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
            parent.layer.close(dialogIndex);
            <%--jp.get("${ctx}/sg/managementCenter/projectPlanArrage/isArranging?arrangeTime="+arrangeTime,function(data){--%>
                <%--if (data.success){--%>
                    <%--jp.getParent().addList(projectNumber,arrangeTime);--%>
                    <%--var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引--%>
                    <%--parent.layer.close(dialogIndex);--%>
				<%--}else {--%>
				    <%--jp.error(data.msg);--%>
				<%--}--%>
            <%--})--%>

        }
	</script>
</head>
<body class="bg-white">
		<form:form id="inputForm" modelAttribute="projectPlanArrage" class="form-horizontal">
		<form:hidden path="id"/>	
		<table class="table table-bordered">
			<tbody>
			<tr>
				<td class="width-15 active"><label class="">项目名称：</label></td>
				<td class="width-35">
					<form:input path="projectName" htmlEscape="false"  id="projectName"  class="form-control"/>
				</td>
				<td class="width-15 active"><label class="">项目定义号：</label></td>
				<td class="width-35">
					<form:input path="projectNumber" htmlEscape="false"  id="projectNumber"  class="form-control"/>
				</td>
			</tr>
			<tr>
				<td class="width-15 active"><label class="">选择月份：</label></td>
				<td class="width-35">
					<div class='input-group form_datetime' id='arrangeTime'>
						<input type='text'  name="projectMonthDate" class="form-control required" id="arrange"  value="<fmt:formatDate value="${constructionProjectTemporary.arrangeTime}" pattern="yyyy-MM"/>"/>
						<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			            </span>
					</div>
				</td>
			</tr>
			</tbody>
		</table>
	</form:form>
</body>
</html>