import{_ as A,d as L,w as u,aO as R,W as H,Z as M,r as p,aC as O,o as v,G as C,C as d,b as _,l as n,M as z,H as T,u as b,bo as j,c as I,F as q,D as G,bw as W}from"./index.1d1a5ecb.js";import{c as Z}from"./index.5fa131c7.js";import{i as J}from"./configs.ae46c65e.js";const K={flex:"","mb-2":""},Q={flex:"","flex-1":"",gap:"5",pr:"20px"},X={flex:"",width:"120px"},Y={flex:"","justify-between":"","mt-2":""},$=L({__name:"capital-modal",emits:["on-add-order"],setup(ee,{expose:w,emit:k}){const x=u([]),f=u([]),l=u({invNo:"",inv_out:"",inv_company:""}),g=u(!1),c=u(!1),y=u(null),S=R(),{currentCompany:D}=H(),t=M({pageSize:10,currentPage:1,total:0});async function m(){const{pageSize:o,currentPage:e}=t;g.value=!0;const{code:s,message:i,data:r}=await Z({status:"3",inv_out:D.value.companyNo,size:o,page:e,...l.value});S({code:s,message:i,handler:()=>{t.total=r.count,x.value=r.list}}),g.value=!1}function F(){c.value=!1,k("on-add-order",b(f.value[0]))}function P(o){if(o.length>1){const e=o.pop();y.value.clearSelection(),y.value.toggleRowSelection(e,!0),f.value=[e]}else f.value=[o[0]]}function h(){t.currentPage=1,m()}function V(o=!1){o&&(l.value={invNo:"",inv_out:"",inv_company:""}),t.currentPage=1,m()}return w({onDisplay:()=>c.value=!0}),(o,e)=>{const s=p("el-input"),i=p("el-button"),r=p("el-table-column"),N=p("el-pagination"),U=p("el-dialog"),B=O("loading");return v(),C(U,{"close-on-click-modal":!1,modelValue:c.value,"onUpdate:modelValue":e[7]||(e[7]=a=>c.value=a),title:"\u53D1\u7968",center:"",width:"1040px",onOpen:e[8]||(e[8]=()=>m())},{default:d(()=>[_("div",K,[_("div",Q,[n(s,{placeholder:"\u53D1\u7968\u7533\u8BF7\u7F16\u7801",size:"small",modelValue:l.value.invNo,"onUpdate:modelValue":e[0]||(e[0]=a=>l.value.invNo=a)},null,8,["modelValue"]),n(s,{placeholder:"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801",size:"small",modelValue:l.value.inv_out,"onUpdate:modelValue":e[1]||(e[1]=a=>l.value.inv_out=a)},null,8,["modelValue"]),n(s,{placeholder:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",size:"small",modelValue:l.value.inv_company,"onUpdate:modelValue":e[2]||(e[2]=a=>l.value.inv_company=a)},null,8,["modelValue"])]),_("div",X,[n(i,{size:"small",type:"primary",onClick:e[3]||(e[3]=()=>V())},{default:d(()=>[z("\u641C\u7D22")]),_:1}),n(i,{size:"small",onClick:e[4]||(e[4]=()=>V(!0))},{default:d(()=>[z("\u91CD\u7F6E")]),_:1})])]),T((v(),C(b(j),{border:"",ref_key:"tableRef",ref:y,data:x.value,size:"small","row-key":"id",onSelectionChange:P},{default:d(()=>[n(r,{type:"selection",align:"center",width:"40"}),(v(!0),I(q,null,G(b(J),(a,E)=>(v(),C(r,W({key:E},a,{"show-overflow-tooltip":""}),null,16))),128))]),_:1},8,["data"])),[[B,g.value]]),_("div",Y,[n(N,{"current-page":t.currentPage,"onUpdate:currentPage":e[5]||(e[5]=a=>t.currentPage=a),"page-size":t.pageSize,"onUpdate:pageSize":e[6]||(e[6]=a=>t.pageSize=a),total:t.total,onCurrentChange:m,onSizeChange:h,layout:"sizes, prev, pager, next","page-sizes":[15,50,100]},null,8,["current-page","page-size","total"]),n(i,{type:"primary",size:"small",onClick:F},{default:d(()=>[z("\u786E\u5B9A")]),_:1})])]),_:1},8,["modelValue"])}}});var oe=A($,[["__scopeId","data-v-6b3c49fd"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/returnTicket/components/create-return-ticket/capital-modal.vue"]]);export{oe as default};
