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-gyz1IdHU.js";import j from"./JeecgOrderTicketModal-D93I_e89.js";import{useListPage as A}from"./useListPage-TMORxSEa.js";import"./index-zKZnG1QC.js";import{t as G,f as H,g as J,h as Q}from"./erplist.api-BwxaxhYU.js";import{a9 as q,i as h,u as W}from"./index-Cy4uayzW.js";import{Q as X}from"./componentMap-0iK4HQBq.js";import Y 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";import"./renderUtils-BcsccCoe.js";const re=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{re as default};
