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