import{_ as j,d as P,w as p,b3 as $,r as c,aC as z,o as E,c as I,l as o,aX as K,H as R,u as d,G as M,C as a,M as i,L as w,bo as O,b as U,F as W,aY as _}from"./index.js";import{h as G}from"./index.c5ae038f.js";import{t as H}from"./status.2df4810d.js";const X={class:"flex justify-end w-full mt-[10px]"},Y=P({__name:"batch",props:{platformType:{type:String,required:!0},customerNo:{type:null,required:!0},companyNo:{type:String,required:!0}},emits:["list"],setup(g,{emit:y}){const m=g,s=p(""),b=p(null),{run:C,data:n,loading:B}=$({isList:!0,success:l=>f.value.total=l.count}),x={page:1,size:100,total:0,pay_status:"1",status:[0]},A=p([]),f=p({...x});function N(){if(!n.value||n.value.length===0){_.warning("\u81F3\u5C11\u6DFB\u52A0\u4E00\u6761\u901A\u7528\u8BA2\u5355");return}y("list",n.value),n.value=[]}const D=async l=>C(G({orderCode:l,...f.value,platform_type:m.platformType,customerNo:m.customerNo,companyNo:m.companyNo})),h=" ",F=` `;function T(l=""){if(!l)return"";let e=l;const r=e.includes(h),t=e.includes(F);return r&&(e=e.split(h).join("")),t&&(e=e.split(F).join("")),e}async function q(){const l=T(s.value),e=l.replace(/[,。;、; .]/g,",").replace(/(^,*)|(,*$)/g,""),r=e.split(",");if(e.length===0||r.length===0){_.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),s.value=l;return}await D(r),s.value=""}return(l,e)=>{const r=c("ElInput"),t=c("ElTableColumn"),S=c("ElTag"),k=c("ElButton"),V=z("loading");return E(),I(W,null,[o(r,{rows:4,modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=u=>s.value=u),style:{"margin-bottom":"10px"},placeholder:"\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)\uFF0C\u56DE\u8F66\u540E\u5F00\u59CB\u89E3\u6790\u3002",type:"textarea",onKeydown:K(q,["enter"])},null,8,["modelValue","onKeydown"]),R((E(),M(d(O),{ref_key:"tableRef",ref:b,border:"",size:"small",data:d(n),class:"mt-[10px]",onSelectionChange:e[1]||(e[1]=u=>A.value=u),"max-height":"500px"},{default:a(()=>[o(t,{label:"\u901A\u7528\u8BA2\u5355\u7F16\u53F7","min-width":"160",prop:"tyCode","show-overflow-tooltip":""}),o(t,{label:"\u786E\u8BA4\u5355\u7F16\u53F7","min-width":"160",prop:"orderCode","show-overflow-tooltip":""}),o(t,{label:"\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u53F7","min-width":"160",prop:"cxCode","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u7F16\u53F7","min-width":"160",prop:"goodNo","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u540D\u79F0","min-width":"160",prop:"goodName","show-overflow-tooltip":""}),o(t,{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:"100px","show-overflow-tooltip":""}),o(t,{label:"\u4E70\u5165\u65B9\u516C\u53F8","min-width":"160",prop:"customerName","show-overflow-tooltip":""}),o(t,{label:"\u5356\u51FA\u65B9\u516C\u53F8","min-width":"160",prop:"companyName","show-overflow-tooltip":""}),o(t,{label:"\u4E0B\u5355\u6570\u91CF",width:"80",prop:"goodNum","show-overflow-tooltip":""},{default:a(u=>[i(w(u.row.qrd?u.row.qrd.goodNum:""),1)]),_:1}),o(t,{label:"\u9500\u552E\u5355\u4EF7",width:"80",prop:"goodPrice","show-overflow-tooltip":""},{default:a(u=>[i(w(u.row.qrd?u.row.qrd.goodPrice:""),1)]),_:1}),o(t,{label:"\u5BF9\u8D26\u72B6\u6001",width:"80",prop:"status","show-overflow-tooltip":""},{default:a(u=>[o(S,null,{default:a(()=>{var v;return[i(w(((v=d(H).find(L=>L.value==u.row.status))==null?void 0:v.label)||"--"),1)]}),_:2},1024)]),_:1}),o(t,{label:"\u7A0E\u7387",width:"80",prop:"goodPrice","show-overflow-tooltip":""},{default:a(u=>[i(w(u.row.qrd?`${u.row.qrd.tax}%`:""),1)]),_:1}),o(t,{label:"\u4E0B\u5355\u65F6\u95F4",width:"100",prop:"addtime","show-overflow-tooltip":""})]),_:1},8,["data"])),[[V,d(B)]]),U("div",X,[o(k,{type:"primary",size:"small",onClick:N},{default:a(()=>[i("\u6DFB\u52A0")]),_:1})])],64)}}});var oo=j(Y,[["__file","C:/Users/63107/Desktop/projects/settle-vue3/src/views/InvoiceSales/currentcyOrderRecord/components/batch.vue"]]);export{oo as default};