addPZ2.jsp 16 KB

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