MerchantBaseInfo-c0b7fc15.js 8.9 KB

1
  1. import{d as J,X as K,J as R,h as X,r as f,e as H,k as Y,K as L,b9 as D,aO as G,v as Q,a,o as m,q as b,w as l,f as e,O as P,c as T,g as W,Y as Z,U as $,z as ee,E as le,x as ae,y as te,i as de,ba as se,A as oe,C as ue,H as re,__tla as ie}from"./index-2eab2d23.js";import{_ as ne,__tla as pe}from"./style.css_vue_type_style_index_0_src_true_lang-2706eaa9.js";import{_ as me,__tla as ce}from"./UploadImg-90fe71c2.js";import{g as _e,__tla as fe}from"./index-44a34f60.js";import{d as be}from"./tree-fd3a041e.js";import{u as ve,__tla as Ve}from"./useMessage-171aa63e.js";import{_ as ge}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ye}from"./index-d3f876ab.js";import{__tla as he}from"./el-image-viewer-5d14bc77.js";let q,Ue=Promise.all([(()=>{try{return ie}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return he}catch{}})()]).then(async()=>{let v,V,g;v={key:0},V=["innerHTML"],g={key:1},q=ge(J({__name:"MerchantBaseInfo",props:{id:{type:Number,default:0},isDetail:{type:Boolean,default:!1},openType:{type:String,default:"\u67E5\u770B"},propFormData:{type:Object,default:()=>{}}},emits:["update:activeName"],setup(n,{expose:k,emit:N}){const I=K(),y=R(()=>I.getMobile),S=ve();X();const M=f(!1),t=H({id:void 0,name:void 0,status:void 0,description:void 0,contact:void 0,address:void 0,contactNumber:void 0,website:void 0,createTime:void 0,complaintsHotline:void 0,customerServiceHotline:void 0,email:void 0,businessLicensePicture:void 0,expireTime:void 0,areaId:void 0}),O=H({name:[{required:!0,message:"\u5546\u6237\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],description:[{required:!0,message:"\u7B80\u4ECB\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],contact:[{required:!0,message:"\u8D1F\u8D23\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],contactNumber:[{required:!0,message:"\u8D1F\u8D23\u4EBA\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],areaId:[{required:!0,message:"\u6240\u5728\u5730\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],customerServiceHotline:[{required:!0,message:"\u5BA2\u670D\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],email:[{required:!0,message:"\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],businessLicensePicture:[{required:!0,message:"\u8425\u4E1A\u6267\u7167\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),c=f(),h=n,U=f([]);Y(async()=>{U.value=await _e()}),L(()=>h.propFormData,p=>{p&&D(t,p)},{immediate:!0});const B=N;k({validate:async()=>{var p;if(c)try{return await((p=a(c))==null?void 0:p.validate()),Object.assign(h.propFormData,t),!0}catch{return S.error("\u57FA\u672C\u4FE1\u606F\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),B("update:activeName","info"),!1}}});const F=G("updateInitialData");return L(t,p=>{try{D(F.value,t)}catch{}},{immediate:!0}),(p,d)=>{const i=$,o=ee,u=le,_=ae,j=te,r=de,z=se,x=oe,w=me,A=ne,C=ue,E=re;return Q((m(),b(C,{ref_key:"formRef",ref:c,model:a(t),class:Z([{view:n.isDetail,"mobile-card":a(y)},"overflow-auto"]),rules:a(O),"label-width":"120px",disabled:n.isDetail,style:{overflow:"hidden"}},{default:l(()=>[e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{label:"\u5546\u6237\u540D\u79F0",prop:"name"},{default:l(()=>[e(i,{modelValue:a(t).name,"onUpdate:modelValue":d[0]||(d[0]=s=>a(t).name=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1}),n.openType!="\u65B0\u589E"?(m(),b(u,{key:0,span:12},{default:l(()=>[e(o,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[e(j,{modelValue:a(t).status,"onUpdate:modelValue":d[1]||(d[1]=s=>a(t).status=s),placeholder:"\u8BF7\u9009\u62E9\u5546\u6237\u72B6\u6001",class:"w-1/1",clearable:""},{default:l(()=>[e(_,{label:"\u4F7F\u7528\u4E2D",value:10}),e(_,{label:"\u8FC7\u671F",value:20}),e(_,{label:"\u505C\u7528",value:30})]),_:1},8,["modelValue"])]),_:1})]),_:1})):P("",!0)]),_:1}),e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{label:"\u8D1F\u8D23\u4EBA",prop:"contact"},{default:l(()=>[e(i,{modelValue:a(t).contact,"onUpdate:modelValue":d[2]||(d[2]=s=>a(t).contact=s),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:12},{default:l(()=>[e(o,{label:"\u6240\u5728\u5730",prop:"areaId"},{default:l(()=>[e(z,{modelValue:a(t).areaId,"onUpdate:modelValue":d[3]||(d[3]=s=>a(t).areaId=s),options:a(U),props:a(be),class:"w-1/1",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",filterable:"","collapse-tags":""},null,8,["modelValue","options","props"])]),_:1})]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{label:"\u8D1F\u8D23\u4EBA\u624B\u673A\u53F7",prop:"contactNumber"},{default:l(()=>[e(i,{modelValue:a(t).contactNumber,"onUpdate:modelValue":d[4]||(d[4]=s=>a(t).contactNumber=s),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u624B\u673A\u53F7",maxlength:"11",onkeyup:"value=value.replace(/[^\\d]/g,'')"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:12},{default:l(()=>[e(o,{label:"\u90AE\u7BB1",prop:"email"},{default:l(()=>[e(i,{modelValue:a(t).email,"onUpdate:modelValue":d[5]||(d[5]=s=>a(t).email=s),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{label:"\u6807\u7B7E"},{default:l(()=>[e(i,{disabled:""})]),_:1})]),_:1}),e(u,{span:12},{default:l(()=>[e(o,{label:"\u529E\u516C\u5730\u5740",prop:"address"},{default:l(()=>[e(i,{modelValue:a(t).address,"onUpdate:modelValue":d[6]||(d[6]=s=>a(t).address=s),placeholder:"\u8BF7\u8F93\u5165\u529E\u516C\u5730\u5740"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:12,style:{display:"none"}},{default:l(()=>[e(o,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:l(()=>[e(x,{modelValue:a(t).expireTime,"onUpdate:modelValue":d[7]||(d[7]=s=>a(t).expireTime=s),type:"date","value-format":"x",placeholder:"\u9009\u62E9\u670D\u52A1\u5230\u671F\u65F6\u95F4"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{label:"\u7EF4\u6743\u7535\u8BDD",prop:"complaintsHotline"},{default:l(()=>[e(i,{modelValue:a(t).complaintsHotline,"onUpdate:modelValue":d[8]||(d[8]=s=>a(t).complaintsHotline=s),placeholder:"\u8BF7\u8F93\u5165\u7EF4\u6743\u7535\u8BDD",maxlength:"11",onkeyup:"value=value.replace(/[^\\d]/g,'')"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:12},{default:l(()=>[e(o,{label:"\u5BA2\u670D\u7535\u8BDD",prop:"customerServiceHotline"},{default:l(()=>[e(i,{modelValue:a(t).customerServiceHotline,"onUpdate:modelValue":d[9]||(d[9]=s=>a(t).customerServiceHotline=s),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u670D\u7535\u8BDD",maxlength:"11",onkeyup:"value=value.replace(/[^\\d]/g,'')"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{label:"\u5B98\u7F51",prop:"website"},{default:l(()=>[e(i,{modelValue:a(t).website,"onUpdate:modelValue":d[10]||(d[10]=s=>a(t).website=s),placeholder:"\u8BF7\u8F93\u5165\u5B98\u7F51"},null,8,["modelValue"])]),_:1})]),_:1}),n.isDetail?(m(),b(u,{key:0,span:12},{default:l(()=>[e(o,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"customerServiceHotline"},{default:l(()=>[e(x,{modelValue:a(t).createTime,"onUpdate:modelValue":d[11]||(d[11]=s=>a(t).createTime=s),type:"date","value-format":"x",disabled:""},null,8,["modelValue"])]),_:1})]),_:1})):P("",!0)]),_:1}),a(y)?(m(),T("div",v,[e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{style:{border:"none"},label:"\u8425\u4E1A\u6267\u7167",prop:"businessLicensePicture"})]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(u,{span:24},{default:l(()=>[e(o,{prop:"businessLicensePicture",class:"businessLicensePicture"},{default:l(()=>[e(w,{modelValue:a(t).businessLicensePicture,"onUpdate:modelValue":d[12]||(d[12]=s=>a(t).businessLicensePicture=s),limit:1,disabled:n.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(u,{span:12},{default:l(()=>[e(o,{style:{border:"none"},label:"\u7B80\u4ECB",prop:"description"})]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(o,{prop:"description",class:"description"},{default:l(()=>[W("div",{innerHTML:a(t).description},null,8,V)]),_:1})]),_:1})])):(m(),T("div",g,[e(r,null,{default:l(()=>[e(u,{span:24},{default:l(()=>[e(o,{label:"\u8425\u4E1A\u6267\u7167",prop:"businessLicensePicture"},{default:l(()=>[e(w,{modelValue:a(t).businessLicensePicture,"onUpdate:modelValue":d[13]||(d[13]=s=>a(t).businessLicensePicture=s),limit:1,disabled:n.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(u,{span:24},{default:l(()=>[e(o,{label:"\u7B80\u4ECB",prop:"description"},{default:l(()=>[e(A,{modelValue:a(t).description,"onUpdate:modelValue":d[14]||(d[14]=s=>a(t).description=s),height:"150px",disabled:n.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})]))]),_:1},8,["model","class","rules","disabled"])),[[E,a(M)]])}}}),[["__scopeId","data-v-9ed7f972"]])});export{Ue as __tla,q as default};