import{f as w,h as y,i as k}from"./member.b42ee60e.js";import{_ as V}from"./AddGroup.vue_vue_type_script_setup_true_lang.ba379a7d.js";import{d as z,b,r as m,p as G,c as d,e as U,f as I,g as s,h as e,i as r,u,q as N,F as $,m as v,N as P,E as F,_ as T}from"./index.0308b213.js";import"./index.dfdc0704.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.2c48f49b.js";import"./vuedraggable.umd.405b1bec.js";import"./index.35b8c9ab.js";import"./index.9e8820cd.js";import"./sort_out.2008c10d.js";import"./index.1d26a072.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";import"./SelectCategory.5a097d89.js";import"./list.4b7efdc5.js";const q={class:"data"},M={class:"operation-btn"},R=v("\u6DFB\u52A0\u63A8\u5E7F\u5458\u7B49\u7EA7"),j={class:"table"},H={class:"table-operation-btn"},L={class:"bottom"},O=v("\u7F16\u8F91"),S=v("\u5220\u9664"),J={class:"bottom"},K={class:"pagination"},Q=z({setup(W){const n=b({keyword:"",timeRange:[],page:1,limit:20}),c=b({list:[],count:0});m([]),m("");const p=()=>{w(n).then(a=>{c.list=a.list,c.count=a.count})};p();let i=m(!1),g=m(0);const E=a=>{g.value=a,i.value=!0},D=()=>{i.value=!1,g.value=0,p()},h=a=>{P.confirm("\u786E\u5B9A\u5220\u9664\u5417\uFF1F","\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{y({id:a}).then(t=>{F.success("\u5220\u9664\u6210\u529F"),p()})})};G(()=>[n.page,n.limit],()=>{p()});const A=a=>{console.log(a),k(a).then(t=>{F.success("\u8BBE\u7F6E\u6210\u529F"),p()})};return(a,t)=>{const f=d("el-button"),l=d("el-table-column"),C=d("el-switch"),x=d("el-table"),B=d("el-pagination");return U(),I($,null,[s("div",q,[s("div",M,[e(f,{class:"btn",type:"primary",onClick:t[0]||(t[0]=o=>E(0))},{default:r(()=>[R]),_:1})]),s("div",j,[e(x,{data:u(c).list,onSelectionChange:t[1]||(t[1]=()=>{})},{default:r(()=>[e(l,{label:"id",prop:"id"}),e(l,{label:"\u4EE3\u7406",prop:"agent_title"}),e(l,{label:"\u540D\u79F0",prop:"title"}),e(l,{label:"\u5916\u5356\u4E00\u7EA7\u4F63\u91D1",prop:"commission1"}),e(l,{label:"\u5916\u5356\u4E8C\u7EA7\u4F63\u91D1",prop:"commission2"}),e(l,{label:"\u5347\u7EA7\u6761\u4EF6",prop:"update_condition_text"}),e(l,{label:"\u662F\u5426\u9ED8\u8BA4",prop:"is_default_degree"},{default:r(o=>[e(C,{modelValue:o.row.is_default_degree,"onUpdate:modelValue":_=>o.row.is_default_degree=_,"active-value":1,"inactive-value":0,"active-text":"\u9ED8\u8BA4","inactive-text":"\u53D6\u6D88",onClick:_=>A(o.row.id)},null,8,["modelValue","onUpdate:modelValue","onClick"])]),_:1}),e(l,{fixed:"right",label:"\u64CD\u4F5C"},{default:r(o=>[s("div",H,[s("div",L,[e(f,{size:"small",type:"primary",onClick:_=>E(o.row.id)},{default:r(()=>[O]),_:2},1032,["onClick"]),e(f,{size:"small",type:"danger",onClick:_=>h(o.row.id)},{default:r(()=>[S]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),s("div",J,[s("div",K,[e(B,{currentPage:u(n).page,"onUpdate:currentPage":t[2]||(t[2]=o=>u(n).page=o),"page-size":u(n).limit,"onUpdate:page-size":t[3]||(t[3]=o=>u(n).limit=o),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:u(c).count},null,8,["currentPage","page-size","total"])])]),e(V,{modelValue:u(i),"onUpdate:modelValue":t[4]||(t[4]=o=>N(i)?i.value=o:i=o),EditId:u(g),onOnClose:t[5]||(t[5]=()=>{}),onHideEdit:D},null,8,["modelValue","EditId"])],64)}}});const ce=T(Q,[["__scopeId","data-v-34a59aa9"]]);export{ce as default};
