1 |
- import{aq as I,d as z,h as E,r as d,e as Y,o as m,v as _,w as t,f as r,a as e,n as f,x as v,c as H,F as M,q as X,t as B,a4 as U,O as G,e0 as J,ah as K,ai as Q,A as W,bb as Z,V as $,D as ee,C as ae,I as le,_ as oe,__tla as te}from"./index-11e4820e.js";import{_ as re,__tla as se}from"./Dialog-bbfaf85c.js";import{a as ue,D as de,__tla as ie}from"./dict-4072dcec.js";import{u as pe,__tla as ne}from"./useMessage-06ddf735.js";let y,q,L,me=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return ie}catch{}})(),(()=>{try{return ne}catch{}})()]).then(async()=>{L=function(b){return I.get({url:"/pay/demo-transfer/page",params:b})},y=oe(z({__name:"DemoTransferForm",emits:["success"],setup(b,{expose:N,emit:R}){const{t:V}=E(),T=pe(),u=d(!1),g=d(""),p=d(!1),h=d(""),o=d({id:void 0,price:void 0,type:void 0,userName:void 0,alipayLogonId:void 0,openid:void 0}),k=Y({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=d();N({open:async s=>{u.value=!0,g.value=V("action."+s),h.value=s,w()},close:async()=>{u.value=!1,w()}});const D=R,F=async()=>{if(n&&await n.value.validate()){p.value=!0;try{const s={...o.value};s.price=J(s.price),h.value==="create"&&(await function(l){return I.post({url:"/pay/demo-transfer/create",data:l})}(s),T.success(V("common.createSuccess"))),u.value=!1,D("success")}finally{p.value=!1}}},w=()=>{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 P=K,S=Q,i=W,A=Z,c=$,C=ee,x=ae,O=re,j=le;return m(),_(O,{title:e(g),modelValue:e(u),"onUpdate:modelValue":l[6]||(l[6]=a=>G(u)?u.value=a:null),width:"800px"},{footer:t(()=>[r(x,{onClick:F,type:"primary",disabled:e(p)},{default:t(()=>[f("\u786E \u5B9A")]),_:1},8,["disabled"]),r(x,{onClick:l[5]||(l[5]=a=>u.value=!1)},{default:t(()=>[f("\u53D6 \u6D88")]),_:1})]),default:t(()=>[v((m(),_(C,{ref_key:"formRef",ref:n,model:e(o),rules:e(k),"label-width":"120px"},{default:t(()=>[r(i,{label:"\u8F6C\u8D26\u7C7B\u578B",prop:"type"},{default:t(()=>[r(S,{modelValue:e(o).type,"onUpdate:modelValue":l[0]||(l[0]=a=>e(o).type=a)},{default:t(()=>[(m(!0),H(M,null,X(e(ue)(e(de).PAY_TRANSFER_TYPE),a=>(m(),_(P,{key:a.value,label:a.value,disabled:a.value===2||a.value===3||a.value===4},{default:t(()=>[f(B(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(A,{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(c,{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}),v(r(i,{label:"\u652F\u4ED8\u5B9D\u767B\u5F55\u8D26\u53F7",prop:"alipayLogonId"},{default:t(()=>[r(c,{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]]),v(r(i,{label:"\u5FAE\u4FE1 openid",prop:"openid"},{default:t(()=>[r(c,{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"])),[[j,e(p)]])]),_:1},8,["title","modelValue"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/pay/demo/transfer/DemoTransferForm.vue"]]),q=Object.freeze(Object.defineProperty({__proto__:null,default:y},Symbol.toStringTag,{value:"Module"}))});export{y as D,me as __tla,q as a,L as g};
|