import{l as P,d as B}from"./pay_type-11f4c206.js";import{p as R}from"./global-0d825ba6.js";import{u as K}from"./index-8db2df2c.js";import{_ as $}from"./edit.vue_vue_type_script_setup_true_lang-822d4975.js";import{M as D,B as L,L as M,S as N,a as V,b as A}from"./ui-ba7aaa7e.js";import{e as I,r as u,d as H,a2 as U,M as j,P as n,a3 as l,a4 as t,H as c,a7 as v,A as m,f as i,I as q}from"./vue-bf422dc1.js";import"./libs-51817cd7.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./echarts-bf9d612c.js";import"./icons-a8498fb6.js";import"./index.vue_vue_type_script_setup_true_lang-b9ebc9cb.js";import"./config-3b189d83.js";const E=[{colKey:"id",title:"ID"},{colKey:"name",title:"名称"},{colKey:"logo",title:"Logo"},{colKey:"ico",title:"图标"},{colKey:"operate",title:"操作",fixed:"right"}],F={class:"category-header c-flex"},G={class:"l"},le=I({__name:"index",setup(J){const o=u({defaultPageSize:20,total:0,defaultCurrent:1}),r=u([]),s=async()=>{const{data:e}=await P({page:o.value.defaultCurrent,limit:o.value.defaultPageSize});r.value=e.list,o.value={defaultPageSize:e.limit,total:e.total,defaultCurrent:e.page}};s();const y=e=>{o.value.defaultCurrent=e.current,o.value.defaultPageSize=e.pageSize,s()},x=K(),C=H(()=>({offsetTop:x.isUseTabsRouter?48:0,container:`.${R}-layout`})),f=u(),_=e=>{f.value.init(e)},k=async e=>{(await B({id:e})).code===1&&(D.success("删除成功"),s())};return(e,d)=>{const b=L,g=U("wp-image"),h=M,w=N,S=V,z=A,p=j("perms");return n(),l(z,{title:"支付方式分类",class:"basic-container",bordered:!1},{actions:t(()=>[c(" 用于购卡页显示选择支付方式；此处和支付授权渠道有关联；为系统预设性，非必要请勿删除 ")]),default:t(()=>[v("div",F,[v("div",G,[m((n(),l(b,{theme:"primary",onClick:d[0]||(d[0]=a=>_(0))},{default:t(()=>[c("添加")]),_:1})),[[p,["adminapi/channel/payType/add"]]])])]),i(S,{ref:"tableRef","row-key":"id",data:r.value,columns:q(E),hover:r.value.length>0,"header-affixed-top":C.value,pagination:o.value,"max-height":"auto","table-layout":"auto","lazy-load":"",onPageChange:y},{logo:t(({row:a})=>[i(g,{src:a.logo,style:{width:"80px",height:"30px"}},null,8,["src"])]),ico:t(({row:a})=>[i(g,{src:a.ico,shape:"circle",style:{width:"30px",height:"30px"}},null,8,["src"])]),operate:t(({row:a})=>[i(w,null,{default:t(()=>[m((n(),l(h,{theme:"primary",size:"small",onClick:T=>_(a.id)},{default:t(()=>[c("编辑")]),_:2},1032,["onClick"])),[[p,["adminapi/channel/payType/edit"]]]),m((n(),l(h,{theme:"danger",size:"small",onClick:T=>k(a.id)},{default:t(()=>[c("删除")]),_:2},1032,["onClick"])),[[p,["adminapi/channel/payType/del"]]])]),_:2},1024)]),_:1},8,["data","columns","hover","header-affixed-top","pagination"]),i($,{ref_key:"editRef",ref:f,onSuccess:s},null,512)]),_:1})}}});export{le as default};
