import{E as M,g as O,a as $,d as j,b as G}from"./EditDialog.a60a74fa.js";import{d as R,a6 as H,b as y,r as d,p as J,c as _,at as K,e as h,f as F,g as i,h as e,i as n,u as t,k as x,A as k,w as Q,q as W,F as X,m as b,y as D,N as Y,E as A,_ as Z}from"./index.0308b213.js";import{A as ee}from"./index.1d26a072.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.8a761348.js";import"./useInstance.233fbdde.js";import"./index.6dd89ec0.js";import"./index.vue_vue_type_script_setup_true_lang.b1ed6ce2.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const ae={class:"filter-form"},le=b("\u67E5\u8BE2"),oe={class:"data"},se={class:"operation-container"},ne={class:"operation-btn"},ie=b("\u6DFB\u52A0"),ue={class:"table"},de={class:"table-operation-btn"},re={class:"top"},ce=b("\u7F16\u8F91"),pe=b("\u5220\u9664"),_e={class:"bottom"},me={class:"pagination"},ge=R({setup(fe){const{OpPlatform:E}=H(),a=y({page:1,limit:10,agentid:"",sid:"",areaid:"",keywords:"",account_id:""}),m=d(!1);y({store:[]});const r=y({list:[],count:0});let B=d([]);const c=()=>{m.value=!0,E.value=="shangpu"?O(a).then(l=>{r.list=l.list,r.count=l.count,m.value=!1}):$(a).then(l=>{r.list=l.list,r.count=l.count,m.value=!1})};c(),d(!1),d(!1),J(()=>[a.page,a.limit],()=>{c()});const V=()=>{c()};let p=d(!1),g=d(!1),f=d(0);const w=()=>{f.value=0,g.value=!0,D(()=>{p.value=!0})},z=l=>{f.value=l,g.value=!0,D(()=>{p.value=!0})},N=()=>{f.value=0,D(()=>{g.value=!1}),c()},P=l=>{Y.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{E.value=="shangpu"?j({id:l}).then(()=>{A({message:"\u5220\u9664\u6210\u529F",type:"success"}),c()}):G({id:l}).then(()=>{A({message:"\u5220\u9664\u6210\u529F",type:"success"}),c()})}).catch(()=>{})},U=l=>{B.value=l.map(s=>s.id)};return(l,s)=>{const C=_("el-form-item"),v=_("el-button"),T=_("el-form"),u=_("el-table-column"),I=_("el-table"),L=_("el-pagination"),S=K("loading");return h(),F(X,null,[i("div",ae,[e(T,{model:t(a),"label-width":"90px"},{default:n(()=>[t(E)==="shangpu"?(h(),x(C,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:n(()=>[e(t(ee),{modelValue:t(a).agentid,"onUpdate:modelValue":s[0]||(s[0]=o=>t(a).agentid=o)},null,8,["modelValue"])]),_:1})):k("",!0),e(C,{label:"\u5546\u6237",prop:"sid",ref:"stores"},{default:n(()=>[e(te,{modelValue:t(a).sid,"onUpdate:modelValue":s[1]||(s[1]=o=>t(a).sid=o),agentid:t(a).agentid},null,8,["modelValue","agentid"])]),_:1},512),e(C,null,{default:n(()=>[e(v,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:V},{default:n(()=>[le]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",oe,[i("div",se,[i("div",ne,[e(v,{class:"btn",type:"primary",onClick:w},{default:n(()=>[ie]),_:1})])]),Q((h(),F("div",ue,[e(I,{data:t(r).list,onSelectionChange:U},{default:n(()=>[e(u,{align:"center",type:"selection"}),e(u,{label:"\u4EE3\u7406",prop:"agent_title"}),e(u,{label:"\u5546\u6237",prop:"store_title"}),e(u,{label:"\u9A91\u624B",prop:"deliveryer_title"}),e(u,{label:"\u53D6\u8D27\u65F6\u95F4\u95F4\u9694",prop:"take_goods_time"}),e(u,{label:"\u5B8C\u6210\u65F6\u95F4\u95F4\u9694",prop:"success_time"}),e(u,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:n(({row:o})=>[i("div",de,[i("div",re,[e(v,{size:"small",type:"primary",onClick:q=>z(o.id)},{default:n(()=>[ce]),_:2},1032,["onClick"]),e(v,{size:"small",type:"danger",onClick:q=>P(o.id)},{default:n(()=>[pe]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])),[[S,m.value]])]),i("div",_e,[i("div",me,[e(L,{currentPage:t(a).page,"onUpdate:currentPage":s[2]||(s[2]=o=>t(a).page=o),"page-size":t(a).limit,"onUpdate:page-size":s[3]||(s[3]=o=>t(a).limit=o),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:t(r).count},null,8,["currentPage","page-size","total"])])]),t(g)?(h(),x(M,{key:0,modelValue:t(p),"onUpdate:modelValue":s[4]||(s[4]=o=>W(p)?p.value=o:p=o),id:t(f),onOnClose:N},null,8,["modelValue","id"])):k("",!0)],64)}}});const Ae=Z(ge,[["__scopeId","data-v-584d51fa"]]);export{Ae as default};
