<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>项目管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }
	
		  return false;
		}
		$(document).ready(function() {
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
            if(${disabled.length()>0}){$('input,textarea,select').attr("disabled","disabled");}

		});
	</script>
</head>
<body class="hideScroll">
		<form:form id="inputForm" modelAttribute="project" action="${ctx}/project/project/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>	
		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
		   <tbody>
				<tr>
					<td class="width-15 active"><label class="pull-right">合同信息：</label></td>
					<td class="width-35">
							合同名称*<sys:gridselect url="${ctx}/project/project/selectcontractInfo"
												 id="contractInfo" name="contractInfo"  value="${project.contractInfo.name}"
												 title="选择合同信息"  cssClass="form-control required"
												 labelName="contractInfo.name" labelValue="${project.contractInfo.name}"
												 fieldLabels="name" fieldKeys="name"
												 searchLabel="name" searchKey="name" ></sys:gridselect>
							合同编号*<input value="${selectedContractInfoId}" htmlEscape="false"   class="form-control input-append"/>
					</td>
				</tr>
		   		<tr>
					<td class="width-15 active"><label class="pull-right">项目信息：</label></td>
					<td class="width-35">

					</td>
				</tr>
		   		<tr>
					<td class="width-15 active"><label class="pull-right">项目概况：</label></td>
					<td class="width-35">
						<sys:gridselect url="${ctx}/project/project/selectprojectGeneral" id="projectGeneral" name="projectGeneral"  value="${project.projectGeneral.id}"  title="选择项目概况" labelName="projectGeneral.id"
										labelValue="${project.projectGeneral.id}" cssClass="form-control required" fieldLabels="name" fieldKeys="name" searchLabel="id" searchKey="id" ></sys:gridselect>
					</td>
				</tr>
		   		<tr>
					<td class="width-15 active"><label class="pull-right">投标单位：</label></td>
					<td class="width-35">
						<sys:gridselect url="${ctx}/project/project/selectworkClientLinkman" id="workClientLinkman" name="workClientLinkman"  value="${project.workClientLinkman.id}"  title="选择投标单位" labelName="workClientLinkman.id"
										labelValue="${project.workClientLinkman.id}" cssClass="form-control required" fieldLabels="name" fieldKeys="name" searchLabel="id" searchKey="id" ></sys:gridselect>
					</td>
				</tr>
		   		<tr>
					<td class="width-15 active"><label class="pull-right">评标记录：</label></td>
					<td class="width-35">
						<sys:gridselect url="${ctx}/project/project/selectprojectEvaluationRecord" id="projectEvaluationRecord" name="projectEvaluationRecord"  value="${project.projectEvaluationRecord.id}"  title="选择评标记录" labelName="projectEvaluationRecord.id"
										labelValue="${project.projectEvaluationRecord.id}" cssClass="form-control required" fieldLabels="name" fieldKeys="name" searchLabel="id" searchKey="id" ></sys:gridselect>
					</td>
				</tr>
		   		<tr>
					<td class="width-15 active"><label class="pull-right">项目组信息：</label></td>
					<td class="width-35">
						<sys:gridselect url="${ctx}/project/project/selectworkprojectgroup" id="workprojectgroup" name="workprojectgroup"  value="${project.workprojectgroup.id}"  title="选择项目组信息" labelName="workprojectgroup.id"
										labelValue="${project.workprojectgroup.id}" cssClass="form-control required" fieldLabels="name" fieldKeys="name" searchLabel="id" searchKey="id" ></sys:gridselect>
					</td>
				</tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>