import{h as S,i as Y}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as w,u as P,r as o,b as h,j as k,q as N,c as f,h as b,e as t,t as d,s as D,f as r,w as x,g as F,v as M,x as V,A as j}from"./index-3-t8Fk7s.js";import{h as n}from"./moment-Cl4UOzQZ.js";const v=l=>(M("data-v-266c9d86"),l=l(),V(),l),q={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card"},L=v(()=>t("div",{class:"tips"},"今日收银 平台+线上+现金 总金额",-1)),T={class:"form-card"},O=v(()=>t("div",{class:"tips"},"昨日收银 平台+线上+现金 总金额",-1)),E={class:"form-card"},R=v(()=>t("div",{class:"tips"},"本月收银 平台+线上+现金 总金额",-1)),U={class:"table"},z={__name:"indexCount",setup(l){const c=P(),m=o([]),g=j();o(1),o(null);const C=o({page:1,limit:15,staff_id:c.userInfo.service.service_id}),_=o(!1);o(0),(()=>{S(c.userInfo.service.mer_id,C.value).then(s=>{m.value=s.data})})();const a=o({});(()=>{_.value=!0,Y(c.userInfo.service.mer_id,{staff_id:c.userInfo.service.service_id}).then(s=>{a.value=s.data.data,_.value=!1})})();const I=(s,p)=>{let e="",i={};Number(n(s.day).format("MM"))>Number(n().format("MM"))?e=n().format("YYYY")-1+"-"+s.day.split("-").join("-"):e=n().format("YYYY")+"-"+s.day.split("-").join("-"),i.date=e,p.no==2&&(i.payType=1),p.no==3&&(i.payType=2),g.push({path:"order",query:i})};return(s,p)=>{const e=h("el-table-column"),i=h("el-table"),u=k("loading");return N((f(),b("div",q,[a.value.today?(f(),b("div",A,[t("div",B,[t("div",null,d((a.value.today.cashPayment+a.value.today.payPrice).toFixed(2)),1),L]),t("div",T,[t("div",null,d((a.value.yesterday.cashPayment+a.value.yesterday.payPrice).toFixed(2)),1),O]),t("div",E,[t("div",null,d((a.value.month.cashPayment+a.value.month.payPrice).toFixed(2)),1),R])])):D("",!0),t("div",U,[r(i,{data:m.value,style:{width:"100%"},onCellClick:I},{default:x(()=>[r(e,{prop:"day",label:"日期",width:"260"}),r(e,{prop:"total",label:"订单数量"}),r(e,{prop:"cash_payment",label:"现金收银金额"}),r(e,{prop:"cash_registe",label:"线上收银金额"}),r(e,{prop:"pay_price",label:"平台交易额"}),r(e,{label:"总金额"},{default:x(y=>[F(d(((+y.row.pay_price||0)+(+y.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[u,_.value]])}}},W=w(z,[["__scopeId","data-v-266c9d86"]]);export{W as default};
