import{a as V}from"./use-response-handle.e6cae34f.js";import{_ as A,q as z,B as p,C as M,r as l,as as N,o as s,K as _,H as r,L as T,v as t,bn as E,t as i,n as I,J as R,I as U,p as q,S as v}from"./index.d8ce26ef.js";import{d as O}from"./index.b903a898.js";import{C as j}from"./tragelog.c677ba3b.js";const F={"w-full":"",flex:"","justify-end":"","mt-2":""},H=v("\u786E\u5B9A"),J=v("\u53D6\u6D88"),K=z({__name:"capital-modal",emits:["on-add-order"],setup(G,{expose:C,emit:y}){const a=p(!1),u=p([]),d=p(null),{run:b,data:h,getPaginationParams:k,loading:w,pagination:c}=V({initalData:[],isList:!0,initalPagination:{currentPage:1,pageSize:10,total:0}}),m=()=>{b(O({status:"2",...k()}))};function D(){a.value=!1,y("on-add-order",t(u.value[0]))}function P(n){if(n.length>1){const e=n.pop();d.value.clearSelection(),d.value.toggleRowSelection(e,!0),u.value=[e]}else u.value=[n[0]]}return C({onDisplay:()=>a.value=!0}),M(()=>m()),(n,e)=>{const f=l("el-table-column"),x=l("el-pagination"),g=l("el-button"),B=l("el-dialog"),S=N("loading");return s(),_(B,{modelValue:a.value,"onUpdate:modelValue":e[2]||(e[2]=o=>a.value=o),title:"\u8D44\u91D1\u8BA4\u9886",center:""},{default:r(()=>[T((s(),_(t(E),{border:"",ref_key:"tableRef",ref:d,data:t(h),size:"small","row-key":"id",onSelectionChange:P},{default:r(()=>[i(f,{type:"selection",width:"55"}),(s(!0),I(U,null,R(t(j),({field:o},L)=>(s(),_(f,{key:L,prop:o,"show-overflow-tooltip":""},null,8,["prop"]))),128))]),_:1},8,["data"])),[[S,t(w)]]),i(x,{total:t(c).total,"current-page":t(c).currentPage,"onUpdate:current-page":e[0]||(e[0]=o=>t(c).currentPage=o),onCurrentChange:m},null,8,["total","current-page"]),q("div",F,[i(g,{type:"primary",size:"small",onClick:D},{default:r(()=>[H]),_:1}),i(g,{size:"small",onClick:e[1]||(e[1]=()=>a.value=!1)},{default:r(()=>[J]),_:1})])]),_:1},8,["modelValue"])}}});var Z=A(K,[["__scopeId","data-v-8b8a1234"]]);export{Z as default};
