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