import{N as O,O as g,D as L,F as V}from"./element-plus.8e273e86.js";import{P as N}from"./index.8afed1db.js";import{n as P}from"./store_order.4be6651c.js";import"./lodash.41b9567d.js";import{a as T}from"./system_store.caf68332.js";import{d as y,s as f,r as c,b as U,Z as E,o as i,c as v,U as r,L as n,u as o,T as j,a9 as z,K as A}from"./@vue.76ce7aa3.js";const I={class:"edit-popup"},K=y({name:"storeOrderEdit"}),X=y({...K,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Z,{expose:h,emit:B}){const p=B,d=f(),u=f(),m=c("add"),S=U(()=>m.value="\u8BBE\u7F6E\u914D\u9001\u4EBA\u5458");c([]);const s=E({id:"",store_id:""}),b=E({});(()=>{T({page_size:50}).then(e=>{_.value=e.lists})})();const w=async()=>{var t,l;await((t=d.value)==null?void 0:t.validate());const e={...s};await P(e),(l=u.value)==null||l.close(),p("success")},x=async e=>{s.id=e.id},D=(e="add")=>{var t;m.value=e,(t=u.value)==null||t.open()},_=c([]),F=()=>{p("close")};return h({open:D,setFormData:x}),(e,t)=>{const l=O,k=g,R=L,C=V;return i(),v("div",I,[r(N,{ref_key:"popupRef",ref:u,title:o(S),async:!0,width:"550px",onConfirm:w,onClose:F},{default:n(()=>[r(C,{ref_key:"formRef",ref:d,model:o(s),"label-width":"90px",rules:o(b)},{default:n(()=>[r(R,{label:"\u8BBE\u7F6E\u95E8\u5E97"},{default:n(()=>[r(k,{modelValue:o(s).store_id,"onUpdate:modelValue":t[0]||(t[0]=a=>o(s).store_id=a),placeholder:"\u9009\u62E9\u95E8\u5E97",style:{width:"240px"}},{default:n(()=>[(i(!0),v(j,null,z(o(_),a=>(i(),A(l,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{X as _};
