1 |
- import{_ as Re,__tla as ze}from"./ContentWrap-260746ab.js";import{_ as Oe,__tla as Ee}from"./index-e6a7fd1e.js";import{d as Fe,u as Be,y as Le,e as je,r as s,p as qe,x as Je,b as $e,a4 as Ge,o as f,c as U,f as l,A as o,B as c,a as t,a2 as Me,aD as Qe,k as J,C as I,D as P,a3 as Y,v as Ve,a5 as M,F as $,R as xe,E as b,aE as We,aF as Xe,P as Ze,aa as ea,ab as aa,J as ta,Q as la,a9 as oa,V as na,I as ra,H as sa,K as ia,W as ca,aG as ma,L as ua,M as da,_ as pa,__tla as _a}from"./index-54aa57d8.js";import{E as ha,__tla as va}from"./el-card-e7d6628c.js";import{I as Se,__tla as fa}from"./ImageCard-dcb28e16.js";import{M as k,__tla as ya}from"./index-4bb983c3.js";import ba,{__tla as wa}from"./MerchantTabs-76ff8ebf.js";import ga,{__tla as Ma}from"./MerchantApplyTabs-833c00cd.js";import{f as Va,__tla as xa}from"./formatTime-e6197688.js";import{g as Sa,__tla as ka}from"./index-b75a8e96.js";import{c as Ca,__tla as Da}from"./template-c53a1878.js";import{u as Ua,__tla as Ia}from"./useMessage-f56cafbb.js";import{__tla as Ta}from"./index-254a9b5e.js";import{__tla as Ha}from"./SPuUploadImg-d377301f.js";import{__tla as Na}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-03e554d4.js";import{__tla as Aa}from"./index-1a846221.js";import{__tla as Pa}from"./el-image-viewer-ec0edec4.js";import{__tla as Ya}from"./Dialog-7bb778a5.js";import{__tla as Ka}from"./MerchantApplyBaseInfo-7a2e8956.js";import{__tla as Ra}from"./Editor-2839cd89.js";import{__tla as za}from"./UploadImgs-1c3a9b0d.js";import{__tla as Oa}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-6e3f8f3f.js";import{__tla as Ea}from"./UploadImg-46306ddf.js";import"./tree-0af4953a.js";import{__tla as Fa}from"./MerchantApplyLog-f950cc15.js";import{__tla as Ba}from"./el-descriptions-item-347c85ca.js";import{__tla as La}from"./el-timeline-item-24fd452f.js";import{__tla as ja}from"./dict-573b3b04.js";import{__tla as qa}from"./permission-1c0fa4cd.js";let ke,Ja=Promise.all([(()=>{try{return ze}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return qa}catch{}})()]).then(async()=>{let G,Q,W,X,Z,ee,ae,te,le,oe,ne,re,K,se;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"}},Z=["title"],ee=["title"],ae={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},te=["title"],le=["onClick"],oe=["title"],ne={key:2},re=[(T=>(ua("data-v-8a189126"),T=T(),da(),T))(()=>c("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],K="views/system/sale/merchant/components/MerchantBaseInfo",se=Fe({name:"Merchant",__name:"index",setup(T){const{currentRoute:$a,push:ie}=Be(),Ce=Le(),H=je(()=>Ce.getMobile),ce=s([{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=s({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});qe("updateInitialData",u);const De=s([{name:"\u5220\u9664",action:function(){Te(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 C.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 k.createMerchant(d).then(p=>{console.log("\u521B\u5EFA\u6210\u529F",p),console.log(u.value.name),Ca({merId:p.merId,shopId:p.shopId,name:u.value.name})}),C.success(B("common.createSuccess")),g()):(await k.updateMerchant(d),C.success(B("common.updateSuccess")),g()),x.value=!1}finally{}},type:"primary",isAdd:!0}]),R=s(),z=s(0),x=s(!1),O=s(""),E=s(!1),me=s("");async function F(r,a){if(me.value=r,a!=null){if(u.value=await k.getMerchant(a.id),H.value)return void ie({name:"MobileDetail",query:{tabs:JSON.stringify(ce.value),initialComponent:K.value,id:a.id,initialData:JSON.stringify(u.value),opentype:r}});E.value=r=="\u67E5\u770B",O.value=r+"-"+a.name,z.value=a.id}else E.value=!1,O.value=r,z.value=0,function(){for(const d of Object.keys(u.value))u.value[d]=void 0;u.value.status=10}();x.value=!0}const ue=s(),N=s(!1);function de(r){w.value[r].showSetting=!0}function pe(r){w.value[r].showSetting=!1}const Ue=()=>{N.value=!N.value},_e=()=>{N.value=!1},C=Ua(),{t:B}=Ze(),A=s(!0),w=s([]),D=s(0),n=Je({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:[]}),he=s();s(!1);const g=async()=>{A.value=!0;try{const r=await k.getMerchantPage(n);r.list.forEach(a=>{a.showSetting=!1}),w.value=r.list,D.value=r.total}finally{A.value=!1}},L=async()=>{A.value=!0;try{const r=await k.getMerchantApplyPage({checkStatus:0});r.list.forEach(a=>{a.showSetting=!1}),w.value=r.list,D.value=r.total}finally{A.value=!1}},v=()=>{n.pageNo=1,g(),_e()},Ie=()=>{he.value.resetFields(),v()};s();const Te=async(r,a)=>{try{await C.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 k.deleteMerchant(r),C.success(B("common.delSuccess")),await g(),x.value=!1}catch{}},ve=s([]),fe=r=>((d,p)=>{const _=[];let i=p;for(;i!==null;){const m=d.get(i);if(!m)break;_.unshift(m.name),i=m.parentId}return _})((d=>{const p=new Map,_=[...d.map(i=>({...i,parentId:null}))];for(;_.length>0;){const i=_.pop();p.set(i.id,{name:i.name,parentId:i.parentId}),i.children&&_.push(...i.children.map(m=>({...m,parentId:i.id})))}return p})(ve.value),r).join("/"),y=s(0),He=r=>{y.value=r.paneName,w.value=[],D.value=0,y.value==0?L():g()};return $e(async()=>{ve.value=await Sa(),y.value==0?L().then(()=>{D.value===0&&(y.value=1,g())}):g()}),(r,a)=>{const d=ea,p=aa,_=ta,i=la,m=oa,h=na,ye=ra,j=sa,q=ia,Ne=ca,be=ha,Ae=ma,Pe=Oe,Ye=Re,we=Ge("hasPermi");return f(),U($,null,[l(Ye,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:o(()=>[c("div",G,[l(p,{modelValue:t(y),"onUpdate:modelValue":a[0]||(a[0]=e=>Me(y)?y.value=e:null),onTabClick:He,class:"parent-tabs"},{default:o(()=>[l(d,{label:"\u5F85\u5BA1\u6838",name:0}),l(d,{label:"\u5728\u7528",name:1})]),_:1},8,["modelValue"]),c("div",Q,[l(_,{icon:t(Qe),onClick:Ue},null,8,["icon"]),t(H)?Y("",!0):J((f(),I(_,{key:0,onClick:a[1]||(a[1]=e=>F("\u65B0\u589E"))},{default:o(()=>[l(i,{class:"mr-5px",icon:"ep:plus"}),P(" \u65B0\u589E ")]),_:1})),[[we,["sale:merchant:create"]]])])]),J(c("div",W,[l(Ne,{class:"-mb-15px",model:t(n),ref_key:"queryFormRef",ref:he,inline:!0,"label-width":"68px"},{default:o(()=>[l(h,{label:"\u5546\u6237\u540D\u79F0",prop:"name"},{default:o(()=>[l(m,{modelValue:t(n).name,"onUpdate:modelValue":a[2]||(a[2]=e=>t(n).name=e),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u8D1F\u8D23\u4EBA",prop:"contact"},{default:o(()=>[l(m,{modelValue:t(n).contact,"onUpdate:modelValue":a[3]||(a[3]=e=>t(n).contact=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u6240\u5728\u5730",prop:"address"},{default:o(()=>[l(m,{modelValue:t(n).address,"onUpdate:modelValue":a[4]||(a[4]=e=>t(n).address=e),placeholder:"\u8BF7\u8F93\u5165\u6240\u5728\u5730",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"contactNumber"},{default:o(()=>[l(m,{modelValue:t(n).contactNumber,"onUpdate:modelValue":a[5]||(a[5]=e=>t(n).contactNumber=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u5B98\u7F51",prop:"website"},{default:o(()=>[l(m,{modelValue:t(n).website,"onUpdate:modelValue":a[6]||(a[6]=e=>t(n).website=e),placeholder:"\u8BF7\u8F93\u5165\u5B98\u7F51",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u7EF4\u6743\u7535\u8BDD",prop:"complaintsHotline"},{default:o(()=>[l(m,{modelValue:t(n).complaintsHotline,"onUpdate:modelValue":a[7]||(a[7]=e=>t(n).complaintsHotline=e),placeholder:"\u8BF7\u8F93\u5165\u7EF4\u6743\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u5BA2\u670D\u7535\u8BDD",prop:"customerServiceHotline"},{default:o(()=>[l(m,{modelValue:t(n).customerServiceHotline,"onUpdate:modelValue":a[8]||(a[8]=e=>t(n).customerServiceHotline=e),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u670D\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u90AE\u7BB1",prop:"email"},{default:o(()=>[l(m,{modelValue:t(n).email,"onUpdate:modelValue":a[9]||(a[9]=e=>t(n).email=e),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:o(()=>[l(ye,{modelValue:t(n).expireTime,"onUpdate:modelValue":a[10]||(a[10]=e=>t(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(h,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:o(()=>[l(ye,{modelValue:t(n).createTime,"onUpdate:modelValue":a[11]||(a[11]=e=>t(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(q,null,{default:o(()=>[l(j,null,{default:o(()=>[l(h,null,{default:o(()=>[l(_,{onClick:_e},{default:o(()=>[P(" \u6536\u8D77 ")]),_:1}),l(_,{onClick:Ie},{default:o(()=>[P(" \u91CD\u7F6E ")]),_:1}),l(_,{onClick:v},{default:o(()=>[l(i,{icon:"ep:search",class:"mr-5px"}),P(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[Ve,t(N)]]),t(y)===0?(f(),I(q,{key:0},{default:o(()=>[(f(!0),U($,null,xe(t(w),(e,V)=>(f(),I(j,{class:"card",key:V,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>de(V),onMouseout:S=>pe(V)},{default:o(()=>[l(be,{onClick:S=>async function(Ke,ge){H.value?ie({name:"MerchantApply",query:{row:JSON.stringify(ge)}}):ue.value.open(Ke,ge)}("\u67E5\u770B",e)},{default:o(()=>[c("div",X,[c("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},b(e.name),9,Z)]),l(Se,{url:e==null?void 0:e.logoUrl,width:151,height:85},{label:o(()=>[c("p",null,"\u8054\u7EDC\u4EBA:"+b(e.contact),1),c("p",null,"\u8054\u7EDC\u4EBA\u624B\u673A\u53F7:"+b(e.contactNumber),1),c("p",null,"\u7533\u8BF7\u65F6\u95F4:"+b(t(Va)(e.createTime,"YYYY-MM-DD")),1),c("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:e.address},b(fe(e.areaId)),9,ee)]),_:2},1032,["url"])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):Y("",!0),t(y)===1?(f(),I(q,{key:1},{default:o(()=>[(f(!0),U($,null,xe(t(w),(e,V)=>(f(),I(j,{class:"card",key:V,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>de(V),onMouseout:S=>pe(V)},{default:o(()=>[l(be,{onClick:S=>F("\u67E5\u770B",e)},{default:o(()=>[c("div",ae,[c("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},b(e.name),9,te),J((f(),U("div",{onClick:We(S=>F("\u7F16\u8F91",e),["stop"]),class:"setting"},[l(Ae,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[l(t(Xe))]),_:1})],8,le)),[[Ve,e.showSetting&&!t(H)],[we,["sale:merchant:update"]]])]),l(Se,{url:e==null?void 0:e.logoUrl,width:151,height:85,"text-container-style":{"line-height":"30px"}},{label:o(()=>[c("p",null,"\u9500\u91CF:"+b(e.salesVolume),1),c("p",null,"\u5546\u54C1\u6570\u91CF:"+b(e.skuCount),1),c("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:e.address},b(fe(e.areaId)),9,oe)]),_:2},1032,["url"])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):Y("",!0),t(w).length===0?(f(),U("div",ne,[...re])):Y("",!0),l(Pe,{total:t(D),page:t(n).pageNo,"onUpdate:page":a[12]||(a[12]=e=>t(n).pageNo=e),limit:t(n).pageSize,"onUpdate:limit":a[13]||(a[13]=e=>t(n).pageSize=e),onPagination:g},null,8,["total","page","limit"])]),_:1}),l(ba,{tabs:t(ce),initialData:t(u),buttonActions:t(De),ref_key:"MerchantTabsRef",ref:R,isDetail:t(E),initialComponent:K,dialogTitle:t(O),id:t(z),modelValue:t(x),"onUpdate:modelValue":a[14]||(a[14]=e=>Me(x)?x.value=e:null),openType:t(me)},null,8,["tabs","initialData","buttonActions","isDetail","dialogTitle","id","modelValue","openType"]),l(ga,{ref_key:"MerchantApplyTabsRef",ref:ue,onSuccess:L},null,512)],64)}}}),ke=pa(se,[["__scopeId","data-v-8a189126"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/sale/merchant/index.vue"]])});export{Ja as __tla,ke as default};
|