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 L,c as T,u as t,w as V,U as p,a2 as d,a3 as j,k as i,af as o,ad as _,G as c,V as x}from"./vue-vendor-CxLCUzY4.js";import"./index-KOQNKxnC.js";import{useListPage as F}from"./useListPage-CevWQ3ci.js";import"./index-XZKTTfG1.js";import K from"./XhOutOrderRequirementItemModal-DtKrAQt8.js";import{x as P,a as A,b as G,c as H,d as Q,e as $}from"./XhOutOrderRequirement.api-Cgz1hNmS.js";import{a9 as J,i as W,u as Y}from"./index-CLZzJyTP.js";import{Q as Z}from"./componentMap-DpsJvoqz.js";import tt 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 pe=L({__name:"XhOutOrderRequirementItemList",setup(b){const r=T("mainId")||"",a=Y(),[C,{openModal:s}]=J(),f={},{prefixCls:k,tableContext:l,onImportXls:n,onExportXls:u}=F({tableProps:{api:A,columns:P,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:H,params:{orderNo:r}},importConfig:{url:()=>G+"/"+t(r)}}),[q,{reload:w},{rowSelection:S,selectedRowKeys:y}]=l;V(r,()=>{f.orderNo=t(r),w()});function v(){if(W(t(r))){a.createMessage.warning("请选择一个主表信息");return}s(!0,{isUpdate:!1,showFooter:!0})}function M(m){return g(this,null,function*(){s(!0,{record:m,isUpdate:!0,showFooter:!0})})}function E(m){return g(this,null,function*(){yield Q({id:m.id},I)})}function N(){return g(this,null,function*(){yield $({ids:y.value},I)})}function I(){(y.value=[])&&w()}function U(m){return[{label:"编辑",onClick:M.bind(null,m)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:E.bind(null,m),placement:"topLeft"}}]}return(m,e)=>{const O=p("a-button"),X=p("j-upload-button"),R=p("Icon"),z=p("a-menu-item"),B=p("a-menu"),D=p("a-dropdown");return d(),j("div",null,[i(t(tt),{onRegister:t(q),rowSelection:t(S),searchInfo:f},{tableTitle:o(()=>[t(r)!=""?(d(),_(O,{key:0,type:"primary",onClick:v,preIcon:"ant-design:plus-outlined"},{default:o(()=>e[0]||(e[0]=[c(" 新增")])),_:1})):x("",!0),t(r)!=""?(d(),_(O,{key:1,type:"primary",preIcon:"ant-design:export-outlined",onClick:t(u)},{default:o(()=>e[1]||(e[1]=[c(" 导出")])),_:1},8,["onClick"])):x("",!0),t(r)!=""?(d(),_(X,{key:2,type:"primary",preIcon:"ant-design:import-outlined",onClick:t(n)},{default:o(()=>e[2]||(e[2]=[c("导入")])),_:1},8,["onClick"])):x("",!0),t(y).length>0?(d(),_(D,{key:3},{overlay:o(()=>[i(B,null,{default:o(()=>[i(z,{key:"1",onClick:N},{default:o(()=>[i(R,{icon:"ant-design:delete-outlined"}),e[3]||(e[3]=c(" 删除 "))]),_:1})]),_:1})]),default:o(()=>[i(O,null,{default:o(()=>[e[4]||(e[4]=c("批量操作 ")),i(R,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):x("",!0)]),action:o(({record:h})=>[i(t(Z),{actions:U(h)},null,8,["actions"])]),bodyCell:o(({column:h,record:et,index:ot,text:rt})=>e[5]||(e[5]=[])),_:1},8,["onRegister","rowSelection"]),i(K,{onRegister:t(C),onSuccess:I},null,8,["onRegister"])])}}});export{pe as default};
