import{r as e,o as a,n as l,c as t,b as s,d as o,e as u,f as r,w as d,g as n,x as i,h as f,i as c,F as p,k as _,p as m,v as g,A as v,l as y,t as h,j as b,B as x,y as k}from"./index-DVkgSHpn.js";import{_ as j}from"./el-navbar.DVIyjZEN.js";import{_ as w}from"./el-tabs.DRFTppt3.js";import{_ as C}from"./el-refresh.CkIPFmzm.js";import{_ as P,a as H}from"./el-layout._U-vZTft.js";import"./el-empty.CMLN1lgh.js";import"./el-loading-icon.Bh3RKCou.js";const S=P({__name:"index",setup(P){const S=e(),$=e(0),B=e(0),R=e(""),A=e([{name:"全部",type:"all"},{name:"待审核",type:"verify"},{name:"已同意",type:"agree"},{name:"已拒绝",type:"refuse"}]),D=e=>{A.value.find(((a,l)=>"string"==typeof e&&a.type==e||"number"==typeof e&&e==l?(B.value=l,R.value=a.type,!0):void 0))};a((e=>{D(e.type),l((()=>{I()}))}));const F=e([]),I=async()=>{var e;null==(e=S.value)||e.resetPage(),F.value=[]},M=e=>{D(e),I()},T=t((()=>{const{windowHeight:e}=_();return e-$.value-50})),U=()=>{I()},V=e=>{S.value.isMore()&&(S.value.loadingPage(),setTimeout((()=>{uni.$http.get("order.refund/index",{type:R.value,page:e.page}).then((a=>{1==a.code?(1==e.page&&(F.value=[]),S.value.setData(a.data.total,a.data.list.length),F.value=F.value.concat(a.data.list)):-1==a.code&&(1==e.page&&a.data.list.length<=0&&(F.value=[]),S.value.emptyPage())}))}),100))};return(e,a)=>{const l=s(o("el-navbar"),j),t=s(o("el-tabs"),w),_=m,P=x,R=k,D=s(o("el-refresh"),C),I=s(o("el-layout"),H);return u(),r(I,null,{default:d((()=>[n(l,{top:$.value,"onUpdate:top":a[0]||(a[0]=e=>$.value=e),placeholder:!0,fixed:!0,border:!1,title:"订单列表"},null,8,["top"]),n(_,{class:"tabs",style:i({top:$.value-1+"px"})},{default:d((()=>[n(t,{showBar:!1,list:A.value,current:B.value,onChange:M,itemStyle:{width:"25%"}},null,8,["list","current"])])),_:1},8,["style"]),n(_,{style:{width:"100%",height:"50px"}}),n(D,{ref_key:"refreshRef",ref:S,onRefresh:U,onScrolltolower:V,scrollHeight:T.value},{default:d((()=>[n(_,{class:"wrapper"},{default:d((()=>[n(_,{class:"order-list"},{default:d((()=>[(u(!0),f(p,null,c(F.value,((e,a)=>(u(),r(_,{class:"order-box",key:a},{default:d((()=>[n(_,{class:"top"},{default:d((()=>[n(_,null,{default:d((()=>[g(v(e.create_time),1)])),_:2},1024),n(_,null,{default:d((()=>[g(v(e.text),1)])),_:2},1024)])),_:2},1024),n(_,{class:"content"},{default:d((()=>[n(_,{class:"goods-list",onClick:a=>y(h)(`/pages/refund/detail?order_id=${e.id}`)},{default:d((()=>[(u(!0),f(p,null,c(e.goods,((e,a)=>(u(),r(_,{class:"goods-box",key:a},{default:d((()=>[n(_,{class:"thumb-image"},{default:d((()=>[n(P,{src:e.thumb_image},null,8,["src"])])),_:2},1024),n(_,{class:"goods-info"},{default:d((()=>[n(_,{class:"goods-name"},{default:d((()=>[2==e.type?(u(),r(R,{key:0,class:"gift"},{default:d((()=>[g("[赠品]")])),_:1})):b("",!0),n(R,null,{default:d((()=>[g(v(e.goods_name),1)])),_:2},1024)])),_:2},1024),e.spec.length>0?(u(),r(_,{key:0,class:"spec"},{default:d((()=>[g(v(e.spec),1)])),_:2},1024)):b("",!0),n(_,{class:"price"},{default:d((()=>[g("￥"),n(R,null,{default:d((()=>[g(v(e.sell_price),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),n(_,{class:"num"},{default:d((()=>[g("x"+v(e.goods_total_nums),1)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1032,["onClick"]),n(_,{class:"order-amount"},{default:d((()=>[g(" 实付款："),n(R,null,{default:d((()=>[g("￥")])),_:1}),n(R,null,{default:d((()=>[g(v(e.order_amount),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),n(_,{class:"bottom"},{default:d((()=>[n(_,{class:"red",onClick:a=>y(h)(`/pages/refund/detail?order_id=${e.id}`)},{default:d((()=>[g("退款详情")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1},8,["scrollHeight"])])),_:1})}}},[["__scopeId","data-v-133f0947"]]);export{S as default};
//# sourceMappingURL=pages-refund-index.B_W2LQXb.js.map
