company-modal.9db715.js 2.7 KB

1
  1. import{_ as N,d as U,w as s,X as A,Z as E,r,aC as j,o as b,G as w,C as p,h as m,j as o,M as v,H,l as x,aV as L,a as M}from"./index.js";import{b as R}from"./index.6d72fac6.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:V}){const g=s([]),y=s([]),u=s({company_name:""}),d=s(!1),c=s(!1),h=s(null),k=A(),a=E({currentPage:1,pageSize:10,total:0});async function _(){const{pageSize:n,currentPage:e}=a;d.value=!0;const{code:f,message:i,data:l}=await R({...u.value,size:n,page:e});d.value=!1,k({code:f,message:i,handler:()=>{a.total=l.count,g.value=l.list}}),d.value=!1}function F(){c.value=!1,V("choose",x(y))}function D(n){y.value=n}function C(n=!1){n&&(u.value={company_name:""}),a.currentPage=1,_()}return z({onDisplay:()=>{c.value=!0}}),(n,e)=>{const f=r("el-input"),i=r("el-button"),l=r("el-table-column"),S=r("el-pagination"),P=r("el-dialog"),B=j("loading");return b(),w(P,{"close-on-click-modal":!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:p(()=>[m("div",O,[m("div",T,[o(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"])]),m("div",q,[o(i,{size:"small",type:"primary",onClick:e[1]||(e[1]=()=>C())},{default:p(()=>[v("\u641C\u7D22")]),_:1}),o(i,{size:"small",onClick:e[2]||(e[2]=()=>C(!0))},{default:p(()=>[v("\u91CD\u7F6E")]),_:1})])]),H((b(),w(x(L),{border:"",ref_key:"tableRef",ref:h,data:g.value,size:"small","row-key":"id",onSelectionChange:D},{default:p(()=>[o(l,{type:"selection",align:"center",width:"40"}),o(l,{label:"\u516C\u53F8\u7F16\u7801",prop:"companyNo","show-overflow-tooltip":""}),o(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"])),[[B,d.value]]),m("div",G,[o(S,{"current-page":a.currentPage,"onUpdate:currentPage":e[3]||(e[3]=t=>a.currentPage=t),"page-size":a.pageSize,"onUpdate:pageSize":e[4]||(e[4]=t=>a.pageSize=t),total:a.total,onCurrentChange:_},null,8,["current-page","page-size","total"]),o(i,{type:"primary",size:"small",onClick:F},{default:p(()=>[v("\u786E\u5B9A")]),_:1})])]),_:1},8,["modelValue"])}}});var K=N(I,[["__scopeId","data-v-bb5db83e"],["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/interest/account/components/company-modal.vue"]]);export{K as default};