import{_ as R,d as T,w as c,bv as U,x as j,r as t,aC as I,H as L,u as f,o as M,c as q,l as e,C as s,M as v,b as P,aY as C}from"./index.56c69f5a.js";import{d as G}from"./index.5ce46a74.js";const H={class:"flex justify-between w-full mt-[10px]"},Y=T({__name:"single",props:["companyNo","supplierNo"],emits:["add"],setup(D,{expose:g,emit:h}){const E=D,b={page:1,size:10,total:0,status:0},m=c({outChildCode:""}),l=c({...b}),r=c([]),F=c(!1),{run:x,loading:z,data:y}=U({initalData:[],isList:!0,success:(u={})=>l.value.total=u.count});function i(){const{supplierNo:u,companyNo:o}=E,{page:_,size:p,status:d}=l.value;x(G({supplierNo:u,companyNo:o,page:_,size:p,status:d}))}function B(){if(r.value.length===0){C.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u53D1\u8D27\u8FD0\u5355");return}const u=r.value.filter(({post_fee:o})=>Number(o)===0);if(u.length!==0){C.warning(`\u53D1\u8D27\u8FD0\u5355${u.map(({TrackCode:o})=>o).join("\u3001")}\u6DFB\u52A0\u5931\u8D25,\u7269\u6D41\u8D39\u7528\u4E0D\u80FD\u4E3A0`);return}h("add",f(r)),F.value=!1}function N(){l.value.page=1,m.value={outChildCode:""},i()}return g({onSearch:()=>i()}),j(i),(u,o)=>{const _=t("ElInput"),p=t("ElCol"),d=t("ElButton"),A=t("ElRow"),a=t("el-table-column"),w=t("ElTableColumn"),k=t("el-table"),S=t("el-pagination"),V=t("el-button"),O=I("loading");return L((M(),q("div",null,[e(A,{gutter:5,"mb-1":""},{default:s(()=>[e(p,{span:6},{default:s(()=>[e(_,{size:"small",placeholder:"\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7",modelValue:m.value.outChildCode,"onUpdate:modelValue":o[0]||(o[0]=n=>m.value.outChildCode=n)},null,8,["modelValue"])]),_:1}),e(p,{span:3,class:"float-right"},{default:s(()=>[e(d,{size:"small",onClick:i,type:"primary"},{default:s(()=>[v(" \u641C\u7D22 ")]),_:1}),e(d,{size:"small",onClick:N},{default:s(()=>[v("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1}),e(k,{border:"",size:"small",style:{width:"100%"},data:f(y),"max-height":"450px",onSelectionChange:o[1]||(o[1]=n=>r.value=n)},{default:s(()=>[e(a,{type:"selection",width:"55"}),e(a,{prop:"TrackCode",label:"\u53D1\u8D27\u8FD0\u5355\u7F16\u53F7","min-width":"150px","show-overflow-tooltip":""}),e(a,{prop:"outChildCode",label:"\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7","min-width":"160px","show-overflow-tooltip":""}),e(a,{prop:"orderCode",label:"\u9500\u552E\u8BA2\u5355\u7F16\u53F7","min-width":"150px","show-overflow-tooltip":""}),e(w,{prop:"companyName",label:"\u4E1A\u52A1\u516C\u53F8","min-width":"180px","show-overflow-tooltip":""}),e(w,{prop:"supplierName",label:"\u7269\u6D41\u4F9B\u5E94\u5546","min-width":"180px","show-overflow-tooltip":""}),e(a,{label:"\u7269\u6D41\u8D39\u7528","min-width":"150px",prop:"post_fee","show-overflow-tooltip":""}),e(a,{label:"\u521B\u5EFA\u4EBA",prop:"apply_name","min-width":"80px","show-overflow-tooltip":""}),e(a,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"140px","show-overflow-tooltip":""})]),_:1},8,["data"]),P("div",H,[e(S,{"current-page":l.value.page,"onUpdate:currentPage":o[2]||(o[2]=n=>l.value.page=n),"page-size":l.value.size,"onUpdate:pageSize":o[3]||(o[3]=n=>l.value.size=n),layout:"total, sizes,prev, pager, next",total:l.value.total,onSizeChange:i,onCurrentChange:i,small:!0,background:!0},null,8,["current-page","page-size","total"]),e(V,{type:"primary",size:"small",onClick:B},{default:s(()=>[v("\u4FDD\u5B58")]),_:1})])])),[[O,f(z)]])}}});var K=R(Y,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supplierOrder/sendOrderRecord/components/query/single.vue"]]);export{K as default};
