var b=Object.defineProperty,y=Object.defineProperties;var x=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var O=(i,a,e)=>a in i?b(i,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[a]=e,l=(i,a)=>{for(var e in a||(a={}))h.call(a,e)&&O(i,e,a[e]);if(k)for(var e of k(a))S.call(a,e)&&O(i,e,a[e]);return i},s=(i,a)=>y(i,x(a));var u=(i,a,e)=>new Promise((p,g)=>{var o=d=>{try{r(e.next(d))}catch(t){g(t)}},c=d=>{try{r(e.throw(d))}catch(t){g(t)}},r=d=>d.done?p(d.value):Promise.resolve(d.value).then(o,c);r((e=e.apply(i,a)).next())});import{u as _,d as m,a as D,b as v}from"./vxe-table-D0Ytu0oZ.js";import{b6 as n}from"./bootstrap-Bqxdt4iG.js";import{u as C,T as q}from"./data-refresh-BZ1_-6mk.js";import{u as w}from"./packing-order-details-B9wXaLSK.js";import{a1 as I,U as B,ap as L,aj as M,p as P,a9 as T}from"../jse/index-index-BUJ_4tQs.js";const A={class:"flex h-full flex-col"},j=I({name:"PackingOrderDetailList",__name:"packing-order-detail-list",props:{packingOrderId:{default:""},embedded:{type:Boolean,default:!1},expandMode:{type:Boolean,default:!1}},setup(i,{expose:a}){const e=i,p=w(),g=C();let o=q.PACKING_ORDER_DETAIL_LIST;e.expandMode?o="expand-packing-order-detail-list":e.embedded&&(o="embedded-packing-order-detail-list");const[c,r]=_(s(l({},v),{formOptions:s(l({},D),{schema:e.embedded?[]:[]}),gridOptions:s(l({},m),{id:o,height:e.embedded?350:void 0,maxHeight:e.expandMode?500:void 0,toolbarConfig:e.expandMode?{enabled:!1}:s(l({},m.toolbarConfig),{buttons:[]}),pagerConfig:e.expandMode?void 0:m.pagerConfig,columns:[...e.expandMode?[]:[{type:"seq",field:"_seq",title:n("page.table.common.seq"),width:"auto",align:"center"}],{field:"inventoryTdSku",title:n("page.packingOrderDetails.table.inventoryTdSku"),width:"auto",sortable:!0,align:"left"},{field:"inventoryOriginalSku",title:n("page.packingOrderDetails.table.inventoryOriginalSku"),width:"auto",align:"left"},{field:"inventoryName",title:n("page.packingOrderDetails.table.inventoryName"),width:"auto",align:"left"},{field:"locationCode",title:n("page.packingOrderDetails.table.locationCode"),width:"auto",align:"center"},{field:"qty",title:n("page.packingOrderDetails.table.qty"),width:"auto",align:"center"}],sortConfig:{remote:!0,trigger:"default",defaultSort:{field:"createdAt",order:"desc"}},proxyConfig:{autoLoad:!e.embedded&&!e.expandMode,ajax:{query:K=>u(null,[K],function*({page:d,sort:t}){if(e.packingOrderId)return yield p.getListByPackingOrderId(e.packingOrderId,{page:d.currentPage,pageSize:d.pageSize,sortBy:(t==null?void 0:t.field)||void 0,sortOrder:(t==null?void 0:t.order)||void 0});const f={page:d.currentPage,pageSize:d.pageSize};return t!=null&&t.field&&(f.sortBy=t.field,f.sortOrder=t.order),yield p.getList(f)})},sort:!0}})}));return a({query:()=>u(null,null,function*(){return r.query()})}),B(()=>g.packingOrderDetailsVersion,()=>{r.query()}),(d,t)=>(M(),L("div",A,[P(T(c),{class:"flex-1"})]))}});export{j as _};
