jingcai-html-dist/public/seller/assets/IndexPage.95671bfd.js

2 lines
12 KiB
JavaScript

import{a_ as st,r as M,a as I,am as T,u as U,w as ot,A as p,B as z,C as a,H as o,I as L,aa as at,F as e,ab as j,aI as S,Q as V,a9 as t,M as r,b9 as y,G as w,D as q,J as it,K as lt,au as J,aG as ct,aH as rt,L as nt}from"./index.816d8fc2.js";import{Q as dt}from"./QList.62104f54.js";import{Q as _t}from"./QBtnDropdown.9dfc6b8a.js";import{Q as ut}from"./QDate.34614b57.js";import{Q as ht}from"./QPopupProxy.ab51256b.js";import{C as A}from"./ClosePopup.15d0a7a0.js";import{_ as pt}from"./MainPageFooter.e75a3768.js";import{_ as mt}from"./LoadingView.b076828a.js";import{d as x,f as d}from"./tools.717b31a2.js";import{P as D}from"./const.19ce85fc.js";import"./QBtnGroup.650018c7.js";import"./QMenu.47b2c253.js";import"./selection.e844b319.js";import"./QRouteTab.2efe0f24.js";import"./QTabs.dce0ceb9.js";import"./QResizeObserver.b50cd61a.js";import"./QFooter.2005ceda.js";import"./sorry.39781903.js";var vt="/assets/register_user.b78f107e.svg",xt="/assets/order_user.4aab57d0.svg";const gt={class:"bg-white q-mb-sm q-pa-md"},bt={class:"bg-teal-10 text-white rounded-borders-xs row relative-position"},ft={class:"text-h5 text-weight-bold"},yt=t("span",{class:"text-grey-3"},"\u603B\u51FA\u7968\u91D1\u989D",-1),wt={class:"text-h5 text-weight-bold"},qt=t("span",{class:"text-grey-3"},"\u6D3E\u5956\u603B\u91D1\u989D",-1),Dt={class:"full-height q-py-md absolute-center"},kt={class:"col-12 q-px-md"},Yt={class:"text-h5 text-weight-bold"},Qt=t("span",{class:"text-grey-3"},"\u4E2D\u5956\u603B\u91D1\u989D",-1),Ct={class:"text-h5 text-weight-bold"},Mt=t("span",{class:"text-grey-3"},"\u63D0\u73B0\u603B\u91D1\u989D",-1),It={key:0,class:"bg-white q-mb-sm q-pa-md"},zt={class:"row q-col-gutter-sm"},Lt={class:"col-6"},Pt=t("div",{class:"text-grey-3 text-caption"},"\u7528\u6237\u5145\u503C",-1),Rt={class:"text-subtitle1 text-weight-bold"},Bt={class:"col-3"},St=t("div",{class:"text-grey-3 text-caption"},"\u5408\u4F5C\u6536\u5165",-1),Vt={class:"text-subtitle1 text-weight-bold"},At=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),Nt={class:"col-3"},Et=t("div",{class:"text-grey-3 text-caption"},"\u670D\u52A1\u8D39\u652F\u51FA",-1),Ft={class:"text-subtitle1 text-weight-bold"},Gt=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),$t={class:"bg-white q-pa-md"},Ht={class:"row q-col-gutter-sm"},Ot={class:"col"},Tt=t("div",{class:"text-grey-3 text-caption"},"\u624B\u5DE5\u52A0\u6B3E",-1),Ut={class:"text-subtitle1 text-weight-bold"},jt=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),Jt={class:"col"},Kt=t("div",{class:"text-grey-3 text-caption"},"\u624B\u5DE5\u6263\u6B3E",-1),Wt={class:"text-subtitle1 text-weight-bold"},Xt=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),Zt={class:"bg-white q-pa-md"},te=t("div",{class:"text-subtitle1 q-mb-sm"},"\u7528\u6237\u7EDF\u8BA1",-1),ee={class:"row q-col-gutter-sm"},se={class:"col-6"},oe=t("img",{class:"absolute-bottom-right",style:{width:"32px",height:"32px",margin:"12px 8px"},src:vt},null,-1),ae={class:"text-subtitle1 text-weight-bold"},ie=t("div",{class:"text-grey text-caption"},"\u6CE8\u518C\u7528\u6237\u6570",-1),le={class:"col-6"},ce=t("img",{class:"absolute-bottom-right",style:{width:"46px",height:"46px",margin:"6px 4px"},src:xt},null,-1),re={class:"text-subtitle1 text-weight-bold"},ne=t("div",{class:"text-grey text-caption"},"\u8D2D\u5F69\u7528\u6237\u6570",-1),de={key:3,class:"bg-white q-mb-sm q-pa-md"},_e=t("div",{class:"text-subtitle1 q-mb-sm"},"\u8D26\u5355\u7EDF\u8BA1",-1),ue={class:"row q-col-gutter-sm"},he={class:"col"},pe={class:"q-pa-sm"},me={class:"text-subtitle1 text-weight-bold"},ve=t("div",{class:"text-grey text-caption"},"\u6628\u65E5\u5E97\u94FA\u4F59\u989D",-1),xe={class:"col"},ge={class:"q-pa-sm"},be={class:"text-subtitle1 text-weight-bold"},fe=t("div",{class:"text-grey text-caption"},"\u4ECA\u65E5\u5E97\u94FA\u4F59\u989D",-1),ye={class:"col"},we={class:"q-pa-sm"},qe={class:"text-subtitle1 text-weight-bold"},De=t("div",{class:"text-grey text-caption"},"\u5E97\u94FA\u4F59\u989D\u53D8\u52A8",-1),ke={class:"row q-col-gutter-sm"},Ye={class:"col"},Qe={class:"q-pa-sm"},Ce={class:"text-subtitle1 text-weight-bold"},Me=t("div",{class:"text-grey text-caption"},"\u6628\u65E5\u6258\u7BA1\u4F59\u989D",-1),Ie={class:"col"},ze={class:"q-pa-sm"},Le={class:"text-subtitle1 text-weight-bold"},Pe=t("div",{class:"text-grey text-caption"},"\u4ECA\u65E5\u6258\u7BA1\u4F59\u989D",-1),Re={class:"col"},Be={class:"q-pa-sm"},Se={class:"text-subtitle1 text-weight-bold"},Ve=t("div",{class:"text-grey text-caption"},"\u6258\u7BA1\u4F59\u989D\u53D8\u52A8",-1),os={__name:"IndexPage",setup(Ae){const k=it(),K=lt(),v=st([{nickname:"\u5168\u5E97",id:""}]),h=M(0),Y=M(!1),c=M({}),Q=I(()=>{var l;return(l=v[h.value])==null?void 0:l.id}),P=I(()=>!Q.value);T.getWorkerList().then(l=>{l.forEach(_=>{_.nickname||(_.nickname=_.name),v.push(_)})});function R(){Y.value=!0,T.getDashboardInfo({...i,seller_id:Q.value}).then(l=>{Y.value=!1,c.value=l}).catch(l=>{Y.value=l.message})}const g=I(()=>c.value.report),u=M({from:k.query.date_start||x.formatDate(new Date,"YYYY-MM-DD"),to:k.query.date_end||x.formatDate(new Date,"YYYY-MM-DD")}),i=U({}),b=U({start:""});function W(){u.value={from:"",to:""},b.start="",N()}function N(){E(),K.replace({path:k.path,query:{...k.query,...i}})}function E(){var l,_;i.date_start=typeof u.value=="string"?u.value:(l=u.value)==null?void 0:l.from,i.date_end=typeof u.value=="string"?u.value:(_=u.value)==null?void 0:_.to,R()}const X=I(()=>i.date_start?i.date_end==i.date_start?i.date_start:i.date_start+"\u81F3"+i.date_end:"\u4ECA\u65E5");function F(l){l?b.start=new Date(l.year,l.month-1,l.day):b.start=""}function Z(l,_,n){F(n.from?{year:n.from.year,month:n.from.month,day:n.from.day}:null)}function tt(l){if(b.start){let _=b.start;return l<=x.formatDate(x.addToDate(_,{months:1}),"YYYY/MM/DD")&&l>=x.formatDate(x.subtractFromDate(_,{months:1}),"YYYY/MM/DD")}return!0}return ot(h,R),E(),(l,_)=>{const n=J("router-link"),et=J("PageLayout");return p(),z(et,null,{"header-title":a(()=>{var m;return[o(_t,{flat:"",dense:"",label:(m=e(v)[h.value])==null?void 0:m.nickname},{default:a(()=>[o(dt,{style:{"min-width":"100px"}},{default:a(()=>[(p(!0),L(j,null,at(e(v),(C,f)=>S((p(),z(ct,{key:f,clickable:"",onClick:B=>h.value=f},{default:a(()=>[o(rt,null,{default:a(()=>[nt(r(C.nickname),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[A]])),128))]),_:1})]),_:1},8,["label"])]}),"header-right":a(()=>[o(V,{dense:"",unelevated:"",color:"grey-3","text-color":"dark","icon-right":"expand_more",label:e(X)},{default:a(()=>[o(ht,{ref:"popupRef"},{default:a(()=>[o(ut,{modelValue:u.value,"onUpdate:modelValue":[_[0]||(_[0]=m=>u.value=m),Z],options:tt,range:"",minimal:"",mask:"YYYY-MM-DD",onRangeStart:F},{default:a(()=>[S(o(V,{color:"primary",flat:"",class:"float-right",onClick:N,label:"\u786E\u5B9A"},null,512),[[A]]),S(o(V,{color:"grey",flat:"",class:"float-right",onClick:W,label:"\u6E05\u7A7A"},null,512),[[A]])]),_:1},8,["modelValue"])]),_:1},512)]),_:1},8,["label"])]),footer:a(()=>[o(pt)]),default:a(()=>[o(mt,{canRefresh:"",refresh:R,loading:Y.value},{default:a(()=>{var m,C,f,B,G,$,H,O;return[t("div",gt,[t("div",bt,[o(n,{to:{path:"/statistics/report/chupiao",query:{t:Date.now(),...i}},class:"col-6 q-pa-md"},{default:a(()=>{var s;return[t("div",ft,r(e(d)(((s=e(g))==null?void 0:s.chupiao_money)||0)),1),yt]}),_:1},8,["to"]),o(n,{to:{path:"/statistics/report/paijiang",query:{t:Date.now(),...i}},class:"col-6 q-pa-md"},{default:a(()=>{var s;return[t("div",wt,r(e(d)(((s=e(g))==null?void 0:s.send_prize)||0)),1),qt]}),_:1},8,["to"]),t("div",Dt,[o(y,{vertical:"",size:"0.5px",color:"teal-7",class:"full-height"})]),t("div",kt,[o(y,{size:"0.5px",color:"teal-7"})]),o(n,{to:{path:"/statistics/report/win_list",query:{t:Date.now(),...i}},class:"col-6 q-pa-md"},{default:a(()=>{var s;return[t("div",Yt,r(e(d)(((s=e(g))==null?void 0:s.win_prize)||0)),1),Qt]}),_:1},8,["to"]),e(P)?(p(),z(n,{key:0,to:{path:"/customer/wallet/draw/history",query:{title:"\u63D0\u73B0\u8BB0\u5F55",t:Date.now(),...i}},class:"col-6 q-pa-md"},{default:a(()=>{var s;return[t("div",Ct,r(e(d)(((s=c.value.report)==null?void 0:s.customer_withdraw)||0)),1),Mt]}),_:1},8,["to"])):w("",!0)])]),e(P)?(p(),L("div",It,[t("div",zt,[t("div",Lt,[o(n,{to:{path:"/statistics/list/customer_recharge",query:{title:"\u7528\u6237\u5145\u503C",t:Date.now(),...i}},class:q(["block fit text-white rounded-borders-xs q-pa-sm","bg-"+e(D).customer_recharge.color])},{default:a(()=>{var s;return[Pt,t("div",Rt,r(e(d)(((s=c.value.report)==null?void 0:s.customer_recharge)||0)),1)]}),_:1},8,["to","class"])]),t("div",Bt,[o(n,{to:{path:"/statistics/list/shop_coop_brokerage",query:{title:"\u5408\u4F5C\u6536\u5165",t:Date.now(),...i}},class:q(["block fit text-white rounded-borders-xs q-pa-sm","bg-"+e(D).shop_coop_brokerage.color])},{default:a(()=>{var s;return[St,t("div",Vt,r(e(d)(((s=c.value.report)==null?void 0:s.cooperate_brokerage)||0)),1),At]}),_:1},8,["to","class"])]),t("div",Nt,[o(n,{to:{path:"/statistics/list/shop_bills",query:{title:"\u670D\u52A1\u8D39\u652F\u51FA",t:Date.now(),...i}},class:q(["block fit text-white rounded-borders-xs q-pa-sm","bg-"+e(D).shop_bills.color])},{default:a(()=>{var s;return[Et,t("div",Ft,r(e(d)(((s=c.value.report)==null?void 0:s.chupiao_fee_money)||0)),1),Gt]}),_:1},8,["to","class"])])])])):w("",!0),t("div",$t,[t("div",Ht,[t("div",Ot,[o(n,{to:{path:"/statistics/list/incr_money",query:{title:"\u624B\u5DE5\u52A0\u6B3E - "+(h.value?e(v)[h.value].nickname:"\u5168\u5E97"),t:Date.now(),...i,seller_id:e(Q)}},class:q(["block fit text-white rounded-borders-xs q-pa-sm","bg-"+e(D).incr_money.color])},{default:a(()=>{var s;return[Tt,t("div",Ut,r(e(d)(((s=e(g))==null?void 0:s.incr_money)||0)),1),jt]}),_:1},8,["to","class"])]),t("div",Jt,[o(n,{to:{path:"/statistics/list/reduce_money",query:{title:"\u624B\u5DE5\u6263\u6B3E - "+(h.value?e(v)[h.value].nickname:"\u5168\u5E97"),t:Date.now(),...i,seller_id:e(Q)}},class:q(["block fit text-white rounded-borders-xs q-pa-sm","bg-"+e(D).reduce_money.color])},{default:a(()=>{var s;return[Kt,t("div",Wt,r(e(d)(((s=e(g))==null?void 0:s.reduce_money)||0)),1),Xt]}),_:1},8,["to","class"])])])]),e(P)?(p(),L(j,{key:1},[o(y,{size:"0.5px"}),t("div",Zt,[te,t("div",ee,[t("div",se,[o(n,{to:{path:"/statistics/list/registers",query:{title:"\u6CE8\u518C\u7528\u6237\u6570",t:Date.now(),...i}},class:"block bg-light-blue-1 glossy-x fit rounded-borders-xs q-pa-sm relative-position"},{default:a(()=>{var s;return[oe,t("div",ae,r(((s=c.value.report)==null?void 0:s.register_num)||0),1),ie]}),_:1},8,["to"])]),t("div",le,[o(n,{to:{path:"/statistics/list/buyers",query:{title:"\u8D2D\u5F69\u7528\u6237\u6570",t:Date.now(),...i}},class:"block bg-yellow-1 fit glossy-x rounded-borders-xs q-pa-sm relative-position"},{default:a(()=>{var s;return[ce,t("div",re,r(((s=c.value.report)==null?void 0:s.buyer_num)||0),1),ne]}),_:1},8,["to"])])])])],64)):w("",!0),c.value.current?(p(),z(y,{key:2,size:"0.5px"})):w("",!0),c.value.current?(p(),L("div",de,[_e,t("div",ue,[t("div",he,[t("div",pe,[t("div",me,r(e(d)(((m=c.value.last)==null?void 0:m.shop_banlance)||0)),1),ve])]),t("div",xe,[t("div",ge,[t("div",be,r(e(d)(((C=c.value.current)==null?void 0:C.shop_banlance)||0)),1),fe])]),t("div",ye,[t("div",we,[t("div",qe,r(e(d)((((f=c.value.current)==null?void 0:f.shop_banlance)||0)-(((B=c.value.last)==null?void 0:B.shop_banlance)||0))),1),De])])]),o(y,{size:"0.5px"}),t("div",ke,[t("div",Ye,[t("div",Qe,[t("div",Ce,r(e(d)(((G=c.value.last)==null?void 0:G.customers_balance)||0)),1),Me])]),t("div",Ie,[t("div",ze,[t("div",Le,r(e(d)((($=c.value.current)==null?void 0:$.customers_balance)||0)),1),Pe])]),t("div",Re,[t("div",Be,[t("div",Se,r(e(d)((((H=c.value.current)==null?void 0:H.customers_balance)||0)-(((O=c.value.last)==null?void 0:O.customers_balance)||0))),1),Ve])])])])):w("",!0)]}),_:1},8,["loading"])]),_:1})}}};export{os as default};