index-40e78d8f.js 16 KB

1
  1. import{_ as qe,__tla as Be}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{_ as Je,__tla as Xe}from"./index.vue_vue_type_script_setup_true_lang-53598c8e.js";import{d as $e,u as Ge,y as Qe,e as We,r as i,p as Ze,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 as t,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 X,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-f65577b8.js";import{E as wa,__tla as xa}from"./el-card-ab53e6aa.js";import{M as C,__tla as Ma}from"./index-bcd0ee6c.js";import Va,{__tla as Sa}from"./MerchantTabs-55c2df7b.js";import{_ as Ca,__tla as ka}from"./MerchantApplyTabs.vue_vue_type_style_index_0_lang-7ed79884.js";import{f as Ua,__tla as Da}from"./formatTime-411ed1a1.js";import{g as Ia,__tla as Ta}from"./index-1c1aa66e.js";import{c as Ha,__tla as Na}from"./template-9fb2229a.js";import{u as Aa,__tla as Pa}from"./useMessage-4dbf0ae4.js";import{_ as Ya}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ka}from"./index-1896261a.js";import{__tla as Ra}from"./SPuUploadImg-bb83411e.js";import{__tla as za}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-cac578ef.js";import{__tla as Ea}from"./index-c1ff7b7a.js";import{__tla as Fa}from"./el-image-viewer-7e496319.js";import{__tla as ja}from"./Dialog-bd3317a7.js";import{__tla as Oa}from"./MerchantApplyBaseInfo-9cd3d31a.js";import{__tla as La}from"./style.css_vue_type_style_index_0_src_true_lang-a4e14d4d.js";import{__tla as qa}from"./UploadImgs-3a300492.js";import{__tla as Ba}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-84036457.js";import{__tla as Ja}from"./UploadImg-9468593a.js";import"./tree-0af4953a.js";import{__tla as Xa}from"./MerchantApplyLog-11b0cda6.js";import{__tla as $a}from"./el-descriptions-item-3096f9fe.js";import{__tla as Ga}from"./el-timeline-item-f70fc29c.js";import{__tla as Qa}from"./dict-fa3ffbd2.js";import{__tla as Wa}from"./permission-2462c0e6.js";let Ne,Za=Promise.all([(()=>{try{return Be}catch{}})(),(()=>{try{return Xe}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 Xa}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Wa}catch{}})()]).then(async()=>{let $,G,Q,W,Z,ee,ae,te,le,oe,ne,re,se,ie,ce,me,ue,de,pe,_e,K,he;$={class:"search"},G={style:{"text-align":"right"},class:"search-input"},Q={class:"searchMore"},W={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},Z=["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-b86641a6"),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=$e({name:"Merchant",__name:"index",setup(I){const{currentRoute:et,push:ve}=Ge(),Ae=Qe(),T=We(()=>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"}]),u=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});Ze("updateInitialData",u);const Pe=i([{name:"\u5220\u9664",action:function(){Re(u.value.id,u.value.name)},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 a=await r;if(console.log(a),!!a)try{let d=u.value;d.otherCertificate=d.otherCertificate.map(p=>p.url),u.value.id==null?(await C.createMerchant(d).then(p=>{console.log("\u521B\u5EFA\u6210\u529F",p),console.log(u.value.name),Ha({merId:p.merId,shopId:p.shopId,name:u.value.name})}),k.success(O("common.createSuccess")),b()):(await C.updateMerchant(d),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,a){if(ye.value=r,a!=null){if(u.value=await C.getMerchant(a.id),T.value)return void ve({name:"MobileDetail",query:{tabs:JSON.stringify(fe.value),initialComponent:K.value,id:a.id,initialData:JSON.stringify(u.value),opentype:r}});F.value=r=="\u67E5\u770B",E.value=r+"-"+a.name,z.value=a.id}else F.value=!1,E.value=r,z.value=0,function(){for(const d of Object.keys(u.value))u.value[d]=void 0;u.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(a=>{a.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(a=>{a.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,a)=>{try{await k.delConfirm(`\u786E\u5B9A\u5220\u9664${a}\uFF1F\u5220\u9664\u540E\u5C06\u81EA\u52A8\u4E0B\u67B6\u8BE5\u5546\u6237\u6240\u6709\u5546\u54C1`,"\u5220\u9664\u5546\u6237"),await C.deleteMerchant(r),k.success(O("common.delSuccess")),await b(),V.value=!1}catch{}},Ve=i([]),Se=r=>((d,p)=>{const _=[];let c=p;for(;c!==null;){const m=d.get(c);if(!m)break;_.unshift(m.name),c=m.parentId}return _})((d=>{const p=new Map,_=[...d.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,a)=>{const d=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(X,null,[l(Oe,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:n(()=>[s("div",$,[l(p,{modelValue:t(y),"onUpdate:modelValue":a[0]||(a[0]=e=>Ie(y)?y.value=e:null),onTabClick:ze,class:"parent-tabs"},{default:n(()=>[l(d,{label:"\u5F85\u5BA1\u6838",name:0}),l(d,{label:"\u5728\u7528",name:1})]),_:1},8,["modelValue"]),s("div",G,[l(_,{icon:t(la),onClick:Ye},null,8,["icon"]),t(T)?Y("",!0):J((f(),D(_,{key:0,onClick:a[1]||(a[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",Q,[l(Ee,{class:"-mb-15px",model:t(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:t(o).name,"onUpdate:modelValue":a[2]||(a[2]=e=>t(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:t(o).contact,"onUpdate:modelValue":a[3]||(a[3]=e=>t(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:t(o).address,"onUpdate:modelValue":a[4]||(a[4]=e=>t(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:t(o).contactNumber,"onUpdate:modelValue":a[5]||(a[5]=e=>t(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:t(o).website,"onUpdate:modelValue":a[6]||(a[6]=e=>t(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:t(o).complaintsHotline,"onUpdate:modelValue":a[7]||(a[7]=e=>t(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:t(o).customerServiceHotline,"onUpdate:modelValue":a[8]||(a[8]=e=>t(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:t(o).email,"onUpdate:modelValue":a[9]||(a[9]=e=>t(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:t(o).expireTime,"onUpdate:modelValue":a[10]||(a[10]=e=>t(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:t(o).createTime,"onUpdate:modelValue":a[11]||(a[11]=e=>t(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,t(H)]]),t(y)===0?(f(),D(B,{key:0},{default:n(()=>[(f(!0),U(X,null,He(t(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",W,[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,Z)]),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(t(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),t(y)===1?(f(),D(B,{key:1},{default:n(()=>[(f(!0),U(X,null,He(t(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(t(na))]),_:1})],8,se)),[[Te,e.showSetting&&!t(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),t(x).length===0?(f(),U("div",pe,_e)):Y("",!0),l(je,{total:t(A),page:t(o).pageNo,"onUpdate:page":a[12]||(a[12]=e=>t(o).pageNo=e),limit:t(o).pageSize,"onUpdate:limit":a[13]||(a[13]=e=>t(o).pageSize=e),onPagination:b},null,8,["total","page","limit"])]),_:1}),l(Va,{tabs:t(fe),initialData:t(u),buttonActions:t(Pe),ref_key:"MerchantTabsRef",ref:R,isDetail:t(F),initialComponent:K,dialogTitle:t(E),id:t(z),modelValue:t(V),"onUpdate:modelValue":a[14]||(a[14]=e=>Ie(V)?V.value=e:null),openType:t(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-b86641a6"]])});export{Za as __tla,Ne as default};