PageSourceSearch

https://frontend-app-9ar.pages.dev/js/2016.ff9bd0ea.js

js frontend-app-9ar.pages.dev collected 2026-10-03 05:15:43 UTC 6,197 bytes, 1 lines download raw bytes

1"use strict";(globalThis["webpackChunkfrontend_app"]=globalThis["webpackChunkfrontend_app"]||[]).push([[2016],{33663:(a,e,l)=>{l.a(a,(async(a,i)=>{try{l.d(e,{Z:()=>r});l(72879);var t=l(59835),o=l(60499),n=l(28339),d=l(83729),v=l(52106),s=l(51829),c=l(5057),u=a([d,v]);[d,v]=u.then?(await u)():u;const r={__name:"SellersList",setup(a){const e=(0,n.tv)(),l=(0,o.iH)(!1),i=e.currentRoute.value.path,u=i.includes("external")?"external":"internal",r=(0,o.iH)([{name:"vendedor",required:!0,label:"Vendedos",align:"left",field:"vendedor"},{name:"leadstratados",required:!0,label:"Leads Tratados",align:"left",field:"leadstratados"},{name:"vendasconvertidas",required:!0,label:"Vendas Convertidas",align:"left",field:"vendasconvertidas"},{name:"eficiencia",required:!0,label:"Eficiência",align:"left",field:"eficiencia",colorized:!0},{name:"receita",required:!0,label:"Receita",align:"left",field:"receita",filterCol:"price"}]),p=(0,o.iH)([]),f=(0,o.iH)([]),m=(0,o.iH)({periodo:"",provedor:"",canal:"",campanha:"",cliente:"",cidade:"",blacklist:"",status:""}),_=(0,o.iH)({provedor:[],canal:[],campanha:[],status:["Nova","Convertida","Inviabilizada"],cidades:[]}),h=(0,o.iH)({}),b=(0,o.iH)([{index:0,label:"Período",model:"",type:"date-range",action:a=>{if(m.value.periodo=a,null!=a){if(a.from){const e=a.from.replaceAll("/","-")+"T00:00:00.000Z";h.value.data_inicio=e}if(a.to){const e=a.to.replaceAll("/","-")+"T23:59:00.000Z";h.value.data_fim=e}if(a.from==a.to){const e=a?.replaceAll("/","-")+"T00:00:00.000Z",l=a?.replaceAll("/","-")+"T23:59:00.000Z";h.value.data_inicio=e,h.value.data_fim=l}}else delete h.value.data_inicio,delete h.value.data_fim}},{index:1,label:"Provedor",model:"",type:"selectFilter",options:_.value.provedor,action:async a=>{b.value[2].model="",b.value[3].model="",m.value.provedor=a,null!=a?(h.value.provedor=a.value,await Z(),await y()):delete h.value.provedor,null!=a&&""!=a||(b.value[2].disable=!0,b.value[2].options=[],b.value[3].disable=!0,b.value[3].options=[])}},{index:2,label:"Canal",model:"",type:"selectFilter",options:_.value.canal,disable:!0,action:a=>{m.value.canal=a,null!=a?h.value.id_canal=a.id:delete h.value.id_canal}},{index:3,label:"Campanha",model:"",type:"selectFilter",options:_.value.campanha,disable:!0,action:a=>{m.value.campanha=a,null!=a?h.value.id_campanha=a.id:delete h.value.id_campanha}},{index:4,label:"Cliente",model:"",type:"input",action:a=>{m.value.cliente=a,null!=a?h.value.cliente=a:delete h.value.cliente}},{index:5,label:"Cidade",model:"",type:"input",action:a=>{m.value.cidade=a,null!=a?h.value.cidade=a:delete h.value.cidade}}]);async function g(){const{data:a,status:e}=await d.Z.UseAxios("get","v1/companies",d.Z.getEffectiveRole("vendas"));200===e&&a.companies.forEach((a=>{_.value.provedor.push({value:a.nome,label:a.label,id:a.id})}))}async function y(){_.value.canal=[],b.value[2].disable=!0,b.value[2].loading=!0,b.value[2].options=[];let a={filtro:{ativo:{_eq:!0}}};a.filtro[m.value.provedor.value.toLowerCase()]={_eq:!0};const{data:e,status:l}=await d.Z.UseAxios("post","v1/vendas/canal",d.Z.getEffectiveRole("vendas"),a);200===l&&e.vendas_canal.forEach((a=>{_.value.canal.push({label:a.nome,id:a.id})})),b.value[2].options=_.value.canal,b.value[2].loading=!1,b.value[2].disable=!1}async function Z(){_.value.campanha=[],b.value[3].disable=!0,b.value[3].loading=!0,b.value[3].options=[];let a={filtro:{ativo:{_eq:!0}}};a.filtro[m.value.provedor.value.toLowerCase()]={_eq:!0};const{data:e,status:l}=await d.Z.UseAxios("post","v1/vendas/campanha",d.Z.getEffectiveRole("vendas"),a);200===l&&e.vendas_campanha.forEach((a=>{_.value.campanha.push({label:a.nome,id:a.id})})),b.value[3].options=_.value.campanha,b.value[3].loading=!1,b.value[3].disable=!1}const w=(0,o.iH)(0);(0,t.JJ)("offset",w);const x=(0,o.iH)(20);async function C(){h.value.offset=w.value,h.value.limit=x.value;const{data:a,status:e}=await d.Z.UseAxios("post","v1/leads/vendas/relatorio/v2",d.Z.getEffectiveRole("vendas"),{filtro:h.value});200===e&&(H.value=a.vendas_relatorio_vendas_filtro_v2[0].total)}(0,t.JJ)("limit",x),(0,t.JJ)("TableGetTotalRows",C);const H=(0,o.iH)(0);async function R(){l.value=!0,f.value=[],h.value.offset=w.value,h.value.limit=x.value;try{const{data:a,status:l}=await d.Z.UseAxios("post","v1/leads/vendas/relatorio/v2",d.Z.getEffectiveRole("vendas"),{filtro:h.value});200===l&&(H.value=a.vendas_relatorio_vendas_filtro_v2[0].total,a.vendas_relatorio_vendas_filtro_v2[0]?.dados?.forEach((a=>{f.value.push({vendedor:a.vendedor,leadstratados:a.leads_tratados,vendasconvertidas:a.vendas_convert
1idas,eficiencia:Math.round(a.eficiencia)+"%",colorized:(0,c.Z)(a.eficiencia),receita:a.valor_venda?a.valor_venda?.toLocaleString("pt-BR",{style:"currency",currency:"BRL"}):"R$ 0,00",buttons:[{name:"Ver Leads",icon:"group",color:"primary",handleClick:()=>{e.push({path:`/sales/${u}/report/sellers/details`,query:{data_inicio:h.value.data_inicio,data_fim:h.value.data_fim,provedor:h.value.provedor,canal:h.value.id_canal,campanha:h.value.id_campanha,cliente:h.value.cliente,cidade:h.value.cidade,blacklist:m.value.blacklist.label,cod_vendedor:a.cod_vendedor}})}}]})})))}catch(a){console.error(a)}l.value=!1}return(0,t.JJ)("totalRows",H),(0,t.JJ)("TablePageChange",R),(0,t.bv)((async()=>{await g()})),(a,e)=>((0,t.wg)(),(0,t.iD)(t.HY,null,[(0,t.Wm)(s.Z,{inputs:b.value,filter:()=>{R()},clearFilter:()=>{h.value={},b.value.forEach((a=>{a.model=""})),m.value.periodo="",m.value.provedor="",m.value.canal="",m.value.campanha="",m.value.cliente="",m.value.cidade="",m.value.blacklist="",m.value.status="",b.value[2].disable=!0,b.value[2].options=[],b.value[3].disable=!0,b.value[3].options=[]}},null,8,["inputs","filter","clearFilter"]),(0,t.Wm)(v.Z,{loading:l.value,cols:r.value,rows:f.value,buttons:p.value,isProvider:!0},null,8,["loading","cols","rows","buttons"])],64))}};i()}catch(r){i(r)}}))},62016:(a,e,l)=>{l.a(a,(async(a,i)=>{try{l.r(e),l.d(e,{default:()=>v});var t=l(46874),o=l(11639),n=a([t]);t=(n.then?(await n)():n)[0];const d=(0,o.Z)(t.Z,[["__scopeId","data-v-79cf6ce9"]]),v=d;i()}catch(d){i(d)}}))},46874:(a,e,l)=>{l.a(a,(async(a,i)=>{try{l.d(e,{Z:()=>t.Z});var t=l(33663),o=a([t]);t=(o.then?(await o)():o)[0],i()}catch(n){i(n)}}))}}]);

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.