import{D as h,d as L,b7 as N,r as i,b as w,c as a,e as T,f as O,h as e,i as l,g as s,u as R,t as f,F as U,m as _,E as b,R as q,S as M,_ as j}from"./index.0308b213.js";import{P as z}from"./page.3b4d44cb.js";const G=o=>h({url:"merchant/shop.index/deliveryer",params:o}),H=o=>h({url:"merchant/shop.index/addStoreDeliveryer",data:o,method:"POST"}),J=o=>h({url:"merchant/shop.index/delStoreDeliveryer",data:o,method:"POST"}),C=o=>(q("data-v-b2f8b3d5"),o=o(),M(),o),K={class:"container"},Q=_("\u6DFB\u52A0\u914D\u9001\u5458"),W=_("\u5220\u9664"),X=_("\u5220\u9664"),Y=C(()=>s("span",null,'\u6DFB\u52A0\u5E73\u53F0\u914D\u9001\u5458\u4E4B\u524D, \u4F60\u9700\u8981\u65B0\u589E\u4E00\u4E2A\u914D\u9001\u5458\u8D26\u6237, \u7136\u540E\u901A\u8FC7\u641C\u7D22"\u624B\u673A\u53F7"\u628A\u4ED6\u6DFB\u52A0\u8FDB\u6765',-1)),Z={class:"dialog-content"},ee=C(()=>s("p",null,"\u914D\u9001\u5458\u624B\u673A\u53F7",-1)),le={class:"dialog-footer"},ue=_("\u53D6\u6D88"),te=_("\u6DFB\u52A0"),ne=L({setup(o){N();const v=i(!1),g=i(!1),m=i(!1),r=i(!1),y=w({list:[]}),D=i(""),p=i([]);w({page:1});const x=n=>{console.log("\u9009\u4E2D",n),p.value=n.map(t=>t.id),console.log("\u9009\u4E2D\u7684id",p.value)},F=()=>{v.value=!0,G({page:1}).then(n=>{console.log("\u8BF7\u6C42\u7ED3\u679C\uFF1A",n),y.list=n.list}).finally(()=>{v.value=!1})};F();const S=()=>{m.value=!0,H({mobile:D.value}).then(n=>{r.value=!1,F(),b.success("\u6DFB\u52A0\u6210\u529F")}).finally(()=>{m.value=!1})},B=n=>{if(!n){if(p.value.length==0){b.warning("\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u5E97\u5458");return}n=p.value}g.value=!0,J(n).then(t=>{b.success("\u5220\u9664\u6210\u529F"),F()}).finally(()=>{g.value=!1})};return(n,t)=>{const c=a("el-button"),A=a("el-col"),E=a("el-row"),d=a("el-table-column"),k=a("el-image"),V=a("el-table"),I=a("el-alert"),P=a("el-input"),$=a("el-dialog");return T(),O(U,null,[e(z,{showBorder:!1,loading:v.value},{main:l(()=>[s("div",K,[e(E,null,{default:l(()=>[e(A,null,{default:l(()=>[e(c,{type:"primary",onClick:t[0]||(t[0]=u=>r.value=!0)},{default:l(()=>[Q]),_:1})]),_:1})]),_:1}),e(E,null,{default:l(()=>[e(A,null,{default:l(()=>[e(V,{border:"",data:R(y).list,style:{width:"100%"},onSelectionChange:x},{default:l(()=>[e(d,{align:"center",type:"selection",width:"55"}),e(d,{align:"center",label:"\u5934\u50CF",width:"80"},{default:l(u=>[e(k,{style:{width:"48px",height:"48px"},src:u.row.deliveryer.avatar,fit:"contain"},null,8,["src"])]),_:1}),e(d,{align:"center",label:"\u5FAE\u4FE1\u6635\u79F0"},{default:l(u=>[s("span",null,f(u.row.deliveryer.nickname),1)]),_:1}),e(d,{align:"center",label:"\u9A91\u624B\u540D\u79F0"},{default:l(u=>[s("span",null,f(u.row.deliveryer.title),1)]),_:1}),e(d,{align:"center",label:"\u624B\u673A\u53F7"},{default:l(u=>[s("span",null,f(u.row.deliveryer.mobile),1)]),_:1}),e(d,{align:"center",label:"\u6DFB\u52A0\u65F6\u95F4"},{default:l(u=>[s("span",null,f(u.row.addtime),1)]),_:1}),e(d,{align:"center",label:"\u64CD\u4F5C"},{default:l(u=>[e(c,{onClick:oe=>B([u.row.id])},{default:l(()=>[W]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1}),e(c,{type:"danger",loading:g.value,onClick:t[1]||(t[1]=u=>B())},{default:l(()=>[X]),_:1},8,["loading"])])]),_:1},8,["loading"]),e($,{modelValue:r.value,"onUpdate:modelValue":t[5]||(t[5]=u=>r.value=u),title:"\u6DFB\u52A0\u95E8\u5E97\u914D\u9001\u5458",draggable:""},{footer:l(()=>[s("span",le,[e(c,{onClick:t[3]||(t[3]=u=>r.value=!1)},{default:l(()=>[ue]),_:1}),e(c,{loading:m.value,type:"primary",onClick:t[4]||(t[4]=u=>S())},{default:l(()=>[te]),_:1},8,["loading"])])]),default:l(()=>[e(I,{closable:!1,"show-icon":""},{default:l(()=>[Y]),_:1}),s("div",Z,[ee,e(P,{modelValue:D.value,"onUpdate:modelValue":t[2]||(t[2]=u=>D.value=u),placeholder:"\u8BF7\u8F93\u5165\u914D\u9001\u5458\u624B\u673A\u53F7"},null,8,["modelValue"])])]),_:1},8,["modelValue"])],64)}}});const de=j(ne,[["__scopeId","data-v-b2f8b3d5"]]);export{de as default};
