1 |
- import{_ as Ke,__tla as Fe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-33dea697.js";import{_ as Re,__tla as ze}from"./index.vue_vue_type_script_setup_true_lang-75f84d87.js";import{d as Oe,u as Le,y as je,e as Be,r as s,p as qe,x as Je,b as Ge,a3 as Ze,o as f,c as U,f as l,B as o,C as c,a as t,a2 as Me,aC as $e,k as J,A as I,E as P,D as Y,v as Ve,a4 as M,F as G,R as xe,G as b,aD as Qe,aE as We,Q as Xe,a9 as ea,aa,K as ta,_ as la,a8 as oa,V as na,J as ra,I as sa,L as ia,W as ca,aF as ma,M as ua,N as da,__tla as pa}from"./index-e8bff8cb.js";import{E as _a,__tla as ha}from"./el-card-f9558d99.js";import{I as Se,__tla as va}from"./ImageCard-5f2b8ac2.js";import{M as C,__tla as fa}from"./index-5c5c6b69.js";import ya,{__tla as ba}from"./MerchantTabs-cbf842f6.js";import{_ as ga,__tla as wa}from"./MerchantApplyTabs.vue_vue_type_style_index_0_lang-84c1186b.js";import{f as Ma,__tla as Va}from"./formatTime-4fdd5566.js";import{g as xa,__tla as Sa}from"./index-4bde5d87.js";import{c as Ca,__tla as ka}from"./template-b2de0d25.js";import{u as Da,__tla as Ua}from"./useMessage-de42a595.js";import{_ as Ia}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ta}from"./index-35928fe5.js";import{__tla as Ha}from"./SPuUploadImg-792a299f.js";import{__tla as Na}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-1394f284.js";import{__tla as Aa}from"./index-32ca9885.js";import{__tla as Pa}from"./el-image-viewer-aab7739e.js";import{__tla as Ya}from"./Dialog-4d17ac25.js";import{__tla as Ea}from"./MerchantApplyBaseInfo-697e31fc.js";import{__tla as Ka}from"./style.css_vue_type_style_index_0_src_true_lang-d66aa64c.js";import{__tla as Fa}from"./UploadImgs-2ffc4b6b.js";import{__tla as Ra}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-5af276cc.js";import{__tla as za}from"./UploadImg-7600c145.js";import"./tree-0af4953a.js";import{__tla as Oa}from"./MerchantApplyLog-25d143f3.js";import{__tla as La}from"./el-descriptions-item-d429ad13.js";import{__tla as ja}from"./el-timeline-item-06d19d31.js";import{__tla as Ba}from"./dict-4a54e490.js";import{__tla as qa}from"./permission-e1298f0a.js";let Ce,Ja=Promise.all([(()=>{try{return Fe}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return qa}catch{}})()]).then(async()=>{let Z,$,Q,W,X,ee,ae,te,le,oe,ne,re,E,se;Z={class:"search"},$={style:{"text-align":"right"},class:"search-input"},Q={class:"searchMore"},W={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},X=["title"],ee=["title"],ae={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},te=["title"],le=["onClick"],oe=["title"],ne={key:2},re=[(T=>(ua("data-v-c72cde45"),T=T(),da(),T))(()=>c("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],E="views/system/sale/merchant/components/MerchantBaseInfo",se=Oe({name:"Merchant",__name:"index",setup(T){const{currentRoute:Ga,push:ie}=Le(),ke=je(),H=Be(()=>ke.getMobile),ce=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"}]),u=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});qe("updateInitialData",u);const De=s([{name:"\u5220\u9664",action:function(){Te(u.value.id,u.value.name)},type:"danger",isAdd:!1},{name:"\u4FDD\u5B58",action:async function(){const r=K.value.ComponentRef.validate();if(!K.value.picUrl)return void k.error("\u8BF7\u4E0A\u4F20logo");const a=await r;if(console.log(a),!!a)try{let d=u.value;d.otherCertificate=d.otherCertificate.map(p=>p.url),u.value.id==null?(await C.createMerchant(d).then(p=>{console.log("\u521B\u5EFA\u6210\u529F",p),console.log(u.value.name),Ca({merId:p.merId,shopId:p.shopId,name:u.value.name})}),k.success(L("common.createSuccess")),w()):(await C.updateMerchant(d),k.success(L("common.updateSuccess")),w()),x.value=!1}finally{}},type:"primary",isAdd:!0}]),K=s(),F=s(0),x=s(!1),R=s(""),z=s(!1),me=s("");async function O(r,a){if(me.value=r,a!=null){if(u.value=await C.getMerchant(a.id),H.value)return void ie({name:"MobileDetail",query:{tabs:JSON.stringify(ce.value),initialComponent:E.value,id:a.id,initialData:JSON.stringify(u.value),opentype:r}});z.value=r=="\u67E5\u770B",R.value=r+"-"+a.name,F.value=a.id}else z.value=!1,R.value=r,F.value=0,function(){for(const d of Object.keys(u.value))u.value[d]=void 0;u.value.status=10}();x.value=!0}const ue=s(),N=s(!1);function de(r){g.value[r].showSetting=!0}function pe(r){g.value[r].showSetting=!1}const Ue=()=>{N.value=!N.value},_e=()=>{N.value=!1},k=Da(),{t:L}=Xe(),A=s(!0),g=s([]),D=s(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:[]}),he=s();s(!1);const w=async()=>{A.value=!0;try{const r=await C.getMerchantPage(n);r.list.forEach(a=>{a.showSetting=!1}),g.value=r.list,D.value=r.total}finally{A.value=!1}},j=async()=>{A.value=!0;try{const r=await C.getMerchantApplyPage({checkStatus:0});r.list.forEach(a=>{a.showSetting=!1}),g.value=r.list,D.value=r.total}finally{A.value=!1}},v=()=>{n.pageNo=1,w(),_e()},Ie=()=>{he.value.resetFields(),v()};s();const Te=async(r,a)=>{try{await k.delConfirm(`\u786E\u5B9A\u5220\u9664${a}\uFF1F\u5220\u9664\u540E\u5C06\u81EA\u52A8\u4E0B\u67B6\u8BE5\u5546\u6237\u6240\u6709\u5546\u54C1`,"\u5220\u9664\u5546\u6237"),await C.deleteMerchant(r),k.success(L("common.delSuccess")),await w(),x.value=!1}catch{}},ve=s([]),fe=r=>((d,p)=>{const _=[];let i=p;for(;i!==null;){const m=d.get(i);if(!m)break;_.unshift(m.name),i=m.parentId}return _})((d=>{const p=new Map,_=[...d.map(i=>({...i,parentId:null}))];for(;_.length>0;){const i=_.pop();p.set(i.id,{name:i.name,parentId:i.parentId}),i.children&&_.push(...i.children.map(m=>({...m,parentId:i.id})))}return p})(ve.value),r).join("/"),y=s(0),He=r=>{y.value=r.paneName,g.value=[],D.value=0,y.value==0?j():w()};return Ge(async()=>{ve.value=await xa(),y.value==0?j().then(()=>{D.value===0&&(y.value=1,w())}):w()}),(r,a)=>{const d=ea,p=aa,_=ta,i=la,m=oa,h=na,ye=ra,B=sa,q=ia,Ne=ca,be=_a,Ae=ma,Pe=Re,Ye=Ke,ge=Ze("hasPermi");return f(),U(G,null,[l(Ye,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:o(()=>[c("div",Z,[l(p,{modelValue:t(y),"onUpdate:modelValue":a[0]||(a[0]=e=>Me(y)?y.value=e:null),onTabClick:He,class:"parent-tabs"},{default:o(()=>[l(d,{label:"\u5F85\u5BA1\u6838",name:0}),l(d,{label:"\u5728\u7528",name:1})]),_:1},8,["modelValue"]),c("div",$,[l(_,{icon:t($e),onClick:Ue},null,8,["icon"]),t(H)?Y("",!0):J((f(),I(_,{key:0,onClick:a[1]||(a[1]=e=>O("\u65B0\u589E"))},{default:o(()=>[l(i,{class:"mr-5px",icon:"ep:plus"}),P(" \u65B0\u589E ")]),_:1})),[[ge,["sale:merchant:create"]]])])]),J(c("div",Q,[l(Ne,{class:"-mb-15px",model:t(n),ref_key:"queryFormRef",ref:he,inline:!0,"label-width":"68px"},{default:o(()=>[l(h,{label:"\u5546\u6237\u540D\u79F0",prop:"name"},{default:o(()=>[l(m,{modelValue:t(n).name,"onUpdate:modelValue":a[2]||(a[2]=e=>t(n).name=e),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u8D1F\u8D23\u4EBA",prop:"contact"},{default:o(()=>[l(m,{modelValue:t(n).contact,"onUpdate:modelValue":a[3]||(a[3]=e=>t(n).contact=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u6240\u5728\u5730",prop:"address"},{default:o(()=>[l(m,{modelValue:t(n).address,"onUpdate:modelValue":a[4]||(a[4]=e=>t(n).address=e),placeholder:"\u8BF7\u8F93\u5165\u6240\u5728\u5730",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"contactNumber"},{default:o(()=>[l(m,{modelValue:t(n).contactNumber,"onUpdate:modelValue":a[5]||(a[5]=e=>t(n).contactNumber=e),placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u5B98\u7F51",prop:"website"},{default:o(()=>[l(m,{modelValue:t(n).website,"onUpdate:modelValue":a[6]||(a[6]=e=>t(n).website=e),placeholder:"\u8BF7\u8F93\u5165\u5B98\u7F51",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u7EF4\u6743\u7535\u8BDD",prop:"complaintsHotline"},{default:o(()=>[l(m,{modelValue:t(n).complaintsHotline,"onUpdate:modelValue":a[7]||(a[7]=e=>t(n).complaintsHotline=e),placeholder:"\u8BF7\u8F93\u5165\u7EF4\u6743\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u5BA2\u670D\u7535\u8BDD",prop:"customerServiceHotline"},{default:o(()=>[l(m,{modelValue:t(n).customerServiceHotline,"onUpdate:modelValue":a[8]||(a[8]=e=>t(n).customerServiceHotline=e),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u670D\u7535\u8BDD",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u90AE\u7BB1",prop:"email"},{default:o(()=>[l(m,{modelValue:t(n).email,"onUpdate:modelValue":a[9]||(a[9]=e=>t(n).email=e),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",onKeyup:M(v,["enter"])},null,8,["modelValue"])]),_:1}),l(h,{label:"\u670D\u52A1\u5230\u671F\u65F6\u95F4",prop:"expireTime"},{default:o(()=>[l(ye,{modelValue:t(n).expireTime,"onUpdate:modelValue":a[10]||(a[10]=e=>t(n).expireTime=e),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(h,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:o(()=>[l(ye,{modelValue:t(n).createTime,"onUpdate:modelValue":a[11]||(a[11]=e=>t(n).createTime=e),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(q,null,{default:o(()=>[l(B,null,{default:o(()=>[l(h,null,{default:o(()=>[l(_,{onClick:_e},{default:o(()=>[P(" \u6536\u8D77 ")]),_:1}),l(_,{onClick:Ie},{default:o(()=>[P(" \u91CD\u7F6E ")]),_:1}),l(_,{onClick:v},{default:o(()=>[l(i,{icon:"ep:search",class:"mr-5px"}),P(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[Ve,t(N)]]),t(y)===0?(f(),I(q,{key:0},{default:o(()=>[(f(!0),U(G,null,xe(t(g),(e,V)=>(f(),I(B,{class:"card",key:V,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>de(V),onMouseout:S=>pe(V)},{default:o(()=>[l(be,{onClick:S=>async function(Ee,we){H.value?ie({name:"MerchantApply",query:{row:JSON.stringify(we)}}):ue.value.open(Ee,we)}("\u67E5\u770B",e)},{default:o(()=>[c("div",W,[c("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},b(e.name),9,X)]),l(Se,{url:e==null?void 0:e.logoUrl,width:151,height:85},{label:o(()=>[c("p",null,"\u8054\u7EDC\u4EBA:"+b(e.contact),1),c("p",null,"\u8054\u7EDC\u4EBA\u624B\u673A\u53F7:"+b(e.contactNumber),1),c("p",null,"\u7533\u8BF7\u65F6\u95F4:"+b(t(Ma)(e.createTime,"YYYY-MM-DD")),1),c("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:e.address},b(fe(e.areaId)),9,ee)]),_:2},1032,["url"])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):Y("",!0),t(y)===1?(f(),I(q,{key:1},{default:o(()=>[(f(!0),U(G,null,xe(t(g),(e,V)=>(f(),I(B,{class:"card",key:V,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:S=>de(V),onMouseout:S=>pe(V)},{default:o(()=>[l(be,{onClick:S=>O("\u67E5\u770B",e)},{default:o(()=>[c("div",ae,[c("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},b(e.name),9,te),J((f(),U("div",{onClick:Qe(S=>O("\u7F16\u8F91",e),["stop"]),class:"setting"},[l(Ae,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[l(t(We))]),_:1})],8,le)),[[Ve,e.showSetting&&!t(H)],[ge,["sale:merchant:update"]]])]),l(Se,{url:e==null?void 0:e.logoUrl,width:151,height:85,"text-container-style":{"line-height":"30px"}},{label:o(()=>[c("p",null,"\u9500\u91CF:"+b(e.salesVolume),1),c("p",null,"\u5546\u54C1\u6570\u91CF:"+b(e.skuCount),1),c("p",{style:{"white-space":"nowrap","text-overflow":"ellipsis",width:"100%",overflow:"hidden"},title:e.address},b(fe(e.areaId)),9,oe)]),_:2},1032,["url"])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1})):Y("",!0),t(g).length===0?(f(),U("div",ne,re)):Y("",!0),l(Pe,{total:t(D),page:t(n).pageNo,"onUpdate:page":a[12]||(a[12]=e=>t(n).pageNo=e),limit:t(n).pageSize,"onUpdate:limit":a[13]||(a[13]=e=>t(n).pageSize=e),onPagination:w},null,8,["total","page","limit"])]),_:1}),l(ya,{tabs:t(ce),initialData:t(u),buttonActions:t(De),ref_key:"MerchantTabsRef",ref:K,isDetail:t(z),initialComponent:E,dialogTitle:t(R),id:t(F),modelValue:t(x),"onUpdate:modelValue":a[14]||(a[14]=e=>Me(x)?x.value=e:null),openType:t(me)},null,8,["tabs","initialData","buttonActions","isDetail","dialogTitle","id","modelValue","openType"]),l(ga,{ref_key:"MerchantApplyTabsRef",ref:ue,onSuccess:j},null,512)],64)}}}),Ce=Ia(se,[["__scopeId","data-v-c72cde45"]])});export{Ja as __tla,Ce as default};
|