import{F as x}from"./element-plus.a63a26dd.js";import{P as R}from"./index.da3823b2.js";import{a as b,b as k,c as C}from"./user_bill.58df85fa.js";import"./lodash.2473fc51.js";import{d as m,s as r,r as E,b as F,Z as p,o as U,c as P,U as d,L as g,u as i}from"./@vue.18505fe0.js";const j={class:"edit-popup"},A=m({name:"userBillEdit"}),Z=m({...A,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(L,{expose:f,emit:_}){const c=_,n=r(),a=r(),l=E("add"),v=F(()=>l.value=="edit"?"\u7F16\u8F91\u7528\u6237\u8D26\u5355\u8868":"\u65B0\u589E\u7528\u6237\u8D26\u5355\u8868"),o=p({id:""}),h=p({}),u=async t=>{for(const e in o)t[e]!=null&&t[e]!=null&&(o[e]=t[e])},w=async t=>{const e=await b({id:t.id});u(e)},y=async()=>{var e,s;await((e=n.value)==null?void 0:e.validate());const t={...o};l.value=="edit"?await k(t):await C(t),(s=a.value)==null||s.close(),c("success")},B=(t="add")=>{var e;l.value=t,(e=a.value)==null||e.open()},D=()=>{c("close")};return f({open:B,setFormData:u,getDetail:w}),(t,e)=>{const s=x;return U(),P("div",j,[d(R,{ref_key:"popupRef",ref:a,title:i(v),async:!0,width:"550px",onConfirm:y,onClose:D},{default:g(()=>[d(s,{ref_key:"formRef",ref:n,model:i(o),"label-width":"90px",rules:i(h)},null,8,["model","rules"])]),_:1},8,["title"])])}}});export{Z as _};
