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