addBT1.jsp 39 KB

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