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