import{d as $,a6 as j,b as A,p as q,c as n,e as p,f as B,g as i,h as o,i as u,u as l,F as v,j as C,k as f,m as _,t as k,A as D,a1 as K,a2 as M,N as w,E as y,_ as I}from"./index.0308b213.js";import{A as O}from"./index.1d26a072.js";import{r as Q,e as G,f as H,g as J,h as R,i as W}from"./join.25402ad0.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const X={class:"filter-form"},Y=_("\u4E0D\u9650"),Z=_("\u7B5B\u9009"),ee={class:"data"},te={class:"table"},le={class:"logo"},oe=["src"],ae={class:""},ue={class:"top"},se=_("\u6062\u590D"),ne=_("\u5F7B\u5E95\u5220\u9664"),re={class:"pagination"},ie=$({setup(de){const{OpPlatform:g}=j(),a=A({label:0,agentid:"",cid:"",keyword:"",page:1,limit:10}),d=A({count:0,list:[],store_category_label:[],categorys:[]}),b=()=>{r()},V=()=>g.value=="agent"?R(a):W(a),r=()=>{V().then(s=>{d.count=s.count,d.list=s.list,d.store_category_label=s.store_category_label,d.categorys=s.categorys})};q(()=>[a.page,a.limit],()=>{r()}),r();const S=s=>{w.alert("\u786E\u5B9A\u9700\u8981\u6062\u590D\u5546\u6237\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{g.value=="agent"?Q(s).then(t=>{y({message:t.msg,type:"success"}),r()}):G(s).then(t=>{y({message:t.msg,type:"success"}),r()})}).catch(()=>{r()})},F=s=>{w.alert("\u786E\u5B9A\u9700\u8981\u5F7B\u5E95\u5220\u9664\u5546\u6237\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{g.value=="agent"?H(s).then(t=>{y({message:t.msg,type:"success"}),r()}):J(s).then(t=>{y({message:t.msg,type:"success"}),r()})}).catch(()=>{r()})};return(s,t)=>{const x=n("el-radio"),z=n("el-radio-group"),h=n("el-form-item"),U=n("el-option"),L=n("el-select"),N=n("el-input"),E=n("el-button"),c=n("el-table-column"),P=n("el-table"),T=n("el-pagination");return p(),B(v,null,[i("div",X,[o(l(M),{model:l(a),"label-width":"80px"},{default:u(()=>[o(h,{class:"tn-el-form-item",label:"\u6807\u7B7E"},{default:u(()=>[o(z,{modelValue:l(a).label,"onUpdate:modelValue":t[0]||(t[0]=e=>l(a).label=e)},{default:u(()=>[o(x,{label:0},{default:u(()=>[Y]),_:1}),(p(!0),B(v,null,C(l(d).store_category_label,(e,m)=>(p(),f(x,{kye:`query-category-label-${m}`,label:e.id},{default:u(()=>[_(k(e.title),1)]),_:2},1032,["kye","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),o(h,{class:"tn-el-form-item",label:"\u5176\u4ED6"},{default:u(()=>[l(g)=="shangpu"?(p(),f(l(O),{key:0,modelValue:l(a).agentid,"onUpdate:modelValue":t[1]||(t[1]=e=>l(a).agentid=e),onChange:b},null,8,["modelValue"])):D("",!0),o(L,{modelValue:l(a).cid,"onUpdate:modelValue":t[2]||(t[2]=e=>l(a).cid=e),placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",filterable:"",clearable:"",style:{"margin-left":"10px"}},{default:u(()=>[(p(!0),B(v,null,C(l(d).categorys,(e,m)=>(p(),f(U,{key:`merchant-categorys-${m}`,value:e.id,label:e.title},{default:u(()=>[_(k(e.title),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"]),o(N,{modelValue:l(a).keyword,"onUpdate:modelValue":t[3]||(t[3]=e=>l(a).keyword=e),placeholder:"\u95E8\u5E97\u540D\u79F0/\u95E8\u5E97id",onKeyup:t[4]||(t[4]=K(e=>b(),["enter"])),style:{width:"auto","margin-left":"10px"}},null,8,["modelValue"])]),_:1}),o(h,null,{default:u(()=>[o(E,{type:"primary",onClick:b},{default:u(()=>[Z]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",ee,[i("div",te,[o(P,{data:l(d).list},{default:u(()=>[o(c,{fixed:"",label:"\u95E8\u5E97logo",width:"100px",align:"center"},{default:u(e=>[i("div",le,[i("div",null,[i("img",{style:{width:"50px",height:"50px"},src:e.row.logo},null,8,oe)])])]),_:1}),o(c,{fixed:"",label:"\u95E8\u5E97\u540D\u79F0",prop:"title",align:"center"}),o(c,{fixed:"",label:"\u95E8\u5E97\u5730\u5740",prop:"address",align:"center"}),o(c,{fixed:"",label:"\u8054\u7CFB\u7535\u8BDD",prop:"telephone",align:"center"}),l(g)==="shangpu"?(p(),f(c,{key:0,label:"\u6240\u5C5E\u57CE\u5E02",prop:"agentid_title",align:"center"})):D("",!0),o(c,{label:"\u6807\u7B7E",prop:"label_title",align:"center"}),o(c,{label:"\u5220\u9664\u65F6\u95F4",prop:"delete_time",align:"center"}),o(c,{label:"\u64CD\u4F5C",width:"auto"},{default:u(e=>[i("div",ae,[i("div",ue,[o(E,{size:"medium",type:"success",onClick:m=>S(e.row.id)},{default:u(()=>[se]),_:2},1032,["onClick"]),o(E,{size:"medium",type:"danger",onClick:m=>F(e.row.id)},{default:u(()=>[ne]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),i("div",re,[o(T,{currentPage:l(a).page,"onUpdate:currentPage":t[5]||(t[5]=e=>l(a).page=e),"page-size":l(a).limit,"onUpdate:page-size":t[6]||(t[6]=e=>l(a).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(d).count},null,8,["currentPage","page-size","total"])])],64)}}});const ye=I(ie,[["__scopeId","data-v-24527509"]]);export{ye as default};
