import{_ as D,d as k,w as q,x as l,Z as N,aP as P,r as _,aD as R,o as h,c as w,l as y,m as E,ar as j,aY as z,H as A,aZ as p,cR as I}from"./index.js";import{useColumns as O}from"./columns.88d7303.js";import{c as V}from"./content.config.13c08e3b.js";import"./index.5a7a3827.js";const $={relative:""},K=k({__name:"search-batch",props:{payload:{type:Object,required:!0},noTag:{type:Boolean,required:!0}},emits:["reload","confirm"],setup(F,{expose:x,emit:b}){const d=F,{columns:f}=O();f.value=f.value.slice(1),q();const c=l(!1),n=l([]),C=l(),S=N({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),u=P(""),i=l([]);async function B(t=[]){c.value=!0;const{currentPage:e,pageSize:s}=S,{code:a,data:r,message:o}=await I({...d.payload,sequenceNo:t.join(","),page:e,size:s});c.value=!1,a==0?n.value=r!=null?r:[]:(p.warning(o),n.value=[]),u.value=""}const v=" ",m=`
`,T=function(t=""){if(!t)return"";let e=t;const s=e.includes(v),a=e.includes(m);return s&&(e=e.split(v).join("")),a&&(e=e.split(m).join("")),e};async function g({triggerEmit:t}){if(d.noTag){p.warning("\u8BF7\u9009\u62E9\u5F00\u7968\u6807\u7B7E");return}const e=T(u.value);if(e.length===0){p.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),u.value=e;return}const a=e.replace(/[，。；、; .]/g,",").split(",");i.value=a,await B(a),t&&b("confirm",{sourceSequenceNos:i.value,selected:n.value})}return x({getResponse:async()=>(await g({triggerEmit:!1}),{sourceSequenceNos:i.value,selected:n.value})}),(t,e)=>{const s=_("ElInput"),a=_("PureTable"),r=R("loading");return h(),w("div",$,[y(s,{rows:4,modelValue:E(u),"onUpdate:modelValue":e[0]||(e[0]=o=>j(u)?u.value=o: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)\u3002",type:"textarea",onKeydown:e[1]||(e[1]=z(o=>g({triggerEmit:!0}),["enter"]))},null,8,["modelValue"]),A((h(),w("div",null,[y(a,{ref_key:"tableRef",ref:C,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:n.value,columns:E(V).columns.filter(o=>o.label!=="\u64CD\u4F5C"),showOverflowTooltip:"","max-height":"560px","header-cell-style":{background:"#fafafa",color:"#606266"}},null,8,["data","columns"])])),[[r,c.value]])])}}});var L=D(K,[["__scopeId","data-v-011cfd0f"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/sheetOrderPool/components/ClientCTagDialog/search-batch.vue"]]);export{L as default};
