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