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