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