import{a2 as t,f as s,g as e,o as a,h as l,w as o,a as i,k as u,F as m,l as r,i as n,j as c,t as d,N as f,m as _,x as p,z as y,y as b,O as h}from"./index-WeUkftbp.js";import{_ as g,a as k}from"./uni-row.DLutFlIQ.js";import{_ as x}from"./uni-dateformat.CAFQ6hZt.js";import{_ as w,a as j}from"./uni-list.D2b1m_I0.js";import{_ as v,a as C,b as D}from"./customer-lost.DHTY2quF.js";import{e as I}from"./index.D8Jasx-l.js";import{a as M}from"./index.d2K7R4mP.js";import{e as N}from"./customer.C_v9K5hM.js";import{_ as $}from"./_plugin-vue_export-helper.BCo6x5W8.js";const q=$({__name:"customerListDefault",props:{listData:{type:Array,default:()=>[]},typeIndex:{type:Number,default:0},types:{type:Number,default:0},emptyTitle:{type:String,default:""}},setup($){const q=$,{listData:z,typeIndex:K,emptyTitle:T,types:A}=t(q);return(t,$)=>{const q=y,K=s(e("uni-col"),g),F=s(e("uni-row"),k),J=b,L=s(e("uni-dateformat"),x),O=h,Q=s(e("uni-list-item"),w),S=s(e("uni-list"),j);return a(),l(q,{class:"examine-content-list"},{default:o((()=>[i(z).length>0?(a(),l(S,{key:0,border:!1},{default:o((()=>[(a(!0),u(m,null,r(i(z),((t,s)=>(a(),l(Q,{key:"list"+t.id},{body:o((()=>[n(q,{class:"item-list"},{default:o((()=>[n(q,{onClick:s=>(t=>{_(`/pages/customer/list/details?id=${t.id}&&types=${A.value}`)})(t),class:"p24"},{default:o((()=>[n(q,{class:"item-list-top"},{default:o((()=>[c(d(t.customer_name),1)])),_:2},1024),n(F,{class:"item-list-content"},{default:o((()=>[n(K,{span:6,class:"left"},{default:o((()=>[c("联系电话")])),_:1}),n(K,{span:18},{default:o((()=>[c(d(t.b37a3f16||"--"),1)])),_:2},1024)])),_:2},1024),n(F,{class:"item-list-content"},{default:o((()=>[n(K,{span:6,class:"left"},{default:o((()=>[c("客户标签")])),_:1}),n(K,{span:18},{default:o((()=>[t.customer_label&&t.customer_label.length>0?(a(),l(q,{key:0,class:"label-text"},{default:o((()=>[(a(!0),u(m,null,r(t.customer_label,((e,i)=>(a(),l(J,{key:i},{default:o((()=>[c(d(e.name)+" "+d(t.customer_label.length>1&&s<t.customer_label.length-1?"、":""),1)])),_:2},1024)))),128))])),_:2},1024)):(a(),l(q,{key:1,class:"label-text"},{default:o((()=>[c(" -- ")])),_:1}))])),_:2},1024)])),_:2},1024),n(F,{class:"item-list-content"},{default:o((()=>[n(K,{span:6,class:"left"},{default:o((()=>[c("跟进时间")])),_:1}),n(K,{span:18},{default:o((()=>[t.last_follow_time?(a(),l(L,{key:0,format:"yyyy/MM/dd hh:mm",date:t.last_follow_time},null,8,["date"])):(a(),l(J,{key:1},{default:o((()=>[c("--")])),_:1}))])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"]),n(q,{class:"item-list-button"},{default:o((()=>[n(F,{class:"item-bottom display-align p24"},{default:o((()=>[n(K,{span:16,class:"display-align"},{default:o((()=>[n(M,{"auto-size":!1,width:60,height:60,src:t.salesman.avatar,radius:8},null,8,["src"]),n(q,{class:"item-bottom-text"},{default:o((()=>[c(d(t.salesman.name)+" 负责 ",1)])),_:2},1024)])),_:2},1024),n(K,{span:8,class:"text-right item-bottom-right",onClick:s=>((t,s)=>{N(s.id,0==s.customer_followed?1:0).then((t=>{p.error(t.message),s.customer_followed=0==s.customer_followed?1:0})).catch((t=>{p.error(t.message)}))})(0,t)},{default:o((()=>[1!=t.customer_followed?(a(),l(J,{key:0,class:"iconfont icon-shequ-shoucang"})):(a(),l(J,{key:1,class:"iconfont icon-shequ-shoucang-yishoucang"})),c(" "+d(1==t.customer_followed?"已关注":"关注"),1)])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024),0==t.customer_status?(a(),l(O,{key:0,class:"item-list-status",src:v,mode:""})):f("",!0),1==t.customer_status?(a(),l(O,{key:1,class:"item-list-status",src:C,mode:""})):f("",!0),2==t.customer_status?(a(),l(O,{key:2,class:"item-list-status",src:D,mode:""})):f("",!0)])),_:2},1024)])),_:2},1024)))),128))])),_:1})):(a(),l(I,{key:1,index:7,title:i(T)},null,8,["title"]))])),_:1})}}},[["__scopeId","data-v-b2bbb4c9"]]);export{q as c};
