import{s as t,d as a,y as s,o as e,z as o,e as l,f as r,w as n,B as i,_ as u,l as c,j as d,t as p,u as m,A as f,k as g,r as _,F as y,g as b,D as x,i as w,m as h,v as T,E as j}from"./index-9aa72eed.js";import{_ as v}from"./su-tabs.801f7709.js";import{_ as k}from"./su-sticky.8fbea04e.js";import{_ as S}from"./s-empty.3adf8b58.js";import{_ as z}from"./uni-load-more.93dce372.js";import{_ as N}from"./s-layout.bffb18b8.js";import{r as B,f as M}from"./useGoods.ce02ada2.js";import{B as C}from"./brokerage.3a814b62.js";import{_ as $}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.cc270d88.js";/* empty css                                                                */import"./form.c66b5271.js";const F=$({__name:"order",setup($){x((t=>({"1a5d6679":T(H)})));const F=2*t.$platform.device.statusBarHeight,H=t.$url.css("/static/img/shop/user/withdraw_bg.png");a((t=>{I.scrollTop=t.scrollTop<=100}));const I=s({totals:0,scrollTop:!1,currentTab:0,loadStatus:"",pagination:{list:[],total:0,pageNo:1,pageSize:1}}),A=[{name:"全部",value:"all"},{name:"待结算",value:"0"},{name:"已结算",value:"1"}];function D(t){B(I.pagination),I.currentTab=t.index,E()}async function E(){I.loadStatus="loading";let{code:t,data:a}=await C.getBrokerageRecordPage({pageSize:I.pagination.pageSize,pageNo:I.pagination.pageSize,bizType:1,status:I.currentTab>0?I.currentTab:void 0});0===t&&(I.pagination.list=u.concat(I.pagination.list,a.list),I.pagination.total=a.total,I.loadStatus=I.pagination.list.length<I.pagination.total?"more":"noMore",0===I.currentTab&&(I.totals=a.total))}function G(){"noMore"!==I.loadStatus&&(I.pagination.pageNo++,E())}return e((()=>{E()})),o((()=>{G()})),(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(I.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(I.totals),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["style"]),d(u,{bgColor:"#fff"},{default:n((()=>[d(o,{list:A,scrollable:!1,current:I.currentTab,onChange:D},null,8,["current"])])),_:1}),d(e,{class:"order-box"},{default:n((()=>[(l(!0),g(y,null,_(I.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===I.pagination.total?(l(),r(B,{key:0,icon:"/static/order-empty.png",text:"暂无订单"})):b("",!0),I.pagination.total>0?(l(),r(C,{key:1,status:I.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:G},null,8,["status"])):b("",!0)])),_:1})])),_:1},8,["class"])}}},[["__scopeId","data-v-24113c32"]]);export{F as default};
