1 |
- import{d as M,y as k,e as q,P as z,r,x as A,b as P,k as B,a as t,o as C,C as H,A as l,f as a,a9 as K,V as O,H as R,K as W,W as Z,Z as E,_ as G,__tla as J}from"./index-f6fb8e95.js";import{_ as L,__tla as N}from"./UploadImg-76a51b31.js";import{S as _,__tla as Q}from"./index-fc3bfebe.js";import{u as T,__tla as X}from"./useMessage-3b767a67.js";import{__tla as Y}from"./index-b76b57e5.js";import{__tla as $}from"./el-image-viewer-cfdb08a7.js";let v,ee=Promise.all([(()=>{try{return J}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})()]).then(async()=>{v=G(M({name:"SystemUserForm",__name:"MerchantStoreFrom",props:{obj:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1}},emits:["success"],setup(p,{expose:g,emit:w}){const V=k();q(()=>V.getMobile);const{t:f}=z(),h=T(),S=r(!1);r("");const n=r(!1),U=r(""),e=r({name:"",id:void 0,status:1,merchantId:0,logoUrl:"",website:""}),x=A({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 U.value==="create"?(await _.createShop(o),h.success(f("common.createSuccess"))):(await _.updateShop(o),h.success(f("common.updateSuccess"))),S.value=!1,j("success"),!0}finally{n.value=!1}}}}),P(()=>{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=K,c=O,i=R,y=W,F=L,I=Z,D=E;return B((C(),H(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};
|