import{C as V,D as h,F as x}from"./element-plus.4a7d92a3.js";import{P as B}from"./index.66d65d7d.js";import{a as R,b as k,c as U}from"./system_store_storage.71e154c0.js";import"./lodash.9dc701ad.js";import{d as y,s as _,r as I,b as P,Z as f,o as j,c as q,U as a,L as l,u as s}from"./@vue.18505fe0.js";const A={class:"edit-popup"},L=y({name:"systemStoreStorageEdit"}),H=y({...L,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(N,{expose:E,emit:F}){const d=F,p=_(),r=_(),n=I("add"),C=P(()=>n.value=="edit"?"\u7F16\u8F91\u95E8\u5E97\u5165\u5E93\u64CD\u4F5C":"\u65B0\u589E\u95E8\u5E97\u5165\u5E93\u64CD\u4F5C"),o=f({id:"",system_store_name:"",product_id:"",nums:""}),S=f({nums:[{required:!0,message:"\u8BF7\u8F93\u5165\u6570\u91CF",trigger:"blur"}]}),i=async t=>{for(const e in o)t[e]!=null&&t[e]!=null&&(o[e]=t[e])},b=async t=>{const e=await R({id:t.id});i(e)},v=async()=>{var e,u;await((e=p.value)==null?void 0:e.validate());const t={...o};n.value=="edit"?await k(t):await U(t),(u=r.value)==null||u.close(),d("success")},g=(t="add")=>{var e;n.value=t,(e=r.value)==null||e.open()},w=()=>{d("close")};return E({open:g,setFormData:i,getDetail:b}),(t,e)=>{const u=V,c=h,D=x;return j(),q("div",A,[a(B,{ref_key:"popupRef",ref:r,title:s(C),async:!0,width:"550px",onConfirm:v,onClose:w},{default:l(()=>[a(D,{ref_key:"formRef",ref:p,model:s(o),"label-width":"90px",rules:s(S)},{default:l(()=>[a(c,{label:"\u95E8\u5E97",prop:"system_store_name"},{default:l(()=>[a(u,{modelValue:s(o).system_store_name,"onUpdate:modelValue":e[0]||(e[0]=m=>s(o).system_store_name=m),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97",readonly:!0},null,8,["modelValue"])]),_:1}),a(c,{label:"\u6570\u91CF",prop:"nums"},{default:l(()=>[a(u,{modelValue:s(o).nums,"onUpdate:modelValue":e[1]||(e[1]=m=>s(o).nums=m),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF",readonly:!1},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{H as _};
