import{_ as U,d as A,w as s,X as E,Z as H,r,aC as L,o as b,G as w,C as p,b as c,l as o,M as v,H as M,u as x,bo as N}from"./index.1d1a5ecb.js";import{h as R}from"./index.683cde90.js";const j={flex:"","mb-2":""},O={flex:"","flex-1":"",gap:"5",pr:"20px"},T={flex:"",width:"120px"},q={flex:"","justify-between":"","mt-2":""},G=A({__name:"company-modal",emits:["choose"],setup(I,{expose:z,emit:h}){const g=s([]),C=s([]),u=s({name:""}),m=s(!1),d=s(!1),k=s(null),F=E(),t=H({currentPage:1,pageSize:10,total:0});async function _(){const{pageSize:n,currentPage:e}=t;m.value=!0;const{code:f,message:i,data:a}=await R({...u.value,size:n,page:e});F({code:f,message:i,handler:()=>{t.total=a.count,g.value=a.list}}),m.value=!1}function V(){d.value=!1,h("choose",x(C))}function D(n){C.value=n}function y(n=!1){n&&(u.value={name:""}),t.currentPage=1,_()}return z({onDisplay:()=>{d.value=!0}}),(n,e)=>{const f=r("el-input"),i=r("el-button"),a=r("el-table-column"),S=r("el-pagination"),P=r("el-dialog"),B=L("loading");return b(),w(P,{"close-on-click-modal":!1,modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=l=>d.value=l),title:"\u4E1A\u52A1\u516C\u53F8",center:"",width:"1040px",onOpen:e[6]||(e[6]=()=>_()),onClose:e[7]||(e[7]=()=>u.value.name="")},{default:p(()=>[c("div",j,[c("div",O,[o(f,{placeholder:"\u516C\u53F8\u540D\u79F0",size:"small",modelValue:u.value.name,"onUpdate:modelValue":e[0]||(e[0]=l=>u.value.name=l)},null,8,["modelValue"])]),c("div",T,[o(i,{size:"small",type:"primary",onClick:e[1]||(e[1]=()=>y())},{default:p(()=>[v("\u641C\u7D22")]),_:1}),o(i,{size:"small",onClick:e[2]||(e[2]=()=>y(!0))},{default:p(()=>[v("\u91CD\u7F6E")]),_:1})])]),M((b(),w(x(N),{border:"",ref_key:"tableRef",ref:k,data:g.value,size:"small","row-key":"id",onSelectionChange:D},{default:p(()=>[o(a,{type:"selection",align:"center",width:"40"}),o(a,{label:"\u516C\u53F8\u7F16\u7801",prop:"code","show-overflow-tooltip":""}),o(a,{label:"\u516C\u53F8\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(a,{label:"\u516C\u53F8\u7C7B\u578B",prop:"nature","show-overflow-tooltip":""})]),_:1},8,["data"])),[[B,m.value]]),c("div",q,[o(S,{"current-page":t.currentPage,"onUpdate:currentPage":e[3]||(e[3]=l=>t.currentPage=l),"page-size":t.pageSize,"onUpdate:pageSize":e[4]||(e[4]=l=>t.pageSize=l),total:t.total,onCurrentChange:_},null,8,["current-page","page-size","total"]),o(i,{type:"primary",size:"small",onClick:V},{default:p(()=>[v("\u786E\u5B9A")]),_:1})])]),_:1},8,["modelValue"])}}});var J=U(G,[["__scopeId","data-v-3eb9682a"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/interest/companyAccount-origin/components/company-modal.vue"]]);export{J as default};
