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