var C=(b,n,m)=>new Promise((k,s)=>{var f=i=>{try{l(m.next(i))}catch(u){s(u)}},x=i=>{try{l(m.throw(i))}catch(u){s(u)}},l=i=>i.done?k(i.value):Promise.resolve(i.value).then(f,x);l((m=m.apply(b,n)).next())});import{d as j,c as F,u as o,w as N,U as p,a2 as d,a3 as X,k as a,af as e,ad as w,G as c,V as _}from"./vue-vendor-CxLCUzY4.js";import"./index-KOQNKxnC.js";import{useListPage as K}from"./useListPage-CevWQ3ci.js";import"./index-XZKTTfG1.js";import{w as P,a as A,b as H,c as O,d as Q,e as W}from"./WmsContainer.api-cYTuTxbM.js";import{a9 as $,i as q,u as J}from"./index-CLZzJyTP.js";import{Q as Y}from"./componentMap-DpsJvoqz.js";import Z from"./BasicTable-DUJWN3yz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-ByX9XNkE.js";import"./useForm-Dx3lJ3DG.js";import"./index-DvqyyN77.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useWindowSizeFn-D9PllI8g.js";import"./JAreaLinkage-M9TGy8nY.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JSelectDept-CaEHrQp6.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./JCodeEditor-CR57XeIe.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-B36c3B5x.js";import"./index-C7yPiS0L.js";import"./depart.api-DHG2p2Yd.js";import"./JPopup-BvqhHpPl.js";import"./EasyCronInput-CWOTSpxK.js";import"./JEllipsis-C_gT_vEQ.js";import"./JDictSelectTag-CfF54ALX.js";import"./JImageUpload-BFwNYdm5.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./injectionKey-DPVn4AgL.js";const mt=j({__name:"WmsContainerGoodsList",setup(b){const n=F("mainId")||"",m=J(),[k,{openModal:s}]=$(),f={},{prefixCls:x,tableContext:l,onImportXls:i,onExportXls:u}=K({tableProps:{api:A,columns:P,canResize:!1,size:"small",striped:!0,useSearchForm:!1,actionColumn:{width:180,fixed:"right"},pagination:{current:1,pageSize:5,pageSizeOptions:["5","10","20"]}},exportConfig:{name:"容器货品",url:O,params:{containerCode:n}},importConfig:{url:()=>H+"/"+o(n)}}),[h,{reload:I},{rowSelection:E,selectedRowKeys:g}]=l;N(n,()=>{f.containerCode=o(n),I()});function M(){if(q(o(n))){m.createMessage.warning("请选择一个主表信息");return}s(!0,{isUpdate:!1,showFooter:!0})}function U(r){return C(this,null,function*(){s(!0,{record:r,isUpdate:!0,showFooter:!0})})}function z(r){return C(this,null,function*(){yield Q({id:r.id},G)})}function B(){return C(this,null,function*(){yield W({ids:g.value},G)})}function G(){(g.value=[])&&I()}function D(r){return[{label:"编辑",onClick:U.bind(null,r)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:z.bind(null,r),placement:"topLeft"}}]}return(r,t)=>{const y=p("a-button"),L=p("j-upload-button"),S=p("Icon"),R=p("a-menu-item"),T=p("a-menu"),V=p("a-dropdown");return d(),X("div",null,[a(o(Z),{onRegister:o(h),rowSelection:o(E),searchInfo:f},{tableTitle:e(()=>[o(n)!=""?(d(),w(y,{key:0,type:"primary",onClick:M,preIcon:"ant-design:plus-outlined"},{default:e(()=>t[0]||(t[0]=[c(" 新增")])),_:1})):_("",!0),o(n)!=""?(d(),w(y,{key:1,type:"primary",preIcon:"ant-design:export-outlined",onClick:o(u)},{default:e(()=>t[1]||(t[1]=[c(" 导出")])),_:1},8,["onClick"])):_("",!0),o(n)!=""?(d(),w(L,{key:2,type:"primary",preIcon:"ant-design:import-outlined",onClick:o(i)},{default:e(()=>t[2]||(t[2]=[c("导入")])),_:1},8,["onClick"])):_("",!0),o(g).length>0?(d(),w(V,{key:3},{overlay:e(()=>[a(T,null,{default:e(()=>[a(R,{key:"1",onClick:B},{default:e(()=>[a(S,{icon:"ant-design:delete-outlined"}),t[3]||(t[3]=c(" 删除 "))]),_:1})]),_:1})]),default:e(()=>[a(y,null,{default:e(()=>[t[4]||(t[4]=c("批量操作 ")),a(S,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):_("",!0)]),action:e(({record:v})=>[a(o(Y),{actions:D(v)},null,8,["actions"])]),bodyCell:e(({column:v,record:oo,index:to,text:eo})=>t[5]||(t[5]=[])),_:1},8,["onRegister","rowSelection"])])}}});export{mt as default};
