import{_ as S,d as k,w as T,x as p,Z as j,aP as z,r as d,aD as P,o as F,c as g,l as f,m,ar as V,aY as q,H as I,h as R,D as O,M as $,aZ as r,cR as K,bx as H}from"./index.js";import{useColumns as M}from"./columns.88d7302.js";import{c as U}from"./content.config.3f80c9db.js";import"./index.142d2268.js";const W={relative:""},Z={class:"flex justify-end mt-10px"},L=k({__name:"search-batch",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(E,{emit:x}){const C=E,{columns:v}=M();v.value=v.value.slice(1);const{logout:y}=T(),l=p(!1),a=p([]),b=p(),w=j({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),o=z("");async function D(u=[]){l.value=!0;const{currentPage:e,pageSize:t}=w,{code:n,data:s,message:c}=await K({...C.payload,sequenceNo:u.join(","),page:e,size:t});H({code:n,message:c,logout:y,handler:()=>{a.value=s!=null?s:[],o.value=""}}),l.value=!1}const _=" ",h=` `,B=function(u=""){if(!u)return"";let e=u;const t=e.includes(_),n=e.includes(h);return t&&(e=e.split(_).join("")),n&&(e=e.split(h).join("")),e};function A(){const u=B(o.value);if(u.length===0){r.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),o.value=u;return}const t=u.replace(/[,。;、; .]/g,",").split(",");D(t)}function N(){if(a.value.length===0)return r.error("\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u9500\u552E\u8BA2\u5355\uFF01");const u=a.value.filter(t=>t.winv_fee==="0.00"),e=a.value.filter(t=>String(t.winv_num)==="0");if(u.length!==0)return r.error(`\u9500\u552E\u8BA2\u5355 ${u[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(e.length!==0)return r.error(`\u9500\u552E\u8BA2\u5355 ${e[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);x("confirm",m(a))}return(u,e)=>{const t=d("ElInput"),n=d("PureTable"),s=d("el-button"),c=P("loading");return F(),g("div",W,[f(t,{rows:4,modelValue:m(o),"onUpdate:modelValue":e[0]||(e[0]=i=>V(o)?o.value=i:null),style:{"margin-bottom":"10px"},placeholder:"\u8F93\u5165\u9500\u552E\u5355\u7F16\u7801(\u5C0F\u4E8E100\u6761)\uFF0C\u7CFB\u7EDF\u652F\u6301\u7684\u5206\u5272\u7B26\u4E3A\u9017\u53F7(,)\u3001\u53E5\u53F7(.)\u3001\u5206\u53F7(;)\u3001\u987F\u53F7(\u3001)\uFF0C\u56DE\u8F66\u540E\u5F00\u59CB\u89E3\u6790\u3002",type:"textarea",onKeydown:q(A,["enter"])},null,8,["modelValue","onKeydown"]),I((F(),g("div",null,[f(n,{ref_key:"tableRef",ref:b,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:a.value,columns:m(U).columns.filter(i=>i.label!=="\u64CD\u4F5C"),showOverflowTooltip:"","max-height":"560px","header-cell-style":{background:"#fafafa",color:"#606266"}},null,8,["data","columns"])])),[[c,l.value]]),R("div",Z,[f(s,{type:"primary",onClick:N,size:"small"},{default:O(()=>[$("\u4FDD\u5B58")]),_:1})])])}}});var X=S(L,[["__scopeId","data-v-1169dbf0"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/sheetOrderPool/components/search-batch.vue"]]);export{X as default};