webGoodsSource-dist/js/index.CP8TIq-Z.js

2 lines
2.3 KiB
JavaScript
Raw Normal View History

2025-07-25 10:17:58 +08:00
import{_ as e}from"./index.C-haDnrt.js";import{k as a}from"./account.-Rtzzh3L.js";import{b4 as t,ag as o,b6 as l,c as n,e as s,N as c,w as d,g as r,bo as i}from"./index.ZCt2DURL.js";import"./el-col.Ac_tUxgv.js";const p={class:"home-container"},m=t({__name:"index",setup(t){const m=o({loading:!1,columns:[{label:"日期",prop:"dates",align:"center"},{label:"服务商",prop:"servicer",align:"center"},{label:"合计",prop:"total",align:"center",needCount:!0}],columns2:[{label:"通道",prop:"channel",align:"center"},{label:"合计",prop:"total",needCount:!0}],searchFields:[{prop:"completed_at",label:"完成时间",type:"date",dateType:"datetimerange",value:[]},{label:"通道聚合",prop:"channel",type:"select",value:"",options:[{label:"淘宝",value:"淘宝"}]}],tableData:[{dates:"2016-05-03",servicer:"Tom",total:"11111",children:[{total:"11",channel:"淘宝复制"},{total:"11",channel:"淘宝复制"}]},{dates:"2016-05-03",servicer:"Tom",total:"11111",children:[{total:"11",channel:"淘宝复制"},{total:"11",channel:"淘宝复制"}]}]});const h=()=>{m.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),u()},u=()=>{var e;m.loading=!0;let t=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(m.searchFields);(null==(e=t.completed_at)?void 0:e.length)>0&&(t.completed_from=t.completed_at[0]?i(t.completed_at[0]):"",t.completed_to=t.completed_at[1]?i(t.completed_at[1]):""),a(t).then(e=>{m.tableData=e.data,m.loading=!1}).catch(()=>{m.loading=!1})};return l(()=>{}),(a,t)=>{const o=e;return s(),n("div",p,[c(o,{type:"export",columns:r(m).columns,searchFields:r(m).searchFields,"onUpdate:searchFields":t[0]||(t[0]=e=>r(m).searchFields=e),data:r(m).tableData,onGetTableData:u,onResetForm:h,loading:r(m).loading,showSelection:!1,paginationSlot:!1,showRightRefreshSlot:!1,showSummary:!0,showExpand:!0,"expand-name":"customExpand",showBtns:!1},{customExpand:d(e=>[c(o,{type:"export",columns:r(m).columns2,data:e.row.children,loading:r(m).loading,showSelection:!1,paginationSlot:!1,showRightRefreshSlot:!1,showSummary:!0,showBtns:!1,style:{width:"80%",margin:"0 auto",padding:"0"}},null,8,["columns","data","loading"])]),_:1},8,["columns","searchFields","data","loading"])])}}},[["__scopeId","data-v-4375a98a"]]);export{m as default};