import{_ as I,d as F,n as _,d3 as c,r as s,aw as U,o as i,A as d,y as r,B as j,i as n,h as u,c as q,F as H,z as T,d6 as $,e as G,H as y,d$ as J}from"./index.js";import{i as K}from"./configs.ae46c65e.js";import{a as M,b as O}from"./index.e9c3d7c7.js";const Q={"w-full":"",flex:"","justify-end":"","mt-2":""},W=F({__name:"create-redink",emits:["reload"],setup(X,{expose:k,emit:z}){const x=z,l=_(!1),g=_([]),C=o=>g.value=o,m=()=>{l.value=!1,x("reload")},b={pageSize:15,currentPage:1,total:0},{data:h,pagination:a,getPaginationParams:w,run:A,loading:B}=c({initalData:[],isList:!0,initalPagination:b}),p=()=>{A(J({status:"3",...w()}))},{run:P,loading:Y}=c({success:m}),{run:S,loading:Z}=c({success:m}),D=()=>{const o=g.value.map(({invNo:e})=>e);if(o.length===1)return S(M({invNo:o[0]}));P(O({invArr:o}))};function R(){a.currentPage=1,p()}return k({onDisplay(){l.value=!0,p()}}),(o,e)=>{const f=s("el-table-column"),V=s("el-table"),L=s("el-pagination"),v=s("el-button"),N=s("el-dialog"),E=U("loading");return i(),d(N,{title:"\u521B\u5EFA\u7EA2\u51B2\u53D1\u7968",center:"",modelValue:l.value,"onUpdate:modelValue":e[4]||(e[4]=t=>l.value=t),"close-on-click-modal":!1,"close-on-press-escape":!1},{default:r(()=>[j((i(),d(V,{data:n(h),"row-key":"invNo",onSelectionChange:C,"max-height":"520px"},{default:r(()=>[u(f,{type:"selection",align:"center",width:"40px",fixed:"left"}),(i(!0),q(H,null,T(n(K),t=>(i(),d(f,$({key:t.prop,ref_for:!0},t,{"show-overflow-tooltip":"","reserve-selection":""}),null,16))),128))]),_:1},8,["data"])),[[E,n(B)]]),u(L,{"current-page":n(a).currentPage,"onUpdate:currentPage":e[0]||(e[0]=t=>n(a).currentPage=t),"page-size":n(a).pageSize,"onUpdate:pageSize":e[1]||(e[1]=t=>n(a).pageSize=t),total:n(a).total,onCurrentChange:e[2]||(e[2]=()=>p()),onSizeChange:R,layout:"sizes, prev, pager, next","page-sizes":[15,50,100]},null,8,["current-page","page-size","total"]),G("div",Q,[u(v,{type:"primary",size:"small",onClick:D},{default:r(()=>e[5]||(e[5]=[y("\u786E\u5B9A")])),_:1}),u(v,{size:"small",onClick:e[3]||(e[3]=()=>l.value=!1)},{default:r(()=>e[6]||(e[6]=[y("\u53D6\u6D88")])),_:1})])]),_:1},8,["modelValue"])}}});var ae=I(W,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/redInk/components/create-redink.vue"]]);export{ae as default};
