1 |
- import{d as I,y as F,e as q,H as M,r as o,x as B,b as D,k as P,a as t,o as A,A as H,B as l,f as a,a8 as J,S as O,J as R,M as X,U as z,X as C,__tla as E}from"./index-bdf2351c.js";import{S as _,__tla as G}from"./index-6628f6af.js";import{u as K,__tla as L}from"./useMessage-26e942fe.js";import{_ as Q}from"./_plugin-vue_export-helper-1b428a4d.js";let g,T=Promise.all([(()=>{try{return E}catch{}})(),(()=>{try{return G}catch{}})(),(()=>{try{return L}catch{}})()]).then(async()=>{g=Q(I({name:"SystemUserForm",__name:"MerchantStorePaymentFrom",props:{obj:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1}},emits:["success"],setup(b,{expose:y,emit:N}){const S=F();q(()=>S.getMobile);const{t:f}=M(),v=K(),V=o(!1);o("");const d=o(!1),k=o(""),e=o({name:"",id:void 0,status:1,merchantId:0,logoUrl:"",website:"",accountName:void 0,accountNumber:void 0,bankName:void 0}),U=B({accountName:[{required:!0,message:"\u8D26\u6237\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],accountNumber:[{required:!0,message:"\u8D26\u6237\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],bankName:[{required:!0,message:"\u5F00\u6237\u94F6\u884C\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),m=b,c=o(),x=N;return y({submitForm:async()=>{if(c&&await c.value.validate()){d.value=!0;try{const s=e.value;return k.value==="create"?(await _.createShop(s),v.success(f("common.createSuccess"))):(await _.updateShop(s),v.success(f("common.updateSuccess"))),V.value=!1,x("success"),!0}finally{d.value=!1}}}}),D(()=>{var s;e.value.merchantId=m.obj.merchantId,e.value.id=m.obj.id,e.value={name:"",id:void 0,status:1,merchantId:0,logoUrl:""},(s=c.value)==null||s.resetFields(),(async()=>_.getShop(m.obj.id).then(u=>{e.value=u}))()}),(s,u)=>{const n=J,i=O,p=R,h=X,j=z,w=C;return P((A(),H(j,{ref_key:"formRef",ref:c,model:t(e),rules:t(U),"label-width":"120px",style:{padding:"10px"},disabled:b.isDetail},{default:l(()=>[a(h,null,{default:l(()=>[a(p,{span:12},{default:l(()=>[a(i,{label:"\u5F00\u6237\u94F6\u884C",prop:"bankName"},{default:l(()=>[a(n,{modelValue:t(e).bankName,"onUpdate:modelValue":u[0]||(u[0]=r=>t(e).bankName=r),placeholder:"\u8BF7\u8F93\u5165\u5F00\u6237\u94F6\u884C"},null,8,["modelValue"])]),_:1})]),_:1}),a(p,{span:12},{default:l(()=>[a(i,{label:"\u8D26\u6237\u540D\u79F0",prop:"accountName"},{default:l(()=>[a(n,{modelValue:t(e).accountName,"onUpdate:modelValue":u[1]||(u[1]=r=>t(e).accountName=r),placeholder:"\u8BF7\u8F93\u5165\u8D26\u6237\u540D\u79F0",maxlength:"11"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(h,null,{default:l(()=>[a(p,{span:24},{default:l(()=>[a(i,{label:"\u8D26\u6237\u53F7\u7801",prop:"accountNumber"},{default:l(()=>[a(n,{modelValue:t(e).accountNumber,"onUpdate:modelValue":u[2]||(u[2]=r=>t(e).accountNumber=r),placeholder:"\u8BF7\u8F93\u5165\u8D26\u6237\u53F7\u7801",onkeyup:"value=value.replace(/[^\\d]/g,'')"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules","disabled"])),[[w,t(d)]])}}}),[["__scopeId","data-v-ab48053b"]])});export{T as __tla,g as default};
|