var c=(w,s,m)=>new Promise((f,p)=>{var d=e=>{try{l(m.next(e))}catch(r){p(r)}},k=e=>{try{l(m.throw(e))}catch(r){p(r)}},l=e=>e.done?f(e.value):Promise.resolve(e.value).then(d,k);l((m=m.apply(w,s)).next())});import{d as F,c as N,e as U,w as D,U as u,a2 as C,a3 as O,k as i,af as n,u as a,G as g,ad as P,V as $}from"./vue-vendor-CxLCUzY4.js";import"./index-BN5Ac_IG.js";import j from"./JeecgOrderTicketModal-B7WVYH2h.js";import{useListPage as A}from"./useListPage-i3Wl0_Fg.js";import"./index-CF_FJn6P.js";import{t as G,f as H,g as J,h as Q}from"./erplist.api-PZf4FuwF.js";import{a9 as q,i as h,u as W}from"./index-CYriLmQo.js";import{Q as X}from"./componentMap-7D1QIeNI.js";import Y 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";import"./renderUtils-CGtepdOw.js";const ie=F({__name:"JeecgOrderTicketList",setup(w){const s=N("orderId",U(()=>"")),m=W(),[f,{openModal:p}]=q(),d={},{prefixCls:k,tableContext:l}=A({tableProps:{api:T,tableSetting:{cacheKey:"ticket"},columns:G,canResize:!1,useSearchForm:!1,actionColumn:{width:180},pagination:{current:1,pageSize:5,pageSizeOptions:["5","10","20"]}}}),[e,{reload:r,setSelectedRowKeys:S},{rowSelection:I,selectedRowKeys:_}]=l;D(s,()=>{d.orderId=a(s),r(),S([])});function T(t){return c(this,null,function*(){let{orderId:o}=t;return o==null||h(o)?[]:yield H(t)})}function R(){if(h(a(s))){m.createMessage.warning("请选择一个订单信息");return}p(!0,{isUpdate:!1,showFooter:!0})}function v(t){return c(this,null,function*(){p(!0,{record:t,isUpdate:!0,showFooter:!0})})}function x(t){return c(this,null,function*(){yield J({id:t.id},r)})}function M(){return c(this,null,function*(){yield Q({ids:_.value},()=>{_.value=[],r()})})}function B(){r()}function K(t){return[{label:"编辑",onClick:v.bind(null,t)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:x.bind(null,t)}}]}return(t,o)=>{const b=u("a-button"),y=u("Icon"),L=u("a-menu-item"),V=u("a-menu"),z=u("a-dropdown");return C(),O("div",null,[i(a(Y),{onRegister:a(e),rowSelection:a(I),searchInfo:d},{tableTitle:n(()=>[i(b,{type:"primary",preIcon:"ant-design:plus-outlined",onClick:R},{default:n(()=>o[0]||(o[0]=[g(" 新增")])),_:1}),a(_).length>0?(C(),P(z,{key:0},{overlay:n(()=>[i(V,null,{default:n(()=>[i(L,{key:"1",onClick:M},{default:n(()=>[i(y,{icon:"ant-design:delete-outlined"}),o[1]||(o[1]=g(" 删除 "))]),_:1})]),_:1})]),default:n(()=>[i(b,null,{default:n(()=>[o[2]||(o[2]=g("批量操作 ")),i(y,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):$("",!0)]),action:n(({record:E})=>[i(a(X),{actions:K(E)},null,8,["actions"])]),_:1},8,["onRegister","rowSelection"]),i(j,{onRegister:a(f),onSuccess:B},null,8,["onRegister"])])}}});export{ie as default};
