PageSourceSearch

https://mhtclouding.com/tongying/assets/CustomerList-FZbE06C7.js

js mhtclouding.com collected 2026-10-02 16:03:14 UTC 6,541 bytes, 1 lines download raw bytes

1import{_ as J,r as d,z as O,d as i,o as l,c as m,e as a,f as n,h as r,x,aj as X,l as Z,ak as ee,p as y,A as u,n as k,al as te,H as L,I as S,K as A,m as I,s as ae,t as oe}from"./index-uGWb9Yh4.js";const ne=_=>(ae("data-v-18f317bd"),_=_(),oe(),_),se={class:"customer-list-container"},le={class:"customer-header"},ce={class:"search-section"},ie={class:"filter-section"},ue={class:"filter-tabs"},re={class:"customer-count"},de={key:0,class:"month-count"},me={class:"total-count"},_e={class:"customer-groups-nav"},pe={class:"nav-header"},ve=ne(()=>a("span",null,"客户分组",-1)),he={class:"groups-list"},fe=["onClick"],Ce={class:"group-info"},ge={class:"group-name"},ye={class:"group-count"},ke={class:"customers-list"},we={key:2,class:"customers-content"},xe=["onClick"],Ie={class:"customer-info"},be={class:"customer-name"},ze={class:"customer-email"},Ve={key:0,class:"customer-company"},De={class:"customer-meta"},Le={key:0,class:"customer-level"},Se={class:"customer-contact"},Ae={class:"customer-footer"},Be={class:"pagination-info"},Me={__name:"CustomerList",props:{loading:{type:Boolean,default:!1}},emits:["customer-select","write-email","search","filter-change"],setup(_,{emit:B}){const C=B,p=d(""),v=d("all"),g=d(1),b=d(1),z=d(20),w=d(null),M=d(2),E=d([{id:1,name:"最近7天有往来",count:"1,0"},{id:2,name:"关注客户",count:"23,0"},{id:3,name:"B级临门客户:已报价...",count:"7,0"},{id:4,name:"C级拉扯客户:有多个...",count:"9,0"},{id:5,name:"D级重潜客户:有触...",count:"19,0"},{id:6,name:"E级普潜客户:从未...",count:"47,0"},{id:7,name:"G核心 L3/L4客户:...",count:"15,0"},{id:8,name:"潜在客户",count:"45,0"},{id:9,name:"意向客户",count:"24,0"},{id:10,name:"A级订单客户:下过...",count:"61,0"},{id:11,name:"多次成交",count:"4,0"},{id:12,name:"S级进驻客户:多次下...",count:"4,0"},{id:13,name:"欧洲客户",count:"3,0"},{id:14,name:"美洲客户",count:"4,0"},{id:15,name:"未分组",count:"136,0"}]),F=d([{id:1,name:"Sam",email:"[email protected]",company:"ABC Company",avatar:"",level:"A级客户",lastContact:"2024-12-19",unreadCount:2,groupId:1},{id:2,name:"Reza Barzegar",email:"[email protected]",company:"Importaciones KYK",avatar:"",level:"C级客户",lastContact:"2025-01-17",unreadCount:0,groupId:1},{id:3,name:"Alabao_Solutions",email:"[email protected]",company:"Alabao Solutions Ltd",avatar:"",level:"B级客户",lastContact:"2024-12-15",unreadCount:1,groupId:2},{id:4,name:"jhoeljesus salcedohuaran...",email:"[email protected]",company:"",avatar:"",level:"D级客户",lastContact:"2024-11-20",unreadCount:0,groupId:2},{id:5,name:"Ilo Calistus",email:"[email protected]",company:"",avatar:"",level:"E级客户",lastContact:"2024-10-05",unreadCount:0,groupId:3},{id:6,name:"Emma Vasnier",email:"[email protected]",company:"Vasnier Group",avatar:"",level:"A级客户",lastContact:"2024-12-28",unreadCount:3,groupId:3},{id:7,name:"Esydstorevzla",email:"[email protected]",company:"",avatar:"",level:"潜在客户",lastContact:"2024-09-12",unreadCount:0,groupId:4}]),h=O(()=>{let t=F.value;if(g.value&&(t=t.filter(o=>o.groupId===g.value)),p.value){const o=p.value.toLowerCase();t=t.filter(c=>c.name.toLowerCase().includes(o)||c.email.toLowerCase().includes(o)||c.company&&c.company.toLowerCase().includes(o))}if(v.value==="recent"){const o=new Date().getMonth()+1,c=new Date().getFullYear();t=t.filter(f=>{const s=new Date(f.lastContact);return s.getMonth()+1===o&&s.getFullYear()===c})}return t}),G=t=>t?t.charAt(0).toUpperCase():"",K=t=>{if(!t)return"从未联系";const o=new Date(t),f=Math.abs(new Date-o),s=Math.ceil(f/(1e3*60*60*24));return s===0?"今天":s===1?"昨天":s<7?`${s}天前`:s<30?`${Math.floor(s/7)}周前`:`${Math.floor(s/30)}月前`},V=()=>{C("search",p.value)},U=t=>{v.value=t,C("filter-change",t)},$=t=>{g.value=t.id,w.value=null},j=t=>{w.value=t.id,C("customer-select",t)},N=()=>{C("write-email")};return(t,o)=>{const c=i("el-icon"),f=i("el-input"),s=i("el-button"),D=i("el-radio-button"),T=i("el-radio-group"),Y=i("el-tooltip"),P=i("el-empty"),q=i("el-skeleton"),H=i("el-avatar"),Q=i("el-badge"),R=i("el-pagination");return l(),m("div",se,[a("div",le,[a("div",ce,[n(f,{modelValue:p.value,"onUpdate:modelValue":o[0]||(o[0]=e=>p.value=e),placeholder:"客户名称/编号/邮箱/...",clearable:"",onClear:V,onKeyup:Z(V,["enter"])},{prefix:r(()=>[n(c,null,{default:r(()=>[n(x(X))]),_:1})]),_:1},8,["modelValue"]),n(s,{type:"primary",onClick:N},{default:r(()=>[n(c,null,{default:r(()=>[n(x(ee))]),_:1}),y(" 写信 ")]),_:1})]),a("div",ie,[a("div",ue,[n(T,{modelValue:v.value,"onUpdate:modelValue":o[1]||(o[1]=e=>v.value=e),onChange:U},{default:r(()=>[n(D,{value:"all"},{default:r(()=>
1[y("所有客户联系人")]),_:1}),n(D,{value:"recent"},{default:r(()=>[y("本月")]),_:1})]),_:1},8,["modelValue"])]),a("div",re,[v.value==="recent"?(l(),m("span",de,"("+u(M.value)+"封)",1)):k("",!0),a("span",me,"共 "+u(h.value.length)+" 个客户",1)])])]),a("div",_e,[a("div",pe,[ve,n(Y,{content:"为了性能,每组最多展示200个客户",placement:"top"},{default:r(()=>[n(c,null,{default:r(()=>[n(x(te))]),_:1})]),_:1})]),a("div",he,[(l(!0),m(L,null,S(E.value,e=>(l(),m("div",{key:e.id,class:A(["group-item",{active:g.value===e.id}]),onClick:W=>$(e)},[a("div",Ce,[a("span",ge,u(e.name),1),a("span",ye,u(e.count),1)])],10,fe))),128))])]),a("div",ke,[h.value.length===0&&!_.loading?(l(),I(P,{key:0,description:"暂无客户","image-size":100})):_.loading?(l(),I(q,{key:1,rows:6,animated:""})):(l(),m("div",we,[(l(!0),m(L,null,S(h.value,e=>(l(),m("div",{key:e.id,class:A(["customer-item",{active:w.value===e.id,unread:e.unreadCount>0}]),onClick:W=>j(e)},[n(H,{size:36,src:e.avatar,class:"customer-avatar"},{default:r(()=>[y(u(G(e.name)),1)]),_:2},1032,["src"]),a("div",Ie,[a("div",be,u(e.name),1),a("div",ze,u(e.email),1),e.company?(l(),m("div",Ve,u(e.company),1)):k("",!0)]),a("div",De,[e.level?(l(),m("div",Le,u(e.level),1)):k("",!0),a("div",Se," 最近联系:"+u(K(e.lastContact)),1)]),e.unreadCount?(l(),I(Q,{key:0,value:e.unreadCount,max:99,class:"customer-badge"},null,8,["value"])):k("",!0)],10,xe))),128))]))]),a("div",Ae,[a("div",Be,[a("span",null,u(h.value.length)+" 个客户",1),n(R,{"current-page":b.value,"onUpdate:currentPage":o[2]||(o[2]=e=>b.value=e),"page-size":z.value,"onUpdate:pageSize":o[3]||(o[3]=e=>z.value=e),"page-sizes":[20,50,100],total:h.value.length,layout:"prev, pager, next",small:""},null,8,["current-page","page-size","total"])])])])}}},Fe=J(Me,[["__scopeId","data-v-18f317bd"]]);export{Fe as default};

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.