var y=(b,r,a)=>new Promise((x,l)=>{var f=i=>{try{s(a.next(i))}catch(u){l(u)}},k=i=>{try{s(a.throw(i))}catch(u){l(u)}},s=i=>i.done?x(i.value):Promise.resolve(i.value).then(f,k);s((a=a.apply(b,r)).next())});import{d as T,c as V,u as t,w as j,U as p,a2 as d,a3 as F,k as n,af as o,ad as g,G as c,V as _}from"./vue-vendor-CxLCUzY4.js";import"./index-gyz1IdHU.js";import{useListPage as K}from"./useListPage-TMORxSEa.js";import"./index-zKZnG1QC.js";import P from"./XhOutOrderDeliveryItemModal-BZhLvcjJ.js";import{x as A,a as G,b as H,c as Q,d as $,e as q}from"./XhOutOrderDelivery.api-BcUc4XkC.js";import{a9 as J,i as W,u as Y}from"./index-Cy4uayzW.js";import{Q as Z}from"./componentMap-0iK4HQBq.js";import tt from"./BasicTable-CgafrQwz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-BN26Feep.js";import"./useForm-DfoT2G6J.js";import"./index-Bdn0r8CG.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./JAreaLinkage-CTMEfTuh.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JSelectDept-D-TUaHvK.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./JCodeEditor-U9QIstNN.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-DP4caUmw.js";import"./index-tDBMxW9-.js";import"./depart.api-B8q8MC-j.js";import"./JPopup-CVHkQZFq.js";import"./EasyCronInput-CZdChTcP.js";import"./JEllipsis-TuDc52fh.js";import"./JDictSelectTag-CalJXNVe.js";import"./JImageUpload-C5OCTlCG.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./injectionKey-DPVn4AgL.js";const pe=T({__name:"XhOutOrderDeliveryItemList",setup(b){const r=V("mainId")||"",a=Y(),[x,{openModal:l}]=J(),f={},{prefixCls:k,tableContext:s,onImportXls:i,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:{orderNo:r}},importConfig:{url:()=>H+"/"+t(r)}}),[D,{reload:w},{rowSelection:S,selectedRowKeys:C}]=s;j(r,()=>{f.orderNo=t(r),w()});function M(){if(W(t(r))){a.createMessage.warning("请选择一个主表信息");return}l(!0,{isUpdate:!1,showFooter:!0})}function R(m){return y(this,null,function*(){l(!0,{record:m,isUpdate:!0,showFooter:!0})})}function E(m){return y(this,null,function*(){yield $({id:m.id},I)})}function N(){return y(this,null,function*(){yield q({ids:C.value},I)})}function I(){(C.value=[])&&w()}function U(m){return[{label:"编辑",onClick:R.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"),v=p("Icon"),z=p("a-menu-item"),B=p("a-menu"),L=p("a-dropdown");return d(),F("div",null,[n(t(tt),{onRegister:t(D),rowSelection:t(S),searchInfo:f},{tableTitle:o(()=>[t(r)!=""?(d(),g(O,{key:0,type:"primary",onClick:M,preIcon:"ant-design:plus-outlined"},{default:o(()=>e[0]||(e[0]=[c(" 新增")])),_:1})):_("",!0),t(r)!=""?(d(),g(O,{key:1,type:"primary",preIcon:"ant-design:export-outlined",onClick:t(u)},{default:o(()=>e[1]||(e[1]=[c(" 导出")])),_:1},8,["onClick"])):_("",!0),t(r)!=""?(d(),g(X,{key:2,type:"primary",preIcon:"ant-design:import-outlined",onClick:t(i)},{default:o(()=>e[2]||(e[2]=[c("导入")])),_:1},8,["onClick"])):_("",!0),t(C).length>0?(d(),g(L,{key:3},{overlay:o(()=>[n(B,null,{default:o(()=>[n(z,{key:"1",onClick:N},{default:o(()=>[n(v,{icon:"ant-design:delete-outlined"}),e[3]||(e[3]=c(" 删除 "))]),_:1})]),_:1})]),default:o(()=>[n(O,null,{default:o(()=>[e[4]||(e[4]=c("批量操作 ")),n(v,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):_("",!0)]),action:o(({record:h})=>[n(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"]),n(P,{onRegister:t(x),onSuccess:I},null,8,["onRegister"])])}}});export{pe as default};
