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-LwlFn7Y4.js";import j from"./JeecgOrderTicketModal-DRgu1GEd.js";import{useListPage as A}from"./useListPage-BEtybUiF.js";import"./index-D2AmS0aU.js";import{t as G,f as H,g as J,h as Q}from"./erplist.api-CZLRJLe7.js";import{a9 as q,i as h,u as W}from"./index-B_2CoVdl.js";import{Q as X}from"./componentMap-CzCGDP7x.js";import Y from"./BasicTable-Clbg3fHx.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./index-DAURrYyA.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useWindowSizeFn-C3WExEpc.js";import"./JAreaLinkage-CSgDAlrn.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JSelectDept-wKz_Qtmc.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./JCodeEditor-esTLnfS3.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-YFlAniYT.js";import"./index-CkL00Q0a.js";import"./depart.api-0qTriT9h.js";import"./JPopup-BJBYqoWe.js";import"./EasyCronInput-DclSHT47.js";import"./JEllipsis-Cn7GCKHR.js";import"./JDictSelectTag-CxpDdimB.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./injectionKey-DPVn4AgL.js";import"./renderUtils-Cbe4E0PZ.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};
