ขาย หมู่บ้านวิชิตนคร บ้าน เจ้าของขายเอง 14643
ขายบ้านมือสอง บ้าน หมู่บ้านวิชิตนคร เจ้าของขายเอง ID-14643
ขายบ้านมือสอง บ้าน หมู่บ้านวิชิตนคร
เจ้าของขายเอง ID-14643
137 จาก 10892 ในรายการ
฿ 68,376	/วา2
ซอยพระราม2(39) ถนนพระราม2 บางขุนเทียน กรุงเทพมหานคร
ขายบ้านเดี่ยว หมู่บ้านวิชิตนคร 4 ห้องนอน 2 ห้องน้ำ 2 ชั้น พื้นที่ 117 ตร.วา ราคา 8.00 ล้านบาท หรือ 68,376 บาท/ตร.วา
เส้นเมนหมู่บ้าน ติดซอย2ด้าน
หมู่บ้าน หมู่บ้านวิชิตนคร
หมู่บ้านวิชิตนคร หรือทรัพย์สินใกล้เคียง
ทาวน์เฮาส์ให้เช่า 25 131 3 12,500	 496
25 4 เช่าแล้ว 09/18
ทาวน์เฮาส์ให้เช่า 20 130 3 15,000	 750
ทาวน์เฮาส์ให้เช่า 18 104 3 12,000	 659
โฮมออฟฟิศให้เช่า 100 400 1 28,000	 280
ตึกแถว-อาคารพาณิชย์ให้เช่า 16 225 2 15,000	 955
- ขาย บ้าน ใกล้ เซ็นทรัล พระราม2
'; $('#cImgUnits').append(imgNode); } var locate_array = [["","","\u0e2b\u0e21\u0e39\u0e48\u0e1a\u0e49\u0e32\u0e19\u0e27\u0e34\u0e0a\u0e34\u0e15\u0e19\u0e04\u0e23","13.6619749069","100.4612350464","\/img\/pin-property.png",99],["0.8","Education","\u0e23\u0e23.\u0e23\u0e38\u0e48\u0e07\u0e2d\u0e23\u0e38\u0e13","13.6585120000","100.4679054000","\/img\/pin-school.png","0","1",1],["1.2","Hospital","\u0e23\u0e1e.\u0e1a\u0e32\u0e07\u0e21\u0e14","13.6717126843","100.4566222355","\/img\/pin-hospital.png","0","1",1],["1.2","ShopingMall","\u0e40\u0e14\u0e2d\u0e30 \u0e44\u0e1a\u0e23\u0e17\u0e4c \u0e1e\u0e23\u0e30\u0e23\u0e32\u0e212","13.6689240219","100.4521590397","\/img\/pin-supermarket.png","0","1",1],["2.5","Expressway","\u0e14\u0e32\u0e27\u0e04\u0e30\u0e19\u0e2d\u0e07","13.6764900000","100.4794900000","\/img\/pin-expressway.png","0","1",1],["2.4","Education","\u0e23\u0e23.\u0e27\u0e23\u0e23\u0e13\u0e2a\u0e27\u0e48\u0e32\u0e07\u0e08\u0e34\u0e15","13.6599980000","100.4388340000","\/img\/pin-school.png","0","1",2],["2.6","Hospital","\u0e23\u0e1e.\u0e1a\u0e32\u0e07\u0e1b\u0e30\u0e01\u0e2d\u0e01 9 \u0e2d\u0e34\u0e19\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e40\u0e19\u0e0a\u0e31\u0e48\u0e19\u0e41\u0e19\u0e25","13.6819440000","100.4744440000","\/img\/pin-hospital.png","0","1",2],["2.2","ShopingMall","\u0e1a\u0e34\u0e4a\u0e01\u0e0b\u0e35 \u0e1e\u0e23\u0e30\u0e23\u0e32\u0e21 2","13.6614544141","100.4405665323","\/img\/pin-supermarket.png","0","1",2],["3.0","Hospital","\u0e23\u0e1e.\u0e19\u0e04\u0e23\u0e18\u0e19","13.6600000000","100.4338890000","\/img\/pin-hospital.png","0","1",3],["2.5","ShopingMall","\u0e40\u0e0b\u0e47\u0e19\u0e17\u0e23\u0e31\u0e25 \u0e1e\u0e23\u0e30\u0e23\u0e32\u0e212","13.6627262970","100.4381740019","\/img\/pin-supermarket.png","0","1",3]]; function initMap(){ //alert(returnSearch[0]+"proj 1 : "+returnSearch[1].ProjectName+" total :"+returnSearch.length); var grayStyles = [ { "stylers": [ { "saturation": -90 } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.local", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] } ]; var latLng = new google.maps.LatLng(13.6619749069, 100.4612350464); var map = new google.maps.Map(document.getElementById('map_canvas2'), { zoom: 14, center: latLng, styles:grayStyles, scrollwheel: false, zoomControlOptions: { position:google.maps.ControlPosition.TOP_RIGHT }, streetViewControlOptions: { position:google.maps.ControlPosition.TOP_RIGHT }, mapTypeControl:true, mapTypeControlOptions: { position:google.maps.ControlPosition.BOTTOM_LEFT }, mapTypeId: google.maps.MapTypeId.ROADMAPgx }); var shape = { coords: [1, 1, 1, 20, 18, 20, 18, 1], type: 'poly' }; for (var i = 0; i < locate_array.length; i++) { var location = locate_array[i]; var myLatlng = new google.maps.LatLng(location[3],location[4]); var myIcon = location[5]; var myTitle = location[2]; var myDistance = location[0]; var myZindex = location[6]; if(myZindex==99){ var ax=25; var ay=60; }else{ var ax=15; var ay=36; } if(location[0]!=''){ var myDistance=myDistance+' km.'; } var marker = new google.maps.Marker({ position: myLatlng, map: map, //icon: image, icon: {url: myIcon, //original size 30x36 //scaleSize: new google.maps.Size(25, 30), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(ax, ay) }, //shape: shape, zIndex: myZindex, title: myTitle }); var content='
'; var infowindow = new google.maps.InfoWindow({ content: content, maxWidth: 200 }); google.maps.event.addListener(marker,'mouseover', (function(marker,content,infowindow){ return function() { infowindow.setContent(content); infowindow.open(map,marker); }; })(marker,content,infowindow)); google.maps.event.addListener(marker,'mouseout', (function(marker,content,infowindow){ return function() { infowindow.close(); }; })(marker,content,infowindow)); } } $(function () { $('.toggle').click(function (event) { event.preventDefault(); var target = $(this).attr('href'); $(target).toggleClass('hidden show'); }); }); //$('#myModal').modal(options); //$('#checklogin').modal(); function send_problem(value){ $('#ptype').val(value); $('#ptype option[value="'+value+'"]').attr('selected','selected'); } function updateFavorite(){ var fav=$('#favourite_check').val(); var user=""; if(user==''){ $('#signupModal').modal(); }else{ if(fav==1){ $('#favourite_check').val(0); $('#favourite_show').removeClass('text-orange2'); $('#favourite_show').addClass('text-grey'); fav_status=0; }else{ $('#favourite_check').val(1); $('#favourite_show').removeClass('text-grey'); $('#favourite_show').addClass('text-orange2'); fav_status=1; } $.post("/zhome/updateFavorite", { 'POID':"14643",'TOProperty':"2",'user_id':"",'Token':"",'favourite_status': fav_status }); } } function updateFavorite2(POID,TOProperty,i){ var user=""; var fav=$('#favourite_check_'+i).val(); if(!user || user==''){ $('#signupModal').modal(); }else{ if(fav=='1'){ $('#favourite_check_'+i).val(0); $('#favourite_show_'+i).removeClass('text-orange2'); $('#favourite_show_'+i).addClass('text-white'); fav_status=0; }else{ $('#favourite_check_'+i).val(1); $('#favourite_show_'+i).removeClass('text-white'); $('#favourite_show_'+i).addClass('text-orange2'); fav_status=1; } $.post("/zhome/updateFavorite", { 'POID':POID,'TOProperty':TOProperty,'user_id':"",'Token':"",'favourite_status': fav_status }); } } function submitFormHelpdesk(){ var a=document.getElementById("poid").value; var b=document.getElementById("pfullname").value; var c=document.getElementById("pemail").value; var d=document.getElementById("ptelphone").value; var e=document.getElementById("ptype").value; var f=document.getElementById("pdetail").value; if (b=="") { document.getElementById("pfullname").style.borderColor = "#FF0000"; } else { document.getElementById("pfullname").style.borderColor = "#CCCCCC"; } if (c=="") { document.getElementById("pemail").style.borderColor = "#FF0000"; } else { document.getElementById("pemail").style.borderColor = "#CCCCCC"; } if (d=="") { document.getElementById("ptelphone").style.borderColor = "#FF0000"; } else { document.getElementById("ptelphone").style.borderColor = "#CCCCCC"; } if (e=="") { document.getElementById("ptype").style.borderColor = "#FF0000"; } else { document.getElementById("ptype").style.borderColor = "#CCCCCC"; } if (f=="") { document.getElementById("pdetail").style.borderColor = "#FF0000"; } else { document.getElementById("pdetail").style.borderColor = "#CCCCCC"; } if (b!="" && c!="" && d!="" && e!="" && f!="") { $('#ckproblem').hide(); $.post("/zhome/add_Helpdesk", { 'poid':a, 'informer_name': b, 'informer_email':c, 'informer_telphone':d, 'problem_type':e, 'informer_detail':f }); $('#myModal').modal('hide'); } else { $('#ckproblem').show(); return false; } } function showUnit(url){ window.open(url); } $(function() { $('#map_canvas2').click(function(e) { $(this).find('iframe').css('pointer-events', 'all'); }).mouseleave(function(e) { $(this).find('iframe').css('pointer-events', 'none'); }); }) '); getOwnerPhone2(); var POID = 14643; var Property = 2; $.post('/zhome/recordViewTel', {POID : POID,Property : Property} ,function(res){ }); } function logClickQuestionair(){ var POID = 14643; var TOProperty="2"; $.post('/zhome/recordClickQuestionair', {POID : POID,TOProperty : TOProperty} ,function(res){ }); } function submitFormRequestProject(POID,PID){ //var user_id=""; var TOProperty="2"; var TOAdvertising="1"; //var Tel=$('#Tel2').val(); var DeveloperID=$('#DeveloperID').val(); var DeveloperAd=$('#DeveloperAd').val(); var req_name=$('#req_name').val(); var req_surname=$('#req_surname').val(); var req_tel=$('#req_tel').val(); req_tel_length=req_tel.length; var req_email=$('#req_email').val(); var req_price=$('#req_price').val(); var req=''; $('.request:checked').each(function(){ req = $(this).val(); }); var req_length=''; $('.request_length:checked').each(function(){ req_length = $(this).val(); }); if(DeveloperID=='10' && DeveloperAd=='1'){ if(req_tel!='' && (req_tel_length==9 || req_tel_length==10)){ $.post("/zhome/add_RequestAlert", {type:'project','PID':PID,'POID':POID,'TOProperty':TOProperty,'TOAdvertising':TOAdvertising,'req_name':req_name,'req_surname':req_surname,'req_tel':req_tel,'req_email':req_email,'req_price':req_price,'req_type':req,'req_length':req_length },function(res){ $('#requestModal').modal('hide'); //$('#requestButton').attr('disabled',true); $('#requestButton').addClass('display-none'); $('#unrequestButton').removeClass('display-none'); // showMsgBotUnit(); }); }else{ if(req_tel==''){ $('#req_tel_show').addClass('error_msg'); }else{ if(req_tel_length==9 || req_tel_length==10){ $('#req_tel_show').removeClass('error_msg'); }else{ $('#req_tel_show').addClass('error_msg'); } } } }else{ if(req_name!='' && req_surname!='' && req_tel!='' && req_email!='' && req!='' && req_length!='' && (req_tel_length==9 || req_tel_length==10)){ $.post("/zhome/add_RequestAlert", {type:'project','PID':PID,'POID':POID,'TOProperty':TOProperty,'TOAdvertising':TOAdvertising,'req_name':req_name,'req_surname':req_surname,'req_tel':req_tel,'req_email':req_email,'req_price':req_price,'req_type':req,'req_length':req_length },function(res){ $('#requestModal').modal('hide'); //$('#requestButton').attr('disabled',true); $('#requestButton').addClass('display-none'); $('#unrequestButton').removeClass('display-none'); // showMsgBotUnit(); }); }else{ if(req_name==''){ $('#req_name_show').addClass('error_msg'); }else{ $('#req_name_show').removeClass('error_msg'); } if(req_surname==''){ $('#req_surname_show').addClass('error_msg'); }else{ $('#req_surname_show').removeClass('error_msg'); } if(req_tel==''){ $('#req_tel_show').addClass('error_msg'); }else{ if(req_tel_length==9 || req_tel_length==10){ $('#req_tel_show').removeClass('error_msg'); }else{ $('#req_tel_show').addClass('error_msg'); } } if(req_email==''){ $('#req_email_show').addClass('error_msg'); }else{ $('#req_email_show').removeClass('error_msg'); } if(req==''){ $('#req_show').addClass('error_msg'); }else{ $('#req_show').removeClass('error_msg'); } if(req_length==0){ $('#req_length_show').addClass('error_msg'); }else{ $('#req_length_show').removeClass('error_msg'); } } } } function showMsgBotUnit(){ var POID="14643"; var TOProperty="2"; var getMsgCode = $.getJSON("/zhome/getMessengerCode",{ Type:'R',POID:POID,TOProperty:TOProperty }, function(json) { console.log( "success" ); }) .done(function() { console.log( "second success" ); }) .fail(function() { console.log( "error" ); }) .always(function(json) { var MsgCode = json; //alert(MsgCode); $('#fbbotModalCode').html(MsgCode); }); // Set another completion function for the request above getMsgCode.complete(function() { console.log( "second complete" ); $('#fbbotModal').modal('show'); }); } function submitFormUnRequestProject(POID,PID){ var TOProperty="2"; $.post("/zhome/remove_RequestAlert", {type:'project','PID':PID,'POID':POID,'TOProperty':TOProperty },function(res){ $('#unrequestModal').modal('hide'); $('#requestButton').removeClass('display-none'); $('#unrequestButton').addClass('display-none'); }); } function submitFormHelpdesk2(){ var TOProperty="2"; var a=$('#poid').val(); var b=$('#pfullname').val(); var c=$('#pemail').val(); var d=$('#ptelphone').val(); var e=''; $('.ptype:checked').each(function(){ e = $(this).val(); }); var f=$('#pdetail').val(); if(b!="" && c!="" && d!="" && e!="" && f!=""){ $('#ckproblem').hide(); $.post("/zhome/add_Helpdesk", { 'TOProperty':TOProperty,'poid':a, 'informer_name': b, 'informer_email':c, 'informer_telphone':d, 'problem_type':e, 'informer_detail':f }); $('#myModal').modal('hide'); }else{ if (b==""){ document.getElementById("pfullname").style.borderColor = "#FF0000"; } else { document.getElementById("pfullname").style.borderColor = "#CCCCCC"; } if (c==""){ document.getElementById("pemail").style.borderColor = "#FF0000"; } else { document.getElementById("pemail").style.borderColor = "#CCCCCC"; } if (d==""){ document.getElementById("ptelphone").style.borderColor = "#FF0000"; } else { document.getElementById("ptelphone").style.borderColor = "#CCCCCC"; } if(e==''){ $('.ptype_name').addClass('error_msg'); }else{ $('.ptype_name').removeClass('error_msg'); } if (f==""){ document.getElementById("pdetail").style.borderColor = "#FF0000"; } else { document.getElementById("pdetail").style.borderColor = "#CCCCCC"; } return false; } } function submitFormLeavePhone(POID){ var TOProperty="2"; var TOAdvertising="1"; //var Tel=$('#Tel2').val(); var callback_name=$('#callback_name').val(); var callback_tel=$('#callback_tel').val(); callback_tel_length=callback_tel.length; if(callback_name!='' && callback_tel!='' && (callback_tel_length==9 || callback_tel_length==10)){ $.post("/zhome/add_LeavePhone", {'POID':POID,'TOProperty':TOProperty,'callback_name':callback_name,'callback_tel':callback_tel },function(res){ $('#leavePhoneModal').modal('hide'); $('#leavePhoneButton').attr('disabled',true); $('#leavePhoneModal2').modal('show'); }); }else{ if(callback_name==''){ $('#callback_name_show').addClass('error_msg'); }else{ $('#callback_name_show').removeClass('error_msg'); } if(callback_tel==''){ $('#callback_tel_show').addClass('error_msg'); }else{ if(callback_tel_length==9 || callback_tel_length==10){ $('#callback_tel_show').removeClass('error_msg'); }else{ $('#callback_tel_show').addClass('error_msg'); } } } } function confirmEditPost(){ var Token=$('#modal_token').val(); location.href='/zhome/EditPost/2/'+Token; } function updateClickBanner(ImageID){ if(ImageID!=0){ $.post("/zhome/updateClickBanner", { 'ImageID':ImageID,'Page':'unitdetail' }); } } function updateViewBanner(POID,PropType,Type){ if(POID!=0){ if(Type==1){ BannerType='Normal'; }else{ BannerType='Match'; } $.post("/zhome/updateViewBanner", { 'POID':POID,'PropType':PropType,'Page':"unitdetail",'BannerType':BannerType }); } } function updateClickAd(ImageID){ if(ImageID!=0){ $.post("/zhome/updateModalAdClick", { 'id':ImageID }); } } function isNumber(field) { var re = /^[0-9-'.']*$/; if (!re.test(field.value)) { alert('กรุณากรอกเฉพาะตัวเลขเท่านั้น!'); field.value = field.value.replace(/[^0-9-'.']/g,""); } } function changeImageShow(type,imgSort){ if(type=='1'){ $('#imgNormal').show(); $('#img360').hide(); $('#btnImgNormal').hide(); $('#btnImg360').show(); $('#divBtn360').hide(); }else{ $('#imgNormal').hide(); $('#divBtn360').show(); $('#img360').empty(); var imgName=$('#img360_'+imgSort).val(); $('#img360').append(' '); $('#img360').show(); $('#btnImgNormal').show(); $('#btnImg360').hide(); $('.btn360').removeClass('active'); $('#btnSort'+imgSort).addClass('active'); } } function showBannerModal(Type,TOProperty,POID,PID){ //$('.search-promotion-btn').removeClass('active'); //$(this).addClass('active'); $('#modal_TOProperty').val(TOProperty); $('#modal_POID').val(POID); $('#modal_PID').val(PID); if(Type==1){ var getData = $.getJSON("/zhome/getBannerRegister",{ POID:POID,PID:PID,TOProperty:TOProperty }, function(json) { console.log( "success" ); }) .done(function() { console.log( "second success" ); }) .fail(function() { console.log( "error" ); }) .always(function(json) { data = json; console.log( "complete" ); }); getData.complete(function() { console.log( "second complete" ); if(data.ProjectName!=null){ Tel = data.ProjectTel; var tel1 = Tel.substring(0,Tel.length-8); var tel2 = Tel.substring(Tel.length-8,Tel.length-4); var tel3 = Tel.substring(Tel.length-4,Tel.length); var tel_format = tel1+""+tel2+"xxxx"; $('#modal_project_name').html(data.ProjectName); $('#modal_project_tel').html(tel_format); $('#modal_project_promotion_head').html(data.AdTXT); $('#modal_project_promotion_detail').html(data.AdTXT2); if(data.ProjectTel=='-' || data.ProjectTel==''){ $('#registerBtnTel').attr('disabled',true); }else{ $('#registerBtnTel').attr('disabled',false); } if(data.user_name!=null || data.user_name!=''){ $('#search_register_name').val(data.user_name); $('#search_register_surname').val(data.user_surname); $('#search_register_email').val(data.user_email); $('#search_register_tel').val(data.user_telephone); } $('#registerModal').modal('show'); addLogClickPromotion(TOProperty,POID,PID); } }); }else{ var getTelephone = $.getJSON("/zhome/getBannerTelephone",{ POID:POID,PID:PID,TOProperty:TOProperty }, function(json) { console.log( "success" ); }) .done(function() { console.log( "second success" ); }) .fail(function() { console.log( "error" ); }) .always(function(json) { data = json; console.log( "complete" ); }); getTelephone.complete(function() { console.log( "second complete" ); if(data.Telephone!=''){ var tel = data.Telephone; if(tel.includes(',') == true){ var telArray = new Array(); telArray = tel.split(','); $('#telephoneUnit').attr("href","tel:"+telArray[0]); $('#telephoneUnit').html(telArray[0]); $('#telephoneUnit2').attr("href","tel:"+telArray[1]); $('#telephoneUnit2').html(telArray[1]); $('#divTelephone2').removeClass('display-none'); $('#telephoneModal').modal('show'); }else{ $('#telephoneUnit').attr("href","tel:"+tel); $('#telephoneUnit').html(tel); $('#divTelephone2').addClass('display-none'); if($('#mobile_detect').val() == 0){ $('#telephoneModal').modal('show'); }else{ window.open('tel:'+tel); } } } }); } } function getProjectTelephone(){ POID=$('#modal_POID').val(); PID=$('#modal_PID').val(); TOProperty=$('#modal_TOProperty').val(); var getTelephone = $.getJSON("/zhome/getBannerTelephone",{ POID:POID,PID:PID,TOProperty:TOProperty }, function(json) { console.log( "success" ); }) .done(function() { console.log( "second success" ); }) .fail(function() { console.log( "error" ); }) .always(function(json) { data = json; console.log( "complete" ); }); getTelephone.complete(function() { console.log( "second complete" ); if(data.Telephone!=''){ var tel = data.Telephone; if(tel.includes(',') == true){ var telArray = new Array(); telArray = tel.split(','); $('#modal_project_tel').html(telArray[0]); }else{ $('#modal_project_tel').html(tel); } } }); } function addLogClickPromotion(TOProperty,POID,PID){ page='unit'; $.post("/zhome/addLogClickPromotion", { 'page':page, 'PID':PID, 'POID':POID, 'TOProperty':TOProperty }); } $('#form_register_project').validate({ rules: { req_name: 'required', req_surname: 'required', req_tel: { required: true, digits: true, minlength: 9 }, req_email: 'email', buyer: 'required', buy_length: 'required' }, messages: { req_name : 'กรุณากรอกชื่อ', req_surname : 'กรุณากรอกนามสกุล', req_tel: { required: 'กรุณากรอกเบอร์โทรศัพท์', digits: 'กรุณากรอกเฉพาะตัวเลขเท่านั้น', minlength: 'กรุณากรอกเบอร์โทรศัพท์ 9-10 หลัก' }, buyer : 'กรุณาเลือก', buy_length : 'กรุณาเลือก', }, errorPlacement: function(error, element) { error.appendTo( element.parent() ); }, submitHandler : function(form) { $(form) .find('button[type="submit"]') .attr('disabled', true) .css('opacity', 0.6); var buyer_type = $('input[name="buyer"]:checked').length ? $('input[name="buyer"]:checked').val() : '' ; var buyer_length = $('input[name="buy_length"]:checked').length ? $('input[name="buyer"]:checked').val() : '' ; $.post( $(form).attr('action'), { 'type':2, 'PID': $('#modal_PID').val(), 'POID': $('#modal_POID').val(), 'TOProperty': $('#modal_TOProperty').val(), 'TOAdvertising': 1, 'buyer_name': $('#search_register_name').val(), 'buyer_surname': $('#search_register_surname').val(), 'buyer_tel': $('#search_register_tel').val(), 'buyer_email': $('#search_register_email').val(), 'buyer_type': buyer_type, 'buyer_length': buyer_length, 'Promotion': '' }, function(res){ $(form) .find('button[type="submit"]') .attr('disabled', false) .css('opacity', 1); //gtag ลงทะเบียนรับโปรโมชั่น gtag_code = 'AW-931317029/0XD3CIaK5qABEKWKi7wD'; gtag_conversion(gtag_code); $('#registerModal').modal('hide'); } ); return false; } }); $('#registerModal').on('hidden.bs.modal', function (e) { var validator = $(this).validate(); validator.resetForm(); $('#registerModal :input').removeClass('error'); }); function submitFormRegisterProject(){ var PID=$('#modal_PID').val(); var POID=$('#modal_POID').val(); var TOProperty=$('#modal_TOProperty').val(); var Promotion=''; var TOAdvertising=1; var buyer_name=$('#search_register_name').val(); var buyer_surname=$('#search_register_surname').val(); var buyer_tel=$('#search_register_tel').val(); var buyer_email=$('#search_register_email').val(); buyer_tel_length=buyer_tel.length; var buyer=''; $('.request:checked').each(function(){ buyer = $(this).val(); }); var buyer_length=''; $('.request_length:checked').each(function(){ buyer_length = $(this).val(); }); if(buyer_name!='' && buyer_surname!='' && buyer_tel!='' && buyer!='' && buyer_length!='' && (buyer_tel_length==9 || buyer_tel_length==10)){ $.post("/zhome/add_Questionnair", {'type':2,'PID':PID,'POID':POID,'TOProperty':TOProperty,'TOAdvertising':TOAdvertising,'buyer_name':buyer_name,'buyer_surname':buyer_surname,'buyer_tel':buyer_tel,'buyer_email':buyer_email,'buyer_type':buyer,'buyer_length':buyer_length,'Promotion':Promotion },function(res){ $('#registerModal').modal('hide'); }); }else{ if(buyer_name==''){ $('#search_register_name_show').addClass('error_msg'); }else{ $('#search_register_name_show').removeClass('error_msg'); } if(buyer_surname==''){ $('#search_register_surname_show').addClass('error_msg'); }else{ $('#search_register_surname_show').removeClass('error_msg'); } if(buyer_tel==''){ $('#search_register_tel_show').addClass('error_msg'); }else{ if(buyer_tel_length==9 || buyer_tel_length==10){ $('#search_register_tel_show').removeClass('error_msg'); }else{ $('#search_register_tel_show').addClass('error_msg'); } } if(buyer==0){ $('#search_register_show').addClass('error_msg'); }else{ $('#search_register_show').removeClass('error_msg'); } if(buyer_length==0){ $('#search_register_length_show').addClass('error_msg'); }else{ $('#search_register_length_show').removeClass('error_msg'); } } } function showTelephoneModal(){ POID=$('#modal_POID').val(); PID=$('#modal_PID').val(); TOProperty=$('#modal_TOProperty').val(); $('#registerModal').modal('hide'); var getTelephone = $.getJSON("/zhome/getBannerTelephone",{ POID:POID,PID:PID,TOProperty:TOProperty }, function(json) { console.log( "success" ); }) .done(function() { console.log( "second success" ); }) .fail(function() { console.log( "error" ); }) .always(function(json) { data = json; console.log( "complete" ); }); getTelephone.complete(function() { console.log( "second complete" ); if(data.Telephone!=''){ var tel = data.Telephone; if(tel.includes(',') == true){ var telArray = new Array(); telArray = tel.split(','); $('#telephoneUnit').attr("href","tel:"+telArray[0]); $('#telephoneUnit').html(telArray[0]); $('#telephoneUnit2').attr("href","tel:"+telArray[1]); $('#telephoneUnit2').html(telArray[1]); $('#divTelephone2').removeClass('display-none'); $('#telephoneModal').modal('show'); }else{ $('#telephoneUnit').attr("href","tel:"+tel); $('#telephoneUnit').html(tel); $('#divTelephone2').addClass('display-none'); if($('#mobile_detect').val() == 0){ $('#telephoneModal').modal('show'); }else{ window.open('tel:'+tel, '_top'); } } } }); } function showRegisterNPA(TOProperty,POID,PID,ProjectName){ $('#register_npa_to_property').val(TOProperty); $('#register_npa_poid').val(POID); $('#register_npa_pid').val(PID); $('#register_npa_project_name').html(ProjectName); $('#registerNPAModal').modal('show'); } function submitFormInterestNPA(){ var to_property=$('#register_npa_to_property').val(); var poid=$('#register_npa_poid').val(); var pid=$('#register_npa_pid').val(); var register_npa_name=$('#register_npa_name').val(); var register_npa_surname=$('#register_npa_surname').val(); var register_npa_tel=$('#register_npa_tel').val(); register_npa_tel_length=register_npa_tel.length; var register_npa_email=$('#register_npa_email').val(); var register_npa_salary=$('#register_npa_salary').val(); if(register_npa_name!='' && register_npa_surname!='' && register_npa_tel!='' && (register_npa_tel_length==9 || register_npa_tel_length==10) && register_npa_email!=''){ $.post("/zhome/registerNPA", {'TOProperty':to_property,'POID':poid,'PID':pid,'first_name':register_npa_name,'last_name':register_npa_surname,'telephone':register_npa_tel,'email':register_npa_email,'salary':register_npa_salary },function(res){ $('#registerNPAModal').modal('hide'); // $('#successNPAModal').modal('show'); if (res) { var telephone = res; Swal.fire({ title: 'ขอบคุณที่สนใจทรัพย์ธนาคาร', width: 460, html: 'คุณสามารถโทรหาธนาคารได้ทันทีที่เบอร์