regBaseZrzjgrqForm.jsp 2.57 KB
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>自然幢信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#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);
					}
				}
			});
			
		});
		
		function submitZrz(ids){
			var jgrq = $("#jgrqtext").val();
			if(jgrq == null || jgrq == ""){
				alert("竣工日期不能为空");
			}
			$.ajax({
				type: "POST",
				url: "${ctx}/reg/base/regBaseZrz/zrzjgrqsave",
				cache: false,
				data: "ids="+ids+"&jgrq="+jgrq,
				async: false,
				success: function(modelmap) {
					if(modelmap.success == 0){
						window.opener.parent.location.reload();
						window.close();
					}
				}
			});
		}
// 		 action="${ctx}/reg/base/regBaseZrz/zrzjgrqsave"
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/reg/base/regBaseZrz/zrzjgrqupdate">自然幢信息</a></li>
	</ul><br/>
	<form:form id="inputForm" name="inputForms" modelAttribute="regBaseZrz" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<table class="otable-form" >
			<tr>
				<td class="tit">不动产单元号:</td>
				<td><form:input path="bdcdyh" id="bdcdyhtext" htmlEscape="false" readOnly="true" maxlength="28" class="input-xlarge"/></td>
			</tr>
			<tr>
				<td class="tit">竣工日期:</td>
				<td><input name="jgrq" type="text" id="jgrqtext" maxlength="20" class="input-medium Wdate required"
					value="<fmt:formatDate value="${regBaseZrz.jgrq}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
					 <span class="help-inline"><font color="red">*</font> </span> 
				</td>
			</tr>
		</table>
		<div class="form-actions">
			<shiro:hasPermission name="reg:base:regBaseZrz:edit">
				<input id="btnSubmit" class="btn btn-primary" type="button" onclick="submitZrz('${regBaseZrz.id}')" value="保 存"/>&nbsp;&nbsp;&nbsp;&nbsp;
			</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="gobackzrzlist('-1')"/>
		</div>
	</form:form>
</body>
</html>