import{d as a,a2 as t,e,f as s,g as i,o as l,h as n,w as o,a as c,k as d,l as u,F as m,z as f,A as p,i as r,N as y,j as _,t as g,a7 as v,m as k,y as b,O as h,a1 as x}from"./index-Dnh6GPlT.js";import{_ as j,a as w}from"./uni-row.C8l4_QpR.js";import{_ as C}from"./uni-dateformat.C-BKL-OF.js";import{_ as $,a as M}from"./uni-list.Y9x-0uJ_.js";import{e as A}from"./index.ZMpzRqor.js";import{_ as B}from"./_plugin-vue_export-helper.BCo6x5W8.js";var F=(a=>(a[a["/static/image/invoice4.png"]=-1]="/static/image/invoice4.png",a[a["/static/image/examine.png"]=0]="/static/image/examine.png",a[a["/static/image/invoice0.png"]=1]="/static/image/invoice0.png",a[a["/static/image/invoice2.png"]=2]="/static/image/invoice2.png",a[a["/static/image/invoice01.png"]=3]="/static/image/invoice01.png",a[a["/static/image/invoice3.png"]=4]="/static/image/invoice3.png",a[a["/static/image/invoice1.png"]=5]="/static/image/invoice1.png",a))(F||{});const q=B(a({__name:"invoiceList",props:{btnShow:{type:Boolean,default:!1},type:{default:0},eid:{default:0},cid:{default:0},name:{default:""},isFinance:{type:Boolean,default:!1},emptyTitle:{default:""},tab:{default:0},listData:{default:[]}},emits:["change"],setup(a,{emit:B}){const q=a,{listData:z,type:D,emptyTitle:I,eid:T,cid:J,name:K,isFinance:L,tab:N}=t(q),O=e({showArray:[2,4],addBtn:"添加发票",addUrl:`/pages/customer/invoice/addInvoice?eid=${T.value}&name=${K.value}&cid=${J.value}`});let Q=B;const S=(a,t)=>{Q("change",{row:a,type:t})};return(a,t)=>{const e=b,B=s(i("uni-col"),j),q=f,T=s(i("uni-dateformat"),C),J=s(i("uni-row"),w),K=h,Q=x,U=s(i("uni-list-item"),$),E=s(i("uni-list"),M);return l(),n(q,{class:"examine-content-list"},{default:o((()=>[c(z).length>0?(l(),n(E,{key:0,border:!1},{default:o((()=>[(l(!0),d(m,null,u(c(z),((a,t)=>(l(),n(U,{class:p(0===c(D)?"content-item-list":"content-item-list-card"),key:"list"+a.id},{body:o((()=>[r(q,{class:"item-list",onClick:t=>(a=>{L.value?k(`/pages/finance/invoice/details?id=${a.id}&tab=${N.value}`):k(`/pages/customer/invoice/details?id=${a.id}`)})(a)},{default:o((()=>{return[r(J,{class:"item-list-content"},{default:o((()=>[r(B,{span:6,class:"left"},{default:o((()=>[1==a.types?(l(),n(e,{key:0,class:"iconfont icon-fapiao-gerenputongfapiao addColor"})):y("",!0),2==a.types?(l(),n(e,{key:1,class:"iconfont icon-fapiao-qiyeputongfapiao1"})):y("",!0),3==a.types?(l(),n(e,{key:2,class:"iconfont icon-fapiao-qiyezhuanyongfapiao"})):y("",!0)])),_:2},1024),r(B,{span:18,class:"right"},{default:o((()=>[r(q,{class:"name line1-1"},{default:o((()=>[1==a.types?(l(),n(e,{key:0},{default:o((()=>[_("个人普通发票")])),_:1})):y("",!0),2==a.types?(l(),n(e,{key:1},{default:o((()=>[_("企业普通发票")])),_:1})):y("",!0),3==a.types?(l(),n(e,{key:2},{default:o((()=>[_("企业专用发票")])),_:1})):y("",!0),_(" · "+g("mail"==a.collect_type?"电子":"纸质"),1)])),_:2},1024),r(q,{class:"time display-align"},{default:o((()=>[r(q,{class:"text"},{default:o((()=>[_(g(a.card.name||"--"),1)])),_:2},1024),r(q,{class:"text"},{default:o((()=>[r(T,{format:"yyyy/MM/dd",date:a.created_at},null,8,["date"])])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024),r(q,{class:"item-list-button"},{default:o((()=>[r(q,{class:"item-bottom-top"},{default:o((()=>[r(e,{class:"name"},{default:o((()=>[_("发票抬头")])),_:1}),r(e,{class:"number"},{default:o((()=>[_(g(a.title||"--"),1)])),_:2},1024)])),_:2},1024),r(J,{class:"item-bottom-item"},{default:o((()=>[r(B,{span:11},{default:o((()=>[r(q,{class:"name"},{default:o((()=>[_("开票金额")])),_:1}),r(q,{class:"number"},{default:o((()=>[_(g(a.amount||"--")+"元",1)])),_:2},1024)])),_:2},1024),r(B,{span:11,offset:2},{default:o((()=>[r(q,{class:"name"},{default:o((()=>[_("实际开票日期")])),_:1}),r(q,{class:"number"},{default:o((()=>[a.real_date?(l(),n(T,{key:0,format:"yyyy/MM/dd",date:a.real_date},null,8,["date"])):(l(),n(q,{key:1},{default:o((()=>[_(" -- ")])),_:1}))])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024),r(K,{class:"item-list-status",src:(t=a.status,F[t]),mode:""},null,8,["src"]),c(L)&&!O.showArray.includes(a.status)?(l(),n(q,{key:0,class:"item-button-content"},{default:o((()=>[5===a.status?(l(),n(Q,{key:0,class:"button default-error",onClick:v((t=>S(a,2)),["stop"])},{default:o((()=>[_("作废")])),_:2},1032,["onClick"])):y("",!0),1==a.status?(l(),n(Q,{key:1,class:"button default-color",onClick:v((t=>S(a,1)),["stop"])},{default:o((()=>[_("录入发票")])),_:2},1032,["onClick"])):y("",!0)])),_:2},1024)):y("",!0)];var t})),_:2},1032,["onClick"])])),_:2},1032,["class"])))),128))])),_:1})):(l(),n(A,{key:1,index:10,title:c(I)},null,8,["title"]))])),_:1})}}}),[["__scopeId","data-v-0b935ae6"]]);export{q as i};
