4d5f8c491ecdb279986db241eeaf4a4da724f1a7.svn-base 13.6 KB
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>预告登记房屋历史登记数据录入管理</title>
	<br/>
	<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 addRow(list, idx, tpl, row){
			$(list).append(Mustache.render(tpl, {
				idx: idx, delBtn: true, row: row
			}));
			$(list+idx).find("select").each(function(){
				$(this).val($(this).attr("data-value"));
			});
			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
				var ss = $(this).attr("data-value").split(',');
				for (var i=0; i<ss.length; i++){
					if($(this).val() == ss[i]){
						$(this).attr("checked","checked");
					}
				}
			});
		}
		function delRow(obj, prefix){
			var id = $(prefix+"_id");
			var delFlag = $(prefix+"_delFlag");
			if (id.val() == ""){
				$(obj).parent().parent().remove();
			}else if(delFlag.val() == "0"){
				delFlag.val("1");
				$(obj).html("&divide;").attr("title", "撤销删除");
				$(obj).parent().parent().addClass("error");
			}else if(delFlag.val() == "1"){
				delFlag.val("0");
				$(obj).html("&times;").attr("title", "删除");
				$(obj).parent().parent().removeClass("error");
			}
		}
		
		//房屋选择
		function firstHouseGuide(){
			//弹出窗口的宽度; 
			var iWidth=1100; 
			//弹出窗口的高度;
	       	var iHeight=600;
	       	//获得窗口的垂直位置 
	       	var iTop = (window.screen.height - 30 - iHeight) / 2;
	       	//获得窗口的水平位置 
	       	var iLeft = (window.screen.width - 10 - iWidth) / 2;
	       	var djxl = $("#djxltext").data('select2').val();
	       	var url =  "${ctx}/reg/base/regBaseXm/guideList?DJLX="+djxl+"&YWH="+$("#ywhtext").val()+"&tz=${tz}";
	       	window.open(url, "楼盘信息向导", "width=" + iWidth + ", height=" + iHeight + ",top=" + iTop + ",left=" + iLeft + ",toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no,alwaysRaised=yes,depended=yes");
		}
		
		function setinfo(ysdm,bdcdyh,xmmc,zrzh,ch,hh,zl,fwjg,sjc,fttdmj,scjzmj,scftjzmj,sjcs,fwxz){
			$("#bdcdyh").val(bdcdyh);
			$("#xmmc").val(xmmc);
			$("#zrzh").val(zrzh);
			$("#ch").val(ch);
			$("#hh").val(hh);
			$("#zl").val(zl);
			$("#fwjg").val(fwjg);
			$("#sjc").val(sjc);
			$("#fttdmj").val(fttdmj);
			$("#scjzmj").val(scjzmj);
			$("#scftjzmj").val(scftjzmj);
			$("#sjcs").val(sjcs);
			$("#fwxz").val(fwxz);
		}
		
		function qlrwinOpen() 
		{
			var ifmWindow_1 = document.getElementById('gjzwframe').contentWindow;
			var tbLen_1 = $(ifmWindow_1.document).find("#contentTable").find("tbody").find("tr").length;
			if(tbLen_1 == 0){
				alert("请您先添加预告登记信息!");
				return;
			}	
			//弹出窗口的宽度; 
			var iWidth=1100; 
			//弹出窗口的高度;
	       	var iHeight=600;
	       	//获得窗口的垂直位置 
	       	var iTop = (window.screen.height - 30 - iHeight) / 2;
	       	//获得窗口的水平位置 
	       	var iLeft = (window.screen.width - 10 - iWidth) / 2;
	       	var gyfs = "";
	       	$.ajax({ 
				type:"POST", 
				url:"${ctx}/reg/bus/regBusHisHouseQlr/isFlagGyqk", 
				cache: false, 
				data:"YWH="+$("#ywhtext").val(),
			    async : false,  
				success:function(modelmap){
					successbj = modelmap.success;
					gyfs = modelmap.gyfs;
					if(modelmap.success != 1){
						alert(modelmap.msg);
						return;
					}
				}
			});
       		if(successbj == 1){
				window.open("${ctx}/reg/bus/regBusHisHouseQlr/form?YWH="+$("#ywhtext").val()+"&gyfs="+gyfs,"窗口2",
					"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
       		}
		}
		function ywrwinOpen() 
		{
			var ifmWindow_1 = document.getElementById('gjzwframe').contentWindow;
			var tbLen_1 = $(ifmWindow_1.document).find("#contentTable").find("tbody").find("tr").length;
			if(tbLen_1 == 0){
				alert("请您先添加预告登记信息!");
				return;
			}
			//弹出窗口的宽度; 
			var iWidth=1100; 
			//弹出窗口的高度;
	       	var iHeight=600;
	       	//获得窗口的垂直位置 
	       	var iTop = (window.screen.height - 30 - iHeight) / 2;
	       	//获得窗口的水平位置 
	       	var iLeft = (window.screen.width - 10 - iWidth) / 2;
       		window.open("${ctx}/reg/bus/regBusHisHouseYwr/form?H=1&YWH="+$("#ywhtext").val(),"窗口1",
    				"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
		}
		
		function setqlxzinfo(qlxz,ywh) 
		{
			$("#qlxz").val(qlxz);
			$("#ywhtext").val(ywh);
		}
		function getUrl(){
			 //查询权利人共有方式
			 var successbj ="";
			 $.ajax({ 
					type:"POST", 
					url:"${ctx}/reg/bus/regBusHisHouseQlr/querygyfs", //请求路径 
					cache: false, 
					data:"YWH="+$("#ywhtext").val(),
				    async : false,  
					success:function(modelmap){
						successbj = modelmap.success;
						if(modelmap.success == 1){
							alert(modelmap.msg);
							return;
						}
					}
			});
			if(successbj == 0){
				$(".error").remove();
				if($("#qllxtext").val() == "" || $("#qllxtext").val() == null){
					alert("权利类型不能为空");
					return;
				}
				if($("#qlxz").val() == "" || $("#qlxz").val() == null){
					alert("权利性质不能为空"); 
					return;
				}
				var bdcqzh = $("#bdcqzh").val();
				var bdcqzbh = $("#bdcqzbh").val();
				if(bdcqzh == "" || bdcqzbh == ""){
					alert("不动产权证明号或证明编号不能为空!");
					return;
				}
				var textfzsj = $("#textfzsj").val();
				if(textfzsj == "" || textfzsj == null){
					alert("发证时间不能为空!");
					return;
				}
				var ifmWindow_1 = document.getElementById('gjzwframe').contentWindow;
				var tbLen_1 = $(ifmWindow_1.document).find("#contentTable").find("tbody").find("tr").length;
				if(tbLen_1 == 0){
					alert("请您添加预告登记信息!");
					return;
				}
				var ifmWindow = document.getElementById('qlrframe').contentWindow;
				var tbLen = $(ifmWindow.document).find("#contentTable").find("tbody").find("tr").length;
				var ifmWindow_1 = document.getElementById('ywrframe').contentWindow;
				var tbLen_1 = $(ifmWindow_1.document).find("#contentTable").find("tbody").find("tr").length;
				if(tbLen == 0 || tbLen_1 == 0){
					alert("请您添加买受人或出卖人信息!");
					return;
				}
				document.getElementById("btnSubmit").disabled="disabled";
				document.inputForms.action = "${ctx}/reg/bus/regBusHisHouseBdcqzsdjxx/save?H=1&optype=${optype}";
				document.inputForms.submit();
			}
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
	<c:if test="${empty VIEWS}">
		<li><a href="${ctx}/reg/bus/regBusHisHouseBdcqzsdjxx/listYG">房屋预告登记历史数据录入列表</a></li>
	</c:if>
	<li class="active"><a href="#">房屋预告登记历史数据录入<shiro:hasPermission name="reg:bus:regBusHisHouseBdcqzsdjxx:edit">${not empty regBusHisHouseBdcqzsdjxx.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="reg:bus:regBusHisHouseBdcqzsdjxx:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" name="inputForms"  modelAttribute="regBusHisHouseBdcqzsdjxx" action="${ctx}/reg/bus/regBusHisHouseBdcqzsdjxx/save?H=1"  method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<fieldset>
			<legend>房屋基本信息</legend>
			<table class="table-form">
					<tr>
						<td class="tit">业务编号:</td>
						<td>
							<form:input path="ywh" id="ywhtext"  htmlEscape="false"  readonly="true"   value="${YWHIS}"  maxlength="100" class="input-large"/>
						</td>
						<td class="tit"><font color="red">登记小类:</font></td>
						<td>
							<form:select path="djxl" id="djxltext" class="input-large required">
								<form:option value="803" label="预告登记"/>
								<form:option value="806"  label="转移预告登记"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td> 
						<td class="tit">权利类型</td>
						<td>
							<form:select path="qllx" id="qllxtext" class="input-large required">
								<form:option value="" label=""/>
								<form:option value="1"  label="集体土地所有权"/>
								<form:option value="2"  label="国家土地所有权"/>
								<form:option value="3"  label="国有建设用地使用权"/>
								<form:option value="4"  label="国有建设用地使用权/房屋所有权"/>
								<form:option value="5"  label="宅基地使用权"/>
								<form:option value="6"  label="宅基地使用权/房屋所有权"/>
								<form:option value="7"  label="集体建设用地使用权"/>
								<form:option value="8"  label="集体建设用地使用权/房屋所有权"/>
								<form:option value="24"  label="抵押权"/>
								<form:option value="27"  label="预告登记"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
					</tr>
					
					<tr>
						<td class="tit">不动产登记证明:</td>
						<td>
							<form:input path="bdcqzh" id="bdcqzh"  htmlEscape="false" maxlength="50" class="input-large required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">证书编号:</td>
						<td>
							<form:input path="bdcqzbh" id="bdcqzbh" htmlEscape="false"  maxlength="50"  class="input-large required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">出让合同号(划拨决定书):</td>
						<td>
							<form:input path="hbhth"   htmlEscape="false"  maxlength="100" class="input-large"/>
						</td>
					</tr>
					
					<tr>
						<td class="tit">使用期限:</td>
						<td>
							<form:input path="syqx" htmlEscape="false"  maxlength="12" class="input-large"/>
						</td>
						<td class="tit">划拨价款:</td>
						<td>
							<form:input path="hbjk"   htmlEscape="false" maxlength="100" class="input-large"/>
						</td>
						<td class="tit">发证时间:</td>
							<td><input name="fzsj" type="text" id="textfzsj" maxlength="20" class="input-medium Wdate required"
									value="${regBusHisHouseBdcqzsdjxx.fzsj}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
					</tr>
					<tr>
						<td class="tit">权利性质</td>
						<td>
							<form:input path="qlxz" id="qlxz" htmlEscape="false"  readonly="true"  maxlength="12" class="input-large required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">批文号:</td>
						<td>
							<form:input path="pwh"  htmlEscape="false" maxlength="50" class="input-large"/>
						</td>
						<td class="tit">备注:</td>
						<td >
							<form:input path="remarks"  htmlEscape="false" maxlength="50" class="input-large"/>
						</td>
					</tr>
			</table>
		</fieldset>
		
		</br>
		<fieldset>
			<table class="table-form">
				<div>
				<c:if test="${empty xg}">
					<input id="queryGuide" class="btn btn-primary" style="float:right;" type="button" onclick="javascript:firstHouseGuide();" value="预告登记信息添加"/><br/><br/>
				</c:if>
					<iframe id="gjzwframe" name="gjzwframe" src="${ctx}/reg/bus/regBusHisHouseBdcqzsdjxx/hishouseyglist?YWH=${LSH}&xg=${xg}&optype=${optype}" width="100%" height="200" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="yes" allowtransparency="yes"></iframe>&nbsp;
				</div>
			</table>
		</fieldset>
		</br>

		<fieldset>
			<legend>买受人信息</legend>
			<table class="table-form">
				<div>
					<c:if test="${empty xg}">
					<input id="btnOpen" class="btn btn-primary" style="float:right;" type="button" onclick="qlrwinOpen();" value="买受人信息添加"/>
					</c:if>
					<iframe id="qlrframe" name="qlrframe" src="${ctx}/reg/bus/regBusHisHouseQlr/list?YWH=${LSH}&xg=${xg}" width="100%" height="200" frameborder="no" border="0" marginwidth="0"
							 marginheight="0" scrolling="yes" allowtransparency="yes"></iframe>&nbsp;
				</div>
			</table>
		</fieldset>
		
		<fieldset>
			<legend>出卖人信息</legend>
			<legend></legend>
			<table class="table-form">
				<div>
					<c:if test="${empty xg}">
					<input id="btnOpen" class="btn btn-primary" style="float:right;" type="button" onclick="ywrwinOpen();" value="出卖人信息添加"/>
					</c:if>
					<iframe id="ywrframe" name="ywrframe" src="${ctx}/reg/bus/regBusHisHouseYwr/list?YWH=${LSH}&xg=${xg}&H=1" width="100%" height="200" frameborder="no" border="0" marginwidth="0"
							 marginheight="0" scrolling="yes" allowtransparency="yes"></iframe>&nbsp;
				</div>
			</table>
		</fieldset>
		
		</br>
			<div class="form-actions" align="center">
			<c:if test="${empty xg}">
				<shiro:hasPermission name="reg:bus:regBusHisHouseBdcqzsdjxx:edit"><input id="btnSubmit"  class="btn btn-primary" type="button"  onclick="getUrl()" value="保 存"/>&nbsp;</shiro:hasPermission>
			</c:if>
			<c:if test="${not empty VIEWS}">
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="javascript:window.close();"/>
			</c:if>
			</div>
	</form:form>
</body>
</html>