import{d as T,a6 as P,b as Y,r as R,p as U,c as n,e as c,f,g as d,h as t,i as o,u as s,k as D,A as V,t as b,F as h,j as k,m as v,a as _,R as j,S as q,aN as L,_ as O}from"./index.0308b213.js";import{g as $}from"./delivery.72c6939f.js";import{b as z}from"./deliveryStation.d851c462.js";import{A as G}from"./index.1d26a072.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const B=m=>(j("data-v-a63d9ffc"),m=m(),q(),m),H={class:"filter-form"},J=v("\u4ECA\u5929"),K=v("\u6700\u8FD17\u5929"),Q=v("\u6700\u8FD130\u5929"),W=v("\u81EA\u5B9A\u4E49"),X=B(()=>d("div",{class:"header"},[d("div",{class:"tn-title--vertical-line title"},"\u603B\u89C8")],-1)),Z={class:"body"},ee={class:"data"},te=B(()=>d("div",{class:"data-title"},"\u603B\u914D\u9001",-1)),ae={class:"data-value"},oe={class:"data"},se={class:"data-title"},le={class:"data-value"},re={class:"table"},de=T({setup(m){const{OpPlatform:g}=P(),r=Y({ways:[],records:[],stat:{total_success_order:0}}),i=R([]);(()=>{const e=_().subtract(7,"day").format("YYYY-MM-DD"),u=_().format("YYYY-MM-DD");i.value=[e,u]})();const E=()=>{const e=L(i.value);a.startday=e[0]||"",a.endday=e[1]||""},A=[{text:"\u4E00\u5468\u5185",value:()=>{const e=_();return[e.subtract(1,"week").toDate(),e.toDate()]}},{text:"\u4E24\u5468\u5185",value:()=>{const e=_();return[e.subtract(2,"week").toDate(),e.toDate()]}},{text:"\u4E00\u4E2A\u6708\u5185",value:()=>{const e=_();return[e.subtract(1,"month").toDate(),e.toDate()]}}],a=Y({days:"7",startday:"",endday:"",agentid:""}),w=()=>{E(),g.value==="agent"?z(a).then(e=>{console.log(e),r.ways=e.select_ways,r.records=e.records,r.stat=e.stat}):$(a).then(e=>{console.log(e),r.ways=e.select_ways,r.records=e.records,r.stat=e.stat})};return w(),U(()=>[a.agentid,a.days,i],()=>{w()},{deep:!0}),(e,u)=>{const p=n("el-radio"),S=n("el-radio-group"),M=n("el-date-picker"),x=n("el-form-item"),C=n("el-form"),F=n("el-card"),y=n("el-table-column"),I=n("el-table");return c(),f(h,null,[d("div",H,[t(C,{model:s(a),"label-width":"90px"},{default:o(()=>[t(x,{class:"tn-el-form-item",label:"\u7B5B\u9009\u65F6\u95F4"},{default:o(()=>[t(S,{modelValue:s(a).days,"onUpdate:modelValue":u[0]||(u[0]=l=>s(a).days=l)},{default:o(()=>[t(p,{border:!0,label:"0"},{default:o(()=>[J]),_:1}),t(p,{border:!0,label:"7"},{default:o(()=>[K]),_:1}),t(p,{border:!0,label:"30"},{default:o(()=>[Q]),_:1}),t(p,{border:!0,label:"-1"},{default:o(()=>[W]),_:1})]),_:1},8,["modelValue"]),s(a).days==="-1"?(c(),D(M,{key:0,modelValue:i.value,"onUpdate:modelValue":u[1]||(u[1]=l=>i.value=l),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",shortcuts:A,style:{"margin-left":"8px"}},null,8,["modelValue"])):V("",!0)]),_:1}),s(g)==="shangpu"?(c(),D(x,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406"},{default:o(()=>[t(s(G),{modelValue:s(a).agentid,"onUpdate:modelValue":u[2]||(u[2]=l=>s(a).agentid=l)},null,8,["modelValue"])]),_:1})):V("",!0)]),_:1},8,["model"])]),t(F,{class:"overview"},{header:o(()=>[X]),default:o(()=>[d("div",Z,[d("div",ee,[te,d("div",ae,b(s(r).stat.total_success_order),1)]),(c(!0),f(h,null,k(s(r).ways,(l,N)=>(c(),f("div",oe,[d("div",se,b(l.title),1),d("div",le,b(l.sum),1)]))),256))])]),_:1}),t(F,{class:"data-table"},{default:o(()=>[d("div",re,[t(I,{data:s(r).records,border:!0},{default:o(()=>[t(y,{label:"\u914D\u9001\u5458",fixed:"",prop:"title",width:"150px",align:"center"}),t(y,{label:"\u603B\u914D\u9001\u5355\u6570",fixed:"",prop:"total_success_order",align:"center",width:"auto"}),(c(!0),f(h,null,k(s(r).ways,(l,N)=>(c(),D(y,{label:l.title,fixed:"",prop:`total_success_order_way_${l.id}`,align:"center",width:"auto"},null,8,["label","prop"]))),256))]),_:1},8,["data"])])]),_:1})],64)}}});const ve=O(de,[["__scopeId","data-v-a63d9ffc"]]);export{ve as default};
