import{a as x}from"./configs.40b3dcc9.js";import{u as V}from"./use-response-handle.23bba72b.js";import{h as S}from"./index.44c8546a.js";import{_ as D,q as E,B as n,b0 as L,C as O,r as i,o as _,K as p,H as s,t as r,n as R,J as A,v as f,I as H,br as M,p as N,S as v,aO as q}from"./index.10c3f8e5.js";const F={"w-full":"",flex:"","justify-end":"","mt-2":""},I=v("\u786E\u5B9A"),P=v("\u53D6\u6D88"),T=E({__name:"add-order-modal",emits:["on-add-order"],setup(j,{expose:y,emit:h}){const o=n([]),d=n([]),a=n(!1),u=n(null),b=V();async function g(){const{code:t,message:e,data:l}=await S({});b({code:t,message:e,handler:()=>{o.value=l.list}})}function w(){a.value=!1,h("on-add-order",f(d))}function C(t){if(t.length>1){const e=t.pop();u.value.clearSelection(),u.value.toggleRowSelection(e,!0),d.value=[e]}else d.value=[t[0]]}return L(()=>o.value=o.value.filter(t=>t.status==="3")),y({onDisplay:()=>a.value=!0}),O(()=>g()),(t,e)=>{const l=i("el-table-column"),m=i("el-button"),k=i("el-dialog");return _(),p(k,{modelValue:a.value,"onUpdate:modelValue":e[1]||(e[1]=c=>a.value=c),title:"\u8BA2\u5355\u5BF9\u8D26",center:""},{default:s(()=>[r(f(M),{border:"",ref_key:"tableRef",ref:u,data:o.value,size:"small","row-key":"id",onSelectionChange:C},{default:s(()=>[r(l,{type:"selection",width:"55"}),(_(!0),R(H,null,A(f(x),(c,B)=>(_(),p(l,q({key:B},c,{"show-overflow-tooltip":""}),null,16))),128))]),_:1},8,["data"]),N("div",F,[r(m,{type:"primary",onClick:w},{default:s(()=>[I]),_:1}),r(m,{onClick:e[0]||(e[0]=()=>a.value=!1)},{default:s(()=>[P]),_:1})])]),_:1},8,["modelValue"])}}});var G=D(T,[["__scopeId","data-v-5f9477a2"]]);export{G as default};
