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