import{az as R,d as j,b as C,r as b,p as I,c as s,e as f,f as k,g as _,h as e,i as t,u as l,F as V,j as L,k as h,m as n,t as S,q as T,A as $,a as F,y as x,_ as G}from"./index.0308b213.js";import{O as H}from"./index.c1819203.js";import"./useInstance.233fbdde.js";import"./setting.644fa418.js";const J=E=>R.request({url:"addon/spread.web.order/list",params:E}),K={class:"filter-form"},Q=n("\u5916\u5356"),W=n("\u5E97\u5185"),X=n("\u8DD1\u817F"),Z=n("\u751F\u6D3B\u5708"),ee=n("\u7535\u5546"),te=n("\u5168\u90E8"),oe=n("\u4E00\u7EA7\u63A8\u5E7F"),le=n("\u4E8C\u7EA7\u63A8\u5E7F"),ae=n("\u7B5B\u9009"),ue={class:"data"},re={class:"table"},se={class:"table-operation-btn"},ne={class:"bottom"},de=n("\u8BE6\u60C5"),ie={class:"bottom"},_e={class:"pagination"},pe=j({setup(E){const u=C({order_type:"takeout",spread_type:0,spreadid:"",timeRange:[],page:1,limit:10}),w=[{text:"\u4E00\u5468\u5185",value:()=>{const r=F();return[r.subtract(1,"week").toDate(),r.toDate()]}},{text:"\u4E24\u5468\u5185",value:()=>{const r=F();return[r.subtract(2,"week").toDate(),r.toDate()]}},{text:"\u4E00\u4E2A\u6708\u5185",value:()=>{const r=F();return[r.subtract(1,"month").toDate(),r.toDate()]}}],p=C({list:[],members:[],count:0});b([]),b("");const g=()=>{J(u).then(r=>{p.list=r.list,p.count=r.count,p.members=r.members})};g();let m=b(!1),D=b(!1),v=b(0);const U=r=>{v.value=r,D.value=!0,x(()=>{m.value=!0})},Y=()=>{x(()=>{D.value=!1})};return I(()=>[u.page,u.limit],()=>{g()}),(r,a)=>{const d=s("el-radio"),B=s("el-radio-group"),c=s("el-form-item"),z=s("el-option"),O=s("el-select"),q=s("el-date-picker"),y=s("el-button"),M=s("el-form"),i=s("el-table-column"),N=s("el-table"),P=s("el-pagination");return f(),k(V,null,[_("div",K,[e(M,{model:l(u),"label-width":"120px"},{default:t(()=>[e(c,{class:"tn-el-form-item",label:"\u8BA2\u5355\u7C7B\u578B"},{default:t(()=>[e(B,{modelValue:l(u).order_type,"onUpdate:modelValue":a[0]||(a[0]=o=>l(u).order_type=o)},{default:t(()=>[e(d,{border:!0,label:"takeout"},{default:t(()=>[Q]),_:1}),e(d,{border:!0,label:"instore"},{default:t(()=>[W]),_:1}),e(d,{border:!0,label:"errander"},{default:t(()=>[X]),_:1}),e(d,{border:!0,label:"gohome"},{default:t(()=>[Z]),_:1}),e(d,{border:!0,label:"mall"},{default:t(()=>[ee]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,{class:"tn-el-form-item",label:"\u8BA2\u5355\u63A8\u5E7F\u7C7B\u578B"},{default:t(()=>[e(B,{modelValue:l(u).spread_type,"onUpdate:modelValue":a[1]||(a[1]=o=>l(u).spread_type=o)},{default:t(()=>[e(d,{border:!0,label:0},{default:t(()=>[te]),_:1}),e(d,{border:!0,label:1},{default:t(()=>[oe]),_:1}),e(d,{border:!0,label:2},{default:t(()=>[le]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,{class:"tn-el-form-item",label:"\u63A8\u5E7F\u5458"},{default:t(()=>[e(O,{modelValue:l(u).spreadid,"onUpdate:modelValue":a[2]||(a[2]=o=>l(u).spreadid=o),placeholder:"\u8BF7\u9009\u62E9\u63A8\u5E7F\u5458",clearable:""},{default:t(()=>[(f(!0),k(V,null,L(l(p).members,(o,A)=>(f(),h(z,{key:A,value:o.id,label:o.nickname},{default:t(()=>[n(S(o.nickname),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(c,{class:"tn-el-form-item",label:"\u65F6\u95F4"},{default:t(()=>[e(q,{class:"tn-el-form-item--item",modelValue:l(u).timeRange,"onUpdate:modelValue":a[3]||(a[3]=o=>l(u).timeRange=o),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:w},null,8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(y,{type:"primary",onClick:a[4]||(a[4]=o=>g())},{default:t(()=>[ae]),_:1})]),_:1})]),_:1},8,["model"])]),_("div",ue,[_("div",re,[e(N,{data:l(p).list,onSelectionChange:a[5]||(a[5]=()=>{})},{default:t(()=>[e(i,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type_cn"}),e(i,{label:"\u4E0B\u5355\u4EBAUID",prop:"uid"}),e(i,{label:"\u8BA2\u5355\u7F16\u53F7",prop:"ordersn"}),e(i,{label:"\u8BA2\u5355\u91D1\u989D",prop:"final_fee"}),e(i,{label:"\u4E00\u7EA7\u63A8\u5E7F\u4F63\u91D1",prop:"data['spread']['commission']['spread1']"}),e(i,{label:"\u4E8C\u7EA7\u63A8\u5E7F\u4F63\u91D1",prop:"data['spread']['commission']['spread2']"}),e(i,{label:"\u8BA2\u5355\u5B8C\u6210\u65F6\u95F4",prop:"endtime_cn"}),e(i,{label:"\u64CD\u4F5C"},{default:t(o=>[_("div",se,[_("div",ne,[e(y,{type:"primary",onClick:A=>U(o.row.id)},{default:t(()=>[de]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),_("div",ie,[_("div",_e,[e(P,{currentPage:l(u).page,"onUpdate:currentPage":a[6]||(a[6]=o=>l(u).page=o),"page-size":l(u).limit,"onUpdate:page-size":a[7]||(a[7]=o=>l(u).limit=o),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(p).count},null,8,["currentPage","page-size","total"])])]),l(D)?(f(),h(H,{key:0,modelValue:l(m),"onUpdate:modelValue":a[8]||(a[8]=o=>T(m)?m.value=o:m=o),id:l(v),onOnClose:Y},null,8,["modelValue","id"])):$("",!0)],64)}}});const ge=G(pe,[["__scopeId","data-v-6f4b7510"]]);export{ge as default};
