import{_ as q,d as I,m as P,n as _,Q as $,cc as O,r,aw as R,o as h,c as F,h as l,cl as W,B as H,y as m,H as y,G as K,i as v,dc as G,e as L,cm as c,ef as M,cW as Q}from"./index.js";import{useColumns as U}from"./columns.d95d09.js";const J={relative:""},X={class:"flex justify-end mt-10px"},E=" ",w=`
`,Y=I({__name:"search-batch",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(x,{emit:b}){const B=b,{columns:i}=U();i.value=i.value.slice(1);const{logout:C}=P(),p=_(!1),a=_([]),D=_(),A=$({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),S=x,n=O("");async function N(t=[]){p.value=!0;const{currentPage:e,pageSize:u}=A,{code:o,data:s,message:d}=await M({...S.payload,sequenceNo:t.join(","),inv_is:"1",cat_status:"2",inv_status:"0",page:e,size:u});Q({code:o,message:d,logout:C,handler:()=>{a.value=s!=null?s:[],n.value=""}}),p.value=!1}const k=function(t=""){if(!t)return"";let e=t;const u=e.includes(E),o=e.includes(w);return u&&(e=e.split(E).join("")),o&&(e=e.split(w).join("")),e};function T(){const t=k(n.value);if(t.length===0){c.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),n.value=t;return}const u=t.replace(/[，。；、; .]/g,",").split(",");N(u)}function j(){if(a.value.length===0)return c.error("\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u9500\u552E\u8BA2\u5355\uFF01");const t=a.value.filter(u=>u.winv_fee==="0.00"),e=a.value.filter(u=>String(u.winv_num)==="0");if(t.length!==0)return c.error(`\u9500\u552E\u8BA2\u5355 ${t[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(e.length!==0)return c.error(`\u9500\u552E\u8BA2\u5355 ${e[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);B("confirm",v(a))}return(t,e)=>{const u=r("ElInput"),o=r("el-tag"),s=r("PureTable"),d=r("el-button"),z=R("loading");return h(),F("div",J,[l(u,{rows:4,modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=f=>n.value=f),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:W(T,["enter"])},null,8,["modelValue"]),H((h(),F("div",null,[l(s,{ref_key:"tableRef",ref:D,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:a.value,columns:v(i),"max-height":"560px","header-cell-style":{background:"#fafafa",color:"#606266"}},{platform_type:m(f=>[l(o,null,{default:m(()=>{var g;return[y(K(((g=v(G).find(({value:V})=>V===f.row.platform_type))==null?void 0:g.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns"])])),[[z,p.value]]),L("div",X,[l(d,{type:"primary",onClick:j,size:"small"},{default:m(()=>e[1]||(e[1]=[y("\u4FDD\u5B58")])),_:1})])])}}});var te=q(Y,[["__scopeId","data-v-52db8c24"],["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/invoiceApply/components/currentcy-form-wanyu/search-batch.vue"]]);export{te as default};
