import{i as N}from"./configs.2961a790.js";import{f as R}from"./index.b38c0e7a.js";import{b as q}from"./index.70af0e5c.js";import{a as _}from"./use-response-handle.e6cae34f.js";import{q as I,B as f,r as l,as as U,o as i,K as p,H as r,L as F,v as t,t as u,n as j,J as H,I as J,p as K,S as v,aY as T}from"./index.d8ce26ef.js";const Y={"w-full":"",flex:"","justify-end":"","mt-2":""},G=v("\u786E\u5B9A"),M=v("\u53D6\u6D88"),ee=I({__name:"create-redink",emits:["reload"],setup(O,{expose:y,emit:b}){const o=f(!1),c=f([]),B=s=>c.value=s,C=()=>{o.value=!1,b("reload")},k={pageSize:10,currentPage:1,total:0},{data:z,pagination:n,getPaginationParams:A,run:h,loading:D}=_({initalData:[],isList:!0,initalPagination:k}),d=()=>{h(R({status:"3",...A()}))},{run:P,loading:w}=_({success:C}),S=()=>{const s=c.value.map(({invNo:e})=>e);P(q({invArr:s}))};return y({onDisplay(){o.value=!0,d()}}),(s,e)=>{const m=l("el-table-column"),V=l("el-table"),x=l("el-pagination"),g=l("el-button"),L=l("el-dialog"),E=U("loading");return i(),p(L,{title:"\u521B\u5EFA\u7EA2\u51B2\u53D1\u7968",center:"",modelValue:o.value,"onUpdate:modelValue":e[4]||(e[4]=a=>o.value=a)},{default:r(()=>[F((i(),p(V,{data:t(z),"row-key":"invNo",onSelectionChange:B},{default:r(()=>[u(m,{type:"selection"}),(i(!0),j(J,null,H(t(N),a=>(i(),p(m,T({key:a.prop},a,{"show-overflow-tooltip":"","reserve-selection":""}),null,16))),128))]),_:1},8,["data"])),[[E,t(D)]]),u(x,{"current-page":t(n).currentPage,"onUpdate:current-page":e[0]||(e[0]=a=>t(n).currentPage=a),"page-size":t(n).pageSize,"onUpdate:page-size":e[1]||(e[1]=a=>t(n).pageSize=a),total:t(n).total,onCurrentChange:e[2]||(e[2]=()=>d())},null,8,["current-page","page-size","total"]),K("div",Y,[u(g,{type:"primary",size:"small",loading:t(w),onClick:S},{default:r(()=>[G]),_:1},8,["loading"]),u(g,{size:"small",onClick:e[3]||(e[3]=()=>o.value=!1)},{default:r(()=>[M]),_:1})])]),_:1},8,["modelValue"])}}});export{ee as default};
