工程信息

报备人信息

$(function(){ console.info(">> aa >>"); $('#btn_report').on('click',function(){ //检查数据项 var b_checked = true; $( ".b_check" ).each(function( index ) { var tip_id = '#tip_' + $(this)[0].name; var tip_info = $(this)[0].placeholder; //console.info(tip_id,tip_info); if( $(this)[0].value ==''){ //console.info( $(this)[0].value,tip_info ); $(tip_id)(tip_info); $(tip_id).css("display","block"); b_checked = false; }else{ $(tip_id).css("display","none"); } }); var company_a_checked = false; if($("#a_company").value !=undefined && $("#a_company_tel").value !=undefined &&$("#a_company").value !='' && $("#a_company_tel").value !='' ){ company_a_checked = true } var company_b_checked = false; if($("#b_company").value !=undefined && $("#b_company_tel").value !=undefined && $("#b_company").value !='' && $("#b_company_tel").value !='' ){ company_b_checked = true } var both_checked = (company_a_checked || company_b_checked); if(!both_checked){ $('#tip_company_info')("甲方/乙方信息不能同时为空!"); $('#tip_company_info').css("display","block"); }else{ $('#tip_company_info').css("display","none"); } if (b_checked && both_checked){ console.info('checked'); $(".form-horizontal").submit(); }else{ console.info('not checked'); } //检查验证码 var ckcode_url = "http://www.hcwell.com/service/captcha/checkCaptcha?code="+$('#code').val() + "&project_name="+$('#project_name').val()+ "&project_description="+$('#project_description').val()+ "&plan_complete_time="+$('#plan_complete_time').val()+ "&building_type="+$('#building_type').val()+ "&building_area="+$('#building_area').val()+ "&application_area="+$('#application_area').val()+ "&design_side="+$('#design_side').val()+ "&a_company="+$('#a_company').val()+ "&a_company_tel="+$('#a_company_tel').val()+ "&b_company="+$('#b_company').val()+ "&b_company_tel="+$('#b_company_tel').val()+ "&any_quotation="+$('#any_quotation').val()+ "&discount_rate="+$('#discount_rate').val()+ "&province_p="+$('#province_p').val()+ "&city_p="+$('#city_p').val()+ "&address_p="+$('#address_p').val()+ "&contacts_p="+$('#contacts_p').val()+ "&phone_p="+$('#phone_p').val()+ "&newspaper_holder="+$('#newspaper_holder').val()+ "&phone_h="+$('#phone_h').val()+ "&province_h="+$('#province_h').val()+ "&city_h="+$('#city_h').val()+ "&address_h="+$('#address_h').val()+ "&copper_rate="+$('#copper_rate').val(); console.info(ckcode_url) $.get(ckcode_url, function(data){ console.info(data); if(data.status == 0) { console.info("check code is false"); return 0; } window.location.href = "http://www.hcwell.com/new/successSubmit"; }); }); $('.b_check').on("blur",function(){ var tip_id = '#tip_' + $(this).attr('name'); var tip_info = $(this).attr('placeholder'); var value = $(this).val(); if(value == ''){ $(tip_id)(tip_info); $(tip_id).css("display","block"); }else{ $(tip_id).css("display","none"); } }); });