(function(window,$,undefined){try{(function(window,jQuery,undefined){var bdArea=$(".sitewidget-form-20200311100742 .sitewidget-bd");$(function(){tableScroll(".sitewidget-form-20200311100742 .sitewidget-bd")});var hasProduct=false;var showCode=false;var verifyCodeRes;var widget="sitewidget-form-20200311100742";$("#component_drUAdphKqZmO").find("input").each(function(){var this_=$(this);this_.on("focus",function(){if(!$("#component_drUAdphKqZmO").find(".refreshImg").attr("isFocused")){phoenixSite.faptcha.reload("component_drUAdphKqZmO"); $("#component_drUAdphKqZmO").find(".refreshImg").attr("isFocused","true")}})});var titleText=$("."+widget+" .sitewidget-bd").find("legend").text();$("."+widget+" .sitewidget-bd").find("legend").hide();$("."+widget+" h2").text(titleText);$("."+widget+" form").attr("action","/phoenix/admin/form");$("."+widget+" form").attr("method","post");$("."+widget+" form").attr("target","coreIframe");$("."+widget+" form").attr("enctype","multipart/form-data");$("."+widget+" form").attr("novalidate","true");$("."+ widget+" form fieldset").prepend('\x3cinput type\x3d"hidden" name\x3d"resultPage" value\x3d"BPKpUJetYyEz"\x3e');$("."+widget+" form fieldset").prepend('\x3cinput type\x3d"hidden" name\x3d"encodeFormId" value\x3d"mPpUALZceahO"\x3e');$("."+widget+" form fieldset").append('\x3cinput type\x3d"hidden" id\x3d"paramsJson" name\x3d"paramsJson" value\x3d""\x3e');$("."+widget+" form fieldset").append('\x3cinput type\x3d"hidden" id\x3d"resultFlag" name\x3d"resultFlag" value\x3d"0"\x3e');$("."+widget+" form fieldset").append('\x3cinput type\x3d"hidden" name\x3d"componentPk" value\x3d"component_drUAdphKqZmO" \x3e'); $("."+widget+" form fieldset").append('\x3cinput type\x3d"hidden" name\x3d"pageId" value\x3d"DyKpATzjiohJ" \x3e');$("."+widget+" form fieldset").append('\x3cinput type\x3d"hidden" name\x3d"Referer" value\x3d"" \x3e');$("."+widget+" form .control-group:last").before($("."+widget+" #imgVarifyCode"));$("."+widget+" [required]").bind("blur",function(){checkEmpty(this)});$("."+widget+" .mailInput").bind("blur",function(){checkMail(this)});var thisWidget=$("."+widget);var countrySelect=thisWidget.find("select[title\x3d'country']"); var countryPlaceholder="";if(countrySelect.length>0)$.ajax({url:"/phoenix/admin/user/getCountries",type:"post",dataType:"json",data:{},success:function(res){if(res.countriesList&&res.countriesList.length>0){countryPlaceholder=!!res.lanCode?"\u8bf7\u9009\u62e9":"please select";var options='\x3coption value\x3d""\x3e'+countryPlaceholder+"\x3c/option\x3e";if(!res.isTw&&res.lanCode)$.each(res.countriesList,function(i,obj){options+='\x3coption value\x3d"'+obj.nameCN+'" data-key\x3d"'+obj.key+'"\x3e'+obj.nameCN+ "\x3c/option\x3e"});else if(!res.lanCode)$.each(res.countriesList,function(i,obj){options+='\x3coption value\x3d"'+obj.nameEN+'" data-key\x3d"'+obj.key+'"\x3e'+obj.nameEN+"\x3c/option\x3e"});else if(res.isTw)$.each(res.countriesList,function(i,obj){options+='\x3coption value\x3d"'+obj.nameTW+'" data-key\x3d"'+obj.key+'"\x3e'+obj.nameTW+"\x3c/option\x3e"});countrySelect.html(options)}}});countrySelect.on("change",function(){if(thisWidget.find(".province").length>0){thisWidget.find(".province").remove(); if(thisWidget.find(".city").length>0)thisWidget.find(".city").remove()}$(this).find("option:selected").val($(this).find("option:selected").text());if($(this).val()){var _this=this;$.ajax({url:"/phoenix/admin/user/getAllCountry",type:"post",dataType:"json",data:{province:$(this).find("option:selected").data("key")},success:function(res){if(res.provinceList&&res.provinceList.length>0){var selectDom='\x3cselect class\x3d"areachoose province"\x3e\x3coption value\x3d""\x3e'+countryPlaceholder+"\x3c/option\x3e"; if(!res.isTw)$.each(res.provinceList,function(i,obj){selectDom+='\x3coption value\x3d"'+obj.parameterValue+'" data-key\x3d"'+obj.parameterKey+'"\x3e'+obj.parameterValue+"\x3c/option\x3e"});else $.each(res.provinceList,function(i,obj){selectDom+='\x3coption value\x3d"'+obj.parameterValueTW+'" data-key\x3d"'+obj.parameterKey+'"\x3e'+obj.parameterValueTW+"\x3c/option\x3e"});selectDom+="\x3c/select\x3e";$(_this).after(selectDom)}}})}});thisWidget.on("change",".province",function(){if(thisWidget.find(".city").length> 0)thisWidget.find(".city").remove();var addVal="";var countryVal=countrySelect.find("option:selected").text();addVal+=countryVal;if($(this).val()){var _this=this;addVal+="_"+$(this).val();if(countrySelect.find("option:selected").data("key")=="China")$.ajax({url:"/phoenix/admin/user/getCity",type:"post",dataType:"json",data:{city:$(this).find("option:selected").data("key")},success:function(res){if(res.cityList&&res.cityList.length>0){var selectDom='\x3cselect class\x3d"areachoose city"\x3e\x3coption value\x3d""\x3e'+ countryPlaceholder+"\x3c/option\x3e";if(!res.isTw)$.each(res.cityList,function(i,obj){selectDom+='\x3coption value\x3d"'+obj.parameterValue+'" data-key\x3d"'+obj.parameterKey+'"\x3e'+obj.parameterValue+"\x3c/option\x3e"});else $.each(res.cityList,function(i,obj){selectDom+='\x3coption value\x3d"'+obj.parameterValueTW+'" data-key\x3d"'+obj.parameterKey+'"\x3e'+obj.parameterValueTW+"\x3c/option\x3e"});selectDom+="\x3c/select\x3e";$(_this).after(selectDom)}}})}countrySelect.find("option:selected").val(addVal)}); thisWidget.on("change",".city",function(){var addVal="";var countryVal=countrySelect.find("option:selected").text();var privinceVal=thisWidget.find(".province").val();addVal+=countryVal+"_"+privinceVal;if($(this).val())addVal+="_"+$(this).val();countrySelect.find("option:selected").val(addVal)});if(hasProduct){$("."+widget+" .inquireDeleteBtn").click(function(){var position=$("."+widget+" #"+$(this).attr("value")).index();$("."+widget+" #"+$(this).attr("value")).remove();jsonData.splice(position, 1);$("."+widget+" #paramsJson").val(JSON.stringify(jsonData))});$("."+widget+" .proNum").each(function(){prodNumFunc(this)});$("."+widget+" .proNum").bind("change",function(){prodNumFunc(this)})}$("."+widget+" #formreset").click(function(e){$("."+widget+" span#filename").empty();$(".errgreater").remove();$("."+widget+" form")[0].reset();$("#formsubmit").removeClass("btn-disabeled")});var serialNumberDom=undefined;var serialStatusDom=undefined;function judgingCustomizedForms(){var sortMark=0;$("."+ widget+" form fieldset div label span:contains('Serial Number')").map(function(){if($(this).text()=="Serial Number"){sortMark=1;serialNumberDom=$(this)}});$("."+widget+" form fieldset div label span:contains('Serial Number Status')").map(function(){if($(this).text()=="Serial Number Status"&&sortMark==1){serialStatusDom=$(this).parents(".control-group.control-multi-radio-inline");serialStatusDom.css("display","none");sortMark+=1}});fillingCustomeizedForms(sortMark);return sortMark}function fillingCustomeizedForms(flag){if(flag== 2){var dateDom=$("."+widget+" form fieldset div label span:contains('Date of Installation')").parents(".control-group");dateDom.find("input").attr({"readonly":"readonly","onClick":"WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d'})"});dateDom.after($("#imgVarifyCode"))}}var mark=judgingCustomizedForms();$("."+widget+" #formsubmit").click(function(e){if(window._ldDataLayer&&window._ldDataLayer.push){var p_sid=$.cookie("p_sid")||0;var _eventUid=p_sid+"_drUAdphKqZmO_"+(new Date).getTime();window._ldDataLayer.push(["event", "action_formSubmit","click","submit",$.trim($("."+widget+" .sitewidget-hd").text()),"",_eventUid]);if($("."+widget+" form fieldset").find(".evuid").length>0)$("."+widget+" form fieldset").find(".evuid").remove();if($("."+widget+" form fieldset").find("._eventReferer").length>0)$("."+widget+" form fieldset").find("._eventReferer").remove();$("."+widget+" form fieldset").prepend('\x3cinput class\x3d"evuid" type\x3d"hidden" name\x3d"_eventUid" value\x3d"'+_eventUid+'"\x3e');$("."+widget+" form fieldset").prepend('\x3cinput class\x3d"_eventReferer" type\x3d"hidden" name\x3d"_eventReferer" value\x3d"'+ document.referrer+'"\x3e')}var _that=this;if(mark==2)$.ajax({url:"/phoenix/admin/common/checkNo",type:"post",dataType:"text",data:{searchId:"aHKfpAUKBOje",conditions:"searchKeyword~!\x3d!~"+serialNumberDom.parents(".control-group").find("input").val(),formPkId:$("."+widget+" form fieldset").find("input[name\x3d'encodeFormId']").val(),serialNumber:serialNumberDom.parents(".control-group").find("input").val(),formField:serialNumberDom.parents(".control-group").find("input").attr("name")},success:function(res){if(res== "1")serialStatusDom.find("input[value\x3d'valid']").attr("checked","true");else if(res=="0")serialStatusDom.find("input[value\x3d'invalid']").attr("checked","true");else if(res=="2")serialStatusDom.find("input[value\x3d'repetitive']").attr("checked","true");else return;formSubmit(_that)}});else formSubmit(_that)});function formSubmit(that){var _that=that;var executiveFlage=sublimeFlage();var formSubmitname=$("#formsubmit").hasClass("btn-disabeled");if(executiveFlage){var varifyResult=true;$("."+widget+ " [required]").each(function(){varifyResult=varifyResult&&checkEmpty(this)});$("."+widget+" .mailInput").each(function(){varifyResult=varifyResult&&checkMail(this)});if(varifyResult){if(hasProduct){$.cookie("baksetProdArray",null,{path:"/"});if(!!!localStorage){$("."+widget+" form").submit();$(this).addClass("btn-disabeled");return}localStorage.setItem("baksetProdArray","")}$("."+widget+" form").submit();$(this).addClass("btn-disabeled")}}}function sublimeFlage(){var fileList=$("."+widget+" :file"); var flage=true;fileList.each(function(i,v,fSZids){var fileItem=v;var isIE=/msie/i.test(navigator.userAgent)&&!window.opera;var fileSize=0;if(isIE&&!fileItem.files.length>0){var filePath=fileItem.value;var fileSystem=new ActiveXObject("Scripting.FileSystemObject");var file=fileSystem.GetFile(filePath);fileSize=file.Size}else if(fileItem.files.length>0)fileSize=fileItem.files[0].size;var sizes=fileSize/1024;var errLenght=$(v).parent().find(".errgreater").length;if(sizes>1E4)flage=false;if(sizes>1E4&& errLenght<1)$(v).parent().append("\x3cp class\x3d'errormessage errgreater'\x3eAttachment can't exceed 10M\x3c/p\x3e");else if(sizes<1E4)$(v).parent().find(".errgreater").remove()});return flage}function prodNumFunc(inputObj){var uid=$(inputObj).attr("unique_Id");var position=$("."+widget+" #"+uid).index();jsonData[position].quantity=$(inputObj).val();$("."+widget+" #paramsJson").val(JSON.stringify(jsonData))}function checkMail(Object){if(!validateMail($(Object).val())){if(undefined==$(Object).next(".errormessage").html())$(Object).after('\x3cdiv class\x3d"errormessage" style\x3d"display:none;"\x3e\x3c/div\x3e'); if($(Object).next(".errormessage").html()=="")$(Object).next(".errormessage").html("invalid email address").show();return false}else{$(Object).next(".errormessage").html("").hide();return true}}function checkEmpty(Object){var isverifyCode=$(Object).attr("id")=="faptcha_response_field";var formAgreement=$(Object).attr("id")=="formbuilder_agreement";if(isverifyCode)if(""==$.trim($(Object).val())){$(Object).parent().find(".errormessage").html("This field is required").show();return false}else{$(Object).parent().find(".errormessage").html("").hide(); return true}else if(formAgreement){var objectSubParent=$(Object).parent().parent();if(!$(Object).is(":checked")){if(undefined==objectSubParent.find(".errormessage").html())objectSubParent.append('\x3cdiv class\x3d"errormessage" style\x3d"display:none;"\x3e\x3c/div\x3e');if(objectSubParent.find(".errormessage").html()=="")objectSubParent.find(".errormessage").html("This field is required").show();return false}else{objectSubParent.find(".errormessage").html("").hide();return true}}else if(""==$.trim($(Object).val())){if(undefined== $(Object).next(".errormessage").html())$(Object).after('\x3cdiv class\x3d"errormessage" style\x3d"display:none;"\x3e\x3c/div\x3e');if($(Object).next(".errormessage").html()=="")$(Object).next(".errormessage").html("This field is required").show();return false}else{$(Object).next(".errormessage").html("").hide();return true}}function validateMail(mail){var patten=new RegExp(/^([a-zA-Z0-9_\-'])*([\.a-zA-Z0-9_\-'])+@([a-zA-Z0-9_\-'])+((\.[a-zA-Z0-9_\-']+)+)\s*$/);if($.isEmptyObject(mail)||patten.test(mail))return true; else return false}var OppositeColorNormal=phoenixSite.opColor.getOppositeColor("rgb(255, 255, 255)");bdArea.find("input:text").css("background-color","rgb(255, 255, 255)").css("color",OppositeColorNormal);bdArea.find("textarea").css("background-color","rgb(255, 255, 255)").css("color",OppositeColorNormal)})(window,jQuery)}catch(e){try{console&&(console.log&&console.log(e))}catch(e){}}try{$(function(){})}catch(e){try{console&&(console.log&&console.log(e))}catch(e){}}})(window,$);
In order to meet customers' request and market developing trends, Sunthone develops into a one-stop solutions provider with all related services. 

OUR PRODUCTS

OFFICE LINE

info@pluslight.com
(+86)-519-86387008

Copyright © Changzhou Plusrite Electric (China) Co., Ltd     Sitemap                                                                                               Support By YouxinManage Entrance