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