addGY2.jsp 37 KB

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