46f79408bcd68b66f439495582c76df89e9fd992.svn-base 52.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334
<%@ 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 src="${ctxStatic}/gis/js/init.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/lib/OpenLayers.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/lib/zdclient.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/lib/jquery.orbit-1.2.3.js" type="text/javascript"></script>    
    <script src="${ctxStatic}/gis/js/global.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/js/config.js" type="text/javascript"></script>
 
	<script src="${ctxStatic}/select3/AreaData_min.js" type="text/javascript"></script>
    <script src="${ctxStatic}/select3/Area.js" type="text/javascript"></script>
	
	
	<link href="${ctxStatic}/gis/lib/jqueryEasyui/easyui.css" rel="stylesheet" type="text/css" />
    <link href="${ctxStatic}/gis/lib/jqueryEasyui/icon.css" rel="stylesheet" type="text/css" />
    <script src="${ctxStatic}/gis/lib/jqueryEasyui/jquery.easyui.min.js" type="text/javascript"></script>
	

	<script type="text/javascript">
	  var mapreturnvale;
	  var mapreturnvaleList;
	  var DJQTotle,DJZQTotle,tempwo,tempoptype,tempywh,tempdaoruxinxi;
	  var DJQName = new Array();
	  var DJZQName = new Array();
	    var regBaseHisZbinfoRowIdx = 0;
		$(document).ready(function() {
			
			$("#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);
					}
				}
			});
			var id = "${regBusHisBdcqzsdjxx.id}";
			var jzdzb = "${regBusHisBdcqzsdjxx.jzdzb}";
			var tzm = "${regBusHisBdcqzsdjxx.zdtzm}";
			if(id == undefined || id == null || id ==""){
				if((jzdzb!="")&&(jzdzb!=null)&&(jzdzb != undefined)&&(tzm!="")&&(tzm!=null)&&(tzm != undefined))
				{
					regBaseHisZbinfoRowIdx = 0, regBaseZbinfoTpl = $("#regBaseZbinfoTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
					var data = ${fns:toJson(regBusHisBdcqzsdjxx.regBaseHisZbinfoList)};
					
					for (var i=0; i<data.length; i++){
						addRow('#regBaseHisZbinfoList', regBaseHisZbinfoRowIdx, regBaseZbinfoTpl, data[i]);
						regBaseHisZbinfoRowIdx = regBaseHisZbinfoRowIdx + 1;
					}
				}
				initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, '44', '0', '0');	
			}
			views();
			$("#seachprovtext").data('select2').val(["610702"]);
		});
		
		
		$(function(){
		});
		function views(){
			var viewid = "${VIEWS}";
			if(viewid == undefined || viewid == null || viewid ==""){
				return;
			}
			$("input:not(:button,:submit,:hidden),select,textarea").attr("disabled","disabled");
		}
		//得到地区码 
		function getAreaID(){
			var area = 0;
			if($("#seachdistricttext").val() != "0"){
				area = $("#seachdistricttext").val();                
			}else if ($("#seachcitytext").val() != "0"){
				area = $("#seachcitytext").val();
			}else{
				area = $("#seachprovtext").val();
			}
			return area;
		}
		
		function getAreaInfo() {
			//地区码 
			var areaID = getAreaID();
			//地区名 
			var areaName = getAreaNamebyID(areaID) ;
			$("#chcode").val(areaID);
			$("#zddm").val(areaID);
			$("#bdcdyhid").val(areaID);
			$("#zltext").val(areaName);
		}
		
		//根据地区码查询地区名 
		function getAreaNamebyID(areaID){
			var areaName = "";
			if(areaID.length == 6){
				areaName = area_array[areaID];
			}else if(areaID.length == 9){
				var index1 = areaID.substring(0, 6);
				areaName = area_array[index1] + "" + sub_array[index1][areaID];
			}else if(areaID.length == 12){
				var index1 = areaID.substring(0, 6);
				var index2 = areaID.substring(0, 9);
				areaName = area_array[index1] + "" + sub_array[index1][index2] + "" + sub_arr[index2][areaID];
			}
			return areaName;
		}
		
		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"));
			});
			for(var i=0;i<150;i++){
				$("#regBaseHisZbinfoList"+i+"_sort").val(i+1);
				$("#regBaseHisZbinfoList"+i+"_zbdmc").val("J"+(i+1));
			}
			$(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("撤销删除").attr("title", "撤销删除");
				$(obj).parent().parent().addClass("error");
			}else if(delFlag.val() == "1"){
				delFlag.val("0");
				$(obj).html("删    除").attr("title", "删除");
				$(obj).parent().parent().removeClass("error");
			}
		}

		function qlrwinOpen() 
		{
			//弹出窗口的宽度; 
			var iWidth=1100; 
			//弹出窗口的高度;
	       	var iHeight=600;
	       	//获得窗口的垂直位置 
	       	var iTop = (window.screen.height - 30 - iHeight) / 2;
	       	//获得窗口的水平位置 
	       	var iLeft = (window.screen.width - 10 - iWidth) / 2;
	       	var op= "${optype}";
	       	if(op == 1){
	       		window.open("${ctx}/reg/bus/regBusHisHouseQlr/form?lsbj=1&optype=${optype}&YWH="+$("#ywhtext").val(),"11",
						"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
	       	}else{
	       		window.open("${ctx}/reg/bus/regBusHisHouseQlr/form?lsbj=1&optype=${optype}&YWH="+$("#ywhtext").val(),"22",
						"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
	       	}
		}
		/*function getUrl(){
			$(".error").remove();
			if($("#bdcdyh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#bdcdyh");
				return;
			}
			if($("#zl").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zl");
				return;
			}
			if($("#yt").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#yt");
				return;
			}
			if($("#djxl").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djxl");
				return;
			}
			if($("#qllx").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#qllx");
				return;
			}
			if($("#qlxz").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#qlxz");
				return;
			}
			if($("#djjg").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djjg");
				return;
			}
			if($("#zdmj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdmj");
				return;
			}
			if($("#dbr").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#dbr");
				return;
			}
			if($("#djsj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djsj");
				return;
			}
			if($("#qxdm").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#qxdm");
				return;
			}
			if($("#djyy").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djyy");
				return;
			} 
			if($("#bdcdjzmh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#bdcdjzmh");
				return;
			}
			if($("#zwr").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwr");
				return;
			}
			if($("#zwrzjzl").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwrzjzl");
				return;
			}
			if($("#zwrzjh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwrzjh");
				return;
			}
			if($("#zwlxjssj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwlxjssj");
				return;
			} 
			if($("#zwlxqssj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwlxqssj");
				return;
			}
			if($("#bdcqzbh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#bdcqzbh");
				return;
			}
			if($("#zdmjtext").val() == ""){
				 alert('宗地面积不能为空,请确认!!!');
				 return;
			}
			var zl = $("#zltext").val();
			if(zl.indexOf("X") > 0 ){
			    alert('坐落中包含非法字符X,请确认!!!');
			    return;
			}
			var ifmWindow = document.getElementById('qlrframe').contentWindow;
			var tbLen = $(ifmWindow.document).find("#contentTable").find("tbody").find("tr").length;
 			if(tbLen == 0){
				alert("请添加权利人信息!");
 				return;
 			}
 			var zdtzm = $("#zdtzmTxt").val();
			var tdsyqdm = $("#tdsyqdmTxt").val();
			if (zdtzm == "A" || zdtzm == "C") {
				if(tdsyqdm == 'G' || tdsyqdm == 'Z'){
					alert("土地所有权代码与宗地特征码不匹配,不能保存!");
					return;
				}
			}else if(zdtzm == "B" || zdtzm == "D" || zdtzm == "E" || zdtzm == "F" || zdtzm == "S" || zdtzm == "X") {
				if(tdsyqdm == 'Z'){
					alert("土地所有权代码与宗地特征码不匹配,不能保存!");
					return;
				}
			}else if(zdtzm == "W" || zdtzm == "Y"){
				if(tdsyqdm == 'G' || tdsyqdm == 'J'){
					alert("土地所有权代码与宗地特征码不匹配,不能保存!");
					return;
				}
			}
 			var zddm = $("#zddm").val();
			var bdcdyh = $("#bdcdyhid").val();
			var dyh = bdcdyh.substr(0,14);
			var zdm = zddm.substr(0,14);
			if(zdm != dyh){
				alert("宗地代码与不动产单元号前14位不一致");
				return;
			}
			var str = "${daoruxinxi}";
			alert(str);
			document.inputForms.action = "${ctx}/reg/bus/regBusHisBdcqzsdjxx/save?WO=2&optype=${optype}&daoruxinxi="+str;
			document.inputForms.submit();
		}*/
		function getUrl(){
			$(".error").remove();
			if($("#bdcdyh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#bdcdyh");
				return;
			}
			if($("#zl").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zl");
				return;
			}
			if($("#yt").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#yt");
				return;
			}
			if($("#djxl").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djxl");
				return;
			}
			if($("#qllx").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#qllx");
				return;
			}
			if($("#qlxz").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#qlxz");
				return;
			}
			if($("#djjg").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djjg");
				return;
			}
			if($("#zdmj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdmj");
				return;
			}
			if($("#dbr").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#dbr");
				return;
			}
			if($("#djsj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djsj");
				return;
			}
			if($("#qxdm").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#qxdm");
				return;
			}
			if($("#djyy").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#djyy");
				return;
			} 
			if($("#bdcdjzmh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#bdcdjzmh");
				return;
			}
			if($("#zwr").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwr");
				return;
			}
			if($("#zwrzjzl").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwrzjzl");
				return;
			}
			if($("#zwrzjh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwrzjh");
				return;
			}
			if($("#zwlxjssj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwlxjssj");
				return;
			} 
			if($("#zwlxqssj").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#zwlxqssj");
				return;
			}
			if($("#bdcqzbh").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#bdcqzbh");
				return;
			}
			if($("#bdcqzhid").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#bdcqzhid");
				return;
			}
			/*if($("#seachcitytext").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#seachcitytext");
				return;
			}
			if($("#seachdistricttext").val() == ""){
				$("<label for='name' class='error'>必填信息</label>").insertAfter("#seachdistricttext");
				return;
			}*/
			if($("#zdmjtext").val() == ""){
				 alert('宗地面积不能为空,请确认!!!');
				 return;
			}
			var zl = $("#zltext").val();
			if(zl.indexOf("X") > 0 ){
			    alert('坐落中包含非法字符X,请确认!!!');
			    return;
			}
			var ifmWindow = document.getElementById('qlrframe').contentWindow;
			var tbLen = $(ifmWindow.document).find("#contentTable").find("tbody").find("tr").length;
 			if(tbLen == 0){
				alert("请添加权利人信息!");
 				return;
 			}
 			var zdtzm = $("#zdtzmTxt").val();
			var tdsyqdm = $("#tdsyqdmTxt").val();
			if (zdtzm == "A" || zdtzm == "C") {
				if(tdsyqdm == 'G' || tdsyqdm == 'Z'){
					alert("土地所有权代码与宗地特征码不匹配,不能保存!");
					return;
				}
			}else if(zdtzm == "B" || zdtzm == "D" || zdtzm == "E" || zdtzm == "F" || zdtzm == "S" || zdtzm == "X") {
				if(tdsyqdm == 'Z'){
					alert("土地所有权代码与宗地特征码不匹配,不能保存!");
					return;
				}
			}else if(zdtzm == "W" || zdtzm == "Y"){
				if(tdsyqdm == 'G' || tdsyqdm == 'J'){
					alert("土地所有权代码与宗地特征码不匹配,不能保存!");
					return;
				}
			}
 			var zddm = $("#zddm").val();
			var bdcdyh = $("#bdcdyhid").val();
			var dyh = bdcdyh.substr(0,14);
			var zdm = zddm.substr(0,14);
			if(zdm != dyh){
				alert("宗地代码与不动产单元号前14位不一致");
				return;
			}
			checkDJQ(actualSvrcfg.DJQ);
			//document.inputForms.action = "${ctx}/reg/bus/regBusHisBdcqzsdjxx/save?WO=2&optype=${optype}&daoruxinxi="+str;
			//document.inputForms.submit();
		}
		 function selectTuCeng(ListTucengNO)
	        {
	        	var tucengValue="";
	        	switch(ListTucengNO)
	        	{
	        	 case "A":
	        		  tucengValue=actualSvrcfg.SYQZDGDBP;
	        		  break;
	        	  case "B":
	        		  tucengValue=actualSvrcfg.SHYQZD_DB;
	        		  break;
	        	  case "S":
	        		  tucengValue=actualSvrcfg.SHYQZD_DS;
	        		  break;
	        	  case "X":
	        		  tucengValue=actualSvrcfg.SHYQZD_DX;
	        		  break;
	        	  case "C":
	        		  tucengValue=actualSvrcfg.ZJDGDBP;
	        		  break;
	        	  case "D":
	        		  tucengValue=actualSvrcfg.CBJYQZD_GD;
	        		  break;
	        	  case "E":
	        		  tucengValue=actualSvrcfg.CBJYQZD_LD;
	        		  break;
	        	  case "F":
	        		  tucengValue=actualSvrcfg.CBJYQZD_CD;
	        		  break;
	        	  case "I":
	        		  break;
	        	  case "J":
	        		  break;
	        	  default:break;
	        	
	        	}
	        	return tucengValue;
	        }		
		
		function checkDJQ(tuceng)
		{	
			
			if(($("#regBaseHisZbinfoList"+0+"_zbx").val())!=($("#regBaseHisZbinfoList"+(regBaseHisZbinfoRowIdx-1)+"_zbx").val()))
	    	{
	    		alert("坐标有误!");
	    		return;
	    	}
			
			var pointObjcheckQu = new Array();
			for(var j=0; j<regBaseHisZbinfoRowIdx; j++){			
			  pointObjcheckQu[j] = new Zondy.Object.Point2D(parseFloat($("#regBaseHisZbinfoList"+j+"_zby").val()), parseFloat($("#regBaseHisZbinfoList"+j+"_zbx").val()));									
			}
			var queryStructcheckQu=new Zondy.Service.QueryFeatureStruct(
					{
						IncludeGeometry:true,
						IncludeAttribute:true,
						IncludeWebGraphic:false
						});
			// var lineObjcheckQu=new Zondy.Object.PolyLineForQuery ; //线要素查询
	    	 var polyLinecheckQu=new Zondy.Object.PolyLineForQuery(pointObjcheckQu);
	    	 	 
	    	 var queryParamcheckQu = new Zondy.Service.QueryByLayerParameter(tuceng,{

	                geometry: polyLinecheckQu,

	                resultFormat: "json",

	                struct: queryStructcheckQu

	            });
	    	 queryParamcheckQu.recordNumber=1000;
			var queryServicecheckQu=new Zondy.Service.QueryLayerFeature(queryParamcheckQu,
					{
				ip: actualSvrcfg.ip,        //IP地址
				port: actualSvrcfg.port ,   //端口号
				requestType:"POST"
				});
			queryServicecheckQu.query(querryDJQSuccess);			
		}
	  	function querryDJQSuccess(data){
			DJQTotle=data.TotalCount;
			document.getElementById("DJQ").options.length = 0;  
			for(var i=0;i<data.TotalCount;i++)
			{
				DJQName[i]=data.SFEleArray[i].AttValue[3];
				var items = new Option(data.SFEleArray[i].AttValue[3]);
		        document.getElementById('DJQ').options.add(items);
			}
			checkDJZQ(actualSvrcfg.DJZQ);
		}
	  	function checkDJZQ(tuceng)
		{
			var pointObjcheckQu = new Array();
			for(var j=0; j<regBaseHisZbinfoRowIdx; j++){
				pointObjcheckQu[j] = new Zondy.Object.Point2D(parseFloat($("#regBaseHisZbinfoList"+j+"_zby").val()), parseFloat($("#regBaseHisZbinfoList"+j+"_zbx").val()));							
				
		}
			var queryStructcheckQu=new Zondy.Service.QueryFeatureStruct(
					{
						IncludeGeometry:true,
						IncludeAttribute:true,
						IncludeWebGraphic:false
						});
			// var lineObjcheckQu=new Zondy.Object.PolyLineForQuery ; //线要素查询
	    	 var polyLinecheckQu=new Zondy.Object.PolyLineForQuery(pointObjcheckQu);
	    	 	 
	    	 var queryParamcheckQu = new Zondy.Service.QueryByLayerParameter(tuceng,{

	                geometry: polyLinecheckQu,

	                resultFormat: "json",

	                struct: queryStructcheckQu

	            });
	    	 queryParamcheckQu.recordNumber=1000;
			var queryServicecheckQu=new Zondy.Service.QueryLayerFeature(queryParamcheckQu,
				{
				ip: actualSvrcfg.ip,        //IP地址
				port: actualSvrcfg.port ,   //端口号
				requestType:"POST"
				});
			queryServicecheckQu.query(querryDJZQSuccess);
			
		}
		function querryDJZQSuccess(data){
			var i;		
			var DJQfanxie = document.getElementById("seachcitytext");
			var DJZQfanxie = document.getElementById("seachdistricttext");  
						
			DJZQTotle=data.TotalCount;
			document.getElementById("QJZQ").options.length = 0;  
			for(i=0;i<data.TotalCount;i++)
			{
				DJZQName[i]=data.SFEleArray[i].AttValue[3];
				document.getElementById('QJZQ').options.add(new Option(DJZQName[i]));
			}
	       
                      
            $('#SelectDJQZQ').dialog('open');
            $("#SelectDJQZQ").dialog("move",{top:$(document).scrollTop() + ($(window).height()-300) * 0.5});//带滚动条的div窗口居中显示
            //document.getElementById('DJQ').options[0].selected = true;
	        //document.getElementById('QJZQ').options[0].selected = true;			    
           $("#DJQ").data('select2').val(DJQName[0]);
           $("#QJZQ").data('select2').val(DJZQName[0]);
          
            //addyaosu();
		}
		function addyaosu()
		{
			var tempcheck;
			var pointObj = new Array(); 
			var zbtemp="",zblisttemp="";
			$('#SelectDJQZQ').dialog('close');
			for(var j=0; j<regBaseHisZbinfoRowIdx; j++){
					pointObj[j]=$("#regBaseHisZbinfoList"+j+"_zbx").val()+","+$("#regBaseHisZbinfoList"+j+"_zby").val();
				    zblisttemp=zblisttemp+$("#regBaseHisZbinfoList"+j+"_zbdmc").val()+"["+$("#regBaseHisZbinfoList"+j+"_zbx").val()+","+$("#regBaseHisZbinfoList"+j+"_zby").val()+"] "+","+$("#regBaseHisZbinfoList"+j+"_id").val()+","+$("#regBaseHisZbinfoList"+j+"_delFlag").val()+","+$("#regBaseHisZbinfoList"+j+"_sort").val()+";";
				    zbtemp=zbtemp+$("#regBaseHisZbinfoList"+j+"_zbdmc").val()+"["+$("#regBaseHisZbinfoList"+j+"_zbx").val()+","+$("#regBaseHisZbinfoList"+j+"_zby").val()+"] ";
			}
			
			var str1=$("#DJQ").select2('data').text;
			str1=str1.replace( /^\s+|\s+$/g, "" );
			var str3="",str4="";
			
			for(i=0;i<document.getElementById("seachcitytext").options.length;i++)
	        { 
	           var str=document.getElementById("seachcitytext").options[i].text;
	           str=str.replace( /^\s+|\s+$/g, "" );
	           if((str1!="")&&(str!=""))
	           {
	        	  if(str1.length>str.length)	
	               {
	        	     str4="";
	        	     if(str==str1.substring(0,str.length))str4="匹配";
	               }
	              else
	               {
	        	     if(str1.length<str.length)
	        	     {
	        		   str4="";
	        		   if(str1==str.substring(0,str1.length))str4="匹配";
	        	    }
	              }
	           }
	           if((str==str1)||(str4=="匹配"))
	           {
	              document.getElementById('seachcitytext').options[i].selected = true;
	              str3=document.getElementById("seachcitytext").options[i].text;
	              $("#seachcitytext").data('select2').val(document.getElementById("seachcitytext").value);
	              changeCity(document.getElementById("seachcitytext").value,'seachdistricttext');
	              getAreaInfo();
	              tdsyq();
	              i=document.getElementById("seachcitytext").options.length+1;	          	         		
	            }
	         }
			str4="";
			var str2=$("#QJZQ").select2('data').text;
			str2=str2.replace( /^\s+|\s+$/g, "" );
			for(i=0;i<document.getElementById("seachdistricttext").options.length;i++)
	        {
	           var str=document.getElementById("seachdistricttext").options[i].text;
	           str=str.replace( /^\s+|\s+$/g, "" );
	          if((str2!="")&&(str!=""))
	           {	 
	        	   
	        	  if(str2.length>=str.length)	
	              {
	        	     str4="";
	        	     if(str==str2.substring(0,str.length))str4="匹配";   	   	              
	              }
	              else
	              {
	        	     if(str2.length<str.length)
	        	     {
	        		   str4="";
	        		   if(str2==str.substring(0,str2.length))str4="匹配";
	        	     }
	             }
	           }
	           if((str==str2)||(str4=="匹配"))
	           {
	              document.getElementById('seachdistricttext').options[i].selected = true;
	              str3=document.getElementById("seachdistricttext").options[i].text;
	              $("#seachdistricttext").data('select2').val(document.getElementById("seachdistricttext").value);
	              getAreaInfo();
	              tdsyq();
	              i=document.getElementById("seachdistricttext").options.length+1;     
	            }
	           
	         }
			var daoruxinxi="${daoruxinxi}";
			$.ajax({ 
	  			type:"POST", //请求方式 
	  			//url:"${ctx}/reg/bus/regBusHisBdcqzsdjxx/save?WO=2&optype=${optype}", //请求路径 	  			
	  			url:"${ctx}/reg/bus/regBusHisBdcqzsdjxx/save?WO=2&optype=${optype}",
	  			cache: false,   //(默认: true,dataType为script和jsonp时默认为false) jQuery 1.2 新功能,设置为 false 将不缓存此页面。 
	  			data:$('#inputForm').serialize(),
	  			//data:"WO=2&optype=${optype}&id=${regBusHisBdcqzsdjxx.id}",  //传参 
	  			//data:"seachcity="+$("#seachcitytext").val()+"&seachdistrict="+$("#seachdistricttext").val()+"&qlrmc="+$("#qlrxmtext").val()+"&zjlx="+$("#zjlxtext").val()+"&zjhm="+$("#zjhmtext").val()+"&seachprov="+$("#seachprovtext").val()+"&zdtzm="+$("#zdtzmTxt").val()+"&zl="+$("#zltext").val()+"&zdmj="+$("#zdmjtext").val()+"&tfh="+$("#tfhtext").val()+"&zdszd="+$("#adszdtext").val()+"&zdszn="+$("#zdszntext").val()+"&zdszx="+$("#zdszxtext").val()+"&zdszb="+$("#zdszbtext").val()+"&zdt="+$("#zdt").val()+"&chrymc="+$("#chrymctext").val()+"&jzdzblist="+zblisttemp+"&jzdzb="+zbtemp+"&id=${regBusHisBdcqzsdjxx.id}",//chrymctext
	  			async:true,
	  	        //dataType: "html",   //返回值类型 
	  			success:function(modelmap){
	  				   mapreturnvale =modelmap.regBusHisBdcqzsdjxx;
	  				   mapreturnvale = eval('(' + mapreturnvale + ')');
	  				   tempwo=modelmap.WO;
	  				   tempoptype=modelmap.optype;
	  				   tempywh=modelmap.ywh;
	  				   tempdaoruxinxi=modelmap.daoruxinxi;
	  				  //---------------------根据id查询到宗地 更新对应宗地信息 
		  				var queryStruct=new Zondy.Service.QueryFeatureStruct();
		  				queryStruct.IncludeGeometry=true;
		  				 var temptuceng=selectTuCeng(mapreturnvale.zdtzm);
		  				 
		  				var str="CHID='"+mapreturnvale.id +"'";
		  				
		  				var queryParam=new Zondy.Service.QueryByLayerParameter(temptuceng,{ 
		  	                   // geometry: line,
		  	                   resultFormat: "json",
		  	                   struct:queryStruct,
		  	                   where :  str
		  	                   });
		  				queryParam.recordNumber=1000;
		  				var queryService=new Zondy.Service.QueryLayerFeature(queryParam,
		  						{
		  					ip: actualSvrcfg.ip,        //IP地址
		  					port: actualSvrcfg.port ,   //端口号
		  					requestType:"POST"
		  					});
		  				queryService.query(queryUpdatedataSuccess);
		  				//------------------------------------	  				  	  				
	  			}
	  		});
		}
		function queryUpdatedataSuccess(data)
		{
			 var chaxunvalue=data;
			 var temptuceng=selectTuCeng($("#zdtzmTxt").val());
			 
			 if(chaxunvalue.TotalCount==0)
			 {
				 addzongdi();
			 }
			 else
				 updatequyaosu(chaxunvalue.SFEleArray[0].FID,temptuceng);
		}
		function addzongdi()
		{
			var pointObj = new Array(); 
			var qupointObj = new Array();
			var lengthzb;
			var zbtemp="";
			for(var j=0; j<regBaseHisZbinfoRowIdx; j++){
				
					pointObj[j]=$("#regBaseHisZbinfoList"+j+"_zbx").val()+","+$("#regBaseHisZbinfoList"+j+"_zby").val();
				    zbtemp=zbtemp+$("#regBaseHisZbinfoList"+j+"_zbdmc").val()+"["+$("#regBaseHisZbinfoList"+j+"_zbx").val()+","+$("#regBaseHisZbinfoList"+j+"_zby").val()+"] "+"zbid="+$("#regBaseHisZbinfoList"+j+"_id").val() +";";
				
			}
			  for(var i=0;i<pointObj.length;i++)
			  {
                lengthzb=pointObj[i].split(",");
		        if(lengthzb.length==2)
		        {
			       qupointObj[i] = new Zondy.Object.Point2D(parseFloat(lengthzb[1]), parseFloat(lengthzb[0]));
		        }
		        else
		        {alert("该宗地坐标有误!");return false;}
		      }
				  var gArc = new Zondy.Object.Arc(qupointObj);              //构成区要素的弧段
				  var gAnyLine = new Zondy.Object.AnyLine([gArc]);        //构成区要素折线
				  var gRegion = new Zondy.Object.GRegion([gAnyLine]);     //构成区要素
				  var fGeom = new Zondy.Object.FeatureGeometry({ RegGeom: [gRegion] }); //构成区要素的几何信息
    
				  //设置区要素的图形参数信息
				  var cRegionInfo = new Zondy.Object.CRegionInfo({ EndColor: 31, FillColor:31, FillMode: 1, OutPenWidth: 1, OverMethod: 0, PatAngle: 1, PatColor: 1, PatHeight: 1, PatID: 0, PatWidth: 1 }); //区形状图形参数信息
				  var graphicInfo = new Zondy.Object.WebGraphicsInfo({ InfoType: 3, RegInfo: cRegionInfo }); //要素图形参数信
              //设置区要素的属性信息
              //var attValue = [0, , ,$("#qlrxmtext").val(),$("#zjlxtext").val(),$("#zjhmtext").val(),$("#seachprovtext").val(),$("#seachcitytext").val(),$("#seachdistricttext").val(),$("#zltext").val(),$("#zdmjtext").val(),$("#tfhtext").val(),$("#zdszdtext").val(),$("#zdszntext").val(),$("#zdszxtext").val(),$("#zdszbtext").val(),zbtemp,$("#zdt").val(),$("#chcode").val(),$("#chrymctext").val(),$("#chsjtext").val()];//$("#textnewyaosu").val()];
              var attValue = [0,,,,,,$("#zdtzmTxt").val(),$("#zltext").val(),$("#zdmjtext").val(),,,,,,,,,,,$("#adszdtext").val(),$("#zdszntext").val(),$("#zdszxtext").val(),$("#zdszbtext").val(),$("#zdt").val(),$("#tfhtext").val(),,,$("#qlrxmtext").val(),mapreturnvale.id,"0"];//$("#textnewyaosu").val()];

             //创建一个新的区要素
             var newFeature = new Zondy.Object.Feature({ AttValue: attValue, fGeom: fGeom, GraphicInfo: graphicInfo });
             newFeature.setFType(3);

             //创建一个要素数据集
             var featureSet = new Zondy.Object.FeatureSet();
             var fldNumber = 30;
             var fldType = ["long",    "double", "double",     "string","string","string","string","string","double","string","string","string","double","string","string","string","float","float","float","string","string","string","string","string","string","string","string","string","string","string"];
             var fldName = ["mpLayer", "mpArea", "mpPerimeter", "ZDDM",  "BDCDYH","YSDM",  "ZDTZM","ZL",    "ZDMJ",   "MJDW", "YT",    "DJ",    "JG",    "QLLX"  ,"QLXZ",  "QLSDFS",  "RJL", "JZMD","JZXG", "ZDSZD", "ZDSZN", "ZDSZX", "ZDSZB",  "ZDT",    "TFH", "DJH","ZT","QLRXM","CHID","islogout"];
             var cAttValue = new Zondy.Object.CAttStruct({ FldNumber: fldNumber, FldType: fldType, FldName: fldName });
             featureSet.AttStruct = cAttValue;
             featureSet.addFeature(newFeature);

            //创建一个要素编辑服务对象
            // var editDocFeature = new Zondy.Service.EditDocFeature(SvrCfg.tileMapName, 0,0, { ip: SvrCfg.ip,  port: SvrCfg.port });
            var temptuceng=selectTuCeng($("#zdtzmTxt").val());
            if(temptuceng!="")
            {
    	       var editDocFeature = new Zondy.Service.EditLayerFeature(temptuceng, { ip: actualSvrcfg.ip,  port: actualSvrcfg.port });
   
               editDocFeature.add(featureSet, chxxsuccess);	 

				  //--------------------------------
			}
		}

		function chxxsuccess(data)
		{
			if (data == true) {
				alert("成功!");
				 //var url ="${ctx}/reg/base/regBaseChxx/?repage";
				 var url ="${ctx}/reg/bus/regBusHisBdcqzsdjxx/list?WO="+tempwo+"&optype="+tempoptype+"&ywh="+tempywh+"&daoruxinxi=0";
	 			 window.location = url;
			}
		    else {
		        alert("失败!");
		    }

		}	
		function updatequyaosu(fid,tuceng)
		{		
			var editDocFeature = new Zondy.Service.EditLayerFeature(tuceng, { ip: actualSvrcfg.ip,  port: actualSvrcfg.port });			   
			editDocFeature.deletes(fid, deleteonSuccess);	
		}
		function deleteonSuccess(data) 
		{
			addzongdi();
		}
		
		function info() 
		{
			var zdmjtext = $("#zdmjtext").val();
			$("#syqmjtext").val(zdmjtext);
		}
		
		function tdsyq(){
			var zddm = $("#zddm").val();
			if(zddm.length >= 12){
				var zddmjq = zddm.substr(0,12);
				var tdsyqdm = $("#tdsyqdm").val();
				var zdtzm = $("#zdtzmTxt").val();
				$("#zddm").val(zddmjq+tdsyqdm+zdtzm);
				$("#bdcdyhid").val(zddmjq+tdsyqdm+zdtzm);
			}
		}
		function zlinfo() 
		{
			var zl = $("#zltext").val();
			if(zl.indexOf("X") > 0 ){
			    alert('坐落中包含非法字符X,请确认!!!');
			    return;
			}
		}
		function setywhinfo(ywh) 
		{
			$("#ywhtext").val(ywh);
		}
	</script>
</head>
<body>
	<form:form id="inputForm" name="inputForms"  modelAttribute="regBusHisBdcqzsdjxx" action="${ctx}/reg/bus/regBusHisBdcqzsdjxx/save?optype=${optype}"  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="chcode"  readOnly="true" htmlEscape="false" maxlength="100" class="input-large "/></td>
						<td class="tit"></td>
						<td></td>
						<td class="tit"></td>
						<td></td>
					</tr>
					<tr>
						<td class="tit">县级行政区:</td>
						<td>
							<form:select path="seachprov" id="seachprovtext" class="input-medium required" >
								<form:option value="610702" label="汉台区"/>
								<form:options items="${fns:getDictList('reg_bus_xq')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">地籍区:</td>
						<td>
							<form:select path="seachcity" id="seachcitytext" class="input-medium required" onChange="changeCity(this.value,'seachdistricttext');getAreaInfo();">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_djq')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
                        <td class="tit">地籍子区:</td>
						<td>
							<form:select path="seachdistrict" id="seachdistricttext" class="input-medium required" onChange="getAreaInfo();">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_djzq')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select> 
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
					</tr>
					
					<tr>
						<td class="tit">宗地面积:</td>
						<td>
								<form:input path="zdmj" id="zdmjtext" onblur="info()" htmlEscape="false" class="input-large number required"/>
								<span class="help-inline"><font color="red">*</font> </span>
						</td>
                        <td class="tit">面积单位</td>
						<td>
							<form:select id="mjdw" path="mjdw"  class="input-medium required">
								<form:option value="1" label="${fns:getDictLabel('1', 'reg_bus_mjdw', '')}"/>
								<form:options items="${fns:getDictList('reg_bus_mjdw')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit"></td>
						<td></td>
					</tr>
					
					<tr>
						<td class="tit">坐落:</td>
						<td colspan="5">
							<form:textarea path="zl" id="zltext" htmlEscape="false" onChange="zlinfo();"   maxlength="200" class="input-xxlarge required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
					</tr>
					
					<tr>
						<td class="tit">图幅号:</td>
						<td>
								<form:input id="tfh" path="tfh" htmlEscape="false" maxlength="50" class="input-large"/>
						</td>
						<td class="tit">宗地四至-东:</td>
						<td>
							<form:input id="zdszd" path="zdszd" htmlEscape="false" maxlength="200"  class="input-large required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">宗地四至-南:</td>
						<td>
								<form:input id="zdszn" path="zdszn" htmlEscape="false" maxlength="200" class="input-large required"/>
								<span class="help-inline"><font color="red">*</font> </span>
						</td>
					</tr>
					<tr>
						<td class="tit">宗地图:</td>
						<td>
								<form:hidden id="zdt" path="zdt" htmlEscape="false" maxlength="255" class="input-large"/>
								<sys:ckfinder input="zdt" type="files" uploadPath="/reg/base/regBaseChxx" selectMultiple="true"/>
						</td>
						<td class="tit">宗地四至-西:</td>
						<td>
							<form:input id="zdszx" path="zdszx" htmlEscape="false" maxlength="200" class="input-large required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">宗地四至-北:</td>
						<td>
								<form:input id="zdszb" path="zdszb" htmlEscape="false" maxlength="200" class="input-large required"/>
								<span class="help-inline"><font color="red">*</font> </span>
						</td>
					</tr>
					<tr>
						<td class="tit">测绘人员:</td>
						<td>
								<form:input path="chrymc"   htmlEscape="false" maxlength="100" class="input-large"/>
						</td>
						<td class="tit">测绘添加时间:</td>
						<td>
							<input name="chsj" type="text" maxlength="20" class="input-large Wdate"
								value="${fns:getDate('yyyy-MM-dd')}"
								onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
						</td>
						<td class="tit"></td>
						<td>
								
						</td>
					</tr>
					<tr>
					<td colspan="6">
									<div class="control-group">
											<label class="control-label">界址点坐标:</label>
											<div class="controls">
												<table id="contentTable" class="table table-striped table-bordered table-condensed">
													<thead>
														<tr>
															<th class="hide"></th>
															<th>序号</th>
															<th>坐标点名称</th>
															<th>X坐标值</th>
															<th>Y坐标值</th>
															<shiro:hasPermission name="reg.bus:regBusHisBdcqzsdjxx:edit"><th width="100">&nbsp;操   作</th></shiro:hasPermission>
														</tr>
													</thead>
													<tbody id="regBaseHisZbinfoList">
													</tbody>
													<shiro:hasPermission name="reg.bus:regBusHisBdcqzsdjxx:edit"><tfoot>
														<tr><td colspan="5"><a href="javascript:" onClick="addRow('#regBaseHisZbinfoList', regBaseHisZbinfoRowIdx, regBaseZbinfoTpl);regBaseHisZbinfoRowIdx = regBaseHisZbinfoRowIdx + 1;" class="btn">新增</a></td></tr>
													</tfoot></shiro:hasPermission>
												</table>
												<script type="text/template" id="regBaseZbinfoTpl">//<!--
													<tr id="regBaseHisZbinfoList{{idx}}">
															<td class="hide">
																<input id="regBaseHisZbinfoList{{idx}}_id" name="regBaseHisZbinfoList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
																<input id="regBaseHisZbinfoList{{idx}}_delFlag" name="regBaseHisZbinfoList[{{idx}}].delFlag" type="hidden" value="0"/>
															</td>
															<td>
																	<input id="regBaseHisZbinfoList{{idx}}_sort" name="regBaseHisZbinfoList[{{idx}}].sort" type="text" value="{{row.sort}}" maxlength="100" class="input-small "/>
															</td>
															<td>
																<input id="regBaseHisZbinfoList{{idx}}_zbdmc" name="regBaseHisZbinfoList[{{idx}}].zbdmc" type="text" value="{{row.zbdmc}}" maxlength="100" class="input-small "/>
															</td>
															<td>
																<input id="regBaseHisZbinfoList{{idx}}_zbx" name="regBaseHisZbinfoList[{{idx}}].zbx" type="text" value="{{row.zbx}}" maxlength="50" class="input-small "/>
															</td>
															<td>
																	<input id="regBaseHisZbinfoList{{idx}}_zby" name="regBaseHisZbinfoList[{{idx}}].zby" type="text" value="{{row.zby}}" maxlength="50" class="input-small "/>
															</td>
															<shiro:hasPermission name="reg.bus:regBusHisBdcqzsdjxx:edit">
															<td class="text-center" width="100">
																{{#delBtn}}<a class="btn btn-primary" onclick="delRow(this, '#regBaseHisZbinfoList{{idx}}')" title="删除">    </a>{{/delBtn}}
															</td></shiro:hasPermission>
													</tr>//-->
											</script>
											<script type="text/javascript">
													regBaseHisZbinfoRowIdx = 0, regBaseZbinfoTpl = $("#regBaseZbinfoTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
													$(document).ready(function() {
														var data = ${fns:toJson(regBusHisBdcqzsdjxx.regBaseHisZbinfoList)};
														for (var i=0; i<data.length; i++){
															addRow('#regBaseHisZbinfoList', regBaseHisZbinfoRowIdx, regBaseZbinfoTpl, data[i]);
															regBaseHisZbinfoRowIdx = regBaseHisZbinfoRowIdx + 1;
														}
													});
												</script>
											</div>
										</div>
							</td>
					</tr>
			</table>
		</fieldset>
		<fieldset>
			<legend>宗地基本信息</legend>
				<table class="table-form">
					<tr>
						<td class="tit">要素代码</td>
						<td>
							<form:input id="ysdm" path="ysdm" htmlEscape="false" value="2001010000" maxlength="10" class="input-large"/>
						</td>
						<td class="tit">宗地代码</td>
						<td>
							<form:input id="zddm" path="zddm"  htmlEscape="false" readonly="true"  maxlength="19" class="input-large required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">土地所有权代码</td>
						<td>
							<form:select path="tdsyqdm"  id="tdsyqdm" onChange="tdsyq()" class="input-medium required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_tdsyqdm')}" itemLabel="label"  itemValue="value" htmlEscape="false"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
					</tr>
					<tr>
						<td class="tit">宗地特征码</td>
						<td>
							<form:select path="zdtzm" id="zdtzmTxt" onChange="tdsyq()" class="input-large required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_zdtzm')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">地籍号</td>
						<td>
							<form:input id="djh" path="djh" htmlEscape="false" maxlength="20" class="input-large "/>
						</td>
						<td class="tit">档案号</td>
						<td>
							<form:input path="dah" htmlEscape="false" maxlength="50" class="input-large "/>
						</td>
					</tr>
					<tr>
						<td class="tit">用途</td>
						<td>
							<form:input id="yt" path="yt" htmlEscape="false" maxlength="200" class="input-large required"/>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">等级</td>
						<td>
							<form:select id="dj" path="dj" class="input-medium ">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_tddj')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</td>
                        <td class="tit">价格</td>
						<td>
							<form:input id="jg" path="jg" htmlEscape="false" class="input-large number"/>
							<span class="help-inline"><font color="#000"></font> </span>
						</td>
					</tr>
					
					<tr>
						<td class="tit">权利类型</td>
						<td>
							<form:select path="qllx" id="qllx"   class="input-medium required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_qllx')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
						<td class="tit">权利性质</td>
						<td>
							<form:select id="qlxz" path="qlxz"  class="input-medium required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_qlxz')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
							<span class="help-inline"><font color="red">*</font> </span>
						</td>
                        <td class="tit">权利设定方式</td>
						<td>
							<form:select id="qlsdfs" path="qlsdfs" class="input-medium ">
								<form:option value="2" label="${fns:getDictLabel('2', 'reg_bus_qlsdfs', '')}"/>
								<form:options items="${fns:getDictList('reg_bus_qlsdfs')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</td>
					</tr>
					<tr>
						<td class="tit">容积率</td>
						<td>
							<form:input id="rjl" path="rjl" htmlEscape="false" maxlength="100"  class="input-large  number"/>
						</td>
						<td class="tit">建筑密度</td>
						<td>
							<form:input id="jzmd" path="jzmd" htmlEscape="false" maxlength="100" class="input-large  number"/>
						</td>
                        <td class="tit">建筑限高</td>
						<td>
							<form:input id="jzxg" path="jzxg" htmlEscape="false" maxlength="100" class="input-large  number"/>
						</td>
					</tr>
					<tr>
						<td class="tit">原不动产单元号</td>
						<td colspan="3">
							<form:input path="bz" htmlEscape="false"  maxlength="300" class="input-xxlarge "/>
						</td>
						<td class="tit">状态</td>
						<td>
							<form:select id="zt" path="zt" class="input-medium ">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('reg_bus_bdcdyzt')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</td>
					</tr>
				</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>
		</br>
		
		<fieldset>
			<legend>权属信息</legend>
				<table class="table-form">
				<tr>
					<td class="tit">要素代码</td>
					<td><form:input path="syqysdm" htmlEscape="false" value="6002020100" maxlength="10" class="input-large "/></td>
					<td class="tit">登记大类</td>
					<td>
						<form:select path="djlx" class="input-medium required">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('reg_bus_djlx')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
						<span class="help-inline"><font color="red">*</font> </span>
					</td>
					<td class="tit">登记小类</td>
					<td>
						<form:select path="djxl" class="input-large required">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('reg_bus_djxl')}"  itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
						<span class="help-inline"><font color="red">*</font> </span>
					</td>
				</tr>
				<tr>
					<td class="tit">登记原因</td>
					<td colspan="5">
						<form:textarea path="djyy" htmlEscape="false" rows="2" maxlength="500" class="input-xxlarge required"/><span class="help-inline"><font color="red">*</font> </span>
					</td>
				</tr>
				<tr>
					<td class="tit">使用权起始时间</td>
					<td>
						<input name="syqqssj" type="text" readonly maxlength="20" class="input-medium Wdate"
							value="<fmt:formatDate value="${regBusHisBdcqzsdjxx.syqqssj}" pattern="yyyy-MM-dd"/>"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
					</td>
					<td class="tit">使用权结束时间</td>
					<td>
						<input name="syqjssj" type="text" readonly maxlength="20" class="input-medium Wdate"
							value="<fmt:formatDate value="${regBusHisBdcqzsdjxx.syqjssj}" pattern="yyyy-MM-dd"/>"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
					</td>
					<td class="tit">取得价格</td>
					<td>
						<form:input id="qdjgtext" path="qdjg"  htmlEscape="false"  class="input-large number"/>万元
					</td>
				</tr>
				<tr>
					<td class="tit">使用权面积</td>
					<td>
						<form:input id="syqmjtext" path="syqmj" htmlEscape="false" class="input-large number required"/>
						<span class="help-inline"><font color="red">*</font> </span>
					</td>
					<td class="tit">区县代码</td>
					<td>
						<form:select path="qxdm" class="input-large ">
							<form:option value="${QXDM}" label="${QXDMMC}"/>
							<form:options items="${fns:getDictList('reg_bus_xq')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
					<td class="tit">登记机构</td>
					<td>
						<form:input path="djjg" readOnly="true"   htmlEscape="false" maxlength="200" class="input-large required"/>
						<span class="help-inline"><font color="red">*</font> </span>
					</td>
				</tr>
				<tr>
					<td class="tit">登簿人</td>
					<td>
						<form:input path="dbr" htmlEscape="false"  maxlength="50" class="input-large required"/>
						<span class="help-inline"><font color="red">*</font> </span>
					</td>
					<td class="tit">登记时间</td>
					<td>
						<input name="djsj" type="text" maxlength="20" class="input-medium Wdate required"
							value="${fns:getDate('yyyy-MM-dd')}"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
							<span class="help-inline"><font color="red">*</font> </span>
					</td>
<!-- 					<td class="tit">权属状态</td> -->
<!-- 					<td> -->
<%-- 						<form:select path="qszt" class="input-large "> --%>
<%-- 							<form:option value="" label=""/> --%>
<%-- 							<form:options items="${fns:getDictList('reg_bus_qszt')}" itemLabel="label" itemValue="value" htmlEscape="false"/> --%>
<%-- 						</form:select> --%>
<!-- 					</td> -->
				</tr>
				<tr>
					<td class="tit">附记</td>
					<td colspan="5">
						<form:input path="fj" htmlEscape="false" maxlength="300" class="input-xxlarge "/>
					</td>
				</tr>
				<tr>
					
				</tr>
				<tr>
					<td class="tit">备注信息</td>
					<td colspan="5">
						<form:input path="remarks" htmlEscape="false"  maxlength="255" class="input-xxlarge "/>
					</td>
				</tr>
			</table>
		</fieldset>
		
		<fieldset>
			<legend>已登记业务</legend>
			<table class="table-form">
				<tr>
					<td class="tit">业务号:</td>
					<td><form:input path="ywh" id="ywhtext" readOnly="true" htmlEscape="false" maxlength="20" value="${YWHIS}" class="input-large "/></td>
					<td class="tit">不动产单元号:</td>
					<td colspan="3"><form:input path="bdcdyh" readOnly="true"  id="bdcdyhid" htmlEscape="false" maxlength="28" class="input-xlarge required"/>
					<span class="help-inline"><font color="red">*</font> </span>(不动产单元号为宗地代码+W00000000共28位)
					</td>
				</tr>
				<tr>
					<td class="tit">证书编号:</td> 
					<td><form:input path="bdcqzbh" htmlEscape="false" maxlength="12" class="input-large required"/>
					<span class="help-inline"><font color="red">*</font> </span>
					</td>
					<td class="tit">不动产权证书号:</td>
					<td colspan="3"><form:input path="bdcqzh" id="bdcqzhid"  htmlEscape="false"   class="input-xxlarge required"/>
						<span class="help-inline"><font color="red">*</font> </span>
						(包含土地证号)
					</td>
				</tr>
				<tr>
					<td class="tit">价款:</td>
					<td><form:input path="hbjk" id="qdjgtext" htmlEscape="false" class="input-large  number"/>
					<td class="tit">出让合同号(划拨决定书):</td>
					<td><form:input path="hbhth" htmlEscape="false" maxlength="12" class="input-large "/></td>
					<td class="tit">批文号:</td>
					<td><form:input path="pwh" htmlEscape="false" maxlength="12" class="input-large "/>
					</td>
				</tr>
				<tr>
					<td class="tit">发证时间:</td>
					<td><input name="fzsj" type="text" maxlength="20" class="input-medium Wdate required"
							value="${regBusHisBdcqzsdjxx.fzsj}"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
							<span class="help-inline"><font color="red">*</font> </span>
					</td>
					<td class="tit">终止时间:</td>
					<td>
						<input name="zzsj" type="text" maxlength="20" class="input-medium Wdate"
							value="${regBusHisBdcqzsdjxx.zzsj}"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
					</td>
					<td class="tit">使用期限:</td>
					<td><form:input path="syqx" htmlEscape="false"  maxlength="100" class="input-large "/>
					</td>
				</tr>
			</table>
		</fieldset>

		<div class="form-actions">
			<c:if test="${empty VIEWS}">
				<c:if test="${empty xg}">
					<shiro:hasPermission name="reg.bus:regBusHisBdcqzsdjxx:edit"><input id="btnSubmit" class="btn btn-primary" type="button"  onclick="getUrl()" value="保 存"/>&nbsp;</shiro:hasPermission>
				</c:if>
			</c:if>
			<input id="btnCancel" class="btn" type="button" value="返 回" onClick="window.close();"/>
		</div>
	</form:form>
	
	<div id="SelectDJQZQ"  class="easyui-dialog" title="该宗地所在的地籍区地籍子区"  maximizable="false"  minimizable="false" collapsible="false"  border="false" resizable="false" closable="true" closed="true" style="color:#1E90FF;left:300px;top:200px; width:300px; height:200px;padding: 5px" resizable="false">	<form style="padding:10px 20px 10px 40px;">    
           <table   border="0"  style="font-family:宋体;font-size:10pt;"> 
             
            <tr>
             <td style="text-align:top;font-weight:bold ;color:#008000;">地籍区</td>
             <td style="text-align:top;height:10;">
                <select name="DJQ" id="DJQ" style="width:100px;">    
                             
                </select>
             </td>
              
              </tr>
               <tr>
             <td style="text-align:top;font-weight:bold ;color:#008000;">地籍子区</td>
             <td style="text-align:top;height:10;">
                <select name="DJZQ" id="QJZQ" style="width:100px;">
                  
                </select>
             </td>
             
             </tr>
           </table>
             <br />
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input id="divDotsearch" type="button" style="margin-right:50px;" value="点击该处确定!" onclick="addyaosu()">	                 
        </div>
	
</body>
</html>