import{e as y,r as n,l as x,d as m,P as b,a3 as S,a4 as c,a7 as p,ab as C,f as u,A as w,B as K,I as P}from"./vue-bf422dc1.js";import{c as d}from"./analysis-a8cb5e50.js";import{p as B}from"./global-0d825ba6.js";import D from"./OrderChannel-26dfd26e.js";import{u as T,d as k}from"./index-8db2df2c.js";import z from"./row-search-71bdbcc4.js";import{a as F,b as R}from"./ui-ba7aaa7e.js";import"./echarts-bf9d612c.js";import"./workbench-6b38294d.js";import"./libs-51817cd7.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./icons-a8498fb6.js";import"./collection-65c798c4.js";import"./pay_type-11f4c206.js";import"./base-847c52cc.js";const j=[{colKey:"channel_id",title:"渠道ID"},{colKey:"title",title:"渠道名称"},{colKey:"count",title:"提交订单"},{colKey:"paid",title:"已付订单"},{colKey:"unpaid",title:"未付订单"},{colKey:"sum_money",title:"提交金额"},{colKey:"sum_actual_money",title:"商户收入"},{colKey:"sum_platform_money",title:"平台收入"}],A={class:"category-header c-flex"},ee=y({__name:"index",setup(I){const e=n({defaultPageSize:20,total:0,defaultCurrent:1}),s=n([]),l=x({}),r=n(!0),f=m(()=>r.value?"收起搜索":"展开搜索"),i=async(o={})=>{if(Object.assign(l,o),l.action==="export"){const t={...l},a=await d(t);k(a.data.url)}else{const t={page:e.value.defaultCurrent,limit:e.value.defaultPageSize,...l},{data:a}=await d(t);s.value=a.list,e.value={...e.value,total:a.total}}};i();const v=o=>{e.value.defaultCurrent=o.current,e.value.defaultPageSize=o.pageSize,i()},h=T(),_=m(()=>({offsetTop:h.isUseTabsRouter?48:0,container:`.${B}-layout`}));return(o,t)=>{const a=F,g=R;return b(),S(g,{title:"支付渠道分析",class:"basic-container",bordered:!1},{actions:c(()=>[p("a",{href:"javascript:void(0)",onClick:t[0]||(t[0]=N=>r.value=!r.value)},C(f.value),1)]),default:c(()=>[u(D,{style:{"margin-bottom":"20px"}}),p("div",A,[w(u(z,{ref:"searchFormRef",onSuccess:i},null,512),[[K,r.value]])]),u(a,{data:s.value,columns:P(j),"row-key":"id","vertical-align":"middle",hover:s.value.length>0,pagination:e.value,"header-affixed-top":_.value,"table-layout":"auto","max-height":"100%",onPageChange:v},{empty:c(()=>[]),_:1},8,["data","columns","hover","pagination","header-affixed-top"])]),_:1})}}});export{ee as default};
