index-de333407.js 16 KB

1
  1. import{_ as qe,__tla as Be}from"./ContentWrap.vue_vue_type_script_setup_true_lang-8883b5ea.js";import{_ as Je,__tla as Ze}from"./index.vue_vue_type_script_setup_true_lang-c008592f.js";import{d as Ge,u as Qe,y as We,e as Xe,r as i,p as $e,x as ea,b as aa,a3 as ta,o as f,c as U,f as l,A as n,B as s,a,a1 as Ie,aC as la,k as J,C as D,D as P,a2 as Y,v as Te,a4 as w,F as Z,Q as He,E as g,aD as oa,aE as na,P as ra,a9 as sa,aa as ia,J as ca,_ as ma,a8 as ua,U as da,I as pa,H as _a,K as ha,V as va,aF as fa,L as ya,M as ga,__tla as ba}from"./index-92ee0c67.js";import{E as wa,__tla as xa}from"./el-card-82c8630d.js";import{M as C,__tla as Ma}from"./index-41ac884f.js";import Va,{__tla as Sa}from"./MerchantTabs-72d8428c.js";import{_ as Ca,__tla as ka}from"./MerchantApplyTabs.vue_vue_type_style_index_0_lang-579fb40f.js";import{f as Ua,__tla as Da}from"./formatTime-a873e830.js";import{g as Ia,__tla as Ta}from"./index-170ad387.js";import{c as Ha,__tla as Na}from"./template-703c375a.js";import{u as Aa,__tla as Pa}from"./useMessage-f82a8260.js";import{_ as Ya}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ka}from"./index-85b58c6a.js";import{__tla as Ra}from"./SPuUploadImg-e3c061ff.js";import{__tla as za}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-cac58d91.js";import{__tla as Ea}from"./index-00287237.js";import{__tla as Fa}from"./el-image-viewer-a14f333a.js";import{__tla as ja}from"./Dialog-81b4474b.js";import{__tla as Oa}from"./MerchantApplyBaseInfo-b9fa92f7.js";import{__tla as La}from"./style.css_vue_type_style_index_0_src_true_lang-56f60035.js";import{__tla as qa}from"./UploadImgs-7fbd21d3.js";import{__tla as Ba}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-28dd6ae5.js";import{__tla as Ja}from"./UploadImg-9d38bba5.js";import"./tree-0af4953a.js";import{__tla as Za}from"./MerchantApplyLog-d2405ad8.js";import{__tla as Ga}from"./el-descriptions-item-9c7e8258.js";import{__tla as Qa}from"./el-timeline-item-f60a2dd7.js";import{__tla as Wa}from"./dict-84c3ed73.js";import{__tla as Xa}from"./permission-530afd98.js";let Ne,$a=Promise.all([(()=>{try{return Be}catch{}})(),(()=>{try{return Ze}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Xa}catch{}})()]).then(async()=>{let G,Q,W,X,$,ee,ae,te,le,oe,ne,re,se,ie,ce,me,ue,de,pe,_e,K,he;G={class:"search"},Q={style:{"text-align":"right"},class:"search-input"},W={class:"searchMore"},X={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)"}},oe=["title"],ne={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},re=["title"],se=["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},_e=[(I=>(ya("data-v-019e36a7"),I=I(),ga(),I))(()=>s("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],K="views/system/sale/merchant/components/MerchantBaseInfo",he=Ge({name:"Merchant",__name:"index",setup(I){const{currentRoute:et,push:ve}=Qe(),Ae=We(),T=Xe(()=>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:"\u4F63\u91D1",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(){Re(d.value.id)},type:"danger",isAdd:!1},{name:"\u4FDD\u5B58",action:async function(){const r=R.value.ComponentRef.validate();if(!R.value.picUrl)return void k.error("\u8BF7\u4E0A\u4F20logo");const t=await r;if(console.log(t),!!t)try{let u=d.value;u.otherCertificate=u.otherCertificate.map(p=>p.url),d.value.id==null?(await C.createMerchant(u).then(p=>{console.log("\u521B\u5EFA\u6210\u529F",p),console.log(d.value.name),Ha({merId:p.merId,shopId:p.shopId,name:d.value.name})}),k.success(O("common.createSuccess")),b()):(await C.updateMerchant(u),k.success(O("common.updateSuccess")),b()),V.value=!1}finally{}},type:"primary",isAdd:!0}]),R=i(),z=i(0),V=i(!1),E=i(""),F=i(!1),ye=i("");async function j(r,t){if(ye.value=r,t!=null){if(d.value=await C.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:r}});F.value=r=="\u67E5\u770B",E.value=r+"-"+t.name,z.value=t.id}else F.value=!1,E.value=r,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 be(r){x.value[r].showSetting=!0}function we(r){x.value[r].showSetting=!1}const Ye=()=>{H.value=!H.value},xe=()=>{H.value=!1},k=Aa(),{t:O}=ra(),N=i(!0),x=i([]),A=i(0),o=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 b=async()=>{N.value=!0;try{const r=await C.getMerchantPage(o);r.list.forEach(t=>{t.showSetting=!1}),x.value=r.list,A.value=r.total}finally{N.value=!1}},L=async()=>{N.value=!0;try{const r=await C.getMerchantApplyPage({checkStatus:0});r.list.forEach(t=>{t.showSetting=!1}),x.value=r.list,A.value=r.total}finally{N.value=!1}},v=()=>{o.pageNo=1,b(),xe()},Ke=()=>{Me.value.resetFields(),v()};i();const Re=async r=>{try{await k.delConfirm(),await C.deleteMerchant(r),k.success(O("common.delSuccess")),await b(),V.value=!1}catch{}},Ve=i([]),Se=r=>((u,p)=>{const _=[];let c=p;for(;c!==null;){const m=u.get(c);if(!m)break;_.unshift(m.name),c=m.parentId}return _})((u=>{const p=new Map,_=[...u.map(c=>({...c,parentId:null}))];for(;_.length>0;){const c=_.pop();p.set(c.id,{name:c.name,parentId:c.parentId}),c.children&&_.push(...c.children.map(m=>({...m,parentId:c.id})))}return p})(Ve.value),r).join("/"),y=i(0),ze=r=>{y.value=r.paneName,y.value==0?L():b()};return aa(async()=>{Ve.value=await Ia(),y.value==0?L().then(()=>{A.value===0&&(y.value=1,b())}):b()}),(r,t)=>{const u=sa,p=ia,_=ca,c=ma,m=ua,h=da,Ce=pa,q=_a,B=ha,Ee=va,ke=wa,Fe=fa,je=Je,Oe=qe,Ue=ta("hasPermi");return f(),U(Z,null,[l(Oe,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:n(()=>[s("div",G,[l(p,{modelValue:a(y),"onUpdate:modelValue":t[0]||(t[0]=e=>Ie(y)?y.value=e:null),onTabClick:ze,class:"parent-tabs"},{default:n(()=>[l(u,{label:"\u5F85\u5BA1\u6838",name:0}),l(u,{label:"\u5728\u7528",name:1})]),_:1},8,["modelValue"]),s("div",Q,[l(_,{icon:a(la),onClick:Ye},null,8,["icon"]),a(T)?Y("",!0):J((f(),D(_,{key:0,onClick:t[1]||(t[1]=e=>j("\u65B0\u589E"))},{default:n(()=>[l(c,{class:"mr-5px",icon:"ep:plus"}),P(" \u65B0\u589E ")]),_:1})),[[Ue,["sale:merchant:create"]]])])]),J(s("div",W,[l(Ee,{class:"-mb-15px",model:a(o),ref_key:"queryFormRef",ref:Me,inline:!0,"label-width":"68px"},{default:n(()=>[l(h,{label:"\u5546\u6237\u540D\u79F0",prop:"name"},{default:n(()=>[l(m,{modelValue:a(o).name,"onUpdate:modelValue":t[2]||(t[2]=e=>a(o).name=e),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u8D1F\u8D23\u4EBA",prop:"contact"},{default:n(()=>[l(m,{modelValue:a(o).contact,"onUpdate:modelValue":t[3]||(t[3]=e=>a(o).contact=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u6240\u5728\u5730",prop:"address"},{default:n(()=>[l(m,{modelValue:a(o).address,"onUpdate:modelValue":t[4]||(t[4]=e=>a(o).address=e),placeholder:"\u8BF7\u8F93\u5165\u6240\u5728\u5730",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"contactNumber"},{default:n(()=>[l(m,{modelValue:a(o).contactNumber,"onUpdate:modelValue":t[5]||(t[5]=e=>a(o).contactNumber=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u7535\u8BDD",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u5B98\u7F51",prop:"website"},{default:n(()=>[l(m,{modelValue:a(o).website,"onUpdate:modelValue":t[6]||(t[6]=e=>a(o).website=e),placeholder:"\u8BF7\u8F93\u5165\u5B98\u7F51",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u7EF4\u6743\u7535\u8BDD",prop:"complaintsHotline"},{default:n(()=>[l(m,{modelValue:a(o).complaintsHotline,"onUpdate:modelValue":t[7]||(t[7]=e=>a(o).complaintsHotline=e),placeholder:"\u8BF7\u8F93\u5165\u7EF4\u6743\u7535\u8BDD",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u5BA2\u670D\u7535\u8BDD",prop:"customerServiceHotline"},{default:n(()=>[l(m,{modelValue:a(o).customerServiceHotline,"onUpdate:modelValue":t[8]||(t[8]=e=>a(o).customerServiceHotline=e),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u670D\u7535\u8BDD",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u90AE\u7BB1",prop:"email"},{default:n(()=>[l(m,{modelValue:a(o).email,"onUpdate:modelValue":t[9]||(t[9]=e=>a(o).email=e),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",onKeyup:w(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:n(()=>[l(Ce,{modelValue:a(o).expireTime,"onUpdate:modelValue":t[10]||(t[10]=e=>a(o).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(h,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:n(()=>[l(Ce,{modelValue:a(o).createTime,"onUpdate:modelValue":t[11]||(t[11]=e=>a(o).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(B,null,{default:n(()=>[l(q,null,{default:n(()=>[l(h,null,{default:n(()=>[l(_,{onClick:xe},{default:n(()=>[P(" \u6536\u8D77 ")]),_:1}),l(_,{onClick:Ke},{default:n(()=>[P(" \u91CD\u7F6E ")]),_:1}),l(_,{onClick:v},{default:n(()=>[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(),D(B,{key:0},{default:n(()=>[(f(!0),U(Z,null,He(a(x),(e,M)=>(f(),D(q,{class:"card",key:M,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>be(M),onMouseout:S=>we(M)},{default:n(()=>[l(ke,{onClick:S=>async function(Le,De){T.value?ve({name:"MerchantApply",query:{row:JSON.stringify(De)}}):ge.value.open(Le,De)}("\u67E5\u770B",e)},{default:n(()=>[s("div",X,[s("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},g(e.name),9,$)]),s("div",ee,[s("div",ae,[s("img",{src:e.logoUrl,style:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"}},null,8,te)]),s("div",le,[s("p",null,"\u8054\u7EDC\u4EBA:"+g(e.contact),1),s("p",null,"\u8054\u7EDC\u4EBA\u624B\u673A\u53F7:"+g(e.contactNumber),1),s("p",null,"\u7533\u8BF7\u65F6\u95F4:"+g(a(Ua)(e.createTime,"YYYY-MM-DD")),1),s("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:e.address},g(Se(e.areaId)),9,oe)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):Y("",!0),a(y)===1?(f(),D(B,{key:1},{default:n(()=>[(f(!0),U(Z,null,He(a(x),(e,M)=>(f(),D(q,{class:"card",key:M,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>be(M),onMouseout:S=>we(M)},{default:n(()=>[l(ke,{onClick:S=>j("\u67E5\u770B",e)},{default:n(()=>[s("div",ne,[s("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},g(e.name),9,re),J((f(),U("div",{onClick:oa(S=>j("\u7F16\u8F91",e),["stop"]),class:"setting"},[l(Fe,{size:"20",color:"rgb(220 223 231)"},{default:n(()=>[l(a(na))]),_:1})],8,se)),[[Te,e.showSetting&&!a(T)],[Ue,["sale:merchant:update"]]])]),s("div",ie,[s("div",ce,[s("img",{src:e.logoUrl,style:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"}},null,8,me)]),s("div",ue,[s("p",null,"\u9500\u91CF:"+g(e.salesVolume),1),s("p",null,"\u5546\u54C1\u6570\u91CF:"+g(e.skuCount),1),s("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(),U("div",pe,_e)):Y("",!0),l(je,{total:a(A),page:a(o).pageNo,"onUpdate:page":t[12]||(t[12]=e=>a(o).pageNo=e),limit:a(o).pageSize,"onUpdate:limit":t[13]||(t[13]=e=>a(o).pageSize=e),onPagination:b},null,8,["total","page","limit"])]),_:1}),l(Va,{tabs:a(fe),initialData:a(d),buttonActions:a(Pe),ref_key:"MerchantTabsRef",ref:R,isDetail:a(F),initialComponent:K,dialogTitle:a(E),id:a(z),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:L},null,512)],64)}}}),Ne=Ya(he,[["__scopeId","data-v-019e36a7"]])});export{$a as __tla,Ne as default};