import{s as t,d as a,v as s,o as e,x as o,e as l,f as r,w as n,z as i,_ as u,l as c,j as d,p,t as m,y as f,k as g,r as _,F as y,g as b,B as x,i as w,m as h,u as T,C as j}from"./index-9880b451.js";import{_ as v}from"./su-tabs.1ce39404.js";import{_ as k}from"./su-sticky.84aef901.js";import{_ as S}from"./s-empty.74111684.js";import{_ as z}from"./uni-load-more.aac4524a.js";import{_ as N}from"./s-layout.dfc5b0b5.js";import{r as B}from"./index.df38848e.js";import{B as C}from"./brokerage.b6c9045b.js";import{f as M}from"./useGoods.bdd1c2ea.js";import{_ as $}from"./_plugin-vue_export-helper.1b428a4d.js";/* empty css                                                                */const F=$({__name:"order",setup($){x((t=>({"1a5d6679":T(I)})));const F=2*t.$platform.device.statusBarHeight,I=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}}),H=[{name:"全部",value:"all"},{name:"待结算",value:"0"},{name:"已结算",value:"1"}];function P(t){B(G.pagination),G.currentTab=t.index,R()}async function R(){G.loadStatus="loading";let{code:t,data:a}=await C.getBrokerageRecordPage({pageSize:G.pagination.pageSize,pageNo:G.pagination.pageSize,bizType:1,status:G.currentTab>0?G.currentTab:void 0});0===t&&(G.pagination.list=u.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 Y(){"noMore"!==G.loadStatus&&(G.pagination.pageNo++,R())}return e((()=>{R()})),o((()=>{Y()})),(a,s)=>{const e=w,o=c(h("su-tabs"),v),u=c(h("su-sticky"),k),x=j,B=c(h("s-empty"),S),C=c(h("uni-load-more"),z),$=c(h("s-layout"),N);return l(),r($,{title:"分销订单",class:i(G.scrollTop?"order-warp":""),navbar:"inner"},{default:n((()=>[d(e,{class:"header-box",style:f([{marginTop:"-"+Number(F+88)+"rpx",paddingTop:Number(F+108)+"rpx"}])},{default:n((()=>[d(e,{class:"team-data-box ss-flex ss-col-center ss-row-between",style:{width:"100%"}},{default:n((()=>[d(e,{class:"data-card",style:{width:"100%"}},{default:n((()=>[d(e,{class:"total-item",style:{width:"100%"}},{default:n((()=>[d(e,{class:"item-title",style:{"text-align":"center"}},{default:n((()=>[p("累计推广订单（单）")])),_:1}),d(e,{class:"total-num",style:{"text-align":"center"}},{default:n((()=>[p(m(G.totals),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["style"]),d(u,{bgColor:"#fff"},{default:n((()=>[d(o,{list:H,scrollable:!1,current:G.currentTab,onChange:P},null,8,["current"])])),_:1}),d(e,{class:"order-box"},{default:n((()=>[(l(!0),g(y,null,_(G.pagination.list,(a=>(l(),r(e,{class:"order-item",key:a},{default:n((()=>[d(e,{class:"order-header"},{default:n((()=>[d(e,{class:"no-box ss-flex ss-col-center ss-row-between"},{default:n((()=>[d(x,{class:"order-code"},{default:n((()=>[p("订单编号："+m(a.bizId),1)])),_:2},1024),d(x,{class:"order-state"},{default:n((()=>[p(m(0===a.status?"待结算":1===a.status?"已结算":"已取消")+" ( 佣金 "+m(T(M)(a.price))+" 元 ) ",1)])),_:2},1024)])),_:2},1024),d(e,{class:"order-from ss-flex ss-col-center ss-row-between"},{default:n((()=>[d(e,{class:"from-user ss-flex ss-col-center"},{default:n((()=>[d(x,null,{default:n((()=>[p(m(a.title),1)])),_:2},1024)])),_:2},1024),d(e,{class:"order-time"},{default:n((()=>[p(m(T(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(B,{key:0,icon:"/static/order-empty.png",text:"暂无订单"})):b("",!0),G.pagination.total>0?(l(),r(C,{key:1,status:G.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:Y},null,8,["status"])):b("",!0)])),_:1})])),_:1},8,["class"])}}},[["__scopeId","data-v-24113c32"]]);export{F as default};
