var a=(l,u,o)=>new Promise((y,t)=>{var s=r=>{try{e(o.next(r))}catch(n){t(n)}},b=r=>{try{e(o.throw(r))}catch(n){t(n)}},e=r=>r.done?y(r.value):Promise.resolve(r.value).then(s,b);e((o=o.apply(l,u)).next())});import{h as d,__tla as L}from"./api-53ded0f3.js";import{F as I,d as j,f as A,n as z,A as H,y as m,o as _,l as p,e as f,w as g,b as B,t as F,H as D,fn as G,_ as N,__tla as V}from"./index-b5895273.js";let v,P,h,k,q,O,x,E=Promise.all([(()=>{try{return L}catch(l){}})(),(()=>{try{return V}catch(l){}})()]).then(()=>a(void 0,null,function*(){x=function(t){return a(this,null,function*(){const s="wbw/getOrderTableData?key="+(t.keyword?t.keyword:"")+"&userID="+(t.userID?t.userID:"");return d({requestUrl:s,requestType:"get"},{})})};function l(){return a(this,null,function*(){return d({requestUrl:"wbw/getProductData",requestType:"get"},{})})}q=function(t){return a(this,null,function*(){const s="wbw/deleteOrderData?OrderID="+t;return d({requestUrl:s,requestType:"get"},{})})},h=function(t){return a(this,null,function*(){const s="wbw/getOrderProductData?OrderID="+t;return d({requestUrl:s,requestType:"get"},{})})},P=function(t,s="modal"){return a(this,null,function*(){return I.post({url:"/order",params:t},{errorMessageMode:s})})},O=function(t,s="modal"){return a(this,null,function*(){return I.put({url:"/order",params:t},{errorMessageMode:s})})};const u={key:0,class:"model-box"},o={key:0},y=j({__name:"SelectGoods",emits:["submit"],setup(t,{emit:s}){const b=[{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"ProductName"},{title:"\u6570\u91CF",dataIndex:"ProductAmount"},{title:"\u5355\u4EF7",dataIndex:"ProductUnitPrice"}],e=A({visible:!1,tableList:[],selectedRowKeys:[],selectedRows:[]});z(()=>{e.selectedRowKeys=[],e.selectedRows=[],e.visible=!1});function r(){return a(this,null,function*(){let c=yield l();e.tableList=c})}const n=H(()=>({checkStrictly:!0,selectedRowKeys:e.selectedRowKeys,onChange:(c,i)=>{e.selectedRowKeys=c,e.selectedRows=i}}));function K(){return a(this,null,function*(){yield r(),e.visible=!0})}function S(){e.selectedRows.length>0?(s("submit",e.selectedRows),R()):G.error({message:"\u63D0\u793A",description:"\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u4FE1\u606F"})}function R(){e.selectedRowKeys=[],e.selectedRows=[],e.visible=!1}return(c,i)=>{const T=m("a-button"),U=m("a-table"),M=m("a-modal");return _(),p("div",null,[f(T,{type:"primary",onClick:K},{default:g(()=>[B("\u9009\u62E9\u5546\u54C1")]),_:1}),f(M,{visible:e.visible,"onUpdate:visible":i[0]||(i[0]=w=>e.visible=w),width:1e3,title:"\u9009\u62E9\u5546\u54C1",onOk:S,onCancel:R},{default:g(()=>[e.visible?(_(),p("div",u,[f(U,{"row-selection":n.value,pagination:{hideOnSinglePage:!0},rowKey:"ProductID",columns:b,"data-source":e.tableList},{bodyCell:g(({column:w,text:C})=>[w.dataIndex==="name"?(_(),p("a",o,F(C),1)):D("",!0)]),_:1},8,["row-selection","data-source"])])):D("",!0)]),_:1},8,["visible"])])}}});v=N(y,[["__scopeId","data-v-804a8695"]]),k=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"}))}));export{v as S,E as __tla,P as a,h as b,k as c,q as d,O as e,x as g};