import{c as L}from"./index.694cd68a.js";import{u as N}from"./use-response-handle.f995d678.js";import{s as P}from"./configs.ef9479ae.js";import{q,B as r,a4 as H,C as O,r as o,as as U,o as i,K as m,H as u,L as E,n as F,J as T,v as z,I as j,p as y,t as _,S}from"./index.7a111e62.js";const I={flex:"","justify-between":"","mt-2":""},J=S("\u4FDD\u5B58"),K=S("\u53D6\u6D88"),W=q({__name:"sales-modal",emits:["save-click-button"],setup(M,{expose:k,emit:C}){const n=r(!1),c=r(!1),g=r([]),v=r([]),h=N(),a=H({pageSize:10,currentPage:1,total:0});async function f(){c.value=!0;const{pageSize:l,currentPage:t}=a,{code:p,message:d,data:s}=await L({page:t,size:l});h({code:p,message:d,handler:()=>{g.value=s.list,a.total=s.count}}),c.value=!1}function w(l){v.value=l}function D(){C("save-click-button",z(v)),n.value=!1}return k({onDisplay:()=>n.value=!0}),O(()=>f()),(l,t)=>{const p=o("el-table-column"),d=o("el-table"),s=o("el-pagination"),b=o("el-button"),B=o("el-dialog"),V=U("loading");return i(),m(B,{modelValue:n.value,"onUpdate:modelValue":t[2]||(t[2]=e=>n.value=e),title:"\u9500\u552E\u5355\u5217\u8868"},{default:u(()=>[E((i(),m(d,{data:g.value,size:"small","row-key":"sequenceNo",onSelectionChange:w},{default:u(()=>[(i(!0),F(j,null,T(z(P),(e,x)=>(i(),m(p,{prop:e.field,label:e.label,key:x,type:e.type,"show-overflow-tooltip":"","reserve-selection":""},null,8,["prop","label","type"]))),128))]),_:1},8,["data"])),[[V,c.value]]),y("div",I,[_(s,{"current-page":a.currentPage,"onUpdate:current-page":t[0]||(t[0]=e=>a.currentPage=e),"page-size":a.pageSize,"onUpdate:page-size":t[1]||(t[1]=e=>a.pageSize=e),total:a.total,"page-sizes":[10,15,20],onCurrentChange:f,size:"small"},null,8,["current-page","page-size","total"]),y("div",null,[_(b,{type:"primary",onClick:D},{default:u(()=>[J]),_:1}),_(b,null,{default:u(()=>[K]),_:1})])])]),_:1},8,["modelValue"])}}});export{W as default};
