var SPMaskBehaviorFlyer = function (val) { return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; }; var spOptionsFlyer = { onKeyPress: function (val, e, field, options) { field.mask(SPMaskBehaviorFlyer.apply({}, arguments), options); } }; var produtosInput = [ { produtos: ['ONJNJQOMJ'], inputs: [ { label: 'Endereço', name: 'endereco1', type: 'text', maxlength: 0, required: false, match: '#endereco1', id: 'endereco1', value: '', meiomask: false }, ], preview:true, }, { produtos: ['KMHQPOOMJ', 'GQJOQOOMJ', 'EPESOOOMJ'], inputs: [ { label: 'Nome', name: 'nome', type: 'text', maxlength: 0, required: false, match: '#nome', id: 'nome', value: '', meiomask: false }, { label: 'Cargo', name: 'cargo', type: 'text', maxlength: 0, required: false, match: '#cargo', id: 'cargo', value: '', meiomask: false }, { label: 'E-mail', name: 'email', type: 'text', maxlength: 0, required: false, match: '#email', id: 'email', value: '', meiomask: false }, { label: 'Telefone', name: 'tel', type: 'text', maxlength: 0, required: false, match: '#tel', id: 'tel', value: '', meiomask: false }, { label: 'Celular', name: 'cel', type: 'text', maxlength: 0, required: false, match: '#cel', id: 'cel', value: '', meiomask: false }, { label: 'Rua', name: 'ruapt', type: 'text', maxlength: 0, required: false, match: '#ruapt', id: 'ruapt', value: '', meiomask: false }, { label: 'Número', name: 'numero', type: 'text', maxlength: 0, required: false, match: '#numero', id: 'numero', value: '', meiomask: false }, { label: 'Andar', name: 'andar', type: 'text', maxlength: 0, required: false, match: '#andar', id: 'andar', value: '', meiomask: false }, { label: 'CEP', name: 'cep', type: 'text', maxlength: 0, required: false, match: '#cep', id: 'cep', value: '', meiomask: false }, { label: 'Cidade', name: 'cid', type: 'text', maxlength: 0, required: false, match: '#cid', id: 'cid', value: '', meiomask: false }, { label: 'Estado', name: 'est', type: 'text', maxlength: 0, required: false, match: '#est', id: 'est', value: '', meiomask: false }, { label: 'País', name: 'pais', type: 'text', maxlength: 0, required: false, match: '#pais', id: 'pais', value: '', meiomask: false }, ], preview:true, }, ]; var formAirliquide = { is2create: false, inputs: [], address: 1, appendForm: '#produto-form-personalizar .panel-body', buttonHandler: '#pagina-produto #produto-resumo button.confirm', endpoint: 'https://editor.print-one.com.br/api/modelo/{ID_MODELO}/layers/?key=30082018141200_yfBskt74CNBNkONmnFbbMXLXQRuAhs', preview:true, verify: function () { self = this; for (var index = 0; index < produtosInput.length; index++) { var prod = produtosInput[index]; if(prod.produtos.indexOf($('#idP').val()) > -1){ this.inputs = prod.inputs; this.is2create = true; this.preview = prod.preview; break; } } }, save: function () { self = this; var validate = true; localStorage.setItem('address', self.address); for (var i in self.inputs) { if (self.inputs[i].required && $('#' + self.inputs[i].id).val() == '') { alert('Campo ' + self.inputs[i].label + ' obrigat�rio'); $('#' + self.inputs[i].id).focus(); validate = false; break; } else { localStorage.setItem($('#' + self.inputs[i].id).data('match'), $('#' + self.inputs[i].id).val()); } } if (validate) { $(self.buttonHandler).click(); } }, createContainer: function () { $container = $('

Preencha os dados corretamente

'); $container.insertAfter('#innerOpcoes'); }, createForm: function () { self = this; // $.getScript( // 'https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.js', // function(){ if (!self.inputs.length) { console.error('Nenhum input definido'); } else { for (var i in self.inputs) { $(self.appendForm).append(self.getInput(self.inputs[i])); } $button = $('
'); $button.css({ 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'z-index': 1, 'cursor': 'pointer' }).click(function (event) { event.preventDefault(); formAirliquide.save(); }); $(self.buttonHandler).css({ 'position': 'relative' }).parent().css({ 'position': 'relative' }).append($button) } // } // ); }, getInput: function (input) { $field = $('
'); var $input; if (input.type == 'select') { $input = $(''); for (var i in input.value) { $input.append(''); } } else { $input = $(''); } $input.attr({ 'name': input.name, 'id': input.id }).data({ 'match': input.match + '#', 'required': input.required, }) if (!!localStorage.getItem(input.match + '#')) { $input.val(localStorage.getItem(input.match + '#')); } if (input.maxlength) { $input.attr({ 'maxlength': input.maxlength, }).data({ 'maxlength': input.maxlength }) } var $label = $(''); $label.attr({ 'for': input.id }).text(input.label); var $span; if (input.maxlength) { $span = $('' + ($input.val().length) + '/' + input.maxlength + ''); $input.on('input', function () { max = $(this).data('maxlength'); current = $(this).val().length; $(this).next('span').text(current + '/' + max); }) } if (input.meiomask !== false) { $input.setMask(input.meiomask); } if (input.sptelephone) { $input.mask(SPMaskBehaviorFlyer, spOptionsFlyer); } $field.append($label); $field.append($input); $field.append($span); return $field; }, };var SPMaskBehaviorCardapio = function (val) { return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; }; var spOptionsCardapio = { onKeyPress: function (val, e, field, options) { field.mask(SPMaskBehaviorCardapio.apply({}, arguments), options); } }; var formCartao = { is2create: false, inputs: [ { name: 'Campos em Português', inputs: [ { label: 'Nome', name: 'nome', type: 'text', maxlength: 0, required: true, match: '#nome', id: 'nome', value: '', meiomask: false, }, { label: 'Cargo', name: 'cargo', type: 'text', maxlength: 0, required: true, match: '#cargo', id: 'cargo', value: '', meiomask: false, }, { label: 'E-mail', name: 'email', type: 'text', maxlength: 0, required: true, match: '#email', id: 'email', value: '', meiomask: false, }, { label: 'Telefone', name: 'tel', type: 'text', maxlength: 0, required: true, match: '#tel', id: 'tel', value: '', meiomask: false, }, { label: 'Celular', name: 'cel', type: 'text', maxlength: 0, required: true, match: '#cel', id: 'cel', value: '', meiomask: false, }, { label: 'Rua', name: 'ruapt', type: 'text', maxlength: 0, required: true, match: '#ruapt', id: 'ruapt', value: '', meiomask: false, }, { label: 'Número', name: 'numero', type: 'text', maxlength: 0, required: true, match: '#numero', id: 'numero', value: '', meiomask: false, }, { label: 'Andar', name: 'andar', type: 'text', maxlength: 0, required: true, match: '#andar', id: 'andar', value: '', meiomask: false, }, { label: 'CEP', name: 'cep', type: 'text', maxlength: 0, required: true, match: '#cep', id: 'cep', value: '', meiomask: false, }, { label: 'Cidade', name: 'cid', type: 'text', maxlength: 0, required: true, match: '#cid', id: 'cid', value: '', meiomask: false, }, { label: 'Estado', name: 'est', type: 'text', maxlength: 0, required: true, match: '#est', id: 'est', value: '', meiomask: false, }, { label: 'País', name: 'pais', type: 'text', maxlength: 0, required: true, match: '#pais', id: 'pais', value: '', meiomask: false, }, ] }, { name: 'English Fields', inputs: [ { label: 'Name', name: 'name', type: 'text', maxlength: 0, required: true, match: '#name', id: 'name', value: '', meiomask: false, }, { label: 'Job Title Here', name: 'job', type: 'text', maxlength: 0, required: true, match: '#job', id: 'job', value: '', meiomask: false, }, { label: 'E-mail', name: 'email', type: 'text', maxlength: 0, required: true, match: '#email', id: 'email', value: '', meiomask: false, }, { label: 'Phone', name: 'phone', type: 'text', maxlength: 0, required: true, match: '#phone', id: 'phone', value: '', meiomask: false, }, { label: 'Mobile', name: 'cel', type: 'text', maxlength: 0, required: true, match: '#cel', id: 'cel', value: '', meiomask: false, }, { label: 'Street', name: 'street', type: 'text', maxlength: 0, required: true, match: '#street', id: 'street', value: '', meiomask: false, }, { label: 'Zip Code City', name: 'zipcode', type: 'text', maxlength: 0, required: true, match: '#zipcode', id: 'zipcode', value: '', meiomask: false, }, { label: 'Country', name: 'country', type: 'text', maxlength: 0, required: true, match: '#country', id: 'country', value: '', meiomask: false, }, ] }, ], address: 1, appendForm: '#produto-form-personalizar .panel-body', buttonHandler: '#pagina-produto #produto-resumo button.confirm', endpoint: 'https://editor.print-one.com.br/api/modelo/{ID_MODELO}/layers/?key=30082018141200_yfBskt74CNBNkONmnFbbMXLXQRuAhs', verify: function () { self = this; var prods = ['QNMMROOMJ', 'QRCRROOMJ', 'OPFPCPOMJ']; if (prods.indexOf($('#idP').val()) > -1) { this.is2create = true; } }, save: function () { self = this; var validate = true; localStorage.setItem('address', self.address); for (var i in self.inputs) { var group = self.inputs[i]; for (var k in group.inputs) { var input = group.inputs[k]; console.log(input); if (input.required && $('#' + input.id).val() == '') { alert('Campo ' + input.label + ' obrigatório!'); $('#' + input.id).focus(); validate = false; break; } else { localStorage.setItem($('#' + input.id).data('match'), $('#' + input.id).val()); } } } if (validate) { $(self.buttonHandler).click(); } }, createContainer: function () { $container = $('

Preencha os dados corretamente

'); $container.insertAfter('#innerOpcoes'); }, createForm: function () { self = this; // $.getScript( // 'https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.js', // function(){ if (!self.inputs.length) { console.error('Nenhum input definido'); } else { for (var i in self.inputs) { var $group = self.getGroup(self.inputs[i]); for (var k in self.inputs[i].inputs) { var input = self.inputs[i].inputs[k]; $field = self.getInput(input); $group.find('.inputs-container').append($field); } $(self.appendForm).append($group); } $button = $('
'); $button.css({ 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'z-index': 1, 'cursor': 'pointer' }).click(function (event) { event.preventDefault(); formCartao.save(); }); $(self.buttonHandler).css({ 'position': 'relative' }).parent().css({ 'position': 'relative' }).append($button) } // } // ); }, getGroup: function (group) { return $('

' + group.name + '


'); }, getInput: function (input, $group) { $field = $('
'); var $input; if (input.type == 'select') { $input = $(''); for (var i in input.value) { $input.append(''); } } else { $input = $(''); } $input.attr({ 'name': input.name, 'id': input.id }).data({ 'match': input.match + '#', 'required': input.required, }) if (!!localStorage.getItem(input.match + '#')) { $input.val(localStorage.getItem(input.match + '#')); } if (input.maxlength) { $input.attr({ 'maxlength': input.maxlength, }).data({ 'maxlength': input.maxlength }) } var $label = $(''); $label.attr({ 'for': input.id }).text(input.label); var $span; if (input.maxlength) { $span = $('' + ($input.val().length) + '/' + input.maxlength + ''); $input.on('input', function () { max = $(this).data('maxlength'); current = $(this).val().length; $(this).next('span').text(current + '/' + max); }) } if (input.meiomask !== false) { $input.setMask(input.meiomask); } if (input.sptelephone) { $input.mask(SPMaskBehaviorCardapio, spOptionsCardapio); } $field.append($label); $field.append($input); $field.append($span); return $field; }, }; $(document).ready(function(){ formAirliquide.verify(); if(formAirliquide.is2create){ formAirliquide.createContainer(); formAirliquide.createForm(); } formCartao.verify(); if(formCartao.is2create){ formCartao.createContainer(); formCartao.createForm(); } if($('#formProposta').length){ // $('#produto-resumo button.confirm b').text('') } $('a[href="#minhas-personalizacoes"]').remove(); $('h2:contains("ORDEM DE COMPRA")').hide(); $('#txtRequisicaoCompras').hide(); setTimeout(function(){$('li:contains("Pessoa Jur�dica")').html('Pessoa F�sica')},300); $('#txtPedidoNota').parent().parent().hide(); // $('.links-list a').not('.links-list a:contains("Contato"),.links-list a:contains("Perguntas"),.links-list a:contains("Termos de Uso"),.links-list a:contains("Como usar a plataforma")').hide(); if (document.URL.indexOf('carrinho-compras-finalizar-endereco') == 44) { $('#frmCentroCustos > h2').remove(); $('label:contains("Telefone")').closest(".col-1").remove() $('h2:contains("ORDEM DE COMPRA")').text('?REA CONT?BIL'); $('label:contains("Nome do respons?vel pelo recebimento")').text('Centro de Custo'); $("#txtRequisicaoCompras").attr('maxlength','4'); $("#txtNomeResponsavel").attr('maxlength','9'); $("#txtNomeResponsavel").attr('required', "true"); $("#txtRequisicaoCompras").attr('required', "true"); } $("label:contains('E-mail (*)')").text("E-mail Air Liquide (*)") }); const alterasPagamentos = `

Boleto:

Seu pedido somente entrará em produção após a confirmação do pagamento. O método de pagamento via boleto depende do processamento bancário e pode levar até 3 dias úteis para confirmação, o que pode impactar em seu prazo de entrega. Caso tenha urgência no pedido, sugerimos que você escolha outra forma de pagamento.

Pix:

Seu pedido entrará em produção somente após a confirmação do pagamento. O método de pagamento via Pix pode levar até 30 minutos para aprovação e, aos finais de semana e fora do horário comercial, a aprovação pode ocorrer em até 1 hora, o que pode impactar em seu prazo de entrega. Caso tenha urgência no pedido, sugerimos que você escolha outra forma de pagamento.

` $( document ).ready(function() { setTimeout(function(){ $('#innerFormasPgto').append(alterasPagamentos); }, 1000); });