import{_ as I,d as q,m as P,n as m,Q as $,cc as M,r,aw as O,o as F,c as h,h as l,cl as R,B as W,y as _,H as y,G,i as v,dc as H,e as K,cm as c,ef as L,cW as Q}from"./index.js";import{useColumns as U}from"./columns.88d730.js";const J={relative:""},X={class:"flex justify-end mt-10px"},E=" ",x=`
`,Y=q({__name:"search-batch-main",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(B,{emit:w}){const C=w,{columns:i}=U();i.value=i.value.slice(1);const{logout:b}=P(),p=m(!1),a=m([]),A=m(),D=$({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),S=B,n=M("");async function N(t=[]){p.value=!0;const{currentPage:e,pageSize:u}=D,{code:o,data:s,message:d}=await L({...S.payload,cxCode:t.join(","),customerNo:"GS2404151642335170",is_comon:"1",inv_is:"1",cat_status:"2",inv_status:"0",status:"3",page:e,size:u});Q({code:o,message:d,logout:b,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(x);return u&&(e=e.split(E).join("")),o&&(e=e.split(x).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`);C("confirm",v(a))}return(t,e)=>{const u=r("ElInput"),o=r("el-tag"),s=r("PureTable"),d=r("el-button"),z=O("loading");return F(),h("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\u8BA2\u5355\u4E3B\u7F16\u53F7(\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:R(T,["enter"])},null,8,["modelValue"]),W((F(),h("div",null,[l(s,{ref_key:"tableRef",ref:A,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:_(f=>[l(o,null,{default:_(()=>{var g;return[y(G(((g=v(H).find(({value:V})=>V===f.row.platform_type))==null?void 0:g.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns"])])),[[z,p.value]]),K("div",X,[l(d,{type:"primary",onClick:j,size:"small"},{default:_(()=>e[1]||(e[1]=[y("\u4FDD\u5B58")])),_:1})])])}}});var te=I(Y,[["__scopeId","data-v-7833c0f5"],["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/invoiceApply/components/currentcy-form/search-batch-main.vue"]]);export{te as default};
