swpz2Add.jsp 45 KB

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