import{az as N,d as Y,Q as j,r as u,x as z,o as c,A as _,B as t,f as r,a as e,E as v,k as f,c as B,F as G,R as K,G as Q,v as U,a2 as W,e1 as Z,as as H,at as J,V as M,bP as O,a8 as X,W as $,K as ee,Z as ae,__tla as le}from"./index-92ad187a.js";import{_ as oe,__tla as te}from"./Dialog-44c9fa34.js";import{a as re,D as se,__tla as de}from"./dict-221f3e01.js";import{u as ue,__tla as ie}from"./useMessage-d9788660.js";let k,w,pe=Promise.all([(()=>{try{return le}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ie}catch{}})()]).then(async()=>{w=function(y){return N.get({url:"/pay/demo-transfer/page",params:y})},k=Y({__name:"DemoTransferForm",emits:["success"],setup(y,{expose:F,emit:I}){const{t:V}=j(),L=ue(),d=u(!1),b=u(""),p=u(!1),g=u(""),o=u({id:void 0,price:void 0,type:void 0,userName:void 0,alipayLogonId:void 0,openid:void 0}),A=z({price:[{required:!0,message:"\u8F6C\u8D26\u91D1\u989D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],type:[{required:!0,message:"\u8F6C\u8D26\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]}),n=u();F({open:async s=>{d.value=!0,b.value=V("action."+s),g.value=s,h()},close:async()=>{d.value=!1,h()}});const E=I,P=async()=>{if(n&&await n.value.validate()){p.value=!0;try{const s={...o.value};s.price=Z(s.price),g.value==="create"&&(await function(l){return N.post({url:"/pay/demo-transfer/create",data:l})}(s),L.success(V("common.createSuccess"))),d.value=!1,E("success")}finally{p.value=!1}}},h=()=>{var s;o.value={id:void 0,price:void 0,userName:void 0,alipayLogonId:void 0,openid:void 0},(s=n.value)==null||s.resetFields()};return(s,l)=>{const R=H,D=J,i=M,T=O,m=X,q=$,x=ee,C=oe,S=ae;return c(),_(C,{title:e(b),modelValue:e(d),"onUpdate:modelValue":l[6]||(l[6]=a=>W(d)?d.value=a:null),width:"800px"},{footer:t(()=>[r(x,{onClick:P,type:"primary",disabled:e(p)},{default:t(()=>[v("\u786E \u5B9A")]),_:1},8,["disabled"]),r(x,{onClick:l[5]||(l[5]=a=>d.value=!1)},{default:t(()=>[v("\u53D6 \u6D88")]),_:1})]),default:t(()=>[f((c(),_(q,{ref_key:"formRef",ref:n,model:e(o),rules:e(A),"label-width":"120px"},{default:t(()=>[r(i,{label:"\u8F6C\u8D26\u7C7B\u578B",prop:"type"},{default:t(()=>[r(D,{modelValue:e(o).type,"onUpdate:modelValue":l[0]||(l[0]=a=>e(o).type=a)},{default:t(()=>[(c(!0),B(G,null,K(e(re)(e(se).PAY_TRANSFER_TYPE),a=>(c(),_(R,{key:a.value,label:a.value,disabled:a.value===2||a.value===3||a.value===4},{default:t(()=>[v(Q(a.label),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(i,{label:"\u8F6C\u8D26\u91D1\u989D(\u5143)",prop:"price"},{default:t(()=>[r(T,{modelValue:e(o).price,"onUpdate:modelValue":l[1]||(l[1]=a=>e(o).price=a),min:0,precision:2,step:.01,placeholder:"\u8BF7\u8F93\u5165\u8F6C\u8D26\u91D1\u989D",style:{width:"200px"}},null,8,["modelValue"])]),_:1}),r(i,{label:"\u6536\u6B3E\u4EBA\u59D3\u540D",prop:"userName"},{default:t(()=>[r(m,{modelValue:e(o).userName,"onUpdate:modelValue":l[2]||(l[2]=a=>e(o).userName=a),placeholder:"\u8BF7\u8F93\u5165\u6536\u6B3E\u4EBA\u59D3\u540D"},null,8,["modelValue"])]),_:1}),f(r(i,{label:"\u652F\u4ED8\u5B9D\u767B\u5F55\u8D26\u53F7",prop:"alipayLogonId"},{default:t(()=>[r(m,{modelValue:e(o).alipayLogonId,"onUpdate:modelValue":l[3]||(l[3]=a=>e(o).alipayLogonId=a),placeholder:"\u8BF7\u8F93\u5165\u652F\u4ED8\u5B9D\u767B\u5F55\u8D26\u53F7"},null,8,["modelValue"])]),_:1},512),[[U,e(o).type===1]]),f(r(i,{label:"\u5FAE\u4FE1 openid",prop:"openid"},{default:t(()=>[r(m,{modelValue:e(o).openid,"onUpdate:modelValue":l[4]||(l[4]=a=>e(o).openid=a),placeholder:"\u8BF7\u8F93\u5165\u5FAE\u4FE1 openid"},null,8,["modelValue"])]),_:1},512),[[U,e(o).type===2]])]),_:1},8,["model","rules"])),[[S,e(p)]])]),_:1},8,["title","modelValue"])}}})});export{k as _,pe as __tla,w as g};
