cashier-mer/dist/assets/indexCount-BYG7OM1O.js
weipengfei 16fa02aadf 1
2024-04-20 09:54:56 +08:00

2 lines
3.1 KiB
JavaScript

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