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