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 h,m as w,v as T,E as j}from"./index-68dd960a.js";import{_ as v}from"./su-tabs.8e3b073b.js";import{_ as k}from"./su-sticky.c1cf5411.js";import{_ as S}from"./s-empty.fd15ca2f.js";import{_ as z}from"./uni-load-more.49bf8042.js";import{r as N,_ as B,f as M}from"./s-layout.454a15cd.js";import{B as C}from"./brokerage.bca7adb6.js";import{_ as $}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.ad675ab6.js";/* empty css                                                                */import"./phone-international-input.471da4c0.js";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=>{A.scrollTop=t.scrollTop<=100}));const A=s({totals:0,scrollTop:!1,currentTab:0,loadStatus:"",pagination:{list:[],total:0,pageNo:1,pageSize:1}}),D=[{name:"全部",value:"all"},{name:"待结算",value:"0"},{name:"已结算",value:"1"}];function E(t){N(A.pagination),A.currentTab=t.index,H()}async function H(){A.loadStatus="loading";let{code:t,data:a}=await C.getBrokerageRecordPage({pageSize:A.pagination.pageSize,pageNo:A.pagination.pageSize,bizType:1,status:A.currentTab>0?A.currentTab:void 0});0===t&&(A.pagination.list=u.concat(A.pagination.list,a.list),A.pagination.total=a.total,A.loadStatus=A.pagination.list.length<A.pagination.total?"more":"noMore",0===A.currentTab&&(A.totals=a.total))}function K(){"noMore"!==A.loadStatus&&(A.pagination.pageNo++,H())}return e((()=>{H()})),o((()=>{K()})),(a,s)=>{const e=h,o=c(w("su-tabs"),v),u=c(w("su-sticky"),k),x=j,N=c(w("s-empty"),S),C=c(w("uni-load-more"),z),$=c(w("s-layout"),B);return l(),r($,{title:"分销订单",class:i(A.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(A.totals),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["style"]),d(u,{bgColor:"#fff"},{default:n((()=>[d(o,{list:D,scrollable:!1,current:A.currentTab,onChange:E},null,8,["current"])])),_:1}),d(e,{class:"order-box"},{default:n((()=>[(l(!0),g(y,null,_(A.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===A.pagination.total?(l(),r(N,{key:0,icon:"/static/order-empty.png",text:"暂无订单"})):b("",!0),A.pagination.total>0?(l(),r(C,{key:1,status:A.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:K},null,8,["status"])):b("",!0)])),_:1})])),_:1},8,["class"])}}},[["__scopeId","data-v-24113c32"]]);export{F as default};
