1 |
- import{d as M,Z as q,L as z,i as B,r,f as J,l as k,y as E,a as t,o as G,x as L,w as l,g as a,W as O,B as P,E as R,j as W,G as Z,J as A,_ as C,__tla as H}from"./index-3fb48822.js";import{_ as K,__tla as N}from"./UploadImg-5bedc878.js";import{S as _,__tla as Q}from"./index-9433e8d9.js";import{u as T,__tla as X}from"./useMessage-b6c78c26.js";import{__tla as Y}from"./index-3dfce5d7.js";import{__tla as $}from"./el-image-viewer-ff953702.js";let v,ee=Promise.all([(()=>{try{return H}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})()]).then(async()=>{v=C(M({name:"SystemUserForm",__name:"MerchantStoreFrom",props:{obj:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1}},emits:["success"],setup(p,{expose:g,emit:w}){const S=q();z(()=>S.getMobile);const{t:f}=B(),h=T(),U=r(!1);r("");const n=r(!1),V=r(""),e=r({name:"",id:void 0,status:1,merchantId:0,logoUrl:"",website:""}),x=J({name:[{required:!0,message:"\u5E97\u94FA\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],logoUrl:[{required:!0,message:"\u5E97\u94FA\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),d=p;r("create"),r(0);const m=r(),j=w;return g({submitForm:async()=>{if(m&&await m.value.validate()){n.value=!0;try{const o=e.value;return V.value==="create"?(await _.createShop(o),h.success(f("common.createSuccess"))):(await _.updateShop(o),h.success(f("common.updateSuccess"))),U.value=!1,j("success"),!0}finally{n.value=!1}}}}),k(()=>{var o;e.value.merchantId=d.obj.merchantId,e.value.id=d.obj.id,e.value={name:"",id:void 0,status:1,merchantId:0,logoUrl:""},(o=m.value)==null||o.resetFields(),(async()=>_.getShop(d.obj.id).then(s=>{e.value=s}))()}),(o,s)=>{const b=O,c=P,i=R,y=W,F=K,I=Z,D=A;return E((G(),L(I,{ref_key:"formRef",ref:m,model:t(e),rules:t(x),"label-width":"120px",style:{padding:"10px"},disabled:p.isDetail},{default:l(()=>[a(y,null,{default:l(()=>[a(i,{span:12},{default:l(()=>[a(c,{label:"\u5E97\u94FA\u540D",prop:"name"},{default:l(()=>[a(b,{modelValue:t(e).name,"onUpdate:modelValue":s[0]||(s[0]=u=>t(e).name=u),placeholder:"\u8BF7\u8F93\u5165\u5E97\u94FA\u540D"},null,8,["modelValue"])]),_:1})]),_:1}),a(i,{span:12},{default:l(()=>[a(c,{label:"\u5E97\u94FA\u57DF\u540D",prop:"website"},{default:l(()=>[a(b,{modelValue:t(e).website,"onUpdate:modelValue":s[1]||(s[1]=u=>t(e).website=u),placeholder:"\u8BF7\u8F93\u5165\u5E97\u94FA\u57DF\u540D"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(y,null,{default:l(()=>[a(i,{span:24},{default:l(()=>[a(c,{label:"\u9996\u9875\u56FE\u7247"},{default:l(()=>[a(F,{modelValue:t(e).logoUrl,"onUpdate:modelValue":s[2]||(s[2]=u=>t(e).logoUrl=u),limit:1,"is-show-tip":!1},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules","disabled"])),[[D,t(n)]])}}}),[["__scopeId","data-v-aaae34f1"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/sale/merchant/components/MerchantStoreFrom.vue"]])});export{ee as __tla,v as default};
|