index-2d591124.js 12 KB

1
  1. import{_ as Ce,__tla as De}from"./ContentWrap-5ec9bc5e.js";import{_ as He,__tla as Ie}from"./index-604245e1.js";import{d as Te,u as Ue,$ as Ne,L as Pe,r as i,as as ze,i as Ae,f as Ke,m as Ye,S as Be,o as b,c as S,g as l,w as s,h as d,a as e,dz as Oe,y as B,x as me,q as k,R as de,T as _,a6 as ue,F as pe,v as Re,t as C,bb as je,dB as Fe,Q as Ee,D as qe,k as Je,X as Le,B as Ge,C as Qe,E as Xe,j as $e,G as We,aP as Ze,p as ea,l as aa,_ as ta,__tla as la}from"./index-3600b653.js";import{E as na,__tla as oa}from"./el-card-22b34851.js";import{M as x,__tla as sa}from"./index-d55b051e.js";import ia,{__tla as ra}from"./MerchantTabs-71ef6d81.js";import{g as ca,__tla as ma}from"./index-ad53fe73.js";import{c as da,__tla as ua}from"./template-150e0f86.js";import{u as pa,__tla as ha}from"./useMessage-fbff8984.js";import{__tla as va}from"./ContentWrap.vue_vue_type_script_setup_true_lang-e859cc9b.js";import{__tla as _a}from"./index-4cb2263c.js";import{__tla as fa}from"./SPuUploadImg-db38da34.js";import{__tla as ya}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-aab5d912.js";import{__tla as ba}from"./index-5e3a76d3.js";import{__tla as ga}from"./el-image-viewer-25ebd18c.js";let he,wa=Promise.all([(()=>{try{return De}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return ga}catch{}})()]).then(async()=>{let O,R,j,F,E,q,J,L,G,Q,X,$,W,D,Z;O={style:{position:"relative"},class:"search"},R={style:{"text-align":"right"}},j={class:"searchMore"},F={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},E=["title"],q=["onClick"],J={style:{display:"flex","align-items":"center"}},L={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"}},G=["src"],Q={style:{"line-height":"30px",width:"calc(100% - 170px)"}},X=["title"],$={key:0},W=[(V=>(ea("data-v-8a189126"),V=V(),aa(),V))(()=>d("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],D="views/system/sale/merchant/components/MerchantBaseInfo",Z=Te({name:"Merchant",__name:"index",setup(V){const{currentRoute:xa,push:ve}=Ue(),_e=Ne(),H=Pe(()=>_e.getMobile),ee=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"}]),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});ze("updateInitialData",u);const fe=i([{name:"\u5220\u9664",action:function(){ge(u.value.id)},type:"danger",isAdd:!1},{name:"\u4FDD\u5B58",action:async function(){const r=I.value.ComponentRef.validate();if(!I.value.picUrl)return void g.error("\u8BF7\u4E0A\u4F20logo");const a=await r;if(console.log(a),!!a)try{const m=u.value;u.value.id==null?(await x.createMerchant(m).then(p=>{console.log("\u521B\u5EFA\u6210\u529F",p),console.log(u.value.name),da({merId:p.merId,shopId:p.shopId,name:u.value.name})}),g.success(z("common.createSuccess")),y()):(await x.updateMerchant(m),g.success(z("common.updateSuccess")),y()),f.value=!1}finally{}},type:"primary",isAdd:!0}]),I=i(),T=i(0),f=i(!1),U=i(""),N=i(!1),ae=i("");async function P(r,a){if(ae.value=r,a!=null){if(u.value=await x.getMerchant(a.id),H.value)return void ve({name:"MobileDetail",query:{tabs:JSON.stringify(ee.value),initialComponent:D.value,id:a.id,initialData:JSON.stringify(u.value),opentype:r}});N.value=r=="\u67E5\u770B",U.value=r+"-"+a.name,T.value=a.id}else N.value=!1,U.value=r,T.value=0,function(){for(const m of Object.keys(u.value))u.value[m]=void 0;u.value.status=10}();f.value=!0}const M=i(!1),ye=()=>{M.value=!M.value},te=()=>{M.value=!1},g=pa(),{t:z}=Ae(),le=i(!0),w=i([]),ne=i(0),n=Ke({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:[]}),oe=i();i(!1);const y=async()=>{le.value=!0;try{const r=await x.getMerchantPage(n);r.list.forEach(a=>{a.showSetting=!1}),w.value=r.list,ne.value=r.total}finally{le.value=!1}},h=()=>{n.pageNo=1,y(),te()},be=()=>{oe.value.resetFields(),h()};i();const ge=async r=>{try{await g.delConfirm(),await x.deleteMerchant(r),g.success(z("common.delSuccess")),await y(),f.value=!1}catch{}},se=i([]);Ye(async()=>{se.value=await ca(),y()});const we=r=>((m,p)=>{const c=[];let o=p;for(;o!==null;){const v=m.get(o);if(!v)break;c.unshift(v.name),o=v.parentId}return c})((m=>{const p=new Map,c=[...m.map(o=>({...o,parentId:null}))];for(;c.length>0;){const o=c.pop();p.set(o.id,{name:o.name,parentId:o.parentId}),o.children&&c.push(...o.children.map(v=>({...v,parentId:o.id})))}return p})(se.value),r).join("/");return(r,a)=>{const m=qe,p=Je,c=Le,o=Ge,v=Qe,ie=Xe,re=$e,xe=We,Ve=Ze,Me=na,Se=He,ke=Ce,ce=Be("hasPermi");return b(),S(pe,null,[l(ke,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:s(()=>[d("div",O,[d("div",R,[l(m,{icon:e(Oe),onClick:ye},null,8,["icon"]),e(H)?de("",!0):B((b(),me(m,{key:0,onClick:a[0]||(a[0]=t=>P("\u65B0\u589E"))},{default:s(()=>[l(p,{class:"mr-5px",icon:"ep:plus"}),k(" \u65B0\u589E ")]),_:1})),[[ce,["sale:merchant:create"]]])]),B(d("div",j,[l(xe,{class:"-mb-15px",model:e(n),ref_key:"queryFormRef",ref:oe,inline:!0,"label-width":"68px"},{default:s(()=>[l(o,{label:"\u5546\u6237\u540D\u79F0",prop:"name"},{default:s(()=>[l(c,{modelValue:e(n).name,"onUpdate:modelValue":a[1]||(a[1]=t=>e(n).name=t),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u8D1F\u8D23\u4EBA",prop:"contact"},{default:s(()=>[l(c,{modelValue:e(n).contact,"onUpdate:modelValue":a[2]||(a[2]=t=>e(n).contact=t),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u6240\u5728\u5730",prop:"address"},{default:s(()=>[l(c,{modelValue:e(n).address,"onUpdate:modelValue":a[3]||(a[3]=t=>e(n).address=t),placeholder:"\u8BF7\u8F93\u5165\u6240\u5728\u5730",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"contactNumber"},{default:s(()=>[l(c,{modelValue:e(n).contactNumber,"onUpdate:modelValue":a[4]||(a[4]=t=>e(n).contactNumber=t),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u7535\u8BDD",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u5B98\u7F51",prop:"website"},{default:s(()=>[l(c,{modelValue:e(n).website,"onUpdate:modelValue":a[5]||(a[5]=t=>e(n).website=t),placeholder:"\u8BF7\u8F93\u5165\u5B98\u7F51",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u7EF4\u6743\u7535\u8BDD",prop:"complaintsHotline"},{default:s(()=>[l(c,{modelValue:e(n).complaintsHotline,"onUpdate:modelValue":a[6]||(a[6]=t=>e(n).complaintsHotline=t),placeholder:"\u8BF7\u8F93\u5165\u7EF4\u6743\u7535\u8BDD",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u5BA2\u670D\u7535\u8BDD",prop:"customerServiceHotline"},{default:s(()=>[l(c,{modelValue:e(n).customerServiceHotline,"onUpdate:modelValue":a[7]||(a[7]=t=>e(n).customerServiceHotline=t),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u670D\u7535\u8BDD",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u90AE\u7BB1",prop:"email"},{default:s(()=>[l(c,{modelValue:e(n).email,"onUpdate:modelValue":a[8]||(a[8]=t=>e(n).email=t),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",onKeyup:_(h,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:s(()=>[l(v,{modelValue:e(n).expireTime,"onUpdate:modelValue":a[9]||(a[9]=t=>e(n).expireTime=t),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(o,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:s(()=>[l(v,{modelValue:e(n).createTime,"onUpdate:modelValue":a[10]||(a[10]=t=>e(n).createTime=t),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(re,null,{default:s(()=>[l(ie,null,{default:s(()=>[l(o,null,{default:s(()=>[l(m,{onClick:te},{default:s(()=>[k(" \u6536\u8D77 ")]),_:1}),l(m,{onClick:be},{default:s(()=>[k(" \u91CD\u7F6E ")]),_:1}),l(m,{onClick:h},{default:s(()=>[l(p,{icon:"ep:search",class:"mr-5px"}),k(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[ue,e(M)]])]),l(re,null,{default:s(()=>[(b(!0),S(pe,null,Re(e(w),(t,A)=>(b(),me(ie,{class:"card",key:A,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:K=>function(Y){w.value[Y].showSetting=!0}(A),onMouseout:K=>function(Y){w.value[Y].showSetting=!1}(A)},{default:s(()=>[l(Me,{onClick:K=>P("\u67E5\u770B",t)},{default:s(()=>[d("div",F,[d("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:t.name},C(t.name),9,E),B((b(),S("div",{onClick:je(K=>P("\u7F16\u8F91",t),["stop"]),class:"setting"},[l(Ve,{size:"20",color:"rgb(220 223 231)"},{default:s(()=>[l(e(Fe))]),_:1})],8,q)),[[ue,t.showSetting&&!e(H)],[ce,["sale:merchant:update"]]])]),d("div",J,[d("div",L,[d("img",{src:t.logoUrl,style:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"}},null,8,G)]),d("div",Q,[d("p",null,"\u9500\u91CF:"+C(t.salesVolume),1),d("p",null,"\u5546\u54C1\u6570\u91CF:"+C(t.skuCount),1),d("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:t.address},C(we(t.areaId)),9,X)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),e(w).length==0?(b(),S("div",$,[...W])):de("",!0),l(Se,{total:e(ne),page:e(n).pageNo,"onUpdate:page":a[11]||(a[11]=t=>e(n).pageNo=t),limit:e(n).pageSize,"onUpdate:limit":a[12]||(a[12]=t=>e(n).pageSize=t),onPagination:y},null,8,["total","page","limit"])]),_:1}),l(ia,{tabs:e(ee),initialData:e(u),buttonActions:e(fe),ref_key:"MerchantTabsRef",ref:I,isDetail:e(N),initialComponent:D,dialogTitle:e(U),id:e(T),modelValue:e(f),"onUpdate:modelValue":a[13]||(a[13]=t=>Ee(f)?f.value=t:null),openType:e(ae)},null,8,["tabs","initialData","buttonActions","isDetail","dialogTitle","id","modelValue","openType"])],64)}}}),he=ta(Z,[["__scopeId","data-v-8a189126"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/system/sale/merchant/index.vue"]])});export{wa as __tla,he as default};