<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>修改项目费率</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<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 designRate = $("#designRate").val();
			var supervisionRate = $("#supervisionRate").val();
			if (designRate == "" || supervisionRate == "") {
				jp.error("请先填写项目费率");
				return;
			}
			jp.loading();
			jp.post("${ctx}/sg/capitalPlan/saveEdit",$('#inputForm').serialize(),function(data){
				function extracted() {
					jp.getParent().refresh();
					var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
					parent.layer.close(dialogIndex);
				}
				if(data.success){
					extracted();
					jp.success(data.msg)
				}else{
					jp.error(data.msg);
				}
			})
		}
	</script>
</head>
<body>
	<div class="wrapper wrapper-content">
		<div class="panel panel-primary">
			<div class="panel-body">
				<form:form id="inputForm" modelAttribute="capitalPlan" 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"   htmlEscape="false"  readonly="true"   class="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"   htmlEscape="false"  readonly="true"   class="form-control"/>
						</td>
						<td class="width-15 active"><label class=""><font color="red">*</font>项目名称：</label></td>
						<td class="width-35">
							<form:input path="projectName"   htmlEscape="false"  readonly="true"  class="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="designRate"   htmlEscape="false"  class="form-control required"/>
						</td>
						<td class="width-15 active"><label class=""><font color="red">*</font>监理费费率：</label></td>
						<td class="width-35">
							<form:input path="supervisionRate"   htmlEscape="false"  class="form-control required"/>
						</td>
					</tr>
					</tbody>
				</table>
				</form:form>
			</div>
		</div>
	</div>
</body>
</html>