1 |
- import{_ as Be,__tla as Le}from"./ContentWrap-a3bb871b.js";import{_ as Je,__tla as Qe}from"./index-ccc64a6d.js";import{d as Xe,u as Ze,Z as Ge,L as We,r as i,au as $e,f as ea,l as aa,R as ta,o as f,c as D,g as l,w as o,h as r,a,P as Te,av as la,y as J,x as U,n as A,Q as P,a5 as Ie,S as b,F as Q,v as He,t as g,aw as na,ax as oa,i as sa,X as ra,Y as ia,D as ca,q as ma,W as ua,B as da,C as pa,E as ha,j as _a,G as va,ay as fa,p as ya,k as ga,_ as wa,__tla as ba}from"./index-b362e1d5.js";import{E as xa,__tla as Ma}from"./el-card-732e29b8.js";import{M as k,__tla as Va}from"./index-8a1dbaa1.js";import Sa,{__tla as ka}from"./MerchantTabs-88e19399.js";import Ca,{__tla as Da}from"./MerchantApplyTabs-2e1479cd.js";import{f as Ua,__tla as Ta}from"./formatTime-053b1c05.js";import{g as Ia,__tla as Ha}from"./index-75393ea1.js";import{c as Na,__tla as Ya}from"./template-fea29c0d.js";import{u as Aa,__tla as Pa}from"./useMessage-7c1dd10e.js";import{__tla as Ka}from"./index-39b44010.js";import{__tla as Ra}from"./SPuUploadImg-8c588231.js";import{__tla as za}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-b4af8eb1.js";import{__tla as Fa}from"./index-6b00d885.js";import{__tla as ja}from"./el-image-viewer-68ae3e49.js";import{__tla as Ea}from"./Dialog-71bebaff.js";import{__tla as Oa}from"./MerchantApplyBaseInfo-b0bbd2de.js";import{__tla as qa}from"./Editor-e146bd91.js";import{__tla as Ba}from"./UploadImgs-38746988.js";import{__tla as La}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-e4965946.js";import{__tla as Ja}from"./UploadImg-badad53e.js";import"./tree-0af4953a.js";let Ne,Qa=Promise.all([(()=>{try{return Le}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ja}catch{}})()]).then(async()=>{let X,Z,G,W,$,ee,ae,te,le,ne,oe,se,re,ie,ce,me,ue,de,pe,he,K,_e;X={class:"search"},Z={style:{"text-align":"right"},class:"search-input"},G={class:"searchMore"},W={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},$=["title"],ee={style:{display:"flex","align-items":"center"}},ae={style:{width:"151px",height:"85px","margin-right":"10px",border:"1px solid rgb(220 223 231)","border-radius":"5px",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden"}},te=["src"],le={style:{"line-height":"22px",width:"calc(100% - 170px)"}},ne=["title"],oe={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},se=["title"],re=["onClick"],ie={style:{display:"flex","align-items":"center"}},ce={style:{width:"151px",height:"85px","margin-right":"10px",border:"1px solid rgb(220 223 231)","border-radius":"5px",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden"}},me=["src"],ue={style:{"line-height":"30px",width:"calc(100% - 170px)"}},de=["title"],pe={key:2},he=[(T=>(ya("data-v-8a189126"),T=T(),ga(),T))(()=>r("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],K="views/system/sale/merchant/components/MerchantBaseInfo",_e=Xe({name:"Merchant",__name:"index",setup(T){const{currentRoute:Xa,push:ve}=Ze(),Ye=Ge(),I=We(()=>Ye.getMobile),fe=i([{name:"BaseInfo",label:"\u57FA\u672C\u4FE1\u606F",component:"views/system/sale/merchant/components/MerchantBaseInfo"},{name:"Store",label:"\u5E97\u94FA",component:"views/system/sale/merchant/components/MerchantStore"},{name:"Product",label:"\u5546\u54C1",component:"views/system/sale/merchant/components/MerchantProduct"},{name:"Order",label:"\u8BA2\u5355",component:"views/system/sale/merchant/components/MerchantOrder"},{name:"Service",label:"\u5BA2\u670D",component:"views/system/sale/merchant/components/MerchantService"},{name:"AfterSales",label:"\u552E\u540E",component:"views/system/sale/merchant/components/MerchantAfterSales"},{name:"Campaign",label:"\u6D3B\u52A8",component:"views/system/sale/merchant/components/MerchantCampaign"},{name:"Points",label:"\u79EF\u5206",component:"views/system/sale/merchant/components/MerchantPoints"},{name:"Advertisement",label:"\u5E7F\u544A",component:"views/system/sale/merchant/components/MerchantAdvertisement"},{name:"Highlights",label:"\u770B\u70B9",component:"views/system/sale/merchant/components/MerchantHighlights"},{name:"Finance",label:"\u8D22\u52A1",component:"views/system/sale/merchant/components/MerchantFinance"},{name:"Employee",label:"\u4EBA\u5458",component:"views/system/sale/merchant/components/MerchantEmployee"},{name:"ApplyLog",label:"\u5165\u9A7B\u5BA1\u6838\u8BB0\u5F55",component:"views/system/sale/merchant/components/MerchantApplyLog"}]),d=i({id:void 0,name:void 0,status:10,description:void 0,contact:void 0,address:void 0,contactNumber:void 0,website:void 0,complaintsHotline:void 0,createTime:void 0,customerServiceHotline:void 0,email:void 0,businessLicensePicture:void 0,expireTime:void 0,logoUrl:void 0,areaId:void 0,brandLicensing:void 0,otherCertificate:[],legalPerson:void 0,legalPersonNumber:void 0,identityCardFront:void 0,identityCardReverseSide:void 0});$e("updateInitialData",d);const Ae=i([{name:"\u5220\u9664",action:function(){Re(d.value.id)},type:"danger",isAdd:!1},{name:"\u4FDD\u5B58",action:async function(){const s=R.value.ComponentRef.validate();if(!R.value.picUrl)return void C.error("\u8BF7\u4E0A\u4F20logo");const t=await s;if(console.log(t),!!t)try{let u=d.value;u.otherCertificate=u.otherCertificate.map(p=>p.url),d.value.id==null?(await k.createMerchant(u).then(p=>{console.log("\u521B\u5EFA\u6210\u529F",p),console.log(d.value.name),Na({merId:p.merId,shopId:p.shopId,name:d.value.name})}),C.success(O("common.createSuccess")),w()):(await k.updateMerchant(u),C.success(O("common.updateSuccess")),w()),V.value=!1}finally{}},type:"primary",isAdd:!0}]),R=i(),z=i(0),V=i(!1),F=i(""),j=i(!1),ye=i("");async function E(s,t){if(ye.value=s,t!=null){if(d.value=await k.getMerchant(t.id),I.value)return void ve({name:"MobileDetail",query:{tabs:JSON.stringify(fe.value),initialComponent:K.value,id:t.id,initialData:JSON.stringify(d.value),opentype:s}});j.value=s=="\u67E5\u770B",F.value=s+"-"+t.name,z.value=t.id}else j.value=!1,F.value=s,z.value=0,function(){for(const u of Object.keys(d.value))d.value[u]=void 0;d.value.status=10}();V.value=!0}const ge=i(),H=i(!1);function we(s){x.value[s].showSetting=!0}function be(s){x.value[s].showSetting=!1}const Pe=()=>{H.value=!H.value},xe=()=>{H.value=!1},C=Aa(),{t:O}=sa(),N=i(!0),x=i([]),Y=i(0),n=ea({pageNo:1,pageSize:10,name:void 0,status:void 0,description:void 0,contact:void 0,address:void 0,contactNumber:void 0,website:void 0,complaintsHotline:void 0,customerServiceHotline:void 0,email:void 0,expireTime:[],createTime:[]}),Me=i();i(!1);const w=async()=>{N.value=!0;try{const s=await k.getMerchantPage(n);s.list.forEach(t=>{t.showSetting=!1}),x.value=s.list,Y.value=s.total}finally{N.value=!1}},q=async()=>{N.value=!0;try{const s=await k.getMerchantApplyPage({checkStatus:0});s.list.forEach(t=>{t.showSetting=!1}),x.value=s.list,Y.value=s.total}finally{N.value=!1}},v=()=>{n.pageNo=1,w(),xe()},Ke=()=>{Me.value.resetFields(),v()};i();const Re=async s=>{try{await C.delConfirm(),await k.deleteMerchant(s),C.success(O("common.delSuccess")),await w(),V.value=!1}catch{}},Ve=i([]),Se=s=>((u,p)=>{const h=[];let c=p;for(;c!==null;){const m=u.get(c);if(!m)break;h.unshift(m.name),c=m.parentId}return h})((u=>{const p=new Map,h=[...u.map(c=>({...c,parentId:null}))];for(;h.length>0;){const c=h.pop();p.set(c.id,{name:c.name,parentId:c.parentId}),c.children&&h.push(...c.children.map(m=>({...m,parentId:c.id})))}return p})(Ve.value),s).join("/"),y=i(0),ze=s=>{y.value=s.paneName,y.value==0?q():w()};return aa(async()=>{Ve.value=await Ia(),y.value==0?q().then(()=>{Y.value===0&&(y.value=1,w())}):w()}),(s,t)=>{const u=ra,p=ia,h=ca,c=ma,m=ua,_=da,ke=pa,B=ha,L=_a,Fe=va,Ce=xa,je=fa,Ee=Je,Oe=Be,De=ta("hasPermi");return f(),D(Q,null,[l(Oe,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:o(()=>[r("div",X,[l(p,{modelValue:a(y),"onUpdate:modelValue":t[0]||(t[0]=e=>Te(y)?y.value=e:null),onTabClick:ze,class:"parent-tabs"},{default:o(()=>[l(u,{label:"\u5F85\u5BA1\u6838",name:0}),l(u,{label:"\u5728\u7528",name:1})]),_:1},8,["modelValue"]),r("div",Z,[l(h,{icon:a(la),onClick:Pe},null,8,["icon"]),a(I)?P("",!0):J((f(),U(h,{key:0,onClick:t[1]||(t[1]=e=>E("\u65B0\u589E"))},{default:o(()=>[l(c,{class:"mr-5px",icon:"ep:plus"}),A(" \u65B0\u589E ")]),_:1})),[[De,["sale:merchant:create"]]])])]),J(r("div",G,[l(Fe,{class:"-mb-15px",model:a(n),ref_key:"queryFormRef",ref:Me,inline:!0,"label-width":"68px"},{default:o(()=>[l(_,{label:"\u5546\u6237\u540D\u79F0",prop:"name"},{default:o(()=>[l(m,{modelValue:a(n).name,"onUpdate:modelValue":t[2]||(t[2]=e=>a(n).name=e),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u8D1F\u8D23\u4EBA",prop:"contact"},{default:o(()=>[l(m,{modelValue:a(n).contact,"onUpdate:modelValue":t[3]||(t[3]=e=>a(n).contact=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u6240\u5728\u5730",prop:"address"},{default:o(()=>[l(m,{modelValue:a(n).address,"onUpdate:modelValue":t[4]||(t[4]=e=>a(n).address=e),placeholder:"\u8BF7\u8F93\u5165\u6240\u5728\u5730",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"contactNumber"},{default:o(()=>[l(m,{modelValue:a(n).contactNumber,"onUpdate:modelValue":t[5]||(t[5]=e=>a(n).contactNumber=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u7535\u8BDD",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u5B98\u7F51",prop:"website"},{default:o(()=>[l(m,{modelValue:a(n).website,"onUpdate:modelValue":t[6]||(t[6]=e=>a(n).website=e),placeholder:"\u8BF7\u8F93\u5165\u5B98\u7F51",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u7EF4\u6743\u7535\u8BDD",prop:"complaintsHotline"},{default:o(()=>[l(m,{modelValue:a(n).complaintsHotline,"onUpdate:modelValue":t[7]||(t[7]=e=>a(n).complaintsHotline=e),placeholder:"\u8BF7\u8F93\u5165\u7EF4\u6743\u7535\u8BDD",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u5BA2\u670D\u7535\u8BDD",prop:"customerServiceHotline"},{default:o(()=>[l(m,{modelValue:a(n).customerServiceHotline,"onUpdate:modelValue":t[8]||(t[8]=e=>a(n).customerServiceHotline=e),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u670D\u7535\u8BDD",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u90AE\u7BB1",prop:"email"},{default:o(()=>[l(m,{modelValue:a(n).email,"onUpdate:modelValue":t[9]||(t[9]=e=>a(n).email=e),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",onKeyup:b(v,["enter"])},null,8,["modelValue"])]),_:1}),l(_,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:o(()=>[l(ke,{modelValue:a(n).expireTime,"onUpdate:modelValue":t[10]||(t[10]=e=>a(n).expireTime=e),style:{width:"auto"},"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")]},null,8,["modelValue","default-time"])]),_:1}),l(_,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:o(()=>[l(ke,{modelValue:a(n).createTime,"onUpdate:modelValue":t[11]||(t[11]=e=>a(n).createTime=e),style:{width:"auto"},"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")]},null,8,["modelValue","default-time"])]),_:1}),l(L,null,{default:o(()=>[l(B,null,{default:o(()=>[l(_,null,{default:o(()=>[l(h,{onClick:xe},{default:o(()=>[A(" \u6536\u8D77 ")]),_:1}),l(h,{onClick:Ke},{default:o(()=>[A(" \u91CD\u7F6E ")]),_:1}),l(h,{onClick:v},{default:o(()=>[l(c,{icon:"ep:search",class:"mr-5px"}),A(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[Ie,a(H)]]),a(y)===0?(f(),U(L,{key:0},{default:o(()=>[(f(!0),D(Q,null,He(a(x),(e,M)=>(f(),U(B,{class:"card",key:M,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>we(M),onMouseout:S=>be(M)},{default:o(()=>[l(Ce,{onClick:S=>async function(qe,Ue){I.value?ve({name:"MerchantApply",query:{row:JSON.stringify(Ue)}}):ge.value.open(qe,Ue)}("\u67E5\u770B",e)},{default:o(()=>[r("div",W,[r("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},g(e.name),9,$)]),r("div",ee,[r("div",ae,[r("img",{src:e.logoUrl,style:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"}},null,8,te)]),r("div",le,[r("p",null,"\u8054\u7EDC\u4EBA:"+g(e.contact),1),r("p",null,"\u8054\u7EDC\u4EBA\u624B\u673A\u53F7:"+g(e.contactNumber),1),r("p",null,"\u7533\u8BF7\u65F6\u95F4:"+g(a(Ua)(e.createTime,"YYYY-MM-DD")),1),r("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:e.address},g(Se(e.areaId)),9,ne)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):P("",!0),a(y)===1?(f(),U(L,{key:1},{default:o(()=>[(f(!0),D(Q,null,He(a(x),(e,M)=>(f(),U(B,{class:"card",key:M,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>we(M),onMouseout:S=>be(M)},{default:o(()=>[l(Ce,{onClick:S=>E("\u67E5\u770B",e)},{default:o(()=>[r("div",oe,[r("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},g(e.name),9,se),J((f(),D("div",{onClick:na(S=>E("\u7F16\u8F91",e),["stop"]),class:"setting"},[l(je,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[l(a(oa))]),_:1})],8,re)),[[Ie,e.showSetting&&!a(I)],[De,["sale:merchant:update"]]])]),r("div",ie,[r("div",ce,[r("img",{src:e.logoUrl,style:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"}},null,8,me)]),r("div",ue,[r("p",null,"\u9500\u91CF:"+g(e.salesVolume),1),r("p",null,"\u5546\u54C1\u6570\u91CF:"+g(e.skuCount),1),r("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:e.address},g(Se(e.areaId)),9,de)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):P("",!0),a(x).length===0?(f(),D("div",pe,[...he])):P("",!0),l(Ee,{total:a(Y),page:a(n).pageNo,"onUpdate:page":t[12]||(t[12]=e=>a(n).pageNo=e),limit:a(n).pageSize,"onUpdate:limit":t[13]||(t[13]=e=>a(n).pageSize=e),onPagination:w},null,8,["total","page","limit"])]),_:1}),l(Sa,{tabs:a(fe),initialData:a(d),buttonActions:a(Ae),ref_key:"MerchantTabsRef",ref:R,isDetail:a(j),initialComponent:K,dialogTitle:a(F),id:a(z),modelValue:a(V),"onUpdate:modelValue":t[14]||(t[14]=e=>Te(V)?V.value=e:null),openType:a(ye)},null,8,["tabs","initialData","buttonActions","isDetail","dialogTitle","id","modelValue","openType"]),l(Ca,{ref_key:"MerchantApplyTabsRef",ref:ge,onSuccess:q},null,512)],64)}}}),Ne=wa(_e,[["__scopeId","data-v-8a189126"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/sale/merchant/index.vue"]])});export{Qa as __tla,Ne as default};
|