import{_ as N}from"./EditDialog.vue_vue_type_script_setup_true_lang.89693632.js";import{b as P,d as T}from"./index.289eb9c3.js";import{d as U,a6 as I,b as F,r as d,p as q,c as i,e as C,f as L,g as a,h as e,i as s,u as t,k as M,q as $,A as j,F as O,m as g,y as v,N as R,E as G,_ as H}from"./index.0308b213.js";import"./useInstance.233fbdde.js";const J={class:"filter-form"},K=g("\u67E5\u8BE2"),Q={class:"data"},S={class:"operation-container"},W={class:"operation-btn"},X=g("\u6DFB\u52A0"),Y={class:"table"},Z={class:"table-operation-btn"},ee={class:"top"},te=g("\u7F16\u8F91"),oe=g("\u5220\u9664"),le={class:"bottom"},ae={class:"pagination"},se=U({setup(ne){I();const l=F({page:1,limit:10,customer_number:""}),p=F({list:[],count:0});d([]);const _=()=>{P(l).then(u=>{p.list=u.list,p.count=u.count})};_(),d(!1),d(!1),q(()=>[l.page,l.limit],()=>{_()});const E=()=>{_()};let c=d(!1),m=d(!1),f=d(0);const x=()=>{f.value=0,m.value=!0,v(()=>{c.value=!0})},D=u=>{f.value=u,m.value=!0,v(()=>{c.value=!0})},B=()=>{f.value=0,v(()=>{m.value=!1}),_()},y=u=>{R.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{T({id:u}).then(()=>{G({message:"\u5220\u9664\u6210\u529F",type:"success"}),_()})}).catch(()=>{})};return(u,n)=>{const k=i("el-input"),h=i("el-form-item"),b=i("el-button"),V=i("el-form"),r=i("el-table-column"),A=i("el-table"),z=i("el-pagination");return C(),L(O,null,[a("div",J,[e(V,{model:t(l),"label-width":"90px"},{default:s(()=>[e(h,{class:"tn-el-form-item",label:"\u5546\u6237\u7F16\u53F7"},{default:s(()=>[e(k,{modelValue:t(l).customer_number,"onUpdate:modelValue":n[0]||(n[0]=o=>t(l).customer_number=o),placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(h,null,{default:s(()=>[e(b,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:E},{default:s(()=>[K]),_:1})]),_:1})]),_:1},8,["model"])]),a("div",Q,[a("div",S,[a("div",W,[e(b,{class:"btn",type:"primary",onClick:x},{default:s(()=>[X]),_:1})])]),a("div",Y,[e(A,{data:t(p).list},{default:s(()=>[e(r,{label:"ID",prop:"id"}),e(r,{label:"\u5546\u6237\u7F16\u53F7",prop:"customer_number"}),e(r,{label:"\u5FAE\u4FE1\u8D39\u7387",prop:"weixin_feilv"}),e(r,{label:"\u652F\u4ED8\u5B9D\u8D39\u7387",prop:"alipay_feilv"}),e(r,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:s(({row:o})=>[a("div",Z,[a("div",ee,[e(b,{size:"small",type:"primary",onClick:w=>D(o.id)},{default:s(()=>[te]),_:2},1032,["onClick"]),e(b,{size:"small",type:"danger",onClick:w=>y(o.id)},{default:s(()=>[oe]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),a("div",le,[a("div",ae,[e(z,{currentPage:t(l).page,"onUpdate:currentPage":n[1]||(n[1]=o=>t(l).page=o),"page-size":t(l).limit,"onUpdate:page-size":n[2]||(n[2]=o=>t(l).limit=o),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:t(p).count},null,8,["currentPage","page-size","total"])])]),t(m)?(C(),M(N,{key:0,modelValue:t(c),"onUpdate:modelValue":n[3]||(n[3]=o=>$(c)?c.value=o:c=o),id:t(f),onOnClose:B},null,8,["modelValue","id"])):j("",!0)],64)}}});const _e=H(se,[["__scopeId","data-v-601cf0fd"]]);export{_e as default};
