import{g as U}from"./account.fdb98bc4.js";import{d as N,b as F,r as w,p as L,c as _,e as f,f as v,g as i,h as t,i as l,u as o,F as x,j as P,k as A,m as s,t as p,q as R,A as S,H as j,n as q,a as y,aN as O,_ as H}from"./index.0308b213.js";import{u as I}from"./useAgent.c0cb1751.js";import{A as $}from"./index.1d26a072.js";import"./list.5526c7ef.js";import"./install.524ae6f2.js";const G={class:"filter-form"},J=s("\u5168\u90E8"),K=s("\u4E0D\u9650"),Q=s("\u6700\u8FD17\u5929"),W=s("\u6700\u8FD130\u5929"),X=s("\u8FD13\u6708"),Z=s("\u81EA\u5B9A\u4E49"),ee={class:"data"},te={class:"table"},ae={class:"bottom"},le={class:"pagination"},oe=N({setup(ue){const h=[{text:"\u4E00\u5468\u5185",value:()=>{const a=y();return[a.subtract(1,"week").toDate(),a.toDate()]}},{text:"\u4E24\u5468\u5185",value:()=>{const a=y();return[a.subtract(2,"week").toDate(),a.toDate()]}},{text:"\u4E00\u4E2A\u6708\u5185",value:()=>{const a=y();return[a.subtract(1,"month").toDate(),a.toDate()]}}],u=F({agentid:"",trade_type:"",days:-2,startday:"",endday:"",page:1,limit:10}),r=F({order_trade_type:[],agents:[],list:[],count:0});let c=w([]);const V=()=>{const a=O(c.value,"YYYY-MM-DD");u.startday=a[0]||"",u.endday=a[1]||""},b=()=>{u.days===-1&&(!c.value||c.value.length===0)||(V(),U(u).then(a=>{r.list=a.list,r.agents=a.agents,r.order_trade_type=a.order_trade_type,r.count=a.count}))};b(),L(()=>u,()=>{b()},{deep:!0});const{getAgentList:B,getAgentTitle:E}=I();B();const Y=a=>{if(r.order_trade_type.length>0){const n=r.order_trade_type.find(d=>d.type==a);if(n)return n.text}return"\u5176\u4ED6\u7C7B\u578B"};return(a,n)=>{const d=_("el-radio"),D=_("el-radio-group"),g=_("el-form-item"),k=_("el-date-picker"),C=_("el-form"),m=_("el-table-column"),z=_("el-table"),M=_("el-pagination");return f(),v(x,null,[i("div",G,[t(C,{model:o(u),"label-width":"90px"},{default:l(()=>[t(g,{class:"tn-el-form-item",label:"\u7C7B\u578B"},{default:l(()=>[t(D,{modelValue:o(u).trade_type,"onUpdate:modelValue":n[0]||(n[0]=e=>o(u).trade_type=e)},{default:l(()=>[t(d,{border:"",label:""},{default:l(()=>[J]),_:1}),(f(!0),v(x,null,P(o(r).order_trade_type,(e,T)=>(f(),A(d,{key:`agent_account_trade-type-${T}`,border:!0,label:e.type},{default:l(()=>[s(p(e.text),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(g,{class:"tn-el-form-item",label:"\u7533\u8BF7\u65F6\u95F4"},{default:l(()=>[t(D,{modelValue:o(u).days,"onUpdate:modelValue":n[1]||(n[1]=e=>o(u).days=e)},{default:l(()=>[t(d,{border:!0,label:-2},{default:l(()=>[K]),_:1}),t(d,{border:!0,label:7},{default:l(()=>[Q]),_:1}),t(d,{border:!0,label:30},{default:l(()=>[W]),_:1}),t(d,{border:!0,label:90},{default:l(()=>[X]),_:1}),t(d,{border:!0,label:-1},{default:l(()=>[Z]),_:1})]),_:1},8,["modelValue"]),o(u).days===-1?(f(),A(k,{key:0,modelValue:o(c),"onUpdate:modelValue":n[2]||(n[2]=e=>R(c)?c.value=e:c=e),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",style:{"margin-left":"8px"},shortcuts:h},null,8,["modelValue"])):S("",!0)]),_:1}),t(g,{class:"tn-el-form-item tn-el-form-item--inline",label:"\u5176\u4ED6"},{default:l(()=>[t(o($),{modelValue:o(u).agentid,"onUpdate:modelValue":n[3]||(n[3]=e=>o(u).agentid=e)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),i("div",ee,[i("div",te,[t(z,{data:o(r).list},{default:l(()=>[t(m,{label:"\u65F6\u95F4",width:"200px"},{default:l(({row:e})=>[i("div",null,p(e.addtime),1)]),_:1}),t(m,{label:"\u6240\u5C5E\u533A\u57DF"},{default:l(({row:e})=>[s(p(o(E)(e.agentid)),1)]),_:1}),t(m,{label:"\u7C7B\u578B"},{default:l(({row:e})=>[i("div",{class:j(["tn-tag",{"tn-tag--green":e.trade_type==1,"tn-tag--red":e.trade_type==2,"tn-tag--blue":![1,2].includes(e.trade_type)}])},p(Y(e.trade_type)),3)]),_:1}),t(m,{label:"\u6536\u5165|\u652F\u51FA(\u5143)",width:"120px"},{default:l(({row:e})=>[i("text",{style:q({color:`${e.fee.indexOf("-")?"":"#FF4A4A"}`})},p(e.fee)+"\u5143 ",5)]),_:1}),t(m,{label:"\u8D26\u6237\u4F59\u989D",width:"120px"},{default:l(({row:e})=>[s(p(e.amount)+"\u5143 ",1)]),_:1})]),_:1},8,["data"])])]),i("div",ae,[i("div",le,[t(M,{currentPage:o(u).page,"onUpdate:currentPage":n[4]||(n[4]=e=>o(u).page=e),"page-size":o(u).limit,"onUpdate:page-size":n[5]||(n[5]=e=>o(u).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:o(r).count},null,8,["currentPage","page-size","total"])])])],64)}}});const ce=H(oe,[["__scopeId","data-v-ebe9fdfc"]]);export{ce as default};
