jingcai-html-dist/public/seller/assets/IndexPage.4488b378.js

2 lines
12 KiB
JavaScript

import{a_ as ot,r as M,a as I,am as T,u as U,w as at,A as h,B as z,C as a,H as o,I as y,aa as it,F as e,ab as J,aI as S,Q as V,a9 as t,M as r,b9 as w,D as q,G as L,J as lt,K as ct,au as K,aG as rt,aH as nt,L as dt}from"./index.c82bb050.js";import{Q as _t}from"./QList.4ca6cccf.js";import{Q as ut}from"./QBtnDropdown.7a4480bc.js";import{Q as ht}from"./QDate.33f9467e.js";import{Q as pt}from"./QPopupProxy.ec1ca56f.js";import{C as A}from"./ClosePopup.e57b2cfe.js";import{_ as mt}from"./MainPageFooter.ddfe1fb8.js";import{_ as vt}from"./LoadingView.aef6eba0.js";import{d as x,f as d}from"./tools.4858b7d5.js";import{P as D}from"./const.19ce85fc.js";import"./QBtnGroup.3e36f13b.js";import"./QMenu.7e067bba.js";import"./selection.23418a69.js";import"./QRouteTab.21509d41.js";import"./QTabs.2c09fba2.js";import"./QResizeObserver.647c4893.js";import"./QFooter.e5240e14.js";import"./sorry.5a9ab846.js";var xt="/assets/register_user.b78f107e.svg",gt="/assets/order_user.4aab57d0.svg";const bt={class:"bg-white q-mb-sm q-pa-md"},ft={class:"bg-teal-10 text-white rounded-borders-xs row relative-position"},yt={class:"text-h5 text-weight-bold"},wt=t("span",{class:"text-grey-3"},"\u603B\u51FA\u7968\u91D1\u989D",-1),qt={class:"text-h5 text-weight-bold"},Dt=t("span",{class:"text-grey-3"},"\u6D3E\u5956\u603B\u91D1\u989D",-1),kt={class:"full-height q-py-md absolute-center"},Yt={class:"col-12 q-px-md"},Qt={class:"text-h5 text-weight-bold"},Ct=t("span",{class:"text-grey-3"},"\u4E2D\u5956\u603B\u91D1\u989D",-1),Mt={class:"text-h5 text-weight-bold"},It=t("span",{class:"text-grey-3"},"\u63D0\u73B0\u603B\u91D1\u989D",-1),zt={key:1,class:"col-6 q-pa-md"},Lt={class:"text-h5 text-weight-bold"},Pt=t("span",{class:"text-grey-3"},"\u63A5\u5355\u603B\u91CF",-1),Rt={key:0,class:"bg-white q-mb-sm q-pa-md"},Bt={class:"row q-col-gutter-sm"},St={class:"col-6"},Vt=t("div",{class:"text-grey-3 text-caption"},"\u7528\u6237\u5145\u503C",-1),At={class:"text-subtitle1 text-weight-bold"},Nt={class:"col-3"},Et=t("div",{class:"text-grey-3 text-caption"},"\u5408\u4F5C\u6536\u5165",-1),Ft={class:"text-subtitle1 text-weight-bold"},Gt=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),$t={class:"col-3"},jt=t("div",{class:"text-grey-3 text-caption"},"\u670D\u52A1\u8D39\u652F\u51FA",-1),Ht={class:"text-subtitle1 text-weight-bold"},Ot=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),Tt={class:"bg-white q-pa-md"},Ut={class:"row q-col-gutter-sm"},Jt={class:"col"},Kt=t("div",{class:"text-grey-3 text-caption"},"\u624B\u5DE5\u52A0\u6B3E",-1),Wt={class:"text-subtitle1 text-weight-bold"},Xt=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),Zt={class:"col"},te=t("div",{class:"text-grey-3 text-caption"},"\u624B\u5DE5\u6263\u6B3E",-1),ee={class:"text-subtitle1 text-weight-bold"},se=t("div",{class:"text-grey-3 text-caption"},"\xA0",-1),oe={class:"bg-white q-pa-md"},ae=t("div",{class:"text-subtitle1 q-mb-sm"},"\u7528\u6237\u7EDF\u8BA1",-1),ie={class:"row q-col-gutter-sm"},le={class:"col-6"},ce=t("img",{class:"absolute-bottom-right",style:{width:"32px",height:"32px",margin:"12px 8px"},src:xt},null,-1),re={class:"text-subtitle1 text-weight-bold"},ne=t("div",{class:"text-grey text-caption"},"\u6CE8\u518C\u7528\u6237\u6570",-1),de={class:"col-6"},_e=t("img",{class:"absolute-bottom-right",style:{width:"46px",height:"46px",margin:"6px 4px"},src:gt},null,-1),ue={class:"text-subtitle1 text-weight-bold"},he=t("div",{class:"text-grey text-caption"},"\u8D2D\u5F69\u7528\u6237\u6570",-1),pe={key:3,class:"bg-white q-mb-sm q-pa-md"},me=t("div",{class:"text-subtitle1 q-mb-sm"},"\u8D26\u5355\u7EDF\u8BA1",-1),ve={class:"row q-col-gutter-sm"},xe={class:"col"},ge={class:"q-pa-sm"},be={class:"text-subtitle1 text-weight-bold"},fe=t("div",{class:"text-grey text-caption"},"\u6628\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"},"\u4ECA\u65E5\u5E97\u94FA\u4F59\u989D",-1),ke={class:"col"},Ye={class:"q-pa-sm"},Qe={class:"text-subtitle1 text-weight-bold"},Ce=t("div",{class:"text-grey text-caption"},"\u5E97\u94FA\u4F59\u989D\u53D8\u52A8",-1),Me={class:"row q-col-gutter-sm"},Ie={class:"col"},ze={class:"q-pa-sm"},Le={class:"text-subtitle1 text-weight-bold"},Pe=t("div",{class:"text-grey text-caption"},"\u6628\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"},"\u4ECA\u65E5\u6258\u7BA1\u4F59\u989D",-1),Ae={class:"col"},Ne={class:"q-pa-sm"},Ee={class:"text-subtitle1 text-weight-bold"},Fe=t("div",{class:"text-grey text-caption"},"\u6258\u7BA1\u4F59\u989D\u53D8\u52A8",-1),cs={__name:"IndexPage",setup(Ge){const k=lt(),W=ct(),v=ot([{nickname:"\u5168\u5E97",id:""}]),p=M(0),Y=M(!1),c=M({}),Q=I(()=>{var l;return(l=v[p.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 X(){u.value={from:"",to:""},b.start="",N()}function N(){E(),W.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 Z=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 tt(l,_,n){F(n.from?{year:n.from.year,month:n.from.month,day:n.from.day}:null)}function et(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 at(p,R),E(),(l,_)=>{const n=K("router-link"),st=K("PageLayout");return h(),z(st,null,{"header-title":a(()=>{var m;return[o(ut,{flat:"",dense:"",label:(m=e(v)[p.value])==null?void 0:m.nickname},{default:a(()=>[o(_t,{style:{"min-width":"100px"}},{default:a(()=>[(h(!0),y(J,null,it(e(v),(C,f)=>S((h(),z(rt,{key:f,clickable:"",onClick:B=>p.value=f},{default:a(()=>[o(nt,null,{default:a(()=>[dt(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(Z)},{default:a(()=>[o(pt,{ref:"popupRef"},{default:a(()=>[o(ht,{modelValue:u.value,"onUpdate:modelValue":[_[0]||(_[0]=m=>u.value=m),tt],options:et,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:X,label:"\u6E05\u7A7A"},null,512),[[A]])]),_:1},8,["modelValue"])]),_:1},512)]),_:1},8,["label"])]),footer:a(()=>[o(mt)]),default:a(()=>[o(vt,{canRefresh:"",refresh:R,loading:Y.value},{default:a(()=>{var m,C,f,B,G,$,j,H,O;return[t("div",bt,[t("div",ft,[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",yt,r(e(d)(((s=e(g))==null?void 0:s.chupiao_money)||0)),1),wt]}),_: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",qt,r(e(d)(((s=e(g))==null?void 0:s.send_prize)||0)),1),Dt]}),_:1},8,["to"]),t("div",kt,[o(w,{vertical:"",size:"0.5px",color:"teal-7",class:"full-height"})]),t("div",Yt,[o(w,{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",Qt,r(e(d)(((s=e(g))==null?void 0:s.win_prize)||0)),1),Ct]}),_:1},8,["to"]),e(P)?(h(),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",Mt,r(e(d)(((s=c.value.report)==null?void 0:s.customer_withdraw)||0)),1),It]}),_:1},8,["to"])):(h(),y("div",zt,[t("div",Lt,r(((m=c.value)==null?void 0:m.jiedan_num)||0),1),Pt]))])]),e(P)?(h(),y("div",Rt,[t("div",Bt,[t("div",St,[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[Vt,t("div",At,r(e(d)(((s=c.value.report)==null?void 0:s.customer_recharge)||0)),1)]}),_:1},8,["to","class"])]),t("div",Nt,[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[Et,t("div",Ft,r(e(d)(((s=c.value.report)==null?void 0:s.cooperate_brokerage)||0)),1),Gt]}),_:1},8,["to","class"])]),t("div",$t,[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[jt,t("div",Ht,r(e(d)(((s=c.value.report)==null?void 0:s.chupiao_fee_money)||0)),1),Ot]}),_:1},8,["to","class"])])])])):L("",!0),t("div",Tt,[t("div",Ut,[t("div",Jt,[o(n,{to:{path:"/statistics/list/incr_money",query:{title:"\u624B\u5DE5\u52A0\u6B3E - "+(p.value?e(v)[p.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[Kt,t("div",Wt,r(e(d)(((s=e(g))==null?void 0:s.incr_money)||0)),1),Xt]}),_:1},8,["to","class"])]),t("div",Zt,[o(n,{to:{path:"/statistics/list/reduce_money",query:{title:"\u624B\u5DE5\u6263\u6B3E - "+(p.value?e(v)[p.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[te,t("div",ee,r(e(d)(((s=e(g))==null?void 0:s.reduce_money)||0)),1),se]}),_:1},8,["to","class"])])])]),e(P)?(h(),y(J,{key:1},[o(w,{size:"0.5px"}),t("div",oe,[ae,t("div",ie,[t("div",le,[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[ce,t("div",re,r(((s=c.value.report)==null?void 0:s.register_num)||0),1),ne]}),_:1},8,["to"])]),t("div",de,[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[_e,t("div",ue,r(((s=c.value.report)==null?void 0:s.buyer_num)||0),1),he]}),_:1},8,["to"])])])])],64)):L("",!0),c.value.current?(h(),z(w,{key:2,size:"0.5px"})):L("",!0),c.value.current?(h(),y("div",pe,[me,t("div",ve,[t("div",xe,[t("div",ge,[t("div",be,r(e(d)(((C=c.value.last)==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)),1),De])]),t("div",ke,[t("div",Ye,[t("div",Qe,r(e(d)((((B=c.value.current)==null?void 0:B.shop_banlance)||0)-(((G=c.value.last)==null?void 0:G.shop_banlance)||0))),1),Ce])])]),o(w,{size:"0.5px"}),t("div",Me,[t("div",Ie,[t("div",ze,[t("div",Le,r(e(d)((($=c.value.last)==null?void 0:$.customers_balance)||0)),1),Pe])]),t("div",Re,[t("div",Be,[t("div",Se,r(e(d)(((j=c.value.current)==null?void 0:j.customers_balance)||0)),1),Ve])]),t("div",Ae,[t("div",Ne,[t("div",Ee,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),Fe])])])])):L("",!0)]}),_:1},8,["loading"])]),_:1})}}};export{cs as default};