1 |
- import{d as F,y as I,e as q,P as D,r as o,x as M,b as P,k as z,a as t,o as A,C as B,A as l,f as a,a9 as C,V as H,H as K,K as O,W as R,Z as W,_ as Z,__tla as E}from"./index-0b2503c4.js";import{S as _,__tla as G}from"./index-3e1d3cd8.js";import{u as J,__tla as L}from"./useMessage-d05433ee.js";let y,Q=Promise.all([(()=>{try{return E}catch{}})(),(()=>{try{return G}catch{}})(),(()=>{try{return L}catch{}})()]).then(async()=>{y=Z(F({name:"SystemUserForm",__name:"MerchantStorePaymentFrom",props:{obj:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1}},emits:["success"],setup(b,{expose:g,emit:N}){const V=I();q(()=>V.getMobile);const{t:f}=D(),v=J(),S=o(!1);o("");const c=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}),x=M({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,n=o(),w=N;return g({submitForm:async()=>{if(n&&await n.value.validate()){c.value=!0;try{const u=e.value;return k.value==="create"?(await _.createShop(u),v.success(f("common.createSuccess"))):(await _.updateShop(u),v.success(f("common.updateSuccess"))),S.value=!1,w("success"),!0}finally{c.value=!1}}}}),P(()=>{var u;e.value.merchantId=m.obj.merchantId,e.value.id=m.obj.id,e.value={name:"",id:void 0,status:1,merchantId:0,logoUrl:""},(u=n.value)==null||u.resetFields(),(async()=>_.getShop(m.obj.id).then(s=>{e.value=s}))()}),(u,s)=>{const d=C,i=H,p=K,h=O,U=R,j=W;return z((A(),B(U,{ref_key:"formRef",ref:n,model:t(e),rules:t(x),"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(d,{modelValue:t(e).bankName,"onUpdate:modelValue":s[0]||(s[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(d,{modelValue:t(e).accountName,"onUpdate:modelValue":s[1]||(s[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(d,{modelValue:t(e).accountNumber,"onUpdate:modelValue":s[2]||(s[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"])),[[j,t(c)]])}}}),[["__scopeId","data-v-9eede85a"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/sale/merchant/components/MerchantStorePaymentFrom.vue"]])});export{Q as __tla,y as default};
|