<%@ 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() {
	        $('.deliverySchedule').datetimepicker({
                format: "YYYY-MM"
            });
            $('.deliverySchedule1').datetimepicker({
                format: "YYYY-MM-DD"
            });
		});
		function save() {
            var isValidate = jp.validateForm('#inputForm');//校验表单
            if(!isValidate){
                return false;
			}else{
                jp.loading();
                jp.post("${ctx}/sg/managementCenter/constructionProject/unplannedPlan",$('#inputForm').serialize(),function(data){
                    if(data.success){
                        jp.getParent().refreshjstreeTime();
                        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="constructionProject" class="form-horizontal">
		<form:hidden path="id"/>	
		<table class="table table-bordered">
			<tbody>
				<%--项目显示--%>
				<c:if test="${constructionId eq '0'}">
				<%--<form:input path="id" htmlEscape="false" class="form-control"/>--%>
					<tr>

						<td class="width-15 active"><label class="">线路名称：</label></td>
						<td class="width-35">
							<form:input path="lineName" readonly="readonly" htmlEscape="false" class="form-control"/>
						</td>
						<td class="width-15 active"><label class="">项目名称：</label></td>
						<td class="width-35">
							<form:input path="projectName" readonly="readonly" htmlEscape="false" 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 deliverySchedule'>
								<input type='text' readonly="readonly"  name="arrangeTime" class="form-control required"  value="<fmt:formatDate value="${constructionProject.arrangeTime}" pattern="yyyy-MM"/>"/>
								<span class="input-group-addon">
										<span class="glyphicon glyphicon-calendar"></span>
									</span>
							</div>
						</td>
						<td class="width-15 active"><label class="">选择具体时间：</label></td>
						<td class="width-35">
							<div class='input-group form_datetime deliverySchedule1'>
								<input type='text'  name="specificTime" class="form-control required"  value="<fmt:formatDate value="${constructionProject.specificTime}" pattern="yyyy-MM-dd"/>"/>
								<span class="input-group-addon">
										<span class="glyphicon glyphicon-calendar"></span>
									</span>
							</div>
						</td>
					</tr>
				</c:if>
				<%--线路显示--%>
				<c:if test="${constructionId eq '1'}">
					<%--<form:input path="id" htmlEscape="false" class="form-control"/>--%>
					<tr>
						<td class="width-15 active"><label class="">线路名称：</label></td>
						<td class="width-35">
							<form:input path="lineName" htmlEscape="false" class="form-control" readonly="readonly"/>
						</td>
						<td class="width-15 active"><label class="">当前时间：</label></td>
						<td class="width-35">
							<div class='input-group form_datetime deliverySchedule' id='deliverySchedule'>
								<input type='text' readonly="readonly"  name="arrangeTime" class="form-control required"  value="<fmt:formatDate value="${constructionProject.arrangeTime}" pattern="yyyy-MM-dd"/>"/>
								<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
							</div>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="">选择具体时间：</label></td>
						<td class="width-35">
							<div class='input-group form_datetime deliverySchedule1' id='deliverySchedule1'>
								<input type='text'  name="specificTime" class="form-control required"  value="<fmt:formatDate value="${constructionProject.specificTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
								<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
							</div>
						</td>
						<td class="width-15 active"><label class=""></label></td>
						<td class="width-35">

						</td>
					</tr>
				</c:if>
			</tbody>
		</table>
	</form:form>
</body>
</html>