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