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