addGY4.jsp 17 KB

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