import{o as s,e,w as t,u as a,_ as o,i as l,y as i,z as d,T as r,j as n,s as u,G as c,m as p,l as m,B as _,C as f,x as b,b as y,f as g,h as x,F as k,k as v,d as h,ah as w}from"./index-520dfaee.js";import{_ as B}from"./_plugin-vue_export-helper.1b428a4d.js";import{b as C,a as j}from"./s-layout.5146c957.js";import{_ as $}from"./s-empty.b6c95127.js";/* empty css                                                                */const I=B({__name:"s-invoice-item",props:{item:{type:Object,default(){}},hasBorderBottom:{type:Boolean,defult:!0}},setup(f){const b=f,y=()=>{u.$router.go("/pages/user/invoice/edit",{id:b.item.id})};return(f,g)=>{const x=p,k=m,v=_;return s(),e(x,{class:c(["address-item ss-flex ss-row-between ss-col-center",[{"border-bottom":b.hasBorderBottom}]])},{default:t((()=>[a(o).isEmpty(b.item)?(s(),e(x,{key:1},{default:t((()=>[l(x,{class:"address-text"},{default:t((()=>[i("请选择收货地址")])),_:1})])),_:1})):(s(),e(x,{key:0,class:"item-left"},{default:t((()=>[l(x,{class:"address-text"},{default:t((()=>[i(d(b.item.name),1)])),_:1}),l(x,{class:"person-text"},{default:t((()=>[i(d(b.item.mobile),1)])),_:1})])),_:1})),r(f.$slots,"default",{},(()=>[l(v,{class:"ss-reset-button edit-btn",onClick:n(y,["stop"])},{default:t((()=>[l(x,{class:"edit-icon ss-flex ss-row-center ss-col-center"},{default:t((()=>[l(k,{src:a(u).$url.static("/assets/addons/shopro/uniapp/user/address/edit.png")},null,8,["src"])])),_:1})])),_:1},8,["onClick"])]),!0)])),_:3},8,["class"])}}},[["__scopeId","data-v-b4e8be10"]]),E=B({__name:"list",setup(o){const d=f({list:[],loading:!0});return b((async()=>{d.list=(await u.$api.user.invoice.list()).data,d.loading=!1})),(o,r)=>{const n=y(h("s-invoice-item"),I),c=p,m=_,f=y(h("su-fixed"),C),b=y(h("s-empty"),$),B=y(h("s-layout"),j);return s(),e(B,{title:"发票管理",bgStyle:{color:"#FFF"}},{default:t((()=>[d.list.length?(s(),e(c,{key:0},{default:t((()=>[(s(!0),g(k,null,x(d.list,(t=>(s(),e(n,{hasBorderBottom:"",key:t.id,item:t,isDefault:t.is_default,onClick:s=>(w("SELECT_INVOICE",{invoiceInfo:t}),void u.$router.back())},null,8,["item","isDefault","onClick"])))),128))])),_:1})):v("",!0),l(f,{bottom:"",placeholder:""},{default:t((()=>[l(c,{class:"footer-box ss-flex ss-row-between ss-p-20"},{default:t((()=>[l(m,{class:"add-btn ss-reset-button ui-Shadow-Main",onClick:r[0]||(r[0]=s=>a(u).$router.go("/pages/user/invoice/edit"))},{default:t((()=>[i(" 新增发票抬头 ")])),_:1})])),_:1})])),_:1}),0!==d.list.length||d.loading?v("",!0):(s(),e(b,{key:1,text:"暂无发票",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-c69946ff"]]);export{E as default};
