addBT2.jsp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. <%-- 补贴申请表11--新就业人员--%>
  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 addBT2_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. function addBT2_submit(){
  18. var flag1 = verifyCurrentHouseSituation();
  19. var flag2 = checkData();
  20. if(flag1&&flag2){
  21. $.ajax({
  22. type: "POST",
  23. url:"securityPersonApply2Action_addSecurityPersonApply",
  24. data:$('#bt2Form').serialize(),// 你的formid
  25. async: false,
  26. error: function(data) {
  27. $.messager.alert("提示","提交失败");
  28. },
  29. success: function(result) {
  30. var parseResult = $.parseJSON(result);
  31. if(parseResult.success){
  32. $('#addBT2Dialog').dialog("close");
  33. var securityPersonApplyId = parseResult.obj.id;
  34. var fileNum = parseResult.obj.fileNum;
  35. for(var i=1;i<=index;i++){
  36. if($("#mbtb_" + i).length > 0 ){
  37. var url = whzl.basePath+'/securityPersonApply2Action_addSecurityPersonApplyRelative';
  38. $.ajax({
  39. type: "post",//使用post方法访问后台
  40. dataType: "json",//返回json格式的数据
  41. url: url,//要访问的后台地址
  42. async: false,
  43. data:{"securityPersonApplyRelative.securityPersonApplyId":securityPersonApplyId ,
  44. "securityPersonApplyRelative.fileNum":fileNum ,
  45. "securityPersonApplyRelative.name":$("#name" + i ).val() ,
  46. "securityPersonApplyRelative.relative":$("#relative" + i ).val() ,
  47. "securityPersonApplyRelative.idCard":$("#idCard" + i ).val() ,
  48. "securityPersonApplyRelative.maritalStatus":$("#maritalStatus" + i ).val() ,
  49. "securityPersonApplyRelative.maritalDate":$("#maritalDate" + i ).datebox('getValue') ,
  50. "securityPersonApplyRelative.company":$("#company" + i ).val() ,
  51. "securityPersonApplyRelative.residenceNo":$("#residenceNo" + i ).val() ,
  52. "securityPersonApplyRelative.company":$("#company" + i ).val() ,
  53. "securityPersonApplyRelative.phone":$("#phone" + i ).val(),
  54. "securityPersonApplyRelative.nationality":$("#nationality" + i ).val() ,
  55. "securityPersonApplyRelative.education":$("#education" + i ).val() ,
  56. "securityPersonApplyRelative.deathDate":$("#deathDate" + i ).datebox('getValue') ,
  57. },
  58. success : function(result){
  59. $("#securityPersonApplyDataGrid").datagrid("reload");
  60. }
  61. });
  62. }
  63. }
  64. }
  65. }
  66. })
  67. }
  68. }
  69. function checkData(){
  70. var flag= true;
  71. //姓名验证
  72. if($("#name_add").val()==''){
  73. $.messager.alert('提醒','请输入姓名');
  74. flag = false;
  75. }
  76. //身份证验证
  77. if($("#idCard_add").val()==''){
  78. $.messager.alert('提醒','请输入身份证号');
  79. flag = false;
  80. }else{
  81. if(!idCard1($("#idCard_add").val())){
  82. $.messager.alert('提醒','请检查输入的身份证号是否正确');
  83. flag = false;
  84. }
  85. }
  86. //婚姻状况验证
  87. if($("#maritalStatus_add").val()==''){
  88. $.messager.alert('提醒','请选择现婚姻状况');
  89. flag = false;
  90. }
  91. //手机号码验证
  92. if($("#phone_add").val()==''){
  93. $.messager.alert('提醒','请输入手机号码');
  94. flag = false;
  95. }
  96. if($("#accountLocation_add").val()==''){
  97. $.messager.alert('提醒','请输入户口所在地');
  98. flag = false;
  99. }
  100. //单位名称
  101. if($("#company_add").val()==''){
  102. $.messager.alert('提醒','请输入单位名称');
  103. flag = false;
  104. }
  105. //单位地址
  106. if($("#workPlace_add").val()==''){
  107. $.messager.alert('提醒','请输入单位地址');
  108. flag = false;
  109. }
  110. //是否缴纳社保
  111. var pension=$('input:radio[name="securityPersonApply.pension"]:checked').val();
  112. if(typeof(pension)=="undefined"){
  113. $.messager.alert('提醒','请选择是否参加市区城镇职工基本社会保险');
  114. flag = false;
  115. }
  116. //是否签订劳动合同
  117. var laborContract=$('input:radio[name="securityPersonApply.laborContract"]:checked').val();
  118. if(typeof(laborContract)=="undefined"){
  119. $.messager.alert('提醒','请选择是否签订劳动合同');
  120. flag = false;
  121. }
  122. //验证家庭成员信息
  123. var isCar=2;
  124. var isBusiness=2;
  125. for(var i=1;i<=index;i++){
  126. var mbtb = $("#mbtb_"+i);
  127. //如果被删除,直接跳过
  128. if(mbtb.length > 0){
  129. var residenceNo=$("#residenceNo"+i).val()
  130. var idCard=$("#idCard"+i).val();
  131. var name=$("#name"+i).val();
  132. var relative=$("#relative"+i).val();
  133. var maritalStatus=$("#maritalStatus"+i).val();
  134. var wageIncome=$("#wageIncome"+i).val();
  135. var maritalDate = $("#maritalDate"+i).datebox('getValue');
  136. var phone=$("#phone"+i).val();
  137. var nationality=$("#nationality"+i).val();
  138. var education=$("#education"+i).val();
  139. //户号
  140. if(residenceNo==''){
  141. $.messager.alert('提醒','请填户号');
  142. flag = false;
  143. }
  144. //验证姓名
  145. if(name==''){
  146. $.messager.alert('提醒','请填写姓名');
  147. flag = false;
  148. }
  149. //验证身份证号
  150. if(idCard!=''){
  151. if(!idCard1(idCard)){
  152. $.messager.alert('提醒','请填正确身份证号');
  153. flag = false;
  154. }
  155. }else{
  156. $.messager.alert('提醒','请填身份证号');
  157. flag = false;
  158. }
  159. //验证户籍关系
  160. if(relative==''){
  161. $.messager.alert('提醒','请填与申请人关系');
  162. flag = false;
  163. }
  164. //验证婚姻关系
  165. if(maritalStatus==''){
  166. $.messager.alert('提醒','请填婚姻状况');
  167. flag = false;
  168. }
  169. //除未成年、未婚都要填写登记时间
  170. if(maritalStatus !="6"&&maritalStatus !="5"){
  171. if(maritalDate ==''){
  172. $.messager.alert('提醒','请填婚姻登记日期');
  173. flag = false;
  174. }
  175. }
  176. //验证民族
  177. if(nationality==''){
  178. $.messager.alert('提醒','请选择民族');
  179. flag = false;
  180. }
  181. //验证文化
  182. if(education==''){
  183. $.messager.alert('提醒','请选择文化程度');
  184. flag = false;
  185. }
  186. //验证电话
  187. if(phone==''){
  188. $.messager.alert('提醒','请填联系电话');
  189. flag = false;
  190. }
  191. }
  192. }
  193. //家庭人口数量
  194. var mbtbNum = $(".mbtb > table").size();
  195. $("#familyNum_add").val(mbtbNum);
  196. return flag;
  197. }
  198. //验证家庭住房情况
  199. function verifyCurrentHouseSituation(){
  200. var flag = true;
  201. var currentHouseSituation=$('input:radio[name="securityPersonApply.currentHouseSituation"]:checked').val();
  202. var propertyCompany=$('#propertyCompany_add').val();
  203. if(typeof(propertyCompany)=="undefined" || propertyCompany == ''){
  204. $.messager.alert('提醒','请输入产权单位');
  205. flag = false;
  206. }
  207. var existArea=$('#existArea_add').val();
  208. if(typeof(existArea)=="undefined" || existArea == ''){
  209. $.messager.alert('提醒','请输房屋面积');
  210. flag = false;
  211. }
  212. var existReal=$('#existReal_add').val();
  213. if(typeof(existReal)=="undefined" || existReal == ''){
  214. $.messager.alert('提醒','请输房屋地址');
  215. flag = false;
  216. }
  217. return flag;
  218. }
  219. var index = 1;
  220. function addSecurityPersonApplyRelative(){
  221. index++;
  222. var $table = $("<table id='mbtb_"+index+"' class='mytable changeLine'></table>");
  223. var $tr1 = $("<tr style='border-top: 2px solid blue;'></tr>");
  224. var $th1_1 = $("<th width='11%'>户号</th>");
  225. var $td1_2 = $("<td width='20%'><input id='residenceNo"+index+"' type='text' style='width: 100px;'></td>");
  226. var $th1_3 = $("<th width='11%'>姓名</th>");
  227. var $td1_4 = $("<td width='24%'><input id='name"+index+"' type='text' style='width: 100px;'></td>");
  228. var $th1_5 = $("<th width='11%'>身份证号</th>");
  229. var $td1_6 = $("<td><input id='idCard"+index+"' type='text' style='width: 172px;'></td>");
  230. $tr1.append($th1_1);
  231. $tr1.append($td1_2);
  232. $tr1.append($th1_3);
  233. $tr1.append($td1_4);
  234. $tr1.append($th1_5);
  235. $tr1.append($td1_6);
  236. var $tr2 = $("<tr></tr>");
  237. var $th2_1 = $("<th>与申请人关系</th>");
  238. var $td2_2 = $("<td></td>");
  239. var $select_relative=$("<select id='relative" + index + "' style='width: 120px;'><option value=''>选择</option></select>")
  240. $select_relative.append(relative_array);
  241. $td2_2.append($select_relative);
  242. var $th2_3 = $("<th>婚姻状况</th>");
  243. var $td2_4 = $("<td></td>");
  244. var $select_maritalStatus=$("<select id='maritalStatus" + index + "' style='width: 120px;height: 20px;vertical-align: middle;'><option value=''>选择</option></select>")
  245. $select_maritalStatus.append(maritalStatus_array);
  246. var $maritalDate = $("<input type='text' style='width: 100px;' id='maritalDate" + index + "' class='easyui-datebox' editable='fasle'/>");
  247. $td2_4.append($select_maritalStatus);
  248. $td2_4.append($maritalDate);
  249. $.parser.parse($td2_4);
  250. var $th2_5 = $("<th>民族</th>");
  251. var $td2_6 = $("<td></td>");
  252. var $select_nationality=$("<select id='nationality" + index + "' style='width: 120px;'><option value=''>选择</option></select>")
  253. $select_nationality.append(nationality_array);
  254. $td2_6.append($select_nationality);
  255. $tr2.append($th2_1);
  256. $tr2.append($td2_2);
  257. $tr2.append($th2_3);
  258. $tr2.append($td2_4);
  259. $tr2.append($th2_5);
  260. $tr2.append($td2_6);
  261. var $tr3 = $("<tr></tr>");
  262. var $th3_1 = $("<th>联系电话</th>");
  263. var $td3_2 = $("<td><input id='phone"+index+"' type='text'/></td>");
  264. var $th3_3 = $("<th>工作单位</th>");
  265. var $td3_4 = $("<td><input id='company"+index+"' type='text'></td>");
  266. var $th3_5 = $("<th>文化程度</th>");
  267. var $td3_6 = $("<td></td>");
  268. var $select_education=$("<select id='education" + index + "' style='width: 120px;'><option value=''>选择</option></select>")
  269. $select_education.append(education_array);
  270. $td3_6.append($select_education);
  271. $tr3.append($th3_1);
  272. $tr3.append($td3_2);
  273. $tr3.append($th3_3);
  274. $tr3.append($td3_4);
  275. $tr3.append($th3_5);
  276. $tr3.append($td3_6);
  277. var $tr4 = $("<tr></tr>");
  278. var $th4_1 = $("<th>死亡注销日期</th>");
  279. var $td4_2 = $("<td></td>");
  280. var $deathDate = $("<input type='text' style='width: 100px;' id='deathDate" + index + "' class='easyui-datebox' editable='fasle'/>");
  281. $td4_2.append($deathDate);
  282. $.parser.parse($td4_2);
  283. $tr4.append($th4_1);
  284. $tr4.append($td4_2);
  285. $table.append($tr1);
  286. $table.append($tr2);
  287. $table.append($tr3);
  288. $table.append($tr4);
  289. $("#mbtb_1").after($table);
  290. }
  291. //删除家庭成员表格
  292. function remove(id){
  293. $("#" + id).remove();
  294. }
  295. </script>
  296. <form id="bt2Form" action="securityPersonApplyAction_addSecurityPersonApply" method="post" >
  297. <input type="hidden" id="familyNum_add" name="securityPersonApply.familyNum"/>
  298. <input type="hidden" id="addType_add" name="securityPersonApply.addType" value="1"/>
  299. <input type="hidden" id="type_add" name="securityPersonApply.type" value="11"/>
  300. <input type="hidden" id="flow_add" name="securityPersonApply.flow" value="2"/>
  301. <input type="hidden" name="securityPersonApply.isCar" id="isCar_add" value="2"/>
  302. <input type="hidden" name="securityPersonApply.isBusiness" id="isBusiness_add" value="2"/>
  303. <table id="securityPersonInfo" class="mytable">
  304. <tr>
  305. <th colspan="4"><span style="font-weight: bolder;">淮安市市区公租房租赁补贴--新就业人员</span></th>
  306. </tr>
  307. <tr>
  308. <th colspan="4">申请人基本信息</th>
  309. </tr>
  310. <tr>
  311. <th width="11%"><em>*</em>申请人姓名</th>
  312. <td width="38%"><input type="text" name="securityPersonApply.securityPersonName" id="name_add"/></td>
  313. <th width="11%"><em>*</em>身份证号码</th>
  314. <td><input type="text" name="securityPersonApply.securityPersonIdCard" id="idCard_add" onchange="check(this.value)"/></td>
  315. </tr>
  316. <tr>
  317. <th><em>*</em>现婚姻状况</th>
  318. <td>
  319. <select name="securityPersonApply.maritalStatus" id="maritalStatus_add" style="width:172px">
  320. <option value="">请选择</option>
  321. </select>
  322. </td>
  323. <th><em>*</em>手机号码</th>
  324. <td><input type="text" name="securityPersonApply.phone" id="phone_add"/></td>
  325. </tr>
  326. <tr>
  327. <th><em>*</em>户口所在地</th>
  328. <td>
  329. <input type="text" id="accountLocation_add" style="width: 350px;" name="securityPersonApply.accountLocation"/>
  330. </td>
  331. <th><em>*</em>中专及以上学历毕业时间</th>
  332. <td>
  333. <input class="easyui-datebox" type="text" id="graduationDate_add" name="securityPersonApply.graduationDate" />
  334. </td>
  335. </tr>
  336. <tr>
  337. <th><em>*</em>工作单位名称</th>
  338. <td><input type="text" id="company_add" name="securityPersonApply.company"/></td>
  339. <th><em>*</em>工作单位地址</th>
  340. <td><input type="text" id="workPlace_add" name="securityPersonApply.workPlace"/></td>
  341. </tr>
  342. <tr>
  343. <th><em>*</em><span>是否参加市区城镇职工基本社会保险</span></th>
  344. <td>
  345. <input value="1" type="radio" name="securityPersonApply.pension" id="pension-1" />
  346. <label for="pension-1" style="cursor: pointer;">是&nbsp;</label>
  347. <input value="2" type="radio" name="securityPersonApply.pension" id="pension-2" />
  348. <label for="pension-2" style="cursor: pointer;">否&nbsp;</label>
  349. </td>
  350. <th><em>*</em><span>是否签订劳动合同(聘用合同)</span></th>
  351. <td>
  352. <input value="1" type="radio" name="securityPersonApply.laborContract" id="laborContract-1" />
  353. <label for="laborContract-1" style="cursor: pointer;">是&nbsp;</label>
  354. <input value="2" type="radio" name="securityPersonApply.laborContract" id="laborContract-2" />
  355. <label for="laborContract-2" style="cursor: pointer;">否&nbsp;</label>
  356. </td>
  357. </tr>
  358. </table>
  359. <div id="mbtb_div" class="mbtb">
  360. <table class="mytable changeLine" id="mbtb_1">
  361. <tr>
  362. <th colspan="8">家庭成员基本信息
  363. <input id="" type="button" value="新增家庭成员" onclick="addSecurityPersonApplyRelative();" style="margin-left: 30px"/>
  364. </th>
  365. </tr>
  366. <tr style="border-top: 2px solid blue;">
  367. <th width="11%">户号</th>
  368. <td width="20%"><input id='residenceNo1' type='text' style="width: 100px;" /></td>
  369. <th width="11%">姓名</th>
  370. <td width="24%"><input id='name1' type='text' style="width: 100px;" /></td>
  371. <th width="11%">身份证号码</th>
  372. <td width="23%"><input id='idCard1' type='text' style="width: 172px;" /></td>
  373. </tr>
  374. <tr>
  375. <th>与申请人关系</th>
  376. <td>
  377. <select id='relative1' style='width: 100px;'>
  378. <option value='0'>申请人</option>
  379. </select>
  380. </td>
  381. <th>婚姻状况</th>
  382. <td>
  383. <select id='maritalStatus1' style='width: 120px;height: 20px;vertical-align: middle;'>
  384. <option value=''>选择</option>
  385. </select>
  386. <input type="text" style="width: 100px;" id='maritalDate1' class="easyui-datebox" editable="fasle"/>
  387. </td>
  388. <th>民族</th>
  389. <td>
  390. <select id='nationality1' style='width: 120px;'>
  391. <option value=''>选择</option>
  392. </select>
  393. </td>
  394. </tr>
  395. <tr>
  396. <th>联系电话</th>
  397. <td><input id="phone1"/></td>
  398. <th>工作单位</th>
  399. <td><input id='company1' type='text' style="width: 172px;"></td>
  400. <th>文化程度</th>
  401. <td>
  402. <select id='education1' style='width: 120px;'>
  403. <option value=''>选择</option>
  404. </select>
  405. </td>
  406. </tr>
  407. <tr>
  408. <th>死亡注销日期</th>
  409. <td><input id='deathDate1' class="easyui-datebox" editable="fasle"/></td>
  410. </tr>
  411. </table>
  412. </div>
  413. <table class="mytable">
  414. <tr>
  415. <th colspan="2">现住房信息</th>
  416. </tr>
  417. <tr>
  418. <th width="20%"><em>*</em>家庭住房困难类型:</th>
  419. <td>
  420. <input value="1" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-1" />
  421. <label for="currentHouseSituation-1" style="cursor: pointer;">自有房产&nbsp;</label>
  422. <input value="2" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-2" />
  423. <label for="currentHouseSituation-2" style="cursor: pointer;">租住私房&nbsp;</label>
  424. <input value="3" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-3" />
  425. <label for="currentHouseSituation-3" style="cursor: pointer;">借住私房&nbsp;</label>
  426. <input value="4" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-4" />
  427. <label for="currentHouseSituation-4" style="cursor: pointer;">租住公房&nbsp;</label></br>
  428. <span style="color:#000;">房屋坐落:</span><input id="existReal_add" name="securityPersonApply.existReal" type="text" class="form-control" style="width: 300px;display: inline;"/>
  429. <span style="color:#000;">,面积:</span><input id="existArea_add" name="securityPersonApply.existArea" type="text" class="form-control" style="width: 100px;display: inline;"/>
  430. <span style="color:#000;">平方米,产权人:</span><input type="text" id="propertyCompany_add" name="securityPersonApply.propertyCompany" style="width: 100px;display: inline;">
  431. </td>
  432. </tr>
  433. <tr>
  434. <th>是否存在转让房产、取得拆迁安置补偿不满两年的情况:</th>
  435. <td>
  436. <input value="1" type="radio" name="securityPersonApply.isAssignmentHouse" id="isAssignmentHouse-1" />
  437. <label for="isAssignmentHouse-1" style="cursor: pointer;">是&nbsp;</label>
  438. <input value="2" type="radio"name="securityPersonApply.isAssignmentHouse" checked="checked" id="isAssignmentHouse-2" />
  439. <label for="isAssignmentHouse-2" style="cursor: pointer;">否&nbsp;</label>
  440. </td>
  441. </tr>
  442. <tr>
  443. <th>申请之日前两年是否享受过房改房、政策性商品房或其他住房保障政策:</th>
  444. <td>
  445. <input value="1" type="radio" name="securityPersonApply.hasUsed" id="hasUsed-1" />
  446. <label for="hasUsed-1" style="cursor: pointer;">是&nbsp;</label>
  447. <input value="2" type="radio"name="securityPersonApply.hasUsed" id="hasUsed-2" />
  448. <label for="hasUsed-2" style="cursor: pointer;">否&nbsp;</label>
  449. </td>
  450. </tr>
  451. </table>
  452. </form>