import{_ as k,d as T,m as j,n as p,Q as z,cc as V,r as d,aw as q,o as v,c as _,h as f,cl as I,B as P,i as h,e as O,y as $,H as R,cm as r,ef as W,cW as H}from"./index.js";import{useColumns as K}from"./columns.88d7302.js";import{c as L}from"./content.config.5ec63a87.js";import"./index.904472d8.js";const M={relative:""},Q={class:"flex justify-end mt-10px"},F=" ",g=`
`,U=T({__name:"search-batch",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(E,{emit:y}){const C=y,{columns:m}=K();m.value=m.value.slice(1);const{logout:w}=j(),l=p(!1),a=p([]),x=p(),b=z({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),B=E,n=V("");async function D(u=[]){l.value=!0;const{currentPage:e,pageSize:t}=b,{code:o,data:s,message:c}=await W({...B.payload,sequenceNo:u.join(","),page:e,size:t});H({code:o,message:c,logout:w,handler:()=>{a.value=s!=null?s:[],n.value=""}}),l.value=!1}const A=function(u=""){if(!u)return"";let e=u;const t=e.includes(F),o=e.includes(g);return t&&(e=e.split(F).join("")),o&&(e=e.split(g).join("")),e};function N(){const u=A(n.value);if(u.length===0){r.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),n.value=u;return}const t=u.replace(/[，。；、; .]/g,",").split(",");D(t)}function S(){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`);C("confirm",h(a))}return(u,e)=>{const t=d("ElInput"),o=d("PureTable"),s=d("el-button"),c=q("loading");return v(),_("div",M,[f(t,{rows:4,modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=i=>n.value=i),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:I(N,["enter"])},null,8,["modelValue"]),P((v(),_("div",null,[f(o,{ref_key:"tableRef",ref:x,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:a.value,columns:h(L).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]]),O("div",Q,[f(s,{type:"primary",onClick:S,size:"small"},{default:$(()=>e[1]||(e[1]=[R("\u4FDD\u5B58")])),_:1})])])}}});var Z=k(U,[["__scopeId","data-v-1169dbf0"],["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/sheetOrderPool/components/search-batch.vue"]]);export{Z as default};
