import{J as g,K as O,D as V,F as L}from"./element-plus.a63a26dd.js";import{P as A}from"./index.da3823b2.js";import{l as K}from"./store_order.6bb18cc8.js";import"./lodash.2473fc51.js";import{e as P}from"./delivery_service.311514dd.js";import{d as D,s as _,r as f,b as T,Z as v,o as i,c as y,U as r,L as n,u as o,T as U,a9 as j,K as z}from"./@vue.18505fe0.js";const I={class:"edit-popup"},J=D({name:"storeOrderEdit"}),X=D({...J,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(N,{expose:E,emit:h}){const c=h,d=_(),u=_(),p=f("add"),B=T(()=>p.value="\u8BBE\u7F6E\u914D\u9001\u4EBA\u5458"),m=f([]),s=v({id:"",delivery_uid:""}),b=v({});(()=>{P({}).then(e=>{m.value=e.lists})})();const w=async()=>{var t,a;await((t=d.value)==null?void 0:t.validate());const e={...s};await K(e),(a=u.value)==null||a.close(),c("success")},x=async e=>{s.id=e.id},F=(e="add")=>{var t;p.value=e,(t=u.value)==null||t.open()},k=()=>{c("close")};return E({open:F,setFormData:x}),(e,t)=>{const a=g,R=O,C=V,S=L;return i(),y("div",I,[r(A,{ref_key:"popupRef",ref:u,title:o(B),async:!0,width:"550px",onConfirm:w,onClose:k},{default:n(()=>[r(S,{ref_key:"formRef",ref:d,model:o(s),"label-width":"90px",rules:o(b)},{default:n(()=>[r(C,{label:"\u914D\u9001\u5458"},{default:n(()=>[r(R,{modelValue:o(s).delivery_uid,"onUpdate:modelValue":t[0]||(t[0]=l=>o(s).delivery_uid=l),placeholder:"\u8BF7\u9009\u62E9\u914D\u9001\u4EBA\u5458",size:"large",style:{width:"240px"}},{default:n(()=>[(i(!0),y(U,null,j(o(m),l=>(i(),z(a,{label:l.nickname,value:l.id},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{X as _};
