1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7614],{92276:function(e,a,s){s.d(a,{Z:function(){return CorItem}});var o=s(85893);function CorItem(e){let{hexa:a,descricao:s,size:l=18}=e;return a||s?(0,o.jsxs)("span",{className:"d-inline-flex align-items-center gap-1 mt-1",children:[(0,o.jsx)("span",{"aria-hidden":"true",title:s||void 0,style:{width:l,height:l,minWidth:l,backgroundColor:a||"transparent",border:"1px solid rgba(0, 0, 0, 0.2)",borderRadius:3}}),s&&(0,o.jsx)("span",{className:"fs-12 lh-1",children:s})]}):null}s(67294)},49559:function(e,a,s){s.d(a,{Z:function(){return ModalOrcamento}});var o=s(85893),l={ipi:"IPI",st:"ST",stsn:"STSN",icmsPartilha:"ICMS"},n=s(92276),r=s(35732),t=s(30105),i=s(59417),c=s(67814),d=s(41609),m=s.n(d),x=s(35161),u=s.n(x);s(67294);var h=s(31555),p=s(32321),f=s(34051),j=s(71642);function ModalOrcamento(e){var a,s;let{props:d}=e,{isMobile:x,isTablet:v}=(0,j.ZP)(),{orcamento:N}=d,{colaborador:g,cliente:b,itens:I,cobranca:O,plano:w,tipoFrete:Z,transportadora:C,ordComp:E,obsEntrega:T,obsPedido:P,dtHorInc:S}=N,{modalIsOpen:L,closeModal:D}=d,ItemInfo=e=>{let{label:a,value:s,isPrice:l=!1,className:n,color:r=""}=e;return(0,o.jsxs)("div",{className:"".concat(n),children:[(0,o.jsx)("span",{className:" ".concat("fs-12"," lh-1 ").concat(l?"":"ps-1"," "),children:a}),(0,o.jsx)("br",{}),(0,o.jsxs)("span",{className:"fw-bold lh-1 d-flex align-items-end justify-content-start ".concat(r||""),children:[(0,o.jsx)("span",{className:"".concat(x?"fs-8":"fs-12"," fw-normal me-1 "),children:l?"R$":" "}),s]})]})};return(0,o.jsx)(p.Z,{show:L,onHide:D,size:"xl",dialogClassName:" rounded-3",centered:!0,fullscreen:x||v,className:"zIndex",children:(0,o.jsxs)("div",{className:" rounded-3 shadow-lg bg-white ",children:[(0,o.jsxs)(p.Z.Header,{className:"px-4 py-2 acoes-primaria-bg-color justify-content-between",children:[(0,o.jsx)("span",{className:"acoes-primaria-contrast-color fs-14",children:N.id}),(0,o.jsx)("button",{"aria-label":"Fechar",className:"btn fs-17 acoes-primaria-contrast-color fw-bold p-0",onClick:D,children:(0,o.jsx)(c.G,{icon:i.YIN})})]}),(0,o.jsx)(p.Z.Body,{className:"py-2 px-3 ",children:(0,o.jsxs)("div",{className:"rounded-3 p-2",children:[(0,o.jsxs)(f.Z,{className:"d-flex w-100 m-0",children:[(0,o.jsxs)(h.Z,{sm:6,lg:2,sm:12,className:"modalItem pb-2",children:[(0,o.jsx)("strong",{className:"acoes-primaria-color",children:N.id}),(0,o.jsx)("br",{}),"por ",(0,o.jsx)("strong",{className:"fs-14 lh-1",children:g.nome})]}),(0,o.jsxs)(h.Z,{sm:6,lg:4,className:"modalItem pb-2",children:["Cliente",(0,o.jsx)("br",{}),(0,o.jsxs)("div",{className:"d-flex flex-column",children:[(0,o.jsxs)("strong",{className:"fs-14 lh-1",children:[b.id," - ",b.razSoc]}),(0,o.jsx)("span",{className:"fs-12 lh-1",children:b.fant})]})]}),(0,o.jsxs)(h.Z,{sm:6,lg:3,className:"modalItem pb-2",children:["Criado em",(0,o.jsx)("br",{}),(0,o.jsx)("strong",{className:"fs-14 lh-1",children:(0,t.rN)(S,!0)})]}),(0,o.jsxs)(h.Z,{sm:6,lg:3,className:"modalItem pb-2",children:["V\xe1lido at\xe9",(0,o.jsx)("br",{}),(0,o.jsx)("strong",{className:"fs-14 lh-1",children:(0,t.rN)(N.dtVal)})]})]}),(0,o.jsxs)(f.Z,{className:"mt-2 d-flex w-100 m-0",children:[(0,o.jsxs)(h.Z,{sm:6,lg:2,className:"modalItem pb-2",children:["Cobran\xe7a",(0,o.jsx)("br",{}),(0,o.jsx)("strong",{className:"fs-14 lh-1",children:O.desc})]}),(0,o.jsxs)(h.Z,{sm:6,lg:4,className:"modalItem pb-2",children:["Plano",(0,o.jsx)("br",{}),(0,o.jsxs)("strong",{className:"fs-14 lh-1",children:[" ",w.desc]})]}),Z&&(0,o.jsxs)(h.Z,{sm:6,lg:3,className:"modalItem pb-2",children:["Tipo frete",(0,o.jsx)("br",{}),(0,o.jsxs)("strong",{className:"fs-14 lh-1",children:[" ",Z.desc]})]}),C&&(0,o.jsxs)(h.Z,{sm:6,lg:3,className:"modalItem pb-2",children:["Transportadora",(0,o.jsx)("br",{}),(0,o.jsxs)("strong",{className:"fs-14 lh-1",children:[" ",C.id," - ",C.razSoc]})]})]}),(0,o.jsxs)(f.Z,{className:"d-flex w-100 m-0",children:[(0,o.jsxs)(h.Z,{sm:6,lg:2,className:"modalItem pb-2",children:["Ordem compra",(0,o.jsx)("br",{}),(0,o.jsx)("strong",{className:"fs-14 lh-1",children:E||"N/D"})]}),(0,o.jsxs)(h.Z,{sm:6,lg:4,className:"modalItem pb-2",children:["Observa\xe7\xe3o de entrega",(0,o.jsx)("br",{}),(0,o.jsx)("strong",{className:"fs-14 lh-1",children:T||"--"})]}),(0,o.jsxs)(h.Z,{sm:6,lg:6,className:"modalItem pb-2",children:["Observa\xe7\xe3o do pedido",(0,o.jsx)("br",{}),(0,o.jsx)("strong",{className:"fs-14 lh-1",children:P||"--"})]})]}),(0,o.jsxs)(f.Z,{className:"mt-4 d-flex justify-content-between align-items-center w-100 m-0",children:[(0,o.jsxs)(h.Z,{xs:6,md:4,className:"d-flex flex-column",children:[(0,o.jsx)("span",{className:"fs-13",children:"Filial"}),(0,o.jsxs)("span",{className:"fs-14 fw-bold lh-1",children:[null==N?void 0:null===(a=N.filial)||void 0===a?void 0:a.idFil," ",null==N?void 0:null===(s=N.filial)||void 0===s?void 0:s.razSoc]})]}),(0,o.jsx)(h.Z,{xs:"auto",className:" d-flex flex-column",children:!!(null==b?void 0:b.visualizaPreco)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"fs-13",children:"Total"}),(0,o.jsxs)("span",{children:[(0,o.jsx)("small",{className:"fs-12 lh-1 me-1",children:"R$"}),(0,o.jsx)("strong",{className:"fs-14",children:(0,t.OH)(null==N?void 0:N.vlTot)})]})]})})]}),(0,o.jsx)("div",{className:"mt-3",children:I.map((e,a)=>{var s;let i=(0,t.Hp)(e);return(0,o.jsx)("div",{className:"w-100 d-flex flex-wrap align-items-center justify-content-between modalItem pb-2 modalCardItem",children:(0,o.jsxs)("div",{className:"col d-flex flex-wrap align-items-center flex-column flex-lg-row",children:[(0,o.jsxs)("div",{className:"col-lg-3 col-12 d-flex py-2 align-items-center",children:[(0,o.jsx)("img",{loading:"lazy",src:(0,r.H6)(e.idImagem),alt:e.descComp,className:"p-2 imgCardItemModalOrcamento col-3"}),(0,o.jsxs)("div",{className:"col-9 p-2",children:[(0,o.jsx)(ItemInfo,{label:"C\xd3D: ".concat(e.idExibicao," EMB: ").concat((null==i?void 0:i.emb)||(null==e?void 0:e.emb)),value:e.descComp,className:""}),!!e.idCor&&(0,o.jsx)(n.Z,{hexa:null===(s=e.cor)||void 0===s?void 0:s.hexa,descricao:e.descricaoCor})]})]}),(0,o.jsxs)("div",{className:"d-flex flex-wrap col-lg-9 col-12 py-2",children:[!!(null==b?void 0:b.visualizaPreco)&&(0,o.jsxs)(o.Fragment,{children:[!m()(e.impostos)&&(0,o.jsx)(ItemInfo,{label:"S/ Imposto",value:(0,t.OH)(e.vlBaseUnit),isPrice:!0,className:"col-6 col-md-2 p-2"}),!m()(e.impostos)&&u()(e.impostos,(a,s)=>{let n=l[s];return(0,o.jsx)(ItemInfo,{label:"".concat(n," ").concat((0,t.s5)(a.perc)),value:(0,t.OH)(a.valor*e.qtde),className:"col-6 col-md-2 p-2",isPrice:!0},s)}),(0,o.jsx)(ItemInfo,{label:"Unit\xe1rio",value:(0,t.OH)(e.vlUnit),isPrice:!0,className:"col-6 col-md-2 p-2"})]}),!(null==b?void 0:b.visualizaPreco)&&(0,o.jsx)("div",{className:"width-inherit"}),(0,o.jsx)(ItemInfo,{label:"Qtd.",value:e.qtde,className:"col-6 col-md-2 p-2",color:"acoes-sucesso-color"}),!!(null==b?void 0:b.visualizaPreco)&&(0,o.jsx)(ItemInfo,{label:"Total",value:(0,t.OH)(e.vlTot),isPrice:!0,className:"col-6 col-md-2 p-2"})]})]})},a)})}),(0,o.jsxs)("div",{className:"mt-3 d-flex justify-content-end w-100 ",children:[(0,o.jsxs)("div",{className:"modalItem pb-2",children:[(0,o.jsx)("span",{className:"fs-13",children:"Itens"}),(0,o.jsx)("br",{}),(0,o.jsxs)("strong",{className:"fs-16",children:[null==N?void 0:N.itens.length," ",(null==N?void 0:N.itens.length)>1?"itens":"item"]})]}),!!(null==b?void 0:b.visualizaPreco)&&(0,o.jsxs)("div",{className:"modalItem pb-2 ps-4",children:[(0,o.jsx)("span",{className:"lh-1",children:"Total"}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:"fs-13 me-1",children:"R$"}),(0,o.jsx)("strong",{className:"fs-16",children:(0,t.OH)(null==N?void 0:N.vlTot)})]})]})]})]})})]})})}},66646:function(e,a,s){s.d(a,{C:function(){return r},Lm:function(){return n},nr:function(){return l}});let o="Aprovar e ver meu carrinho (recomendado): finaliza a aprova\xe7\xe3o e te leva direto ao carrinho com o or\xe7amento a
1provado para fechar o pedido.\n\nApenas aprovar: marca o or\xe7amento como aprovado mas mant\xe9m voc\xea nesta tela. Use somente se for aprovar v\xe1rios or\xe7amentos antes de acessar o carrinho.",l={titulo:"Voc\xea est\xe1 aprovando um or\xe7amento de outra loja/filial.",texto:o},n={titulo:"Deseja aprovar or\xe7amento?",texto:o},r={titulo:"Deseja reprovar o or\xe7amento",texto:"Esse or\xe7amento ser\xe1 reprovado e n\xe3o poder\xe1 ser recuperado."}},76150:function(e,a,s){s.d(a,{j:function(){return withActionsOrcamentosHOC}});var o=s(85893),l=s(67294),n=s(11163),r=s.n(n),t=s(9473),i=s(12378),c=s(52587),d=s(16737),m=s(30316),x=s(11926),u=s(66646),h=s(67863),p=s(91022),f=s(8789),j=s(86992),v=s(23453);let withActionsOrcamentosHOC=e=>a=>{var s,n;let{...N}=a,{liberarOrcamentoCallcenter:g,liberarOrcamentoFV:b,downloadOrcamento:I,deletarOrcamento:O,recuperarOrcamento:w,renovarOrcamento:Z,duplicarOrcamento:C}=(0,d.i)(),E=(0,t.I0)(),loadCarrinho=function(e,a){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];E(i.Nw.loadCarrinho({idOrcamento:e,callback:a,edit:s}))},[T,P]=(0,l.useState)(!1),finishLoading=()=>P(!1),[S,L]=(0,l.useState)(!1),[D,H]=(0,l.useState)(!1),[R,y]=(0,l.useState)(null),{colaboradores:z,isFetching:B,buscar:F}=(0,p.Z)(j.ZP.CLIENTES_OPERADORES),{colaboradores:A,isFetching:M,buscar:k}=(0,p.Z)(j.ZP.CLIENTES_REPRESENTANTES),{cliente:_}=(0,t.v9)(v.VJ),{selecionaOperadorCallcenter:q,selecionaRepresentanteFv:U}=(0,f.Z)(),{permiteEditar:V,permiteBaixarPdf:$,permiteBaixarXls:G,permiteDeletar:J,permiteRenovar:Q,permiteDuplicar:W,permiteLiberarCall:X,permiteLiberarFv:Y,permiteRecuperarCall:K,permiteRecuperarFv:ee,permiteReprovarPrePedido:ea}=(0,x.Z)(null==N?void 0:null===(s=N.orcamento)||void 0===s?void 0:s.acoes,null==N?void 0:null===(n=N.orcamento)||void 0===n?void 0:n.tipoEdicao);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e,{...N,onDownloadPdf:$?e=>{P(!0),I(e,"pdf",finishLoading)}:null,onDownloadXls:G?e=>{P(!0),I(e,"xls",finishLoading)}:null,onDelete:J?e=>{(0,m.g)({title:"Deletar o or\xe7amento ".concat(e.id,"?"),text:"Esse or\xe7amento ser\xe1 deletado e n\xe3o poder\xe1 ser recuperado.",confirmButtonText:"Deletar Or\xe7amento",action:()=>{O(e,N.listar)}})}:null,onLiberarCall:X?e=>{if(q){y(e),F(null==_?void 0:_.id),L(!0);return}(0,m.g)({title:"Deseja liberar o pedido para o Callcenter?",text:"O pedido ser\xe1 liberado para o Callcenter",confirmButtonText:"Liberar pedido",action:()=>g(e,N.listar)})}:null,onLiberarFv:Y?e=>{if(U){y(e),k(null==_?void 0:_.id),H(!0);return}(0,m.g)({title:"Liberar o or\xe7amento ".concat(e.id,"?"),text:"Esse or\xe7amento ser\xe1 liberado para o seu representante comercial.",confirmButtonText:"Liberar Or\xe7amento",action:()=>{b(e,N.listar)}})}:null,onRecuperar:K||ee?e=>{w(e,N.listar)}:null,onEditar:V?e=>{P(!0),E(i.Nw.isEditandoOrcamento(!0)),(0,m.g)({title:"Editar o or\xe7amento ".concat(e.id,"?"),text:"Ao editar este or\xe7amento, o seu carrinho atual ficar\xe1 dispon\xedvel no menu \xc1rea do cliente -> Or\xe7amentos",confirmButtonText:"Editar Or\xe7amento",action:()=>{loadCarrinho(e.id,()=>{P(!1)},!0)},denyButtonAction:()=>{P(!1),E(i.Nw.isEditandoOrcamento(!1))}})}:null,onRenovar:Q?e=>{Z(e,N.listar)}:null,onDuplicar:W?e=>{(0,m.g)({title:"Duplicar o or\xe7amento ".concat(e.id,"?"),text:"Um novo carrinho ser\xe1 aberto para duplicar o seu or\xe7amento.",confirmButtonText:"Duplicar Or\xe7amento",action:()=>{P(!0),E(i.Nw.isEditandoOrcamento(!0)),C(e,e=>{if(!(null==e?void 0:e.id)){finishLoading(),E(i.Nw.isEditandoOrcamento(!1));return}loadCarrinho(e.id,()=>{finishLoading(),r().push("/carrinho")},!0)}).catch(()=>{finishLoading(),E(i.Nw.isEditandoOrcamento(!1))})}})}:null,onReprovar:ea?e=>{P(!0),(0,m.g)({title:"".concat(u.C.titulo," ").concat(e.id,"?"),text:u.C.texto,confirmButtonText:"Reprovar",action:()=>{E(c.Nw.reprovarOrcamento({idOrcamento:e.id}))}})}:null,isLoading:T}),(0,o.jsx)(h.Z,{show:S,onHide:()=>L(!1),colaboradores:z,isFetching:B,onSelect:e=>{R&&(0,m.g)({title:"Deseja liberar o pedido para o Callcenter?",text:"O pedido ser\xe1 liberado para ".concat(e.nome),confirmButtonText:"Liberar pedido",action:()=>g(R,N.listar,e.id)})}}),(0,o.jsx)(h.Z,{show:D,onHide:()=>H(!1),colaboradores:A,isFetching:M,onSelect:e=>{R&&(0,m.g)({title:"Liberar o or\xe7amento ".concat(R.id,"?"),text:"Esse or\xe7amento ser\xe1 liberado para ".concat(e.nome,"."),confirmButtonText:"Liberar Or\xe7amento",action:()=>b(R,N.listar,e.id)})},titulo:"Selecione o representante que ir\xe1 atender este or\xe7amento",singular:"representante",plural:"representantes"})]})}},36405:function(e,a,s){s.d(a,{Z:function(){return useOrcamentoDetalhado}});var o=s(86992),l=s(67294),n=s(95642);function useOrcamentoDetalhado(){let[e,a]=(0,l.useState)(!1),s=(0,n.Z)({apiParams:{endPoint:o.ZP.ORCAMENTO,qs:{...o.ZP.ORCAMENTO.qs}},initialData:{}}),toggleModal=()=>{a(!e)},loadOrcamento=(e,a)=>{s.doFetch({},{},{id:e.id}),a&&a()};return{api:s,loadOrcamento,modalIsOpen:e,toggleModal,onLoadOrcamento:e=>{loadOrcamento(e,toggleModal)}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.