index-982152ce.js 15 KB

1
  1. import{_ as Je,__tla as Le}from"./ContentWrap-83998678.js";import{_ as qe,__tla as Qe}from"./index-ed6c67a8.js";import{d as Ge,u as We,y as Xe,e as Ze,r as i,p as $e,x as ea,b as aa,a4 as ta,o as f,c as D,f as l,A as o,B as r,a,a2 as Ie,aD as la,k as q,C as U,D as P,a3 as Y,v as Te,a5 as b,F as Q,R as He,E as g,aE as na,aF as oa,P as sa,aa as ra,ab as ia,J as ca,Q as ma,a9 as ua,V as da,I as pa,H as ha,K as _a,W as va,aG as fa,L as ya,M as ga,_ as wa,__tla as ba}from"./index-286756b9.js";import{E as xa,__tla as Ma}from"./el-card-d3d5a654.js";import{M as k,__tla as Va}from"./index-95ae7168.js";import Sa,{__tla as ka}from"./MerchantTabs-a696da90.js";import Ca,{__tla as Da}from"./MerchantApplyTabs-30fe2105.js";import{f as Ua,__tla as Ia}from"./formatTime-83e416ef.js";import{g as Ta,__tla as Ha}from"./index-bb0e31fe.js";import{c as Na,__tla as Aa}from"./template-6ba93929.js";import{u as Pa,__tla as Ya}from"./useMessage-084b1e70.js";import{__tla as Ka}from"./index-fb47c94c.js";import{__tla as za}from"./SPuUploadImg-895192f9.js";import{__tla as Oa}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-6643271d.js";import{__tla as Ra}from"./index-5a40c383.js";import{__tla as Ea}from"./el-image-viewer-e0e5d3be.js";import{__tla as Fa}from"./Dialog-4c2de357.js";import{__tla as ja}from"./MerchantApplyBaseInfo-b1edab7b.js";import{__tla as Ba}from"./Editor-514f76f8.js";import{__tla as Ja}from"./UploadImgs-b8116d2f.js";import{__tla as La}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-a65d467a.js";import{__tla as qa}from"./UploadImg-d2713eac.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 Ia}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return qa}catch{}})()]).then(async()=>{let G,W,X,Z,$,ee,ae,te,le,ne,oe,se,re,ie,ce,me,ue,de,pe,he,K,_e;G={class:"search"},W={style:{"text-align":"right"},class:"search-input"},X={class:"searchMore"},Z={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=[(I=>(ya("data-v-8a189126"),I=I(),ga(),I))(()=>r("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],K="views/system/sale/merchant/components/MerchantBaseInfo",_e=Ge({name:"Merchant",__name:"index",setup(I){const{currentRoute:Ga,push:ve}=We(),Ae=Xe(),T=Ze(()=>Ae.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 Pe=i([{name:"\u5220\u9664",action:function(){ze(d.value.id)},type:"danger",isAdd:!1},{name:"\u4FDD\u5B58",action:async function(){const s=z.value.ComponentRef.validate();if(!z.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(j("common.createSuccess")),w()):(await k.updateMerchant(u),C.success(j("common.updateSuccess")),w()),V.value=!1}finally{}},type:"primary",isAdd:!0}]),z=i(),O=i(0),V=i(!1),R=i(""),E=i(!1),ye=i("");async function F(s,t){if(ye.value=s,t!=null){if(d.value=await k.getMerchant(t.id),T.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}});E.value=s=="\u67E5\u770B",R.value=s+"-"+t.name,O.value=t.id}else E.value=!1,R.value=s,O.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 Ye=()=>{H.value=!H.value},xe=()=>{H.value=!1},C=Pa(),{t:j}=sa(),N=i(!0),x=i([]),A=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,A.value=s.total}finally{N.value=!1}},B=async()=>{N.value=!0;try{const s=await k.getMerchantApplyPage({checkStatus:0});s.list.forEach(t=>{t.showSetting=!1}),x.value=s.list,A.value=s.total}finally{N.value=!1}},v=()=>{n.pageNo=1,w(),xe()},Ke=()=>{Me.value.resetFields(),v()};i();const ze=async s=>{try{await C.delConfirm(),await k.deleteMerchant(s),C.success(j("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),Oe=s=>{y.value=s.paneName,y.value==0?B():w()};return aa(async()=>{Ve.value=await Ta(),y.value==0?B().then(()=>{A.value===0&&(y.value=1,w())}):w()}),(s,t)=>{const u=ra,p=ia,h=ca,c=ma,m=ua,_=da,ke=pa,J=ha,L=_a,Re=va,Ce=xa,Ee=fa,Fe=qe,je=Je,De=ta("hasPermi");return f(),D(Q,null,[l(je,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:o(()=>[r("div",G,[l(p,{modelValue:a(y),"onUpdate:modelValue":t[0]||(t[0]=e=>Ie(y)?y.value=e:null),onTabClick:Oe,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",W,[l(h,{icon:a(la),onClick:Ye},null,8,["icon"]),a(T)?Y("",!0):q((f(),U(h,{key:0,onClick:t[1]||(t[1]=e=>F("\u65B0\u589E"))},{default:o(()=>[l(c,{class:"mr-5px",icon:"ep:plus"}),P(" \u65B0\u589E ")]),_:1})),[[De,["sale:merchant:create"]]])])]),q(r("div",X,[l(Re,{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(J,null,{default:o(()=>[l(_,null,{default:o(()=>[l(h,{onClick:xe},{default:o(()=>[P(" \u6536\u8D77 ")]),_:1}),l(h,{onClick:Ke},{default:o(()=>[P(" \u91CD\u7F6E ")]),_:1}),l(h,{onClick:v},{default:o(()=>[l(c,{icon:"ep:search",class:"mr-5px"}),P(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[Te,a(H)]]),a(y)===0?(f(),U(L,{key:0},{default:o(()=>[(f(!0),D(Q,null,He(a(x),(e,M)=>(f(),U(J,{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(Be,Ue){T.value?ve({name:"MerchantApply",query:{row:JSON.stringify(Ue)}}):ge.value.open(Be,Ue)}("\u67E5\u770B",e)},{default:o(()=>[r("div",Z,[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})):Y("",!0),a(y)===1?(f(),U(L,{key:1},{default:o(()=>[(f(!0),D(Q,null,He(a(x),(e,M)=>(f(),U(J,{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=>F("\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),q((f(),D("div",{onClick:na(S=>F("\u7F16\u8F91",e),["stop"]),class:"setting"},[l(Ee,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[l(a(oa))]),_:1})],8,re)),[[Te,e.showSetting&&!a(T)],[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})):Y("",!0),a(x).length===0?(f(),D("div",pe,[...he])):Y("",!0),l(Fe,{total:a(A),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(Pe),ref_key:"MerchantTabsRef",ref:z,isDetail:a(E),initialComponent:K,dialogTitle:a(R),id:a(O),modelValue:a(V),"onUpdate:modelValue":t[14]||(t[14]=e=>Ie(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:B},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};