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