import{G as F,H as R,D as V,v as w,F as B}from"./element-plus.4a7d92a3.js";import{P as k}from"./index.03fbab49.js";import{B as g}from"./index.7c768626.js";import{d as i,s as c,Z as N,o as P,c as U,U as o,L as t,u,R as _}from"./@vue.18505fe0.js";const z={class:"edit-popup"},G=i({name:"balance"}),T=i({...G,emits:["success","close"],setup(I,{expose:f,emit:E}){const p=c(),m=E,n=c(),a=N({id:"",type:"1",purchase_funds:""}),b=(s="add")=>{var e;(e=n.value)==null||e.open()},v=async()=>{var e,l;await((e=p.value)==null?void 0:e.validate());const s={...a};await g(s),(l=n.value)==null||l.close(),m("success")},y=async s=>{a.id=s.id},C=()=>{m("close")};return f({open:b,setFormData:y}),(s,e)=>{const l=F,D=R,d=V,h=w,x=B;return P(),U("div",z,[o(k,{title:"\u4FEE\u6539\u7528\u6237\u91C7\u8D2D\u6B3E",async:!0,width:"550px",onConfirm:v,onClose:C,ref_key:"popupRef",ref:n},{default:t(()=>[o(x,{ref_key:"formRef",ref:p,model:u(a),"label-width":"90px"},{default:t(()=>[o(d,{label:"\u4FEE\u6539\u91C7\u8D2D\u6B3E",prop:"username"},{default:t(()=>[o(D,{modelValue:u(a).type,"onUpdate:modelValue":e[0]||(e[0]=r=>u(a).type=r)},{default:t(()=>[o(l,{value:"1",size:"large",label:"1"},{default:t(()=>[_("\u589E\u52A0")]),_:1}),o(l,{value:"-1",size:"large",label:"-1"},{default:t(()=>[_("\u51CF\u5C11")]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u91D1\u989D"},{default:t(()=>[o(h,{modelValue:u(a).purchase_funds,"onUpdate:modelValue":e[1]||(e[1]=r=>u(a).purchase_funds=r),min:.01,max:99999},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},512)])}}});export{T as _};
