1 |
- import{_ as Ve}from"./ContentWrap.vue_vue_type_script_setup_true_lang-dd7e3058.js";import{_ as xe}from"./index.vue_vue_type_script_setup_true_lang-ba921998.js";import{d as Se,u as Ce,y as ke,e as Ue,r as s,q as De,x as Te,b as He,a1 as Ie,o as f,c as D,f as l,B as o,C as c,a as t,a0 as se,aA as Ae,l as L,A as T,G as P,E as Y,v as re,a2 as M,F as q,P as ce,D as b,aB as Ne,aC as Pe,H as Ye,a7 as Ke,a8 as ze,L as Ee,_ as Fe,a6 as Oe,S as Re,K as Be,J as je,M as Le,U as qe,aD as Je}from"./index-b9299550.js";import{E as Ge}from"./el-card-0ae6fb5f.js";import{I as me}from"./ImageCard-a0b6915c.js";import{M as C}from"./index-02414656.js";import Qe from"./MerchantTabs-301c43b8.js";import{_ as We}from"./MerchantApplyTabs.vue_vue_type_style_index_0_lang-7a7e059a.js";import{f as $e}from"./formatTime-988372b6.js";import{g as Xe}from"./index-ad7fa68a.js";import{u as Ze}from"./useMessage-903d430d.js";import{_ as ea}from"./_plugin-vue_export-helper-1b428a4d.js";import"./index-1bc6dd97.js";import"./SPuUploadImg-b6a12c80.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-cc5a2c9f.js";import"./index-8605fb4b.js";import"./el-image-viewer-498779d9.js";import"./Dialog-f2c6d513.js";import"./MerchantApplyBaseInfo-add678f0.js";import"./style.css_vue_type_style_index_0_src_true_lang-927117be.js";import"./UploadImgs-fe941821.js";import"./UploadImgs.vue_vue_type_style_index_0_scoped_bad238b9_lang-35ed27c4.js";import"./UploadImg-f60d6fd5.js";import"./tree-fd3a041e.js";import"./MerchantApplyLog-09d57b3e.js";import"./el-descriptions-item-d52ce73b.js";import"./el-timeline-item-28cd9b1a.js";import"./dict-fc5218c3.js";import"./permission-ffdfcbe8.js";const aa={class:"search"},ta={style:{"text-align":"right"},class:"search-input"},la={class:"searchMore"},oa={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},na=["title"],ia=["title"],sa={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},ra=["title"],ca=["onClick"],ma=["title"],ua={key:2},ue="views/system/sale/merchant/components/MerchantBaseInfo",da=Se({name:"Merchant",__name:"index",setup(va){const{currentRoute:ha,push:J}=Ce(),de=ke(),H=Ue(()=>de.getMobile),G=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"}]),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,brandLicensing:void 0,otherCertificate:[],legalPerson:void 0,legalPersonNumber:void 0,identityCardFront:void 0,identityCardReverseSide:void 0});De("updateInitialData",d);const pe=s([{name:"\u5220\u9664",action:function(){fe(d.value.id,d.value.name)},type:"danger",isAdd:!1},{name:"\u4FDD\u5B58",action:async function(){const i=I.value.ComponentRef.validate();if(!I.value.picUrl)return void k.error("\u8BF7\u4E0A\u4F20logo");if(await i)try{let e=d.value;e.logoUrl=I.value.picUrl,e.otherCertificate=e.otherCertificate&&e.otherCertificate.map(h=>h.url),d.value.id==null?(await C.createMerchant(e),k.success(O("common.createSuccess")),g()):(await C.updateMerchant(e),k.success(O("common.updateSuccess")),g()),_.value=!1}finally{}},type:"primary",isAdd:!0}]),I=s(),K=s(0),_=s(!1),z=s(""),E=s(!1),Q=s("");async function F(i,e){if(Q.value=i,e!=null){if(d.value=await C.getMerchant(e.id),H.value)return void J({name:"MobileDetail",query:{tabs:JSON.stringify(G.value),initialComponent:ue.value,id:e.id,initialData:JSON.stringify(d.value),opentype:i}});E.value=i=="\u67E5\u770B",z.value=i+"-"+e.name,K.value=e.id}else E.value=!1,z.value=i,K.value=0,function(){for(const h of Object.keys(d.value))d.value[h]=void 0;d.value.status=10}();_.value=!0}const W=s(),A=s(!1);function $(i){w.value[i].showSetting=!0}function X(i){w.value[i].showSetting=!1}const ve=()=>{A.value=!A.value},Z=()=>{A.value=!1},k=Ze(),{t:O}=Ye(),N=s(!0),w=s([]),U=s(0),n=Te({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:[]}),ee=s();s(!1);const g=async()=>{N.value=!0;try{const i=await C.getMerchantPage(n);i.list.forEach(e=>{e.showSetting=!1}),w.value=i.list,U.value=i.total}finally{N.value=!1}},R=async()=>{N.value=!0;try{const i=await C.getMerchantApplyPage({checkStatus:0});i.list.forEach(e=>{e.showSetting=!1}),w.value=i.list,U.value=i.total}finally{N.value=!1}},v=()=>{n.pageNo=1,g(),Z()},he=()=>{ee.value.resetFields(),v()};s();const fe=async(i,e)=>{try{await k.delConfirm(`\u786E\u5B9A\u5220\u9664${e}\uFF1F\u5220\u9664\u540E\u5C06\u81EA\u52A8\u4E0B\u67B6\u8BE5\u5546\u6237\u6240\u6709\u5546\u54C1`,"\u5220\u9664\u5546\u6237"),await C.deleteMerchant(i),k.success(O("common.delSuccess")),await g(),_.value=!1}catch{}},ae=s([]),te=i=>((h,x)=>{const u=[];let r=x;for(;r!==null;){const m=h.get(r);if(!m)break;u.unshift(m.name),r=m.parentId}return u})((h=>{const x=new Map,u=[...h.map(r=>({...r,parentId:null}))];for(;u.length>0;){const r=u.pop();x.set(r.id,{name:r.name,parentId:r.parentId}),r.children&&u.push(...r.children.map(m=>({...m,parentId:r.id})))}return x})(ae.value),i).join("/"),y=s(0),ye=i=>{y.value=i.paneName,w.value=[],U.value=0,y.value==0?R():g()};return He(async()=>{ae.value=await Xe(),y.value==0?R().then(()=>{U.value===0&&(y.value=1,g())}):g()}),(i,e)=>{const h=Ke,x=ze,u=Ee,r=Fe,m=Oe,p=Re,le=Be,B=je,j=Le,be=qe,oe=Ge,we=Je,ge=xe,Me=Ve,ne=Ie("hasPermi");return f(),D(q,null,[l(Me,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:o(()=>[c("div",aa,[l(x,{modelValue:t(y),"onUpdate:modelValue":e[0]||(e[0]=a=>se(y)?y.value=a:null),onTabClick:ye,class:"parent-tabs"},{default:o(()=>[l(h,{label:"\u5F85\u5BA1\u6838",name:0}),l(h,{label:"\u5728\u7528",name:1})]),_:1},8,["modelValue"]),c("div",ta,[l(u,{icon:t(Ae),onClick:ve},null,8,["icon"]),t(H)?Y("",!0):L((f(),T(u,{key:0,onClick:e[1]||(e[1]=a=>F("\u65B0\u589E"))},{default:o(()=>[l(r,{class:"mr-5px",icon:"ep:plus"}),e[15]||(e[15]=P(" \u65B0\u589E "))]),_:1})),[[ne,["sale:merchant-apply:create"]]])])]),L(c("div",la,[l(be,{class:"-mb-15px",model:t(n),ref_key:"queryFormRef",ref:ee,inline:!0,"label-width":"68px"},{default:o(()=>[l(p,{label:"\u5546\u6237\u540D\u79F0",prop:"name"},{default:o(()=>[l(m,{modelValue:t(n).name,"onUpdate:modelValue":e[2]||(e[2]=a=>t(n).name=a),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u8D1F\u8D23\u4EBA",prop:"contact"},{default:o(()=>[l(m,{modelValue:t(n).contact,"onUpdate:modelValue":e[3]||(e[3]=a=>t(n).contact=a),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u6240\u5728\u5730",prop:"address"},{default:o(()=>[l(m,{modelValue:t(n).address,"onUpdate:modelValue":e[4]||(e[4]=a=>t(n).address=a),placeholder:"\u8BF7\u8F93\u5165\u6240\u5728\u5730",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"contactNumber"},{default:o(()=>[l(m,{modelValue:t(n).contactNumber,"onUpdate:modelValue":e[5]||(e[5]=a=>t(n).contactNumber=a),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u5B98\u7F51",prop:"website"},{default:o(()=>[l(m,{modelValue:t(n).website,"onUpdate:modelValue":e[6]||(e[6]=a=>t(n).website=a),placeholder:"\u8BF7\u8F93\u5165\u5B98\u7F51",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u7EF4\u6743\u7535\u8BDD",prop:"complaintsHotline"},{default:o(()=>[l(m,{modelValue:t(n).complaintsHotline,"onUpdate:modelValue":e[7]||(e[7]=a=>t(n).complaintsHotline=a),placeholder:"\u8BF7\u8F93\u5165\u7EF4\u6743\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u5BA2\u670D\u7535\u8BDD",prop:"customerServiceHotline"},{default:o(()=>[l(m,{modelValue:t(n).customerServiceHotline,"onUpdate:modelValue":e[8]||(e[8]=a=>t(n).customerServiceHotline=a),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u670D\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u90AE\u7BB1",prop:"email"},{default:o(()=>[l(m,{modelValue:t(n).email,"onUpdate:modelValue":e[9]||(e[9]=a=>t(n).email=a),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(p,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:o(()=>[l(le,{modelValue:t(n).expireTime,"onUpdate:modelValue":e[10]||(e[10]=a=>t(n).expireTime=a),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(p,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:o(()=>[l(le,{modelValue:t(n).createTime,"onUpdate:modelValue":e[11]||(e[11]=a=>t(n).createTime=a),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(j,null,{default:o(()=>[l(B,null,{default:o(()=>[l(p,null,{default:o(()=>[l(u,{onClick:Z},{default:o(()=>e[16]||(e[16]=[P(" \u6536\u8D77 ")])),_:1}),l(u,{onClick:he},{default:o(()=>e[17]||(e[17]=[P(" \u91CD\u7F6E ")])),_:1}),l(u,{onClick:v},{default:o(()=>[l(r,{icon:"ep:search",class:"mr-5px"}),e[18]||(e[18]=P(" \u641C\u7D22 "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[re,t(A)]]),t(y)===0?(f(),T(j,{key:0},{default:o(()=>[(f(!0),D(q,null,ce(t(w),(a,V)=>(f(),T(B,{class:"card",key:V,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>$(V),onMouseout:S=>X(V)},{default:o(()=>[l(oe,{onClick:S=>async function(_e,ie){H.value?J({name:"MerchantApply",query:{row:JSON.stringify(ie)}}):W.value.open(_e,ie)}("\u67E5\u770B",a)},{default:o(()=>[c("div",oa,[c("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:a.name},b(a.name),9,na)]),l(me,{url:a==null?void 0:a.logoUrl,width:151,height:85},{label:o(()=>[c("p",null,"\u8054\u7EDC\u4EBA:"+b(a.contact),1),c("p",null,"\u8054\u7EDC\u4EBA\u624B\u673A\u53F7:"+b(a.contactNumber),1),c("p",null,"\u7533\u8BF7\u65F6\u95F4:"+b(t($e)(a.createTime,"YYYY-MM-DD")),1),c("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:a.address},b(te(a.areaId)),9,ia)]),_:2},1032,["url"])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):Y("",!0),t(y)===1?(f(),T(j,{key:1},{default:o(()=>[(f(!0),D(q,null,ce(t(w),(a,V)=>(f(),T(B,{class:"card",key:V,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>$(V),onMouseout:S=>X(V)},{default:o(()=>[l(oe,{onClick:S=>F("\u67E5\u770B",a)},{default:o(()=>[c("div",sa,[c("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:a.name},b(a.name),9,ra),L((f(),D("div",{onClick:Ne(S=>F("\u7F16\u8F91",a),["stop"]),class:"setting"},[l(we,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[l(t(Pe))]),_:1})],8,ca)),[[re,a.showSetting&&!t(H)],[ne,["sale:merchant:update"]]])]),l(me,{url:a==null?void 0:a.logoUrl,width:151,height:85,"text-container-style":{"line-height":"30px"}},{label:o(()=>[c("p",null,"\u9500\u91CF:"+b(a.salesVolume),1),c("p",null,"\u5546\u54C1\u6570\u91CF:"+b(a.skuCount),1),c("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:a.address},b(te(a.areaId)),9,ma)]),_:2},1032,["url"])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):Y("",!0),t(w).length===0?(f(),D("div",ua,e[19]||(e[19]=[c("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1)]))):Y("",!0),l(ge,{total:t(U),page:t(n).pageNo,"onUpdate:page":e[12]||(e[12]=a=>t(n).pageNo=a),limit:t(n).pageSize,"onUpdate:limit":e[13]||(e[13]=a=>t(n).pageSize=a),onPagination:g},null,8,["total","page","limit"])]),_:1}),l(Qe,{tabs:t(G),initialData:t(d),buttonActions:t(pe),ref_key:"MerchantTabsRef",ref:I,isDetail:t(E),initialComponent:ue,dialogTitle:t(z),id:t(K),modelValue:t(_),"onUpdate:modelValue":e[14]||(e[14]=a=>se(_)?_.value=a:null),openType:t(Q),visible:t(_)},null,8,["tabs","initialData","buttonActions","isDetail","dialogTitle","id","modelValue","openType","visible"]),l(We,{ref_key:"MerchantApplyTabsRef",ref:W,onSuccess:R},null,512)],64)}}}),pa=ea(da,[["__scopeId","data-v-99700b50"]]);export{pa as default};
|