import{_ as O,d as R,w as m,bv as T,x as U,r as t,aC as j,H as I,u as f,o as L,c as M,l as e,C as s,M as v,b as P,aY as C}from"./index.56c69f5a.js";import{d as q}from"./index.5ce46a74.js";const G={class:"flex justify-between w-full mt-[10px]"},H=R({__name:"single",props:["companyNo","supplierNo"],emits:["add"],setup(D,{expose:g,emit:h}){const E=D,l=m({...{page:1,size:10,total:0,status:0}}),r=m([]),b=m(!1),p=m({outChildCode:""}),{run:F,loading:x,data:z}=T({initalData:[],isList:!0,success:(u={})=>l.value.total=u.count});function i(){const{supplierNo:u,companyNo:o}=E,{page:_,size:d,status:c}=l.value;F(q({supplierNo:u,companyNo:o,page:_,size:d,status:c,...p.value}))}function y(){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)),b.value=!1}function B(){l.value.page=1,p.value={outChildCode:""},i()}return g({onSearch:()=>i()}),U(i),(u,o)=>{const _=t("ElInput"),d=t("ElCol"),c=t("ElButton"),N=t("ElRow"),a=t("el-table-column"),w=t("ElTableColumn"),A=t("el-table"),k=t("el-pagination"),S=t("el-button"),V=j("loading");return I((L(),M("div",null,[e(N,{gutter:5,"mb-1":""},{default:s(()=>[e(d,{span:6},{default:s(()=>[e(_,{size:"small",placeholder:"\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7",modelValue:p.value.outChildCode,"onUpdate:modelValue":o[0]||(o[0]=n=>p.value.outChildCode=n)},null,8,["modelValue"])]),_:1}),e(d,{span:3,class:"float-right"},{default:s(()=>[e(c,{size:"small",onClick:i,type:"primary"},{default:s(()=>[v(" \u641C\u7D22 ")]),_:1}),e(c,{size:"small",onClick:B},{default:s(()=>[v("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1}),e(A,{border:"",size:"small",style:{width:"100%"},data:f(z),onSelectionChange:o[1]||(o[1]=n=>r.value=n),"max-height":"450px"},{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",G,[e(k,{"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(S,{type:"primary",size:"small",onClick:y},{default:s(()=>[v("\u4FDD\u5B58")]),_:1})])])),[[V,f(x)]])}}});var K=O(H,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/postSupplierOrder/sendOrderRecord/components/query/single.vue"]]);export{K as default};
