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