var g=(b,r,a)=>new Promise((C,s)=>{var f=n=>{try{l(a.next(n))}catch(u){s(u)}},k=n=>{try{l(a.throw(n))}catch(u){s(u)}},l=n=>n.done?C(n.value):Promise.resolve(n.value).then(f,k);l((a=a.apply(b,r)).next())});import{d as V,c as j,u as t,w as F,U as p,a2 as d,a3 as N,k as i,af as e,ad as _,G as c,V as x}from"./vue-vendor-CxLCUzY4.js";import"./index-BN5Ac_IG.js";import{useListPage as K}from"./useListPage-i3Wl0_Fg.js";import"./index-CF_FJn6P.js";import P from"./XhOutOrderItemModal-2XRWSUYQ.js";import{x as A,a as G,b as H,c as Q,d as $,e as q}from"./XhOutOrder.api-AB_HaWDB.js";import{a9 as J,i as W,u as Y}from"./index-CYriLmQo.js";import{Q as Z}from"./componentMap-7D1QIeNI.js";import tt from"./BasicTable-DAfCfXmD.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-BkgeZpOO.js";import"./useForm-8o5KRzWo.js";import"./index-CxQILSKV.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./JAreaLinkage-DFTeDmm8.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JSelectDept-DorRVguN.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./JCodeEditor-_KZ8XnNK.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-CXT54-j9.js";import"./index-BTSd5ebC.js";import"./depart.api-C9T5xfw6.js";import"./JPopup-KP1kIsae.js";import"./EasyCronInput-XK54XB3r.js";import"./JEllipsis-287cEHxd.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./injectionKey-DPVn4AgL.js";const ao=V({__name:"XhOutOrderItemList",setup(b){const r=j("mainId")||"",a=Y(),[C,{openModal:s}]=J(),f={},{prefixCls:k,tableContext:l,onImportXls:n,onExportXls:u}=K({tableProps:{api:G,columns:A,canResize:!1,useSearchForm:!1,size:"small",striped:!0,actionColumn:{width:180,fixed:"right"},pagination:{current:1,pageSize:5,pageSizeOptions:["5","10","20"]}},exportConfig:{name:"鑫泓出库单明细",url:Q,params:{orderId:r}},importConfig:{url:()=>H+"/"+t(r)}}),[v,{reload:w},{rowSelection:M,selectedRowKeys:I}]=l;F(r,()=>{f.orderId=t(r),w()});function R(){if(W(t(r))){a.createMessage.warning("请选择一个主表信息");return}s(!0,{isUpdate:!1,showFooter:!0})}function E(m){return g(this,null,function*(){s(!0,{record:m,isUpdate:!0,showFooter:!0})})}function U(m){return g(this,null,function*(){yield $({id:m.id},y)})}function X(){return g(this,null,function*(){yield q({ids:I.value},y)})}function y(){(I.value=[])&&w()}function z(m){return[{label:"编辑",onClick:E.bind(null,m)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:U.bind(null,m),placement:"topLeft"}}]}return(m,o)=>{const O=p("a-button"),B=p("j-upload-button"),h=p("Icon"),D=p("a-menu-item"),L=p("a-menu"),T=p("a-dropdown");return d(),N("div",null,[i(t(tt),{onRegister:t(v),rowSelection:t(M),searchInfo:f},{tableTitle:e(()=>[t(r)!=""?(d(),_(O,{key:0,type:"primary",onClick:R,preIcon:"ant-design:plus-outlined"},{default:e(()=>o[0]||(o[0]=[c(" 新增")])),_:1})):x("",!0),t(r)!=""?(d(),_(O,{key:1,type:"primary",preIcon:"ant-design:export-outlined",onClick:t(u)},{default:e(()=>o[1]||(o[1]=[c(" 导出")])),_:1},8,["onClick"])):x("",!0),t(r)!=""?(d(),_(B,{key:2,type:"primary",preIcon:"ant-design:import-outlined",onClick:t(n)},{default:e(()=>o[2]||(o[2]=[c("导入")])),_:1},8,["onClick"])):x("",!0),t(I).length>0?(d(),_(T,{key:3},{overlay:e(()=>[i(L,null,{default:e(()=>[i(D,{key:"1",onClick:X},{default:e(()=>[i(h,{icon:"ant-design:delete-outlined"}),o[3]||(o[3]=c(" 删除 "))]),_:1})]),_:1})]),default:e(()=>[i(O,null,{default:e(()=>[o[4]||(o[4]=c("批量操作 ")),i(h,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):x("",!0)]),action:e(({record:S})=>[i(t(Z),{actions:z(S)},null,8,["actions"])]),bodyCell:e(({column:S,record:ot,index:et,text:rt})=>o[5]||(o[5]=[])),_:1},8,["onRegister","rowSelection"]),i(P,{onRegister:t(C),onSuccess:y},null,8,["onRegister"])])}}});export{ao as default};
