12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <style type="text/css">
- em {color:red;font-size:13px;font-style:normal}
- </style>
- <script type="text/javascript">
- //申请类别
- var typeObj = null;
-
- var type_array = null;
-
- var carCount = 1;
-
- var businessCount = 1;
-
- //申请保障类别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"securityPersonApplyType" ,"aa10.name":"类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- typeObj = msg.obj.rows;
- var select_arr = [];
- var data = typeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- type_array = select_arr.join("");
- //$("#type_add").append(type_array)
- }
- }
- });
-
- var index = 1;
- function addSecurityPersonApplyRelative(){
- index++;
- var $table = $("<table id='mbtb_"+index+"' class='mytable'></table>");
- var $tr1 = $("<tr style='border-top: 2px solid blue;'></tr>");
- var $th1_1 = $("<th width='10%'>户号</th>");
- var $td1_2 = $("<td width='20%'><input id='residenceNo"+index+"' type='text' style='width: 100px;'></td>");
- var $th1_3 = $("<th width='10%'>姓名</th>");
- var $td1_4 = $("<td width='25%'><input id='name"+index+"' type='text' style='width: 100px;'></td>");
- var $th1_5 = $("<th width='10%'>身份证号</th>");
- var $td1_6 = $("<td width='25%'><input id='idCard"+index+"' type='text' style='width: 172px;'></td>");
-
- $tr1.append($th1_1);
- $tr1.append($td1_2);
- $tr1.append($th1_3);
- $tr1.append($td1_4);
- $tr1.append($th1_5);
- $tr1.append($td1_6);
-
- var $tr2 = $("<tr></tr>");
- var $th2_1 = $("<th>与户主关系</th>");
- var $td2_2 = $("<td></td>");
- var $select_relative=$("<select id='relative" + index + "' style='width: 100px;'><option value=''>选择</option></select>")
- $select_relative.append(relative_array);
- $td2_2.append($select_relative);
- var $th2_3 = $("<th>婚姻状况</th>");
- var $td2_4 = $("<td></td>");
- var $select_maritalStatus=$("<select id='maritalStatus" + index + "' style='width: 120px;height: 20px;vertical-align: middle;'><option value=''>选择</option></select>")
- $select_maritalStatus.append(maritalStatus_array);
- var $maritalDate = $("<input type='text' style='width: 100px;' id='maritalDate" + index + "' class='easyui-datebox'/>");
- $td2_4.append($select_maritalStatus);
- $td2_4.append($maritalDate);
- $.parser.parse($td2_4);
- var $th2_5 = $("<th>是否市区户口</th>");
- var $td2_6 = $("<td>" +
- "<input value='1' type='radio' name='isUrban_"+index+"' id='isUrban_"+index+"-1' checked='checked'>"+
- "<label for='isUrban_"+index+"-1' style='cursor: pointer;'>是 </label>"+
- "<input value='2' type='radio' name='isUrban_"+index+"' id='isUrban_"+index+"-2'>"+
- "<label for='isUrban_"+index+"-2' style='cursor: pointer;'>否 </label>"+
- "</td>");
-
- $tr2.append($th2_1);
- $tr2.append($td2_2);
- $tr2.append($th2_3);
- $tr2.append($td2_4);
- $tr2.append($th2_5);
- $tr2.append($td2_6);
-
- var $tr3 = $("<tr></tr>");
- var $th3_1 = $("<th width='10%'>工作单位</th>");
- var $td3_2 = $("<td width='20%'><input id='company"+index+"' type='text' style='width: 172px;'></td>");
- var $th3_3 = $("<th width='10%'>资产信息</th>");
- var $td3_4 = $("<td></td>");
- var $button1 =$("<input id='carInfo"+index+"' type='button' value='车辆信息' onclick='carInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
- var $button2 =$("<input id='businessInfo"+index+"' type='button' value='工商信息' onclick='businessInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
- var $button3 =$("<input id='securitiesInfo"+index+"' type='button' value='证券信息' onclick='securitiesInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
- var $button4 =$("<input id='bankInfo"+index+"' type='button' value='银行信息' onclick='bankInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
- var $button5 =$("<input id='commercialInsuranceInfo"+index+"' type='button' value='商业保险信息' onclick='commercialInsuranceInfo_add("+index+")' style='margin: 0 0 0 6px;'/>");
- var $img = $("<img align='right' src='images/remove.png' onclick=remove('mbtb_" + index + "')>");
- $td3_4.append($button1);
- $td3_4.append($button2);
- $td3_4.append($button3);
- $td3_4.append($button4);
- $td3_4.append($button5);
- $td3_4.append($img);
-
- var $th3_5 = $("<th>是否低保</th>");
- var $td3_6 = $("<td>"+
- "<input value='1' type='radio' name='isSubsistenceAllowances_"+index+"' id='isSubsistenceAllowances_"+index+"-1'>"+
- "<label for='isSubsistenceAllowances_"+index+"-1' style='cursor: pointer;'>是 </label>"+
- "<input value='2' type='radio' name='isSubsistenceAllowances_"+index+"' id='isSubsistenceAllowances_"+index+"-2' checked='checked'>"+
- "<label for='isSubsistenceAllowances_"+index+"-2' style='cursor: pointer;'>否 </label>"+
- "</td>"
- );
-
- $tr3.append($th3_1);
- $tr3.append($td3_2);
- $tr3.append($th3_5);
- $tr3.append($td3_6);
- $tr3.append($th3_3);
- $tr3.append($td3_4);
-
- var $tr4 = $("<tr id='tr"+index+"_4' style='display: none;'></tr>");
- var $th4_1 = $("<th>资产信息</th>");
- var $td4_2 = $("<td id='all_td"+index+"' colspan='5'></td>");
- var $carInfo_div = $("<div id='carInfo_span"+index+"'></div>");
- var $carInfo_input = $("<input id='carInfo_input"+index+"' type='hidden'/>");
- var $businessInfo_div = $("<div id='businessInfo_span"+index+"'></div>");
- var $businessInfo_input = $("<input id='businessInfo_input"+index+"' type='hidden'/>");
- var $securitiesInfo_span = $("<span id='securitiesInfo_span"+index+"'></span>");
- var $securitiesInfo_input = $("<input id='securitiesInfo_input"+index+"' type='hidden' value='0'/>");
- var $bankInfo_span = $("<span id='bankInfo_span"+index+"'></span>");
- var $bankInfo_input = $("<input id='bankInfo_input"+index+"' type='hidden' value='0'/>");
- var $commercialInsuranceInfo_span = $("<span id='commercialInsuranceInfo_span"+index+"'></span>");
- var $commercialInsuranceInfo_input = $("<input id='commercialInsuranceInfo_input"+index+"' type='hidden' value='0'/>");
- $td4_2.append($carInfo_div);
- $td4_2.append($businessInfo_div);
- $td4_2.append($carInfo_input);
- $td4_2.append($businessInfo_input);
- $td4_2.append($securitiesInfo_span);
- $td4_2.append($securitiesInfo_input);
- $td4_2.append($bankInfo_span);
- $td4_2.append($bankInfo_input);
- $td4_2.append($commercialInsuranceInfo_span);
- $td4_2.append($commercialInsuranceInfo_input);
- $tr4.append($th4_1);
- $tr4.append($td4_2);
-
- var $tr5 = $("<tr></tr>");
- var $th5_1 = $("<th width='10%'>工薪收入(元/月)</th>");
- var $td5_2 = $("<td width='20%'><input id='wageIncome"+index+"' type='text' style='width: 172px;'></td>");
- var $th5_3 = $("<th width='10%'>经营净收入(元/月)</th>");
- var $td5_4 = $("<td width='20%'><input id='operatingNetIncome"+index+"' type='text' style='width: 172px;'></td>");
- var $th5_5 = $("<th width='10%'>财产性收入(元/月)</th>");
- var $td5_6 = $("<td width='30%'><input id='propertyIncome"+index+"' type='text' style='width: 172px;'></td>");
- $tr5.append($th5_1);
- $tr5.append($td5_2);
- $tr5.append($th5_3);
- $tr5.append($td5_4);
- $tr5.append($th5_5);
- $tr5.append($td5_6);
-
- $table.append($tr1);
- $table.append($tr2);
- $table.append($tr5);
- $table.append($tr3);
- $table.append($tr4);
- $("#mbtb_1").after($table);
- }
-
- function carInfo_add(index){
- $("#addAssetsInfoDialog").dialog({
- buttons:[{
- text:"确认",
- iconCls : 'icon-ok',
- handler : function(){
- $("#car_id").val(index)
- var id = "car_index_" + (new Date()).valueOf();
- var indexCar = $("#car_id").val();
- var vehicleBrand = "车辆品牌:" + $("#vehicleBrand1").val();
- var vehicleModel = "车辆型号:" + $("#vehicleModel1").val();
- var buyFirstTime = "置购日期:" + $("#buyFirstTime1").datebox("getValue");
- var estimatePrice = "车辆价值(元):" + $("#estimatePrice1").val();
- if($("#estimatePrice1").val()==''){
- $.messager.alert('提醒','请输入车辆价值');
- return ;
- }
-
- var spanText = vehicleBrand + "," + vehicleModel + "," + buyFirstTime + "," + estimatePrice;
- var delBtn = "<img src='images/i_de.png' style='float:left; margin-left:10px;cursor:pointer' onclick=delCar('"+id+"','"+spanText+"','"+indexCar+"')>";
- var html = "<div id='"+id+"' style='height:20px;'><span style='float:left;margin-left:10px;'>"+spanText+"</span>"+ delBtn + "</div>";
- var pText = $('#carInfo_span'+indexCar).html();
- $("#carInfo_span"+indexCar).html(pText + html);
- var cars_hidden_text_id = '#carInfo_input' + indexCar;
- $(cars_hidden_text_id).val($(cars_hidden_text_id).val() + "###" + spanText);
- $("#tr"+index+"_4").show();
- $("#addAssetsInfoDialog").dialog("close");
- }
- },{
- text:"取消",
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- }
- }],
- onLoad : function(){
- $("#carInfo_tb").show();
- }
- })
- }
-
- function delCar(id,spanText,indexCar){
- //删除该车辆
- $("#"+id).remove();
- //删除车辆信息
- $("#carInfo_input"+indexCar).val($("#carInfo_input"+indexCar).val().replace('###'+spanText,''));
- }
-
- function businessInfo_add(index){
- $("#addAssetsInfoDialog").dialog({
- buttons:[{
- text:"确认",
- iconCls : 'icon-ok',
- handler : function(){
- $("#business_id").val(index)
- var id = "business_index_" + (new Date()).valueOf();
- var indexbusiness = $("#business_id").val();
- var businessName = "企业名称:" + $("#businessName1").val();
- var businessAddress = "地址:" + $("#businessAddress1").val();
- var shareholderName = "股东名称:" + $("#shareholderName1").val();;
- var investmentAmount = "出资金额:" + $("#investmentAmount1").val();
- var spanText = businessName + "," + businessAddress + "," + shareholderName + "," + investmentAmount;
- var delBtn = "<img src='images/i_de.png' style='float:left; margin-left:10px;cursor:pointer' onclick=delBusiness('"+id+"','"+spanText+"','"+indexbusiness+"')>";
- var html = "<div id='"+id+"' style='height:20px;'><span style='float:left;margin-left:10px;'>"+spanText+"</span>"+ delBtn + "</div>";
- var pText = $('#businessInfo_span'+indexbusiness).html();
- $("#businessInfo_span"+indexbusiness).html(pText + html);
- var businesss_hidden_text_id = '#businessInfo_input' + indexbusiness;
- $(businesss_hidden_text_id).val($(businesss_hidden_text_id).val() + "###" + spanText);
- $("#tr"+index+"_4").show();
- $("#addAssetsInfoDialog").dialog("close");
- }
- },{
- text:"取消",
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- }
- }],
- onLoad : function(){
- $("#businessInfo_tb").show();
- }
- })
- }
-
- function delBusiness(id,spanText,indexBusiness){
- //删除该车辆
- $("#"+id).remove();
- //删除车辆信息
- $("#businessInfo_input"+indexBusiness).val($("#businessInfo_input"+indexBusiness).val().replace('###'+spanText,''));
- }
- //股票信息添加
- function securitiesInfo_add(index){
- $("#addAssetsInfoDialog").dialog({
- buttons:[{
- text:"确认",
- iconCls : 'icon-ok',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- var securitiesTotal=$("#securitiesTotal1").val()
- $("#securitiesInfo_span"+index).html("证券总额为:"+securitiesTotal+"</br>");
- $("#securitiesInfo_input"+index).val(securitiesTotal);
- $("#tr"+index+"_4").show();
- }
- },{
- text:"取消",
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- }
- }],
- onLoad : function(){
- $("#securitiesInfo_tb").show();
- }
- })
- }
- //银行存款信息添加
- function bankInfo_add(index){
- $("#addAssetsInfoDialog").dialog({
- buttons:[{
- text:"确认",
- iconCls : 'icon-ok',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- var bankTotal=$("#bankTotal1").val()
- $("#bankInfo_span"+index).html("银行存款总额为:"+bankTotal+"</br>");
- $("#bankInfo_input"+index).val(bankTotal);
- $("#tr"+index+"_4").show();
- }
- },{
- text:"取消",
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- }
- }],
- onLoad : function(){
- $("#bankInfo_tb").show();
- }
- })
- }
- //商业保险添加
- function commercialInsuranceInfo_add(index){
- $("#addAssetsInfoDialog").dialog({
- buttons:[{
- text:"确认",
- iconCls : 'icon-ok',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- var commercialInsuranceInfo=$("#commercialInsuranceTotal1").val();
- $("#commercialInsuranceInfo_span"+index).html("商业保险总额为:"+commercialInsuranceInfo+"</br>");
- $("#commercialInsuranceInfo_input"+index).val(commercialInsuranceInfo);
- $("#tr"+index+"_4").show();
- }
- },{
- text:"取消",
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addAssetsInfoDialog").dialog("close");
- }
- }],
- onLoad : function(){
- $("#commercialInsuranceInfo_tb").show();
- }
- })
- }
-
- //删除家庭成员表格
- function remove(id){
- $("#" + id).remove();
- //index--;
- }
-
- function addCar(){
- carCount++;
- $tr1 = $("<tr></tr>");
- $th1_1 = $("<th>车辆品牌</th>");
- $td1_2 = $("<td><input id='vehicleBrand"+carCount+"' type='text'/></td>");
- $th1_3 = $("<th>车辆型号</th>");
- $td1_4 = $("<td><input id='vehicleModel"+carCount+"' type='text'/></td>");
- $tr1.append($th1_1);
- $tr1.append($td1_2);
- $tr1.append($th1_3);
- $tr1.append($td1_4);
-
- $tr2 = $("<tr></tr>");
- $th2_1 = $("<th>是否是一手车</th>");
- $td2_2 = $("<td></td>")
- $input1 = $("<input value='1' type='radio' id='usedCar-1_"+carCount+"' name='usedCar"+carCount+"'>")
- $label1 =$("<label for='usedCar-1_"+carCount+"'>是 </label>");
- $input2 = $("<input value='2' type='radio' id='usedCar-2_"+carCount+"' name='usedCar"+carCount+"'>")
- $label2 =$("<label for='usedCar-2_"+carCount+"'>否 </label>");
- $td2_2.append($input1);
- $td2_2.append($label1);
- $td2_2.append($input2);
- $td2_2.append($label2);
- $th2_3 = $("<th>初始购买日期</th>");
- $td2_4 = $("<td><input id='buyFirstTime"+carCount+"' type='text' class='easyui-datebox'/></td>")
- $.parser.parse($td2_4);
-
- $tr2.append($th2_1);
- $tr2.append($td2_2);
- $tr2.append($th2_3);
- $tr2.append($td2_4);
-
- $("#carInfo_tb").append($tr1);
- $("#carInfo_tb").append($tr2);
- }
-
- function addBusiness(){
- businessCount++;
- $tr1 = $("<tr></tr>");
- $th1_1 = $("<th>单位名称</th>");
- $td1_2 = $("<td><input id='businseeName"+businessCount+"' type='text'/></td>");
- $th1_3 = $("<th>地址</th>");
- $td1_4 = $("<td><input id='businessAddress"+businessCount+"' type='text'/></td>");
- $tr1.append($th1_1);
- $tr1.append($td1_2);
- $tr1.append($th1_3);
- $tr1.append($td1_4);
-
- $tr2 = $("<tr></tr>");
- $th2_1 = $("<th>股东名称</th>");
- $td2_2 = $("<td><input id='shareholderName"+businessCount+"' type='text'/></td>");
- $th2_3 = $("<th>出资金额</th>");
- $td2_4 = $("<td><input id='investmentAmount"+businessCount+"' type='text'/></td>");
- $tr2.append($th2_1);
- $tr2.append($td2_2);
- $tr2.append($th2_3);
- $tr2.append($td2_4);
-
- $("#businessInfo_tb").append($tr1);
- $("#businessInfo_tb").append($tr2);
- }
-
- var task_submit = function(){
- var type=$("#type_add").val();
- //申请类别验证
- if($("#type_add").val()==''){
- $.messager.alert('提醒','请选择申请类别');
- return false;
- }
- //姓名验证
- if($("#name_add").val()==''){
- $.messager.alert('提醒','请输入姓名');
- return false;
- }
- //身份证验证
- if($("#idCard_add").val()==''){
- $.messager.alert('提醒','请输入身份证号');
- return false;
- }else{
- if(!idCard1($("#idCard_add").val())){
- $.messager.alert('提醒','请检查输入的身份证号是否正确');
- return false;
- }
- }
- //婚姻状况验证
- if($("#maritalStatus_add").val()==''){
- $.messager.alert('提醒','请选择现婚姻状况');
- return false;
- }
- //手机号码验证
- if($("#phone_add").val()==''){
- $.messager.alert('提醒','请输入手机号码');
- return false;
- }
-
- if(type=="1"){
- //默认是本地户口
- $("#hk_flag-1").attr("checked","checked");
- //户口所在地
- if($("#neighborhood_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地');
- return false;
- }
- if($("#community_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地社区');
- return false;
- }
- }else if(type=="2"){
- var hk_flag=$('input:radio[name="securityPersonApply.hk_flag"]:checked').val();
- if(hk_flag==1){
- if($("#neighborhood_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地');
- return false;
- }
- if($("#community_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地社区');
- return false;
- }
- }else if(hk_flag==2){
- if($("#accountLocation_add").val()==''){
- $.messager.alert('提醒','请输入户口所在地');
- return false;
- }
- if($("#temporaryDate_add").datebox('getValue')==''){
- $.messager.alert('提醒','请输入持有暂住证时间');
- return false;
- }else{
- if(!countYears(1,$("#temporaryDate_add").datebox('getValue'))){
- $.messager.alert('提醒',"获得暂住证时间不满1年,不可以申请!!!");
- return false;
- }
- }
- }else{
- $.messager.alert('提醒','请选择是否市区户口');
- return false;
- }
- }else if(type=="3"){
- //户口所在地
- if($("#neighborhood_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地');
- return false;
- }
- if($("#community_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地社区');
- return false;
- }
- //学历
- if($("#education_add").val()==''){
- $.messager.alert('提醒','请选择学历');
- return false;
- }
- //毕业时间
- if($("#graduationDate_add").datebox('getValue')==''){
- $.messager.alert('提醒','请输入毕业时间');
- return false;
- }else{
- if(countYears(5,$("#graduationDate_add").datebox('getValue'))){
- $.messager.alert('提醒',"毕业时间超过5年,不可以申请!!!");
- return false;
- }
- }
- //单位名称
- if($("#company_add").val()==''){
- $.messager.alert('提醒','请输入单位名称');
- return false;
- }
- //单位地址
- if($("#workPlace_add").val()==''){
- $.messager.alert('提醒','请输入单位地址');
- return false;
- }
- //是否缴纳社保
- var pension=$('input:radio[name="securityPersonApply.pension"]:checked').val();
- if(pension==''){
- $.messager.alert('提醒','请选择是否缴纳社保');
- return false;
- }else{
- if(pension=='2'){
- $.messager.alert('提醒',"未缴纳社保,不可以申请!!!")
- return false;
- }
- }
- }else if(type=="4"){
- //户口所在地
- if($("#accountLocation_add").val()==''){
- $.messager.alert('提醒','请输入户口所在地');
- return false;
- }
- //单位名称
- if($("#company_add").val()==''){
- $.messager.alert('提醒','请输入单位名称');
- return false;
- }
- //单位地址
- if($("#workPlace_add").val()==''){
- $.messager.alert('提醒','请输入单位地址');
- return false;
- }
- //是否缴纳社保
- var pension=$('input:radio[name="securityPersonApply.pension"]:checked').val();
- if(typeof(pension)=="undefined"){
- $.messager.alert('提醒','请选择是否缴纳社保');
- return false;
- }else{
- if(pension=='2'){
- $.messager.alert('提醒',"未缴纳社保,不可以申请!!!")
- return false;
- }
- }
- //单位名称
- if($("#pensionDate_add").val()==''){
- $.messager.alert('提醒','请输入缴纳社保时间');
- return false;
- }
- }else if(type=="5"){
- //户口所在地
- if($("#neighborhood_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地');
- return false;
- }
- if($("#community_add").val()==''){
- $.messager.alert('提醒','请选择户口所在地社区');
- return false;
- }
- //单位名称
- if($("#company_add").val()==''){
- $.messager.alert('提醒','请输入单位名称');
- return false;
- }
- //单位地址
- if($("#workPlace_add").val()==''){
- $.messager.alert('提醒','请输入单位地址');
- return false;
- }
- }
- //验证家庭成员信息
- for(var i=1;i<=index;i++){
- var mbtb = $("#mbtb_"+i);
- //如果被删除,直接跳过
- if(mbtb.length > 0){
- var residenceNo=$("#residenceNo"+i).val()
- var idCard=$("#idCard"+i).val();
- var name=$("#name"+i).val();
- var relative=$("#relative"+i).val();
- var maritalStatus=$("#maritalStatus"+i).val();
- var maritalDate = $("#maritalDate" + i ).datebox('getValue');
- var isUrban=$("#isUrban"+i).val();
- var wageIncome=$("#wageIncome"+i).val();
- //户号
- if(residenceNo==''){
- $.messager.alert('提醒','请填户号');
- return false;
- }
- //验证姓名
- if(name==''){
- $.messager.alert('提醒','请填写姓名');
- return false;
- }
- //验证身份证号
- if(idCard!=''){
- if(!idCard1(idCard)){
- $.messager.alert('提醒','请填正确身份证号');
- return false;
- }
- }else{
- $.messager.alert('提醒','请填身份证号');
- return false;
- }
- //验证户籍关系
- if(relative==''){
- $.messager.alert('提醒','请填与户主关系');
- return false;
- }
- //验证婚姻关系
- if(maritalStatus==''){
- $.messager.alert('提醒','请填婚姻状况');
- return false;
- }
- //除未成年都要填写登记时间
- if(maritalStatus !="6"){
- if(maritalDate ==''){
- $.messager.alert('提醒','请填婚姻状况登记日期');
- return false;
- }
- }
- }
- }
- //验证有无房产、是否转让房产、享受房改
- if(verifyHouse()==false){
- return false;
- };
- //计算家庭人均收入
- if(type!="3"&&type!="6"){
- if($("#avgIncome_add").val()==""||$("#avgIncome_add").val()==null){
- countAvgIncome();
- }
- }
- //家庭人口数量
- var mbtbNum = $(".mbtb > table").size();
- $("#familyNum_add").val(mbtbNum);
-
- $.ajax({
- type: "POST",
- url:"securityPersonApply2Action_addSecurityPersonApply",
- data:$('#addSecurityPersonApplyForm').serialize(),// 你的formid
- async: false,
- error: function(data) {
- $.messager.alert("提示","提交失败");
- },
- success: function(result) {
- var parseResult = $.parseJSON(result);
- if(parseResult.success){
- $('#addSecurityPersonApplyDialog').dialog("close");
- var securityPersonApplyId = parseResult.obj.id;
- var fileNum = parseResult.obj.fileNum;
- for(var i=1;i<=index;i++){
- if($("#mbtb_" + i).length > 0 ){
- var url = whzl.basePath+'/securityPersonApply2Action_addSecurityPersonApplyRelative';
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: url,//要访问的后台地址
- async: false,
- data:{"securityPersonApplyRelative.securityPersonApply.id":securityPersonApplyId ,
- "securityPersonApplyRelative.fileNum":fileNum ,
- "securityPersonApplyRelative.name":$("#name" + i ).val() ,
- "securityPersonApplyRelative.relative":$("#relative" + i ).val() ,
- "securityPersonApplyRelative.idCard":$("#idCard" + i ).val() ,
- "securityPersonApplyRelative.maritalStatus":$("#maritalStatus" + i ).val() ,
- "securityPersonApplyRelative.maritalDate":$("#maritalDate" + i ).datebox('getValue') ,
- "securityPersonApplyRelative.isUrban":$("input:radio[name='isUrban_"+i+"']:checked").val() ,
- "securityPersonApplyRelative.company":$("#company" + i ).val() ,
- "securityPersonApplyRelative.residenceNo":$("#residenceNo" + i ).val() ,
- "securityPersonApplyRelative.wageIncome":$("#wageIncome" + i ).val() ,
- "securityPersonApplyRelative.operatingNetIncome":$("#operatingNetIncome" + i ).val() ,
- "securityPersonApplyRelative.propertyIncome":$("#propertyIncome" + i ).val() ,
- "securityPersonApplyRelative.securitiesTotal":$("#securitiesInfo_input" + i ).val() ,
- "securityPersonApplyRelative.bankTotal":$("#bankInfo_input" + i ).val() ,
- "securityPersonApplyRelative.commercialInsurance":$("#commercialInsuranceInfo_input" + i ).val(),
- "securityPersonApplyRelative.isSubsistenceAllowances":$("input:radio[name='isSubsistenceAllowances_"+i+"']:checked").val()
- },
- success : function(result){
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: whzl.basePath+'/securityPersonApply2Action_addAssets',//要访问的后台地址
- async: false,
- data:{"securityPersonApplyRelative.id":result.obj.id ,
- "cars":$("#carInfo_input"+i).val() ,
- "businesses": $("#businessInfo_input"+i).val() ,
- },
- });
- }
- });
- }
- }
- }
- }
- })
- }
-
- function countAvgIncome(){
- var wageIncomeTotal = 0;
- var operatingNetIncomeTotal = 0;
- var propertyIncomeTotal = 0;
- var avgIncome = 0;
- var mbtbNum = $(".mbtb > table").size();
- for(var i=1;i<=index;i++){
- if($("#wageIncome"+i).val()==''){
- $("#wageIncome"+i).val(0);
- }else{
- wageIncomeTotal+=parseInt($("#wageIncome"+i).val());
- }
- if($("#operatingNetIncome"+i).val()==''){
- $("#operatingNetIncome"+i).val(0);
- }else{
- operatingNetIncomeTotal+=parseInt($("#operatingNetIncome"+i).val());
- }
- if($("#propertyIncome"+i).val()==''){
- $("#propertyIncome"+i).val(0);
- }else{
- propertyIncomeTotal+=parseInt($("#propertyIncome"+i).val());
- }
- }
-
- avgIncome = Number((wageIncomeTotal+operatingNetIncomeTotal+propertyIncomeTotal)/mbtbNum).toFixed(2);
- $("#avgIncome_add").val(avgIncome);
- $("#avgIncome_span").text("家庭平均月收入=( "+wageIncomeTotal+"【工资收入】+"+operatingNetIncomeTotal+"【经营净收入】+"+propertyIncomeTotal+"【财产性收入】"+")/"+index+"【人数】 = " + avgIncome + "元")
- }
-
- //验证是否转让房产、享受房改
- function verifyHouse(){
- var flag = true;
- //现住房情况
- var currentHouseSituation=$('input:radio[name="securityPersonApply.currentHouseSituation"]:checked').val();
- if(typeof(currentHouseSituation)=="undefined"){
- $.messager.alert('提醒','请选择现住房情况');
- flag = false;
- }else{
- flag = true;
- }
- //是否转让房产(含拆迁货币安置)
- var isAssignmentHouse=$('input:radio[name="securityPersonApply.isAssignmentHouse"]:checked').val();
- if(typeof(isAssignmentHouse)=="undefined"){
- $.messager.alert('提醒','请选择是否转让房产(含拆迁货币安置)');
- flag = false;
- }else{
- flag = true;
- }
-
- //是否享受过房改房、政策性商品房或其他住房保障政策
- var hasUsed=$('input:radio[name="securityPersonApply.hasUsed"]:checked').val();
- if(typeof(hasUsed)=="undefined"){
- $.messager.alert('提醒','请选择是否享受过房改房、政策性商品房或其他住房保障政策');
- flag = false;
- }else{
- flag = true;
- }
- return flag;
- }
-
-
- function countYears(year,compareDate){
- var myDate=new Date()
- var yearLast = myDate.getFullYear() - year;
- var month = myDate.getMonth() + 1;
- var day = myDate.getDate();
- var timeStr = yearLast + "-" + month + "-" + day
- myDate.setFullYear(myDate.getFullYear()-year);
- var time1 = new Date(timeStr.replace(/-/g,"\/")).getTime();
- //var time2 = new Date($("#residenceYear_add").val().replace(/-/g,"\/")).getTime();
- var time2 = new Date(compareDate.replace(/-/g,"\/")).getTime();
- return time1 > time2;
- }
- </script>
- <form id="addSecurityPersonApplyForm" action="securityPersonApplyAction_addSecurityPersonApply" method="post" >
- <input type="hidden" id="familyNum_add" name="securityPersonApply.familyNum"/>
- <input type="hidden" id="securityNum_add" name="securityPersonApply.securityNum"/>
- <table id="securityPersonInfo" class="mytable">
- <tr>
- <th colspan="4">户主基本信息</th>
- </tr>
- <tr>
- <th width="13%"><em>*</em>户主姓名</th>
- <td width="33%">
- <input type="text" name="securityPersonApply.securityPerson.name" id="name_add"/>
- <input type="hidden" name="securityPersonApply.type" id="type_add"/>
- <input type="hidden" name="securityPersonApply.addType" id="addType_add" value="2"/>
- </td>
- <th width="13%"><em>*</em>身份证号码</th>
- <td><input type="text" name="securityPersonApply.securityPerson.idCard" id="idCard_add"/></td>
- </tr>
- <tr>
- <th><em>*</em>现婚姻状况</th>
- <td>
- <select name="securityPersonApply.maritalStatus" id="maritalStatus_add" style="width:172px">
- <option value="">请选择</option>
- </select>
- </td>
- <th><em>*</em>手机号码</th>
- <td><input type="text" name="securityPersonApply.phone" id="phone_add"/></td>
- </tr>
- <tr id="houseRegister_add_tr" style="display: none;">
- <th id="hk_flag_th" style="display: none;"><em>*</em>是否本地户口</th>
- <td id="hk_flag_td" style="display: none;">
- <input value="1" type="radio" id="hk_flag-1" name="securityPersonApply.hk_flag" style="cursor: pointer;">
- <label for="hk_flag-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio" id="hk_flag-2" name="securityPersonApply.hk_flag" style="cursor: pointer;">
- <label for="hk_flag-2" style="cursor: pointer;">否 </label>
- </td>
- <th><em>*</em>户口所在地:</th>
- <td id="houseRegisterId_select" style="display: none;">
- <select id="area_add">
- <option value="">请选择</option>
- </select>
- <select id="street_add" style="width: 80px">
- <option value="">请选择</option>
- </select>
- <select id="neighborhood_add" name="securityPersonApply.houseRegister.id" style="width: 130px">
- <option value="">请选择</option>
- </select>
- <select id="communityId_add" name="securityPersonApply.communityId" style="width: 100px">
- <option value="">请选择</option>
- </select>
- <input type="hidden" id="community_add" name="securityPersonApply.community"/>
- </td>
- <td id="accountLocation_Input" style="display: none;">
- <input type="hidden" id="accountLocation_add" name="securityPersonApply.accountLocation"/>
- </td>
- </tr>
- <tr id="isDisabilityInfo_tr" style="display: none;">
- <th><em>*</em>是否残疾人员</th>
- <td>
- <input value="1" type="radio" name="securityPersonApply.isDisability" id="isDisability-1" style="cursor: pointer;">
- <label for="isDisability-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio" name="securityPersonApply.isDisability" id="isDisability-2" style="cursor: pointer;">
- <label for="isDisability-2" style="cursor: pointer;">否 </label>
- </td>
- <th><em>*</em>是否退役军人</th>
- <td>
- <input value="1" type="radio" name="securityPersonApply.isExServiceMan" id="isExServiceMan-1" style="cursor: pointer;">
- <label for="isExServiceMan-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio" name="securityPersonApply.isExServiceMan" id="isExServiceMan-2" style="cursor: pointer;">
- <label for="isExServiceMan-2" style="cursor: pointer;">否 </label>
- </td>
- </tr>
- <tr id="temporaryDateInfo_tr" style="display: none;">
- <th><em>*</em>取得暂住证时间</th>
- <td id="temporaryDate_td" colspan="3">
- <input class="easyui-datebox" type="text" id="temporaryDate_add" name="securityPersonApply.temporaryDate"/>
- </td>
- </tr>
- <tr id="educationInfo_tr" style="display: none;">
- <th><em>*</em>学历</th>
- <td>
- <select name="securityPersonApply.education" id="education_add" style="width:172px">
- <option value="">请选择</option>
- </select>
- </td>
- <th><em>*</em>毕业时间</th>
- <td>
- <input class="easyui-datebox" type="text" id="graduationDate_add" name="securityPersonApply.graduationDate" />
- </td>
- </tr>
- <tr id="companyInfo_tr" style="display: none;">
- <th><em>*</em>工作单位名称</th>
- <td><input type="text" id="company_add" name="securityPersonApply.company"/></td>
- <th><em>*</em>工作单位地址</th>
- <td><input type="text" id="workPlace_add" name="securityPersonApply.workPlace"/></td>
- </tr>
- <tr id="pensionInfo_tr" style="display: none;">
- <th><em>*</em>是否缴纳社保</th>
- <td>
- <input value="1" type="radio" name="securityPersonApply.pension" id="pension-1">
- <label for="pension-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio" name="securityPersonApply.pension" id="pension-2">
- <label for="pension-2" style="cursor: pointer;">否 </label>
- </td>
- <th id="pensionDate_th" style="display: none;"><em>*</em>缴纳时间</th>
- <td id="pensionDate_td" style="display: none;">
- <input type="text" id="pensionDate_add" name="securityPersonApply.pensionDate" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM'})" class="Wdate"/>
- </td>
- </tr>
- </table>
- <div id="mbtb_div" style="display: none;" class="mbtb">
- <table class="mytable" id="mbtb_1" style="display: none;">
- <tr>
- <th colspan="8">家庭成员基本信息
- <input id="" type="button" value="新增家庭成员" onclick="addSecurityPersonApplyRelative();" style="margin-left: 30px"/>
- <input type="button" value="计算家庭平均收入" onclick="countAvgIncome()"/>
- <span id="avgIncome_span"></span>
- <input id="avgIncome_add" name="securityPersonApply.avgIncome" type="hidden"/>
- </th>
- </tr>
- <tr id="tr1_1" style="border-top: 2px solid blue;">
- <th width="10%">户号</th>
- <td width="20%"><input id='residenceNo1' type='text' style="width: 100px;"></td>
- <th width="10%">姓名</th>
- <td width="25%"><input id='name1' type='text' style="width: 100px;"></td>
- <th width="10%">身份证号码</th>
- <td width="25%"><input id='idCard1' type='text' style="width: 172px;"></td>
- </tr>
- <tr id="tr1_2">
- <th>与户主关系</th>
- <td>
- <select id='relative1' style='width: 100px;'>
- <option value='0'>户主</option>
- </select>
- </td>
- <th>婚姻状况</th>
- <td>
- <select name='#' id='maritalStatus1' style='width: 120px;height: 20px;vertical-align: middle;'>
- <option value=''>选择</option>
- </select>
- <input type="text" style="width: 100px;" id="maritalDate1" class="easyui-datebox" name="securityPersonApplyRelative.maritalDate"/>
- </td>
- <th>是否市区户口</th>
- <td>
- <input value="1" type="radio" name="isUrban_1" id="isUrban_1-1" checked="checked">
- <label for="isUrban_1-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio" name="isUrban_1" id="isUrban_1-2">
- <label for="isUrban_1-2" style="cursor: pointer;">否 </label>
- </td>
- </tr>
- <tr id="tr1_5">
- <th>工薪收入(元/月)</th>
- <td><input id="wageIncome1" name="securityPersonApplyRelative.wageIncome"/></td>
- <th>经营净收入(元/月)</th>
- <td><input id="operatingNetIncome1" name="securityPersonApplyRelative.operatingNetIncome"/></td>
- <th>财产性收入(元/月)</th>
- <td><input id="propertyIncome1" name="securityPersonApplyRelative.propertyIncome"/></td>
- </tr>
- <tr id="tr1_3">
- <th>工作单位</th>
- <td><input id='company1' type='text' style="width: 172px;"></td>
- <th>是否低保</th>
- <td>
- <input value="1" type="radio" name="isSubsistenceAllowances_1" id="isSubsistenceAllowances_1-1">
- <label for="isSubsistenceAllowances_1-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio" name="isSubsistenceAllowances_1" id="isSubsistenceAllowances_1-2" checked="checked">
- <label for="isSubsistenceAllowances_1-2" style="cursor: pointer;">否 </label>
- </td>
- <th>资产信息</th>
- <td>
- <input id="carInfo1" type="button" value="车辆信息" onclick="carInfo_add(1)"/>
- <input id="businessInfo1" type="button" value="工商信息" onclick="businessInfo_add(1)"/>
- <input id="securitiesInfo1" type="button" value="证券信息" onclick="securitiesInfo_add(1)"/>
- <input id="bankInfo1" type="button" value="银行信息" onclick="bankInfo_add(1)"/>
- <input id="commercialInsuranceInfo1" type="button" value="商业保险信息" onclick="commercialInsuranceInfo_add(1)"/>
- </td>
- </tr>
- <tr id="tr1_4" style="display: none;">
- <th>资产信息</th>
- <td id="all_td1" colspan="5">
- <!-- 车辆 -->
- <div id="carInfo_span1"></div>
- <input id="carInfo_input1" type="hidden"/>
- <!-- 工商 -->
- <div id="businessInfo_span1"></div>
- <input id="businessInfo_input1" type="hidden"/>
- <!-- 证券 -->
- <span id="securitiesInfo_span1"></span>
- <input id="securitiesInfo_input1" name="securityPersonApplyRelative.securitiesTotal" type="hidden" value="0"/>
- <!-- 银行 -->
- <span id="bankInfo_span1"></span>
- <input id="bankInfo_input1" name="securityPersonApplyRelative.bankTotal" type="hidden" value="0"/>
- <!-- 商业保险 -->
- <span id="commercialInsuranceInfo_span1"></span>
- <input id="commercialInsuranceInfo_input1" name="securityPersonApplyRelative.commercialInsurance" type="hidden" value="0"/>
- </td>
- </tr>
- </table></div>
- <table class="mytable">
- <tr>
- <th colspan="4">现住房信息</th>
- </tr>
- <tr>
- <th width="20%"><em>*</em>现住房信息情况:</th>
- <td colspan="3">
- <input value="1" type="radio" name="securityPersonApply.currentHouseSituation" id=currentHouseSituation-1>
- <label for="currentHouseSituation-1" style="cursor: pointer;">自有房产 </label>
- <input value="2" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-2">
- <label for="currentHouseSituation-2" style="cursor: pointer;">租住私房 </label>
- <input value="3" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-3"/>
- <label for="currentHouseSituation-3" style="cursor: pointer;">借住私房 </label>
- <input value="4" type="radio" name="securityPersonApply.currentHouseSituation" id="currentHouseSituation-4"/>
- <label for="currentHouseSituation-4" style="cursor: pointer;">租住公房 </label></br>
- <span style="color:#000">房屋坐落:</span><input id="existReal_add" name="securityPersonApply.existReal" type="text" class="form-control" style="width: 300px;display: inline"/>
- <span style="color:#000">,面积:</span><input id="existArea_add" name="securityPersonApply.existArea" type="text" class="form-control" style="width: 100px;display: inline"/>
- <span style="color:#000">平方米,产权人:</span><input id="propertyPerson_add" name="securityPersonApply.propertyPerson" type="text" class="form-control" style="width: 100px;display: inline"/>
- <!-- 平均面积 -->
- <input type="hidden" id="avgArea_add" name="securityPersonApply.avgArea">
- </td>
- </tr>
- <tr>
- <th><em>*</em>申请之日前在市区是否转让房产</th>
- <td colspan="3">
- <input value="1" type="radio" name="securityPersonApply.isAssignmentHouse" id="isAssignmentHouse-1">
- <label for="isAssignmentHouse-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio"name="securityPersonApply.isAssignmentHouse" id="isAssignmentHouse-2">
- <label for="isAssignmentHouse-2" style="cursor: pointer;">否 </label>
- <span id="isAssignmentHouseAreaSpan" hidden>面积:</span><input type="text" id="isAssignmentHouseArea_add" name="securityPersonApply.isAssignmentHouseArea" style="display: none;"/>
- </td>
- </tr>
- <tr>
- <th><em>*</em>是否享受过房改房、政策性商品房或其他住房保障政策:</th>
- <td colspan="3">
- <input value="1" type="radio" name="securityPersonApply.hasUsed" id="hasUsed-1">
- <label for="hasUsed-1" style="cursor: pointer;">是 </label>
- <input value="2" type="radio" name="securityPersonApply.hasUsed" id="hasUsed-2">
- <label for="hasUsed-2" style="cursor: pointer;">否 </label>
- <span id="hasUsedAreaSpan" hidden>面积:</span><input type="text" id="hasUsedArea_add" name="securityPersonApply.hasUsedArea" style="display: none;"/>
- </td>
- </tr>
- </table>
- </form>
|