1 |
- import{_ as ke,__tla as Ie}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{_ as De,__tla as He}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{d as Te,u as Ue,b as Ne,e as Pe,r as i,as as Ae,B as Ke,f as Ye,z as ze,S as Ee,o as b,c as S,i as l,w as s,k as d,a as e,dz as Re,D as E,j as me,m as C,l as de,T as v,a6 as ue,F as pe,C as je,t as k,ba as Oe,dC as Fe,R as qe,q as Be,_ as Je,X as Le,I as Xe,p as Ge,E as Qe,s as We,J as Ze,aP as $e,v as ea,x as aa,__tla as ta}from"./index-1e808f2e.js";import{E as la,__tla as na}from"./el-card-03b3588b.js";import{M as x,__tla as oa}from"./index-7984c4c3.js";import sa,{__tla as ia}from"./MerchantTabs-2154d9ef.js";import{g as ra,__tla as ca}from"./index-f40ed4f7.js";import{c as ma,__tla as da}from"./template-23d3cdf1.js";import{u as ua,__tla as pa}from"./useMessage-5f9e8917.js";import{_ as ha}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as va}from"./index-73afebcf.js";import{__tla as _a}from"./SPuUploadImg-f0bd750f.js";import{__tla as fa}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-b3df4382.js";import{__tla as ya}from"./index-b59955b6.js";import{__tla as ba}from"./el-image-viewer-dddb6285.js";let he,ga=Promise.all([(()=>{try{return Ie}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ba}catch{}})()]).then(async()=>{let R,j,O,F,q,B,J,L,X,G,Q,W,Z,I,$;R={style:{position:"relative"},class:"search"},j={style:{"text-align":"right"}},O={class:"searchMore"},F={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},q=["title"],B=["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"}},X=["src"],G={style:{"line-height":"30px",width:"calc(100% - 170px)"}},Q=["title"],W={key:0},Z=[(V=>(ea("data-v-426adb52"),V=V(),aa(),V))(()=>d("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],I="views/system/sale/merchant/components/MerchantBaseInfo",$=Te({name:"Merchant",__name:"index",setup(V){const{currentRoute:wa,push:ve}=Ue(),_e=Ne(),D=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:"\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"}]),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});Ae("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=H.value.ComponentRef.validate();if(!H.value.picUrl)return void g.error("\u8BF7\u4E0A\u4F20logo");if(await r)try{const a=u.value;u.value.id==null?(await x.createMerchant(a).then(m=>{ma({merId:m.merId,shopId:m.shopId,name:u.value.name})}),g.success(A("common.createSuccess")),y()):(await x.updateMerchant(a),g.success(A("common.updateSuccess")),y()),f.value=!1}finally{}},type:"primary",isAdd:!0}]),H=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),D.value)return void ve({name:"MobileDetail",query:{tabs:JSON.stringify(ee.value),initialComponent:I.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=ua(),{t:A}=Ke(),le=i(!0),w=i([]),ne=i(0),n=Ye({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}},p=()=>{n.pageNo=1,y(),te()},be=()=>{oe.value.resetFields(),p()};i();const ge=async r=>{try{await g.delConfirm(),await x.deleteMerchant(r),g.success(A("common.delSuccess")),await y(),f.value=!1}catch{}},se=i([]);ze(async()=>{se.value=await ra(),y()});const we=r=>((m,_)=>{const c=[];let o=_;for(;o!==null;){const h=m.get(o);if(!h)break;c.unshift(h.name),o=h.parentId}return c})((m=>{const _=new Map,c=[...m.map(o=>({...o,parentId:null}))];for(;c.length>0;){const o=c.pop();_.set(o.id,{name:o.name,parentId:o.parentId}),o.children&&c.push(...o.children.map(h=>({...h,parentId:o.id})))}return _})(se.value),r).join("/");return(r,a)=>{const m=Be,_=Je,c=Le,o=Xe,h=Ge,ie=Qe,re=We,xe=Ze,Ve=$e,Me=la,Se=De,Ce=ke,ce=Ee("hasPermi");return b(),S(pe,null,[l(Ce,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:s(()=>[d("div",R,[d("div",j,[l(m,{icon:e(Re),onClick:ye},null,8,["icon"]),e(D)?de("",!0):E((b(),me(m,{key:0,onClick:a[0]||(a[0]=t=>P("\u65B0\u589E"))},{default:s(()=>[l(_,{class:"mr-5px",icon:"ep:plus"}),C(" \u65B0\u589E ")]),_:1})),[[ce,["sale:merchant:create"]]])]),E(d("div",O,[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:v(p,["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:v(p,["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:v(p,["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:v(p,["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:v(p,["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:v(p,["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:v(p,["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:v(p,["enter"])},null,8,["modelValue"])]),_:1}),l(o,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:s(()=>[l(h,{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(h,{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(()=>[C(" \u6536\u8D77 ")]),_:1}),l(m,{onClick:be},{default:s(()=>[C(" \u91CD\u7F6E ")]),_:1}),l(m,{onClick:p},{default:s(()=>[l(_,{icon:"ep:search",class:"mr-5px"}),C(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[ue,e(M)]])]),l(re,null,{default:s(()=>[(b(!0),S(pe,null,je(e(w),(t,K)=>(b(),me(ie,{class:"card",key:K,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:Y=>function(z){w.value[z].showSetting=!0}(K),onMouseout:Y=>function(z){w.value[z].showSetting=!1}(K)},{default:s(()=>[l(Me,{onClick:Y=>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},k(t.name),9,q),E((b(),S("div",{onClick:Oe(Y=>P("\u7F16\u8F91",t),["stop"]),class:"setting"},[l(Ve,{size:"20",color:"rgb(220 223 231)"},{default:s(()=>[l(e(Fe))]),_:1})],8,B)),[[ue,t.showSetting&&!e(D)],[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,X)]),d("div",G,[d("p",null,"\u9500\u91CF:"+k(t.salesVolume),1),d("p",null,"\u5546\u54C1\u6570\u91CF:"+k(t.skuCount),1),d("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:t.address},k(we(t.areaId)),9,Q)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),e(w).length==0?(b(),S("div",W,Z)):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(sa,{tabs:e(ee),initialData:e(u),buttonActions:e(fe),ref_key:"MerchantTabsRef",ref:H,isDetail:e(N),initialComponent:I,dialogTitle:e(U),id:e(T),modelValue:e(f),"onUpdate:modelValue":a[13]||(a[13]=t=>qe(f)?f.value=t:null),openType:e(ae)},null,8,["tabs","initialData","buttonActions","isDetail","dialogTitle","id","modelValue","openType"])],64)}}}),he=ha($,[["__scopeId","data-v-426adb52"]])});export{ga as __tla,he as default};
|