import{s as t,e as a,B as s,o as e,C as o,f as l,g as r,w as n,H as i,bS as u,_ as c,q as d,n as p,m,t as f,E as g,p as _,r as b,F as y,i as x,J as h,l as w,u as T,z as j,K as v}from"./index-007bf156.js";import{_ as S}from"./su-tabs.6f882e3d.js";import{_ as k}from"./su-sticky.42fb87b3.js";import{_ as z}from"./s-empty.df9577ad.js";import{_ as N}from"./uni-load-more.4c025ab2.js";import{_ as C}from"./s-layout.19bedb43.js";import{r as M,f as B}from"./useGoods.ac3bf93e.js";import{_ as H}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.cf8b6051.js";/* empty css                                                                */import"./phone-international-input.3617e4e0.js";const $=H({__name:"order",setup(H){h((t=>({"1a5d6679":j(F)})));const $=2*t.$platform.device.statusBarHeight,F=t.$url.css("/static/img/shop/user/withdraw_bg.png");a((t=>{G.scrollTop=t.scrollTop<=100}));const G=s({totals:0,scrollTop:!1,currentTab:0,loadStatus:"",pagination:{list:[],total:0,pageNo:1,pageSize:1}}),I=[{name:"全部",value:"all"},{name:"待结算",value:"0"},{name:"已结算",value:"1"}];function q(t){M(G.pagination),G.currentTab=t.index,E()}async function E(){G.loadStatus="loading";let{code:t,data:a}=await u.getBrokerageRecordPage({pageSize:G.pagination.pageSize,pageNo:G.pagination.pageSize,bizType:1,status:G.currentTab>0?G.currentTab:void 0});0===t&&(G.pagination.list=c.concat(G.pagination.list,a.list),G.pagination.total=a.total,G.loadStatus=G.pagination.list.length<G.pagination.total?"more":"noMore",0===G.currentTab&&(G.totals=a.total))}function J(){"noMore"!==G.loadStatus&&(G.pagination.pageNo++,E())}return e((()=>{E()})),o((()=>{J()})),(a,s)=>{const e=w,o=d(T("su-tabs"),S),u=d(T("su-sticky"),k),c=v,h=d(T("s-empty"),z),M=d(T("uni-load-more"),N),H=d(T("s-layout"),C);return l(),r(H,{title:"分销订单",class:i(G.scrollTop?"order-warp":""),navbar:"inner"},{default:n((()=>[p(e,{class:"header-box",style:g([{marginTop:"-"+Number($+88)+"rpx",paddingTop:Number($+108)+"rpx"}])},{default:n((()=>[p(e,{class:"team-data-box ss-flex ss-col-center ss-row-between",style:{width:"100%"}},{default:n((()=>[p(e,{class:"data-card",style:{width:"100%"}},{default:n((()=>[p(e,{class:"total-item",style:{width:"100%"}},{default:n((()=>[p(e,{class:"item-title",style:{"text-align":"center"}},{default:n((()=>[m("累计推广订单（单）")])),_:1}),p(e,{class:"total-num",style:{"text-align":"center"}},{default:n((()=>[m(f(G.totals),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["style"]),p(u,{bgColor:"#fff"},{default:n((()=>[p(o,{list:I,scrollable:!1,current:G.currentTab,onChange:q},null,8,["current"])])),_:1}),p(e,{class:"order-box"},{default:n((()=>[(l(!0),_(y,null,b(G.pagination.list,(a=>(l(),r(e,{class:"order-item",key:a},{default:n((()=>[p(e,{class:"order-header"},{default:n((()=>[p(e,{class:"no-box ss-flex ss-col-center ss-row-between"},{default:n((()=>[p(c,{class:"order-code"},{default:n((()=>[m("订单编号："+f(a.bizId),1)])),_:2},1024),p(c,{class:"order-state"},{default:n((()=>[m(f(0===a.status?"待结算":1===a.status?"已结算":"已取消")+" ( 佣金 "+f(j(B)(a.price))+" 元 ) ",1)])),_:2},1024)])),_:2},1024),p(e,{class:"order-from ss-flex ss-col-center ss-row-between"},{default:n((()=>[p(e,{class:"from-user ss-flex ss-col-center"},{default:n((()=>[p(c,null,{default:n((()=>[m(f(a.title),1)])),_:2},1024)])),_:2},1024),p(e,{class:"order-time"},{default:n((()=>[m(f(j(t).$helper.timeFormat(a.createTime,"yyyy-mm-dd hh:MM:ss")),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128)),0===G.pagination.total?(l(),r(h,{key:0,icon:"/static/order-empty.png",text:"暂无订单"})):x("",!0),G.pagination.total>0?(l(),r(M,{key:1,status:G.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:J},null,8,["status"])):x("",!0)])),_:1})])),_:1},8,["class"])}}},[["__scopeId","data-v-24113c32"]]);export{$ as default};
