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