1 |
- import{_ as Ke,__tla as Ee}from"./ContentWrap.vue_vue_type_script_setup_true_lang-bed37a76.js";import{_ as ze,__tla as Le}from"./index.vue_vue_type_script_setup_true_lang-cd12277f.js";import{d as Oe,u as Re,y as je,e as Be,r as s,p as Je,x as qe,b as Ze,a3 as $e,o as f,c as U,f as l,A as o,B as c,a as t,a1 as Me,aC as Ge,k as q,C as D,D as P,a2 as Y,v as Ve,a4 as w,F as Z,Q as xe,E as b,aD as Qe,aE as Xe,P as We,a9 as ea,aa,J as ta,_ as la,a8 as oa,U as na,I as ra,H as sa,K as ia,V as ca,aF as ma,L as ua,M as da,__tla as pa}from"./index-6e0fa573.js";import{E as _a,__tla as ha}from"./el-card-f999e23d.js";import{I as Se,__tla as va}from"./ImageCard-2e4257de.js";import{M as C,__tla as fa}from"./index-df7848c8.js";import ya,{__tla as ba}from"./MerchantTabs-37522ddc.js";import{_ as ga,__tla as wa}from"./MerchantApplyTabs.vue_vue_type_style_index_0_lang-4482758e.js";import{f as Ma,__tla as Va}from"./formatTime-4408999b.js";import{g as xa,__tla as Sa}from"./index-be0d2849.js";import{c as Ca,__tla as ka}from"./template-fcfd5cb7.js";import{u as Ua,__tla as Da}from"./useMessage-7f978edc.js";import{_ as Ia}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ta}from"./index-99c4720b.js";import{__tla as Ha}from"./SPuUploadImg-57a4a7e3.js";import{__tla as Na}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-16273a08.js";import{__tla as Aa}from"./index-f34352a4.js";import{__tla as Pa}from"./el-image-viewer-bd37a3c0.js";import{__tla as Ya}from"./Dialog-a16029e3.js";import{__tla as Fa}from"./MerchantApplyBaseInfo-a9059877.js";import{__tla as Ka}from"./style.css_vue_type_style_index_0_src_true_lang-f8cebfb8.js";import{__tla as Ea}from"./UploadImgs-d20458da.js";import{__tla as za}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-eaa39ea2.js";import{__tla as La}from"./UploadImg-db85e21f.js";import"./tree-0af4953a.js";import{__tla as Oa}from"./MerchantApplyLog-d476afe4.js";import{__tla as Ra}from"./el-descriptions-item-868c8d3f.js";import{__tla as ja}from"./el-timeline-item-248613ef.js";import{__tla as Ba}from"./dict-33efee75.js";import{__tla as Ja}from"./permission-76a7b86a.js";let Ce,qa=Promise.all([(()=>{try{return Ee}catch{}})(),(()=>{try{return Le}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 Da}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 Fa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ja}catch{}})()]).then(async()=>{let $,G,Q,X,W,ee,ae,te,le,oe,ne,re,F,se;$={class:"search"},G={style:{"text-align":"right"},class:"search-input"},Q={class:"searchMore"},X={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},W=["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=[(I=>(ua("data-v-b6125279"),I=I(),da(),I))(()=>c("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u6237",-1))],F="views/system/sale/merchant/components/MerchantBaseInfo",se=Oe({name:"Merchant",__name:"index",setup(I){const{currentRoute:Za,push:ie}=Re(),ke=je(),T=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});Je("updateInitialData",u);const Ue=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(R("common.createSuccess")),g()):(await C.updateMerchant(d),k.success(R("common.updateSuccess")),g()),x.value=!1}finally{}},type:"primary",isAdd:!0}]),K=s(),E=s(0),x=s(!1),z=s(""),L=s(!1),me=s("");async function O(r,a){if(me.value=r,a!=null){if(u.value=await C.getMerchant(a.id),T.value)return void ie({name:"MobileDetail",query:{tabs:JSON.stringify(ce.value),initialComponent:F.value,id:a.id,initialData:JSON.stringify(u.value),opentype:r}});L.value=r=="\u67E5\u770B",z.value=r+"-"+a.name,E.value=a.id}else L.value=!1,z.value=r,E.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(),H=s(!1);function de(r){M.value[r].showSetting=!0}function pe(r){M.value[r].showSetting=!1}const De=()=>{H.value=!H.value},_e=()=>{H.value=!1},k=Ua(),{t:R}=We(),N=s(!0),M=s([]),A=s(0),n=qe({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 g=async()=>{N.value=!0;try{const r=await C.getMerchantPage(n);r.list.forEach(a=>{a.showSetting=!1}),M.value=r.list,A.value=r.total}finally{N.value=!1}},j=async()=>{N.value=!0;try{const r=await C.getMerchantApplyPage({checkStatus:0});r.list.forEach(a=>{a.showSetting=!1}),M.value=r.list,A.value=r.total}finally{N.value=!1}},v=()=>{n.pageNo=1,g(),_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(R("common.delSuccess")),await g(),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,y.value==0?j():g()};return Ze(async()=>{ve.value=await xa(),y.value==0?j().then(()=>{A.value===0&&(y.value=1,g())}):g()}),(r,a)=>{const d=ea,p=aa,_=ta,i=la,m=oa,h=na,ye=ra,B=sa,J=ia,Ne=ca,be=_a,Ae=ma,Pe=ze,Ye=Ke,ge=$e("hasPermi");return f(),U(Z,null,[l(Ye,{class:"Content",style:{"min-height":"400px",border:"unset"}},{default:o(()=>[c("div",$,[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",G,[l(_,{icon:t(Ge),onClick:De},null,8,["icon"]),t(T)?Y("",!0):q((f(),D(_,{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"]]])])]),q(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:w(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:w(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:w(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:w(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:w(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:w(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:w(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:w(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(J,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(H)]]),t(y)===0?(f(),D(J,{key:0},{default:o(()=>[(f(!0),U(Z,null,xe(t(M),(e,V)=>(f(),D(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(Fe,we){T.value?ie({name:"MerchantApply",query:{row:JSON.stringify(we)}}):ue.value.open(Fe,we)}("\u67E5\u770B",e)},{default:o(()=>[c("div",X,[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,W)]),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(),D(J,{key:1},{default:o(()=>[(f(!0),U(Z,null,xe(t(M),(e,V)=>(f(),D(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),q((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(Xe))]),_:1})],8,le)),[[Ve,e.showSetting&&!t(T)],[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(M).length===0?(f(),U("div",ne,re)):Y("",!0),l(Pe,{total:t(A),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:g},null,8,["total","page","limit"])]),_:1}),l(ya,{tabs:t(ce),initialData:t(u),buttonActions:t(Ue),ref_key:"MerchantTabsRef",ref:K,isDetail:t(L),initialComponent:F,dialogTitle:t(z),id:t(E),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-b6125279"]])});export{qa as __tla,Ce as default};
|