addPZ1.jsp 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <%-- 配租申请表1--城市中等偏下收入住房困难家庭--%>
  2. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  3. <style type="text/css">
  4. em {color:red;font-size:13px;font-style:normal}
  5. .changeLine th{
  6. white-space: NOWRAP;
  7. }
  8. </style>
  9. <script type="text/javascript">
  10. function addPZ1_load(){
  11. //婚姻
  12. $("#maritalStatus_add").append(maritalStatus_array);
  13. $("#maritalStatus1").append(maritalStatus_array);
  14. $("#nationality1").append(nationality_array);
  15. $("#education1").append(education_array);
  16. //街办
  17. getStreetList("1",0,"street_add");
  18. $("#street_add").children('option').remove();
  19. $("#street_add").change(function(){
  20. $("#neighborhood_add").children('option').remove();
  21. getNeighborhoodList($("#street_add").val(),0,"neighborhood_add");
  22. $("#communityId_add").children('option').remove();
  23. $("#communityId_add").append("<option value=''>请选择</option>");
  24. });
  25. $("#neighborhood_add").change(function(){
  26. $("#communityId_add").children('option').remove();
  27. getCommunityList($("#neighborhood_add").val(),0,"communityId_add");
  28. $("#community_add").val("");
  29. });
  30. $("#communityId_add").change(function(){
  31. var community = $("#communityId_add").find("option:selected").text();
  32. $("#community_add").val(community);
  33. });
  34. }
  35. function addPZ1_submit(){
  36. var flag= true;
  37. var flag1 = verifyCurrentHouseSituation();
  38. var flag2 = checkData();
  39. if($("#avgIncome_add").val()==""||$("#avgIncome_add").val()==null){
  40. countAvgIncome();
  41. flag = false;
  42. }
  43. if(flag1&&flag2&&flag){
  44. $.ajax({
  45. type: "POST",
  46. url:"securityPersonApply2Action_addSecurityPersonApply",
  47. data:$('#pz1Form').serialize(),// 你的formid
  48. async: false,
  49. error: function(data) {
  50. $.messager.alert("提示","提交失败");
  51. },
  52. success: function(result) {
  53. var parseResult = $.parseJSON(result);
  54. if(parseResult.success){
  55. $('#addPZ1Dialog').dialog("close");
  56. var securityPersonApplyId = parseResult.obj.id;
  57. var fileNum = parseResult.obj.fileNum;
  58. for(var i=1;i<=index;i++){
  59. if($("#mbtb_" + i).length > 0 ){
  60. var url = whzl.basePath+'/securityPersonApply2Action_addSecurityPersonApplyRelative';
  61. $.ajax({
  62. type: "post",//使用post方法访问后台
  63. dataType: "json",//返回json格式的数据
  64. url: url,//要访问的后台地址
  65. async: false,
  66. data:{"securityPersonApplyRelative.securityPersonApplyId":securityPersonApplyId ,
  67. "securityPersonApplyRelative.fileNum":fileNum ,
  68. "securityPersonApplyRelative.name":$("#name" + i ).val() ,
  69. "securityPersonApplyRelative.relative":$("#relative" + i ).val() ,
  70. "securityPersonApplyRelative.idCard":$("#idCard" + i ).val() ,
  71. "securityPersonApplyRelative.maritalStatus":$("#maritalStatus" + i ).val() ,
  72. "securityPersonApplyRelative.maritalDate":$("#maritalDate" + i ).datebox('getValue') ,
  73. "securityPersonApplyRelative.company":$("#company" + i ).val() ,
  74. "securityPersonApplyRelative.residenceNo":$("#residenceNo" + i ).val() ,
  75. "securityPersonApplyRelative.wageIncome":$("#wageIncome" + i ).val() ,
  76. "securityPersonApplyRelative.operatingNetIncome":$("#operatingNetIncome" + i ).val() ,
  77. "securityPersonApplyRelative.propertyIncome":$("#propertyIncome" + i ).val() ,
  78. "securityPersonApplyRelative.otherIncome":$("#otherIncome" + i ).val() ,
  79. "securityPersonApplyRelative.otherIncomeRemark":$("#otherIncomeRemark" + i ).val() ,
  80. "securityPersonApplyRelative.securitiesTotal":$("#securitiesInfo_input" + i ).val() ,
  81. "securityPersonApplyRelative.bankTotal":$("#bankInfo_input" + i ).val() ,
  82. "securityPersonApplyRelative.certificateInfo":$("#certificateInfo" + i ).val(),
  83. "securityPersonApplyRelative.isSubsistenceAllowances":$("#isSubsistenceAllowances" + i ).val(),
  84. "securityPersonApplyRelative.commercialInsurance":$("#commercialInsuranceInfo_input" + i ).val(),
  85. "securityPersonApplyRelative.phone":$("#phone" + i ).val(),
  86. "securityPersonApplyRelative.nationality":$("#nationality" + i ).val() ,
  87. "securityPersonApplyRelative.education":$("#education" + i ).val() ,
  88. "securityPersonApplyRelative.deathDate":$("#deathDate" + i ).datebox('getValue') ,
  89. "securityPersonApplyRelative.moveIn":$("#moveIn" + i ).val() ,
  90. },
  91. success : function(result){
  92. $.ajax({
  93. type: "post",//使用post方法访问后台
  94. dataType: "json",//返回json格式的数据
  95. url: whzl.basePath+'/securityPersonApply2Action_addAssets',//要访问的后台地址
  96. async: false,
  97. data:{"securityPersonApplyRelative.id":result.obj.id ,
  98. "cars":$("#carInfo_input"+i).val() ,
  99. "businesses": $("#businessInfo_input"+i).val() ,
  100. },
  101. });
  102. $("#securityPersonApplyDataGrid").datagrid("reload");
  103. }
  104. });
  105. }
  106. }
  107. }
  108. }
  109. })
  110. }
  111. }
  112. function checkData(){
  113. var flag= true;
  114. //验证家庭成员信息
  115. var isCar=2;
  116. var isBusiness=2;
  117. for(var i=1;i<=index;i++){
  118. var mbtb = $("#mbtb_"+i);
  119. //如果被删除,直接跳过
  120. if(mbtb.length > 0){
  121. var residenceNo=$("#residenceNo"+i).val()
  122. var idCard=$("#idCard"+i).val();
  123. var name=$("#name"+i).val();
  124. var relative=$("#relative"+i).val();
  125. var maritalStatus=$("#maritalStatus"+i).val();
  126. var wageIncome=$("#wageIncome"+i).val();
  127. var maritalDate = $("#maritalDate"+i).datebox('getValue');
  128. var phone=$("#phone"+i).val();
  129. var nationality=$("#nationality"+i).val();
  130. var education=$("#education"+i).val();
  131. var carInfo =$("#carInfo_input"+i).val();
  132. var businessesInfo =$("#businessInfo_input"+i).val();
  133. $("#certificateInfo"+i).val("");
  134. $("#isSubsistenceAllowances"+i).val("");
  135. //户号
  136. if(residenceNo==''){
  137. $.messager.alert('提醒','请填户号');
  138. flag = false;
  139. }
  140. //验证姓名
  141. if(name==''){
  142. $.messager.alert('提醒','请填写姓名');
  143. flag = false;
  144. }
  145. //验证身份证号
  146. /*if(idCard!=''){
  147. if(!idCard1(idCard)){
  148. $.messager.alert('提醒','请填正确身份证号');
  149. flag = false;
  150. }
  151. }else{
  152. $.messager.alert('提醒','请填身份证号');
  153. flag = false;
  154. }*/
  155. //验证户籍关系
  156. if(relative==''){
  157. $.messager.alert('提醒','请填与申请人关系');
  158. flag = false;
  159. }
  160. //验证婚姻关系
  161. if(maritalStatus==''){
  162. $.messager.alert('提醒','请填婚姻状况');
  163. flag = false;
  164. }
  165. //除未成年、未婚都要填写登记时间
  166. if(maritalStatus !="6"&&maritalStatus !="5"){
  167. if(maritalDate ==''){
  168. $.messager.alert('提醒','请填婚姻登记日期');
  169. flag = false;
  170. }
  171. }
  172. //验证婚姻关系
  173. if(phone==''){
  174. $.messager.alert('提醒','请填联系电话');
  175. flag = false;
  176. }
  177. //验证民族
  178. if(nationality==''){
  179. $.messager.alert('提醒','请选择民族');
  180. flag = false;
  181. }
  182. //验证文化
  183. if(education==''){
  184. $.messager.alert('提醒','请选择文化程度');
  185. flag = false;
  186. }
  187. //验证是否持有证书
  188. var obj = document.getElementsByName('certificateInfoSpan'+i);
  189. var certificateInfo = '';
  190. for (var j = 0; j < obj.length; j++) {
  191. if (obj[j].checked) {
  192. certificateInfo += obj[j].value + ',';//如果选中,将value添加到变量s中
  193. }
  194. }
  195. if(certificateInfo ==""){
  196. $.messager.alert('提醒','请选择持有证件');
  197. flag = false;
  198. }else{
  199. $("#certificateInfo"+i).val(certificateInfo.substring(0, certificateInfo.length - 1));
  200. var temp = $("#certificateInfo"+i).val();
  201. if(temp.indexOf("2") != -1){
  202. $("#isSubsistenceAllowances"+i).val("1");
  203. }else{
  204. $("#isSubsistenceAllowances"+i).val("2");
  205. }
  206. }
  207. //验证是否有车与工商信息
  208. if(carInfo!=''){
  209. isCar = 1;
  210. }
  211. if(businessesInfo!=''){
  212. isBusiness = 1;
  213. }
  214. }
  215. }
  216. $("#isCar_add").val(isCar);
  217. $("#isBusiness_add").val(isBusiness);
  218. //家庭人口数量
  219. var mbtbNum = $(".mbtb > table").size();
  220. $("#familyNum_add").val(mbtbNum);
  221. return flag;
  222. }
  223. //计算人均收入
  224. function countAvgIncome(){
  225. var wageIncomeTotal = 0;
  226. var operatingNetIncomeTotal = 0;
  227. var propertyIncomeTotal = 0;
  228. var otherIncomeTotal = 0
  229. var avgIncome = 0;
  230. var avgArea = 0;
  231. var areaTotal = 0;
  232. var mbtbNum = $(".mbtb > table").size();
  233. for(var i=1;i<=index;i++){
  234. if($("#wageIncome"+i).val()==''||$("#wageIncome"+i).val()==undefined){
  235. $("#wageIncome"+i).val(0);
  236. }else{
  237. wageIncomeTotal+=parseInt($("#wageIncome"+i).val());
  238. }
  239. if($("#operatingNetIncome"+i).val()==''||$("#operatingNetIncome"+i).val()==undefined){
  240. $("#operatingNetIncome"+i).val(0);
  241. }else{
  242. operatingNetIncomeTotal+=parseInt($("#operatingNetIncome"+i).val());
  243. }
  244. if($("#propertyIncome"+i).val()==''||$("#propertyIncome"+i).val()==undefined){
  245. $("#propertyIncome"+i).val(0);
  246. }else{
  247. propertyIncomeTotal+=parseInt($("#propertyIncome"+i).val());
  248. }
  249. if($("#otherIncome"+i).val()==''||$("#otherIncome"+i).val()==undefined){
  250. $("#otherIncome"+i).val(0);
  251. }else{
  252. otherIncomeTotal+=parseInt($("#otherIncome"+i).val());
  253. }
  254. }
  255. avgIncome = Number((wageIncomeTotal+operatingNetIncomeTotal+propertyIncomeTotal+otherIncomeTotal)/mbtbNum).toFixed(2);
  256. $("#avgIncome_add").val(avgIncome);
  257. $("#avgIncome_span").text("家庭平均月收入=( "+wageIncomeTotal+"【工资收入】+"+operatingNetIncomeTotal+"【经营净收入】+"+propertyIncomeTotal+"【财产性收入】+"+otherIncomeTotal+"【其他收入】"+")/"+mbtbNum+"【人数】 = " + avgIncome + "元");
  258. }
  259. //验证家庭住房情况
  260. function verifyCurrentHouseSituation(){
  261. var flag = true;
  262. var currentHouseSituation=$('input:radio[name="securityPersonApply.currentHouseSituation"]:checked').val();
  263. var propertyCompany=$('#propertyCompany_add').val();
  264. if(typeof(propertyCompany)=="undefined" || propertyCompany == ''){
  265. $.messager.alert('提醒','请输入产权单位');
  266. flag = false;
  267. }
  268. var existArea=$('#existArea_add').val();
  269. if(typeof(existArea)=="undefined" || existArea == ''){
  270. $.messager.alert('提醒','请输房屋面积');
  271. flag = false;
  272. }
  273. var existReal=$('#existReal_add').val();
  274. if(typeof(existReal)=="undefined" || existReal == ''){
  275. $.messager.alert('提醒','请输房屋地址');
  276. flag = false;
  277. }
  278. return flag;
  279. }
  280. var index = 1;
  281. function addSecurityPersonApplyRelative(){
  282. index++;
  283. var $table = $("<table id='mbtb_"+index+"' class='mytable changeLine'></table>");
  284. var $tr1 = $("<tr style='border-top: 2px solid blue;'></tr>");
  285. var $th1_1 = $("<th width='11%'>户号</th>");
  286. var $td1_2 = $("<td width='20%'><input id='residenceNo"+index+"' type='text' style='width: 100px;'></td>");
  287. var $th1_3 = $("<th width='11%'>姓名</th>");
  288. var $td1_4 = $("<td width='24%'><input id='name"+index+"' type='text' style='width: 100px;'></td>");
  289. var $th1_5 = $("<th width='11%'>身份证号</th>");
  290. var $td1_6 = $("<td><input id='idCard"+index+"' type='text' style='width: 172px;'></td>");
  291. $tr1.append($th1_1);
  292. $tr1.append($td1_2);
  293. $tr1.append($th1_3);
  294. $tr1.append($td1_4);
  295. $tr1.append($th1_5);
  296. $tr1.append($td1_6);
  297. var $tr2 = $("<tr></tr>");
  298. var $th2_1 = $("<th>与申请人关系</th>");
  299. var $td2_2 = $("<td></td>");
  300. var $select_relative=$("<select id='relative" + index + "' style='width: 120px;'><option value=''>选择</option></select>")
  301. $select_relative.append(relative_array);
  302. $td2_2.append($select_relative);
  303. var $th2_3 = $("<th>婚姻状况</th>");
  304. var $td2_4 = $("<td></td>");
  305. var $select_maritalStatus=$("<select id='maritalStatus" + index + "' style='width: 120px;height: 20px;vertical-align: middle;'><option value=''>选择</option></select>")
  306. $select_maritalStatus.append(maritalStatus_array);
  307. var $maritalDate = $("<input type='text' style='width: 100px;' id='maritalDate" + index + "' class='easyui-datebox' editable='fasle'/>");
  308. $td2_4.append($select_maritalStatus);
  309. $td2_4.append($maritalDate);
  310. $.parser.parse($td2_4);
  311. var $th2_5 = $("<th>民族</th>");
  312. var $td2_6 = $("<td></td>");
  313. var $select_nationality=$("<select id='nationality" + index + "' style='width: 120px;'><option value=''>选择</option></select>")
  314. $select_nationality.append(nationality_array);
  315. $td2_6.append($select_nationality);
  316. $tr2.append($th2_1);
  317. $tr2.append($td2_2);
  318. $tr2.append($th2_3);
  319. $tr2.append($td2_4);
  320. $tr2.append($th2_5);
  321. $tr2.append($td2_6);
  322. var $tr3 = $("<tr></tr>");
  323. var $th3_1 = $("<th>联系电话</th>");
  324. var $td3_2 = $("<td><input id='phone"+index+"' type='text'/></td>");
  325. var $th3_3 = $("<th>工作单位</th>");
  326. var $td3_4 = $("<td><input id='company"+index+"' type='text'></td>");
  327. var $th3_5 = $("<th>文化程度</th>");
  328. var $td3_6 = $("<td></td>");
  329. var $select_education=$("<select id='education" + index + "' style='width: 120px;'><option value=''>选择</option></select>")
  330. $select_education.append(education_array);
  331. $td3_6.append($select_education);
  332. $tr3.append($th3_1);
  333. $tr3.append($td3_2);
  334. $tr3.append($th3_3);
  335. $tr3.append($td3_4);
  336. $tr3.append($th3_5);
  337. $tr3.append($td3_6);
  338. var $tr4 = $("<tr></tr>");
  339. var $th4_1 = $("<th>工薪收入(元/月)</th>");
  340. var $td4_2 = $("<td><input id='wageIncome"+index+"' type='text'></td>");
  341. var $th4_3 = $("<th>经营净收入(元/月)</th>");
  342. var $td4_4 = $("<td><input id='operatingNetIncome"+index+"' type='text'></td>");
  343. var $th4_5 = $("<th>财产性收入(元/月)</th>");
  344. var $td4_6 = $("<td><input id='propertyIncome"+index+"' type='text'></td>");
  345. $tr4.append($th4_1);
  346. $tr4.append($td4_2);
  347. $tr4.append($th4_3);
  348. $tr4.append($td4_4);
  349. $tr4.append($th4_5);
  350. $tr4.append($td4_6);
  351. var $tr5 = $("<tr></tr>");
  352. var $th5_1 = $("<th>其他收入(元/月)</th>");
  353. var $td5_2 = $("<td><input id='otherIncome"+index+"' type='text'></td>");
  354. var $th5_3 = $("<th>其他收入备注</th>");
  355. var $td5_4 = $("<td><input id='otherIncomeRemark"+index+"' type='text'></td>");
  356. var $th5_5 = $("<th>死亡注销日期</th>");
  357. var $td5_6 = $("<td></td>");
  358. var $deathDate = $("<input type='text' style='width: 100px;' id='deathDate" + index + "' class='easyui-datebox' editable='fasle'/>");
  359. $td5_6.append($deathDate);
  360. $.parser.parse($td5_6);
  361. $tr5.append($th5_1);
  362. $tr5.append($td5_2);
  363. $tr5.append($th5_3);
  364. $tr5.append($td5_4);
  365. $tr5.append($th5_5);
  366. $tr5.append($td5_6);
  367. var $tr6 = $("<tr></tr>");
  368. var $th6_1 = $("<th>何时何地迁入本市区户籍</th>" );
  369. var $td6_2 = $("<td colspan='5'><input id='moveIn"+index+"' type='text' style='width:700px'></td>");
  370. $tr6.append($th6_1);
  371. $tr6.append($td6_2);
  372. var $tr7 = $("<tr></tr>");
  373. var $th7_1 = $("<th>是否持有</th>" );
  374. var $td7_2 = $("<td colspan='5'>"+
  375. "<input value='1' type='checkbox' name='certificateInfoSpan"+index+"' id='certificateInfoSpan"+index+"-1' />"+
  376. "<label for='certificateInfoSpan"+index+"-1' style='cursor: pointer;width: 62px;'>无&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>"+
  377. "<input value='2' type='checkbox' name='certificateInfoSpan"+index+"' id='certificateInfoSpan"+index+"-2' />"+
  378. "<label for='certificateInfoSpan"+index+"-2' style='cursor: pointer;width: 62px;'>低保证</label>"+
  379. "<input value='3' type='checkbox' name='certificateInfoSpan"+index+"' id='certificateInfoSpan"+index+"-3' />"+
  380. "<label for='certificateInfoSpan"+index+"-3' style='cursor: pointer;width: 62px;'>残疾证</label>"+
  381. "<input value='4' type='checkbox' name='certificateInfoSpan"+index+"' id='certificateInfoSpan"+index+"-4' />"+
  382. "<label for='certificateInfoSpan"+index+"-4' style='cursor: pointer;width: 62px;'>特困证</label>"+
  383. "<input value='5' type='checkbox' name='certificateInfoSpan"+index+"' id='certificateInfoSpan"+index+"-5' />"+
  384. "<label for='certificateInfoSpan"+index+"-5' style='cursor: pointer;width: 62px;'>退役证</label>"+
  385. "<input value='6' type='checkbox' name='certificateInfoSpan"+index+"' id='certificateInfoSpan"+index+"-6' />"+
  386. "<label for='certificateInfoSpan"+index+"-6' style='cursor: pointer;width: 62px;'>环卫工人</label>"+
  387. "<input value='7' type='checkbox' name='certificateInfoSpan"+index+"' id='certificateInfoSpan"+index+"-7' />"+
  388. "<label for='certificateInfoSpan"+index+"-7' style='cursor: pointer;width: 62px;'>公交司机</label>"+
  389. "<input type='hidden' name='certificateInfo"+index+"' id='certificateInfo"+index+"'/>"+
  390. "<input type='hidden' name='isSubsistenceAllowances"+index+"' id='isSubsistenceAllowances"+index+"'/>"+
  391. "</td>"
  392. );
  393. $tr7.append($th7_1);
  394. $tr7.append($td7_2);
  395. var $tr8 = $("<tr></tr>");
  396. var $th8_1 = $("<th>资产信息</th>");
  397. var $td8_2 = $("<td colspan='5'></td>");
  398. var $button1 =$("<input id='carInfo"+index+"' type='button' value='车辆信息' onclick='carInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
  399. var $button2 =$("<input id='businessInfo"+index+"' type='button' value='工商信息' onclick='businessInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
  400. var $button3 =$("<input id='securitiesInfo"+index+"' type='button' value='证券信息' onclick='securitiesInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
  401. var $button4 =$("<input id='bankInfo"+index+"' type='button' value='银行信息' onclick='bankInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
  402. var $button5 =$("<input id='commercialInsuranceInfo"+index+"' type='button' value='商业保险信息' onclick='commercialInsuranceInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
  403. var $img = $("<img align='right' src='images/remove.png' onclick=remove('mbtb_" + index + "')>");
  404. $td8_2.append($button1);
  405. $td8_2.append($button2);
  406. $td8_2.append($button3);
  407. $td8_2.append($button4);
  408. $td8_2.append($button5);
  409. $td8_2.append($img);
  410. $tr8.append($th8_1);
  411. $tr8.append($td8_2);
  412. var $tr9 = $("<tr id='tr"+index+"_9' style='display: none;'></tr>");
  413. var $th9_1 = $("<th>资产信息</th>");
  414. var $td9_2 = $("<td id='all_td"+index+"' colspan='5'></td>");
  415. var $carInfo_div = $("<div id='carInfo_span"+index+"'></div>");
  416. var $carInfo_input = $("<input id='carInfo_input"+index+"' type='hidden'/>");
  417. var $businessInfo_div = $("<div id='businessInfo_span"+index+"'></div>");
  418. var $businessInfo_input = $("<input id='businessInfo_input"+index+"' type='hidden'/>");
  419. var $securitiesInfo_span = $("<span id='securitiesInfo_span"+index+"'></span>");
  420. var $securitiesInfo_input = $("<input id='securitiesInfo_input"+index+"' type='hidden' value='0'/>");
  421. var $bankInfo_span = $("<span id='bankInfo_span"+index+"'></span>");
  422. var $bankInfo_input = $("<input id='bankInfo_input"+index+"' type='hidden' value='0'/>");
  423. var $commercialInsuranceInfo_span = $("<span id='commercialInsuranceInfo_span"+index+"'></span>");
  424. var $commercialInsuranceInfo_input = $("<input id='commercialInsuranceInfo_input"+index+"' type='hidden' value='0'/>");
  425. $td9_2.append($carInfo_div);
  426. $td9_2.append($businessInfo_div);
  427. $td9_2.append($carInfo_input);
  428. $td9_2.append($businessInfo_input);
  429. $td9_2.append($securitiesInfo_span);
  430. $td9_2.append($securitiesInfo_input);
  431. $td9_2.append($bankInfo_span);
  432. $td9_2.append($bankInfo_input);
  433. $td9_2.append($commercialInsuranceInfo_span);
  434. $td9_2.append($commercialInsuranceInfo_input);
  435. $tr9.append($th9_1);
  436. $tr9.append($td9_2);
  437. $table.append($tr1);
  438. $table.append($tr2);
  439. $table.append($tr3);
  440. $table.append($tr4);
  441. $table.append($tr5);
  442. $table.append($tr6);
  443. $table.append($tr7);
  444. $table.append($tr8);
  445. $table.append($tr9);
  446. $("#mbtb_1").after($table);
  447. }
  448. //删除家庭成员表格
  449. function remove(id){
  450. $("#" + id).remove();
  451. }
  452. function carInfo_add(index){
  453. $("#addAssetsInfoDialog").dialog({
  454. buttons:[{
  455. text:"确认",
  456. iconCls : 'icon-ok',
  457. handler : function(){
  458. $("#car_id").val(index)
  459. var id = "car_index_" + (new Date()).valueOf();
  460. var indexCar = $("#car_id").val();
  461. var vehicleBrand = "车辆品牌:" + $("#vehicleBrand1").val();
  462. var vehicleModel = "车辆型号:" + $("#vehicleModel1").val();
  463. var buyFirstTime = "初次购买日期:" + $("#buyFirstTime1").datebox("getValue");
  464. var estimatePrice = "车辆价值(元):" + $("#estimatePrice1").val();
  465. if($("#estimatePrice1").val()==''){
  466. $.messager.alert('提醒','请输入车辆价值');
  467. return ;
  468. }
  469. var spanText = vehicleBrand + "," + vehicleModel + "," + buyFirstTime + "," + estimatePrice;
  470. var delBtn = "<img src='images/i_de.png' style='float:left; margin-left:10px;cursor:pointer' onclick=delCar('"+id+"','"+spanText+"','"+indexCar+"')>";
  471. var html = "<div id='"+id+"' style='height:20px;'><span style='float:left;'>"+spanText+"</span>"+ delBtn + "</div>";
  472. var pText = $('#carInfo_span'+indexCar).html();
  473. $("#carInfo_span"+indexCar).html(pText + html);
  474. var cars_hidden_text_id = '#carInfo_input' + indexCar;
  475. $(cars_hidden_text_id).val($(cars_hidden_text_id).val() + "###" + spanText);
  476. $("#tr"+index+"_9").show();
  477. $("#addAssetsInfoDialog").dialog("close");
  478. }
  479. },{
  480. text:"取消",
  481. iconCls : 'icon-cancel',
  482. handler : function(){
  483. $("#addAssetsInfoDialog").dialog("close");
  484. }
  485. }],
  486. onLoad : function(){
  487. $("#carInfo_tb").show();
  488. }
  489. })
  490. }
  491. function delCar(id,spanText,indexCar){
  492. //删除该车辆
  493. $("#"+id).remove();
  494. //删除车辆信息
  495. $("#carInfo_input"+indexCar).val($("#carInfo_input"+indexCar).val().replace('###'+spanText,''));
  496. }
  497. function businessInfo_add(index){
  498. $("#addAssetsInfoDialog").dialog({
  499. buttons:[{
  500. text:"确认",
  501. iconCls : 'icon-ok',
  502. handler : function(){
  503. $("#business_id").val(index)
  504. var id = "business_index_" + (new Date()).valueOf();
  505. var indexbusiness = $("#business_id").val();
  506. var businessName = "企业名称:" + $("#businessName1").val();
  507. var businessAddress = "地址:" + $("#businessAddress1").val();
  508. var shareholderName = "股东名称:" + $("#shareholderName1").val();;
  509. var investmentAmount = "出资金额:" + $("#investmentAmount1").val();
  510. var spanText = businessName + "," + businessAddress + "," + shareholderName + "," + investmentAmount;
  511. var delBtn = "<img src='images/i_de.png' style='float:left; margin-left:10px;cursor:pointer' onclick=delBusiness('"+id+"','"+spanText+"','"+indexbusiness+"')>";
  512. var html = "<div id='"+id+"' style='height:20px;'><span style='float:left;'>"+spanText+"</span>"+ delBtn + "</div>";
  513. var pText = $('#businessInfo_span'+indexbusiness).html();
  514. $("#businessInfo_span"+indexbusiness).html(pText + html);
  515. var businesss_hidden_text_id = '#businessInfo_input' + indexbusiness;
  516. $(businesss_hidden_text_id).val($(businesss_hidden_text_id).val() + "###" + spanText);
  517. $("#tr"+index+"_9").show();
  518. $("#addAssetsInfoDialog").dialog("close");
  519. }
  520. },{
  521. text:"取消",
  522. iconCls : 'icon-cancel',
  523. handler : function(){
  524. $("#addAssetsInfoDialog").dialog("close");
  525. }
  526. }],
  527. onLoad : function(){
  528. $("#businessInfo_tb").show();
  529. }
  530. })
  531. }
  532. function delBusiness(id,spanText,indexBusiness){
  533. //删除该车辆
  534. $("#"+id).remove();
  535. //删除车辆信息
  536. $("#businessInfo_input"+indexBusiness).val($("#businessInfo_input"+indexBusiness).val().replace('###'+spanText,''));
  537. }
  538. //股票信息添加
  539. function securitiesInfo_add(index){
  540. $("#addAssetsInfoDialog").dialog({
  541. buttons:[{
  542. text:"确认",
  543. iconCls : 'icon-ok',
  544. handler : function(){
  545. $("#addAssetsInfoDialog").dialog("close");
  546. var securitiesTotal=$("#securitiesTotal1").val()
  547. $("#securitiesInfo_span"+index).html("证券总额为:"+securitiesTotal+"</br>");
  548. $("#securitiesInfo_input"+index).val(securitiesTotal);
  549. $("#tr"+index+"_9").show();
  550. }
  551. },{
  552. text:"取消",
  553. iconCls : 'icon-cancel',
  554. handler : function(){
  555. $("#addAssetsInfoDialog").dialog("close");
  556. }
  557. }],
  558. onLoad : function(){
  559. $("#securitiesInfo_tb").show();
  560. }
  561. })
  562. }
  563. //银行存款信息添加
  564. function bankInfo_add(index){
  565. $("#addAssetsInfoDialog").dialog({
  566. buttons:[{
  567. text:"确认",
  568. iconCls : 'icon-ok',
  569. handler : function(){
  570. $("#addAssetsInfoDialog").dialog("close");
  571. var bankTotal=$("#bankTotal1").val()
  572. $("#bankInfo_span"+index).html("银行存款总额为:"+bankTotal+"</br>");
  573. $("#bankInfo_input"+index).val(bankTotal);
  574. $("#tr"+index+"_9").show();
  575. }
  576. },{
  577. text:"取消",
  578. iconCls : 'icon-cancel',
  579. handler : function(){
  580. $("#addAssetsInfoDialog").dialog("close");
  581. }
  582. }],
  583. onLoad : function(){
  584. $("#bankInfo_tb").show();
  585. }
  586. })
  587. }
  588. //商业保险添加
  589. function commercialInsuranceInfo_add(index){
  590. $("#addAssetsInfoDialog").dialog({
  591. buttons:[{
  592. text:"确认",
  593. iconCls : 'icon-ok',
  594. handler : function(){
  595. $("#addAssetsInfoDialog").dialog("close");
  596. var commercialInsuranceInfo=$("#commercialInsuranceTotal1").val();
  597. $("#commercialInsuranceInfo_span"+index).html("商业保险总额为:"+commercialInsuranceInfo+"</br>");
  598. $("#commercialInsuranceInfo_input"+index).val(commercialInsuranceInfo);
  599. $("#tr"+index+"_9").show();
  600. }
  601. },{
  602. text:"取消",
  603. iconCls : 'icon-cancel',
  604. handler : function(){
  605. $("#addAssetsInfoDialog").dialog("close");
  606. }
  607. }],
  608. onLoad : function(){
  609. $("#commercialInsuranceInfo_tb").show();
  610. }
  611. })
  612. }
  613. </script>
  614. <form id="pz1Form" action="securityPersonApplyAction_addSecurityPersonApply" method="post" >
  615. <input type="hidden" id="familyNum_add" name="securityPersonApply.familyNum"/>
  616. <input type="hidden" id="addType_add" name="securityPersonApply.addType" value="1"/>
  617. <input type="hidden" id="type_add" name="securityPersonApply.type" value="2"/>
  618. <input type="hidden" id="flow_add" name="securityPersonApply.flow" value="1"/>
  619. <input type="hidden" name="securityPersonApply.isCar" id="isCar_add" value="2"/>
  620. <input type="hidden" name="securityPersonApply.isBusiness" id="isBusiness_add" value="2"/>
  621. <table id="securityPersonInfo" class="mytable">
  622. <tr>
  623. <th colspan="4"><span style="font-weight: bolder;">淮安市市区公租房实物配租--低保人员</span></th>
  624. </tr>
  625. <tr>
  626. <th colspan="4">申请人基本信息</th>
  627. </tr>
  628. <tr>
  629. <th width="11%"><em>*</em>申请人姓名</th>
  630. <td width="38%"><input type="text" name="securityPersonApply.securityPersonName" id="name_add"/></td>
  631. <th width="11%"><em>*</em>身份证号码</th>
  632. <td><input type="text" name="securityPersonApply.securityPersonIdCard" id="idCard_add" onchange="check(this.value)"/></td>
  633. </tr>
  634. <tr>
  635. <th><em>*</em>现婚姻状况</th>
  636. <td>
  637. <select name="securityPersonApply.maritalStatus" id="maritalStatus_add" style="width:172px">
  638. <option value="">请选择</option>
  639. </select>
  640. </td>
  641. <th><em>*</em>手机号码</th>
  642. <td><input type="text" name="securityPersonApply.phone" id="phone_add"/></td>
  643. </tr>
  644. <tr>
  645. <th id="houseRegister_span"><em>*</em>户口所在地:</th>
  646. <td>
  647. <select id="street_add" style="width: 80px">
  648. <option value="">请选择</option>
  649. </select>
  650. <select id="neighborhood_add" name="securityPersonApply.houseRegister.id" style="width: 130px">
  651. <option value="">请选择</option>
  652. </select>
  653. <select id="communityId_add" name="securityPersonApply.communityId" style="width: 100px">
  654. <option value="">请选择</option>
  655. </select>
  656. <input type="hidden" id="community_add" name="securityPersonApply.community"/>
  657. </td>
  658. <th><em>*</em>工作单位名称</th>
  659. <td><input type="text" id="company_add" name="securityPersonApply.company"/></td>
  660. </tr>
  661. </table>
  662. <div id="mbtb_div" class="mbtb">
  663. <table class="mytable changeLine" id="mbtb_1">
  664. <tr>
  665. <th colspan="8">家庭成员基本信息
  666. <input id="" type="button" value="新增家庭成员" onclick="addSecurityPersonApplyRelative();" style="margin-left: 30px"/>
  667. <input type="button" value="计算家庭平均收入" onclick="countAvgIncome()"/>
  668. <span id="avgIncome_span"></span>
  669. <input id="avgIncome_add" name="securityPersonApply.avgIncome" type="hidden"/>
  670. </th>
  671. </tr>
  672. <tr style="border-top: 2px solid blue;">
  673. <th width="11%">户号</th>
  674. <td width="20%"><input id='residenceNo1' type='text' style="width: 100px;"></td>
  675. <th width="11%">姓名</th>
  676. <td width="24%"><input id='name1' type='text' style="width: 100px;"></td>
  677. <th width="11%">身份证号码</th>
  678. <td width="23%"><input id='idCard1' type='text' style="width: 172px;"></td>
  679. </tr>
  680. <tr>
  681. <th>与申请人关系</th>
  682. <td>
  683. <select id='relative1' style='width: 120px;'>
  684. <option value='0'>申请人</option>
  685. </select>
  686. </td>
  687. <th>婚姻状况</th>
  688. <td>
  689. <select id='maritalStatus1' style='width: 120px;height: 20px;vertical-align: middle;'>
  690. <option value=''>选择</option>
  691. </select>
  692. <input type="text" style="width: 100px;" id='maritalDate1' class="easyui-datebox" editable="fasle"/>
  693. </td>
  694. <th>民族</th>
  695. <td>
  696. <select id='nationality1' style='width: 120px;'>
  697. <option value=''>选择</option>
  698. </select>
  699. </td>
  700. </tr>
  701. <tr>
  702. <th>联系电话</th>
  703. <td><input id="phone1"/></td>
  704. <th>工作单位</th>
  705. <td><input id='company1' type='text' style="width: 172px;"></td>
  706. <th>文化程度</th>
  707. <td>
  708. <select id='education1' style='width: 120px;'>
  709. <option value=''>选择</option>
  710. </select>
  711. </td>
  712. </tr>
  713. <tr>
  714. <th>工薪收入(元/月)</th>
  715. <td><input id="wageIncome1" /></td>
  716. <th>经营净收入(元/月)</th>
  717. <td><input id="operatingNetIncome1" /></td>
  718. <th>财产性收入(元/月)</th>
  719. <td><input id="propertyIncome1" /></td>
  720. </tr>
  721. <tr>
  722. <th>其他收入(元/月)</th>
  723. <td><input id="otherIncome1" /></td>
  724. <th>其他收入备注</th>
  725. <td><input id="otherIncomeRemark1" /></td>
  726. <th>死亡注销日期</th>
  727. <td><input id='deathDate1' class="easyui-datebox" editable="fasle"/></td>
  728. </tr>
  729. <tr>
  730. <th>何时何地迁入本市区户籍</th>
  731. <td colspan="5">
  732. <input id="moveIn1" style="width: 700px"/>
  733. </td>
  734. </tr>
  735. <tr>
  736. <th>是否持有</th>
  737. <td colspan="5">
  738. <input value="1" type="checkbox" name="certificateInfoSpan1" id="certificateInfoSpan1-1" />
  739. <label for="certificateInfoSpan1-1" style="cursor: pointer;">无&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
  740. <input value="2" type="checkbox" name="certificateInfoSpan1" id="certificateInfoSpan1-2" />
  741. <label for="certificateInfoSpan1-2" style="cursor: pointer;">低保证&nbsp;</label>
  742. <input value="3" type="checkbox" name="certificateInfoSpan1" id="certificateInfoSpan1-3" />
  743. <label for="certificateInfoSpan1-3" style="cursor: pointer;">残疾证&nbsp;</label>
  744. <input value="4" type="checkbox" name="certificateInfoSpan1" id="certificateInfoSpan1-4" />
  745. <label for="certificateInfoSpan1-4" style="cursor: pointer;">特困证&nbsp;</label>
  746. <input value="5" type="checkbox" name="certificateInfoSpan1" id="certificateInfoSpan1-5" />
  747. <label for="certificateInfoSpan1-5" style="cursor: pointer;">退役证&nbsp;</label>
  748. <input value="6" type="checkbox" name="certificateInfoSpan1" id="certificateInfoSpan1-6" />
  749. <label for="certificateInfoSpan1-6" style="cursor: pointer;">环卫工人&nbsp;</label>
  750. <input value="7" type="checkbox" name="certificateInfoSpan1" id="certificateInfoSpan1-7" />
  751. <label for="certificateInfoSpan1-7" style="cursor: pointer;">公交司机&nbsp;</label>
  752. <input id="certificateInfo1" name="certificateInfo1" type="hidden"/>
  753. <input id="isSubsistenceAllowances1" name="isSubsistenceAllowances1" type="hidden"/>
  754. </td>
  755. </tr>
  756. <tr>
  757. <th>资产信息</th>
  758. <td colspan="5">
  759. <input id="carInfo1" type="button" value="车辆信息" onclick="carInfo_add(1)"/>
  760. <input id="businessInfo1" type="button" value="工商信息" onclick="businessInfo_add(1)"/>
  761. <input id="securitiesInfo1" type="button" value="证券信息" onclick="securitiesInfo_add(1)"/>
  762. <input id="bankInfo1" type="button" value="银行信息" onclick="bankInfo_add(1)"/>
  763. <input id="commercialInsuranceInfo1" type="button" value="商业保险信息" onclick="commercialInsuranceInfo_add(1)"/>
  764. </td>
  765. </tr>
  766. <tr id="tr1_9" style="display: none;">
  767. <th>资产信息</th>
  768. <td id="all_td1" colspan="5">
  769. <!-- 车辆 -->
  770. <div id="carInfo_span1"></div>
  771. <input id="carInfo_input1" type="hidden"/>
  772. <!-- 工商 -->
  773. <div id="businessInfo_span1"></div>
  774. <input id="businessInfo_input1" type="hidden"/>
  775. <!-- 证券 -->
  776. <span id="securitiesInfo_span1"></span>
  777. <input id="securitiesInfo_input1" name="securityPersonApplyRelative.securitiesTotal" type="hidden" value="0"/>
  778. <!-- 银行 -->
  779. <span id="bankInfo_span1"></span>
  780. <input id="bankInfo_input1" name="securityPersonApplyRelative.bankTotal" type="hidden" value="0"/>
  781. <!-- 商业保险 -->
  782. <span id="commercialInsuranceInfo_span1"></span>
  783. <input id="commercialInsuranceInfo_input1" name="securityPersonApplyRelative.commercialInsurance" type="hidden" value="0"/>
  784. </td>
  785. </tr>
  786. </table>
  787. </div>
  788. <table class="mytable">
  789. <tr>
  790. <th colspan="2">现住房信息</th>
  791. </tr>
  792. <tr>
  793. <th width="20%"><em>*</em>家庭住房困难类型:</th>
  794. <td>
  795. <input value="1" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-1">
  796. <label for="currentHouseSituation-1" style="cursor: pointer;">自有房产&nbsp;</label>
  797. <input value="2" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-2">
  798. <label for="currentHouseSituation-2" style="cursor: pointer;">租住私房&nbsp;</label>
  799. <input value="3" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-3">
  800. <label for="currentHouseSituation-3" style="cursor: pointer;">借住私房&nbsp;</label>
  801. <input value="4" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-4">
  802. <label for="currentHouseSituation-4" style="cursor: pointer;">租住公房&nbsp;</label></br>
  803. <span style="color:#000;">房屋坐落:</span><input id="existReal_add" name="securityPersonApply.existReal" type="text" class="form-control" style="width: 300px;display: inline;"/>
  804. <span style="color:#000;">,面积:</span><input id="existArea_add" name="securityPersonApply.existArea" type="text" class="form-control" style="width: 100px;display: inline;"/>
  805. <span style="color:#000;">平方米,产权人:</span><input type="text" id="propertyCompany_add" name="securityPersonApply.propertyCompany" style="width: 100px;display: inline;">
  806. </td>
  807. </tr>
  808. <tr>
  809. <th>是否存在转让房产、取得拆迁安置补偿不满两年的情况:</th>
  810. <td>
  811. <input value="1" type="radio" name="securityPersonApply.isAssignmentHouse" id="isAssignmentHouse-1" />
  812. <label for="isAssignmentHouse-1" style="cursor: pointer;">是&nbsp;</label>
  813. <input value="2" type="radio"name="securityPersonApply.isAssignmentHouse" checked="checked" id="isAssignmentHouse-2" />
  814. <label for="isAssignmentHouse-2" style="cursor: pointer;">否&nbsp;</label>
  815. </td>
  816. </tr>
  817. <tr>
  818. <th>申请之日前两年是否享受过房改房、政策性商品房或其他住房保障政策:</th>
  819. <td>
  820. <input value="1" type="radio" name="securityPersonApply.hasUsed" id="hasUsed-1" />
  821. <label for="hasUsed-1" style="cursor: pointer;">是&nbsp;</label>
  822. <input value="2" type="radio"name="securityPersonApply.hasUsed" id="hasUsed-2" />
  823. <label for="hasUsed-2" style="cursor: pointer;">否&nbsp;</label>
  824. </td>
  825. </tr>
  826. </table>
  827. </form>