import{az as i,d as M,s as R,r as F,b as _,p as j,o as z,c as s,e as m,k as v,i as o,h as a,u,f as h,j as B,F as x,a2 as O,m as C,E as A}from"./index.0308b213.js";const W=l=>i.request({url:"addon/multiPlatformDelivery.web.index/list",params:l}),X=l=>i.request({url:"addon/multiPlatformDelivery.web.index/delete",params:l}),T=l=>i.request({url:"addon/multiPlatformDelivery.web.index/add",params:l}),G=l=>i.request({url:"addon/multiPlatformDelivery.web.index/edit",params:l}),H=l=>i.request({url:"addon/multiPlatformDelivery.web.index/otherPlatformDeliveryUserList",params:l}),I=l=>i.request({url:"addon/multiPlatformDelivery.web.index/detail",params:l}),J=l=>i.request({url:"addon/multiPlatformDelivery.web.index/currentPlatformDeliveryUserList",params:l}),K=C("\u63D0\u4EA4"),Q=C("\u53D6\u6D88"),Y=M({props:{modelValue:{type:Boolean,default:!1},id:null},emits:["update:modelValue","onClose"],setup(l,{emit:y}){const n=l;let w=R(()=>Number(n.id)>0);const p=F(!1),b=F(),r=_({id:"",deliveryer_id:"",mapping_deliveryer_id:""}),U=()=>{r.id>0?G(r).then(e=>{A({message:"\u7F16\u8F91\u6210\u529F",type:"success"}),c()}):T(r).then(e=>{A({message:"\u65B0\u589E\u6210\u529F",type:"success"}),c()})};j(()=>n.modelValue,e=>{p.value=e,e&&n.id&&(r.id=n.id,k())});const k=()=>{I({id:n.id}).then(e=>{e=e.data,r.deliveryer_id=e.deliveryer_id,r.mapping_deliveryer_id=e.mapping_deliveryer_id})},c=()=>{var e;y("update:modelValue",!1),y("onClose"),(e=b.value)==null||e.resetFields()},D=_({list:[]}),g=_({list:[]}),q=()=>{J({}).then(e=>{g.list=e})},L=()=>{H({}).then(e=>{D.list=e})};return z(()=>{q(),L()}),(e,d)=>{const E=s("el-option"),P=s("el-select"),f=s("el-form-item"),V=s("el-button"),N=s("el-dialog");return m(),v(N,{modelValue:p.value,"onUpdate:modelValue":d[2]||(d[2]=t=>p.value=t),title:u(w)?"\u67E5\u770B":"\u65B0\u589E",width:"70%","destroy-on-close":"",onClose:c},{default:o(()=>[a(u(O),{ref_key:"formRef",ref:b,model:u(r),"inline-message":!0,"label-width":"160px"},{default:o(()=>[a(f,{label:"\u5E73\u53F0\u9A91\u624B"},{default:o(()=>[a(P,{modelValue:u(r).deliveryer_id,"onUpdate:modelValue":d[0]||(d[0]=t=>u(r).deliveryer_id=t),placeholder:"\u8BF7\u9009\u62E9\u5E73\u53F0\u9A91\u624B",clearable:"",filterable:""},{default:o(()=>[(m(!0),h(x,null,B(u(g).list,t=>(m(),v(E,{key:t.id,label:t.title,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(f,{label:"\u6620\u5C04\u5E73\u53F0\u9A91\u624B"},{default:o(()=>[a(P,{modelValue:u(r).mapping_deliveryer_id,"onUpdate:modelValue":d[1]||(d[1]=t=>u(r).mapping_deliveryer_id=t),placeholder:"\u8BF7\u9009\u62E9\u6620\u5C04\u5E73\u53F0\u9A91\u624B",clearable:"",filterable:""},{default:o(()=>[(m(!0),h(x,null,B(u(D).list,t=>(m(),v(E,{key:t.id,label:t.title,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(f,null,{default:o(()=>[a(V,{type:"primary",onClick:U},{default:o(()=>[K]),_:1}),a(V,{onClick:c},{default:o(()=>[Q]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])}}});export{Y as _,X as d,W as g};
