<%@ 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');//校验表单
            if(!isValidate){
                return false;
			}else {
				var name = $("#reserveProjectNameId").val();
				if (name == '') {
					jp.error("请选择项目");
					return false;
				}
				jp.loading();
				jp.post("${ctx}/sg/managementcenter/project/tearEditSave", $('#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);
					}
				})
			}

        }
		function noFue(val){
			document.getElementById('constructionContractRate').value = val >= 0 ? val : 0;
		}
	</script>
</head>
<body class="bg-white">
		<form:form id="inputForm" modelAttribute="project" class="form-horizontal">
		<form:hidden path="id"/>	
		<table class="table table-bordered">
			<tbody>
				<tr>
					<td class="width-15 active"><label class=""><font color="red">*</font>储备项目名称：</label></td>
					<td class="width-35">
						<form:input path="reserveProjectName" readonly="true" htmlEscape="false" cssClass="form-control "/>
					</td>
					<td class="width-15 active"><label class=""><font color="red">*</font>项目名称：</label></td>
					<td class="width-35">
						<form:input path="projectName" readonly="true" htmlEscape="false" cssClass="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class=""><font color="red">*</font>项目定义号：</label></td>
					<td class="width-35">
						<form:input path="projectId" readonly="true" htmlEscape="false" cssClass="form-control "/>
					</td>
					<td class="width-15 active"><label class=""><font color="red">*</font>设备材料名称：</label></td>
					<td class="width-35">
						<form:input path="tearDown.reservedName" readonly="true" htmlEscape="false" cssClass="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="">型号 ：</label></td>
					<td class="width-35">
						<form:input path="tearDown.reserveModel"   htmlEscape="false" class="form-control required"/>
					</td>
					<td class="width-15 active"><label class="">单位：</label></td>
					<td class="width-35">
						<form:input path="tearDown.reserveUnit"   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="tearDown.reserveNumber"  htmlEscape="false" class="form-control number required"/>
					</td>
					<td class="width-15 active"><label class="">备注：</label></td>
					<td class="width-35">
						<form:input path="tearDown.reserveNotes"  htmlEscape="false" class="form-control required"/>
					</td>
				</tr>

			</tbody>
		</table>
	</form:form>
</body>
</html>