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