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