import{b as t,a2 as a,r as e,f as s,g as l,o,h as i,w as n,a as c,k as r,F as u,l as m,i as d,j as f,t as _,A as p,N as y,x as g,m as h,y as b,z as k,O as w}from"./index-WeUkftbp.js";import{_ as x,a as j}from"./uni-row.DLutFlIQ.js";import{_ as v}from"./uni-dateformat.CAFQ6hZt.js";import{_ as M,a as C}from"./uni-list.D2b1m_I0.js";import{e as T}from"./index.D8Jasx-l.js";import{a as q}from"./index.d2K7R4mP.js";import"./moment.BD7_iMEL.js";import{M as N}from"./customer.C_v9K5hM.js";import{_ as z}from"./_plugin-vue_export-helper.BCo6x5W8.js";const A=z({__name:"contractList",props:{listData:{type:Array,default:()=>[]},emptyTitle:{type:String,default:""},type:{type:Number,default:0},follow:{type:Number,default:0},formType:{type:Object,default:{}}},setup(z){const A=t(),D=z,{listData:F,emptyTitle:K,type:O,follow:S,formType:$}=a(D),I=e(-1),J=(t,a,e)=>{N(t,a,e).then((t=>{g.error(t.message),F.value[I.value].contract_followed=0===F.value[I.value].contract_followed?1:0})).catch((t=>{g.error(t.message)}))},L=t=>{let a="";return 0==t.contract_status?a="/static/image/normal03.png":1==t.contract_status?a="/static/image/normal00.png":2==t.contract_status?a="/static/image/normal02.png":3==t.contract_status&&(a="/static/image/normal01.png"),a};return(t,a)=>{const e=b,g=s(l("uni-col"),x),N=k,z=s(l("uni-dateformat"),v),D=s(l("uni-row"),j),Q=w,B=s(l("uni-list-item"),M),E=s(l("uni-list"),C);return o(),i(N,{class:"examine-content-list"},{default:n((()=>[c(F).length>0?(o(),i(E,{key:0,border:!1},{default:n((()=>[(o(!0),r(u,null,m(c(F),((t,a)=>(o(),i(B,{key:"list"+t.id},{body:n((()=>[d(N,{class:"item-list"},{default:n((()=>[d(N,{onClick:a=>(t=>{A.commit("setCustomerFormType",$.value),h(`/pages/customer/contract/details?id=${t.id}`)})(t)},{default:n((()=>[d(D,{class:"item-list-content"},{default:n((()=>[d(g,{span:6,class:"left"},{default:n((()=>[d(e,{class:"iconfont icon-kehuxiangqing-hetong"})])),_:1}),d(g,{span:18,class:"right"},{default:n((()=>[d(N,{class:"name line1-1"},{default:n((()=>[f(_(t.contract_name),1)])),_:2},1024),d(N,{class:"time"},{default:n((()=>[f(" 起止时间： "),d(z,{format:"yyyy/MM/dd",date:t.start_date},null,8,["date"]),f(" - "),"0000-00-00"!==t.end_date?(o(),i(z,{key:0,format:"yyyy/MM/dd",date:t.end_date},null,8,["date"])):(o(),r(u,{key:1},[f("永久")],64))])),_:2},1024)])),_:2},1024)])),_:2},1024),d(N,{class:"item-list-button"},{default:n((()=>[d(N,{class:"item-bottom"},{default:n((()=>[d(D,{class:"item-bottom-top"},{default:n((()=>[d(g,{span:11},{default:n((()=>[d(e,{class:"name"},{default:n((()=>[f("总金额")])),_:1}),d(e,{class:"number"},{default:n((()=>[f(_(t.contract_price),1)])),_:2},1024)])),_:2},1024),d(g,{span:11,offset:2},{default:n((()=>[d(e,{class:"name"},{default:n((()=>[f("未回款")])),_:1}),d(e,{class:"number1"},{default:n((()=>[f(_(t.surplus),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),(o(!0),r(u,null,m(t.bills,((t,a)=>(o(),i(D,{class:"item-bottom-item",key:t.id},{default:n((()=>[d(g,{span:2,class:"item-bottom-item-left"},{default:n((()=>[d(e,{class:"iconfont icon-tixing-fukuantixing"})])),_:1}),d(g,{span:22,class:"item-bottom-item-right"},{default:n((()=>[d(D,null,{default:n((()=>[d(g,{class:"item-right-type line1-1",span:6},{default:n((()=>[f(_(t.renew?t.renew.title:"--"),1)])),_:2},1024),d(g,{class:"item-right-type line1-1",span:6},{default:n((()=>[f(_(t.num),1)])),_:2},1024),d(g,{span:12,class:"text-right"},{default:n((()=>[d(z,{class:"time",format:"yyyy/MM/dd",date:t.date},null,8,["date"])])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"]),1===c(O)?(o(),i(N,{key:0,class:"item-list-bottom"},{default:n((()=>[d(D,{class:"item-bottom display-align"},{default:n((()=>[d(g,{span:16,class:"display-align"},{default:n((()=>[d(q,{src:t.salesman.avatar,"auto-size":!1,width:60,height:60,radius:8},null,8,["src"]),d(N,{class:"item-bottom-text"},{default:n((()=>[f(_(t.salesman.name)+" 负责",1)])),_:2},1024)])),_:2},1024),c(S)<1?(o(),i(g,{key:0,span:8,class:"text-right item-bottom-right",onClick:e=>((t,a)=>{I.value=t,J(a.id,0==a.contract_followed?1:0,{status:0==a.contract_followed?1:0})})(a,t)},{default:n((()=>[d(e,{class:p(["iconfont",0==t.contract_followed?"icon-shequ-shoucang":"icon-shequ-shoucang-yishoucang selected-color"])},null,8,["class"]),f(" "+_(0==t.contract_followed?"关注":"已关注"),1)])),_:2},1032,["onClick"])):y("",!0)])),_:2},1024)])),_:2},1024)):y("",!0),d(Q,{class:"item-list-status",src:L(t),mode:""},null,8,["src"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})):(o(),i(T,{key:1,index:9,title:c(K)},null,8,["title"]))])),_:1})}}},[["__scopeId","data-v-bd63172f"]]);export{A as c};
