import{_ as M,d as T,n as p,P as A,O as H,Q as j,r as u,aw as q,o as d,A as v,y as n,h as a,i as m,fn as Q,dU as $,c as z,F,z as w,dc as G,d6 as E,a as J,B as K,cY as W,e as X,H as Z,d$ as ee}from"./index.js";import{a as le}from"./_details.3de0dc8c.js";const ae={flex:"","justify-between":"","mt-2":""},te=T({__name:"capital-modal",emits:["choose"],setup(ne,{expose:D,emit:S}){const V=p([]),f=p([]),t=p({invNo:"",date:[],platform_type:"",buyer_name:"",inv_number:""}),_=p(!1),c=p(!1),B=S,g=p(null),h=A(),{currentCompany:k}=H(),o=j({pageSize:15,currentPage:1,total:0});async function y(){const{pageSize:r,currentPage:e}=o;_.value=!0;const{code:s,message:b,data:i}=await ee({status:"4",inv_out:k.value.companyNo,size:r,page:e,...t.value});h({code:s,message:b,handler:()=>{o.total=i.count,V.value=i.list}}),_.value=!1}function P(){c.value=!1,B("choose",m(f.value[0]))}function N(r){if(r.length>1){const e=r.pop();g.value.clearSelection(),g.value.toggleRowSelection(e,!0),f.value=[e]}else f.value=[r[0]]}function U(){o.currentPage=1,y()}return D({onDisplay:()=>c.value=!0}),(r,e)=>{const s=u("ElCol"),b=u("ElOption"),i=u("ElInput"),x=u("ElRow"),C=u("el-table-column"),O=u("el-pagination"),R=u("el-button"),Y=u("el-dialog"),I=q("loading");return d(),v(Y,{"close-on-click-modal":!1,"close-on-press-escape":!1,modelValue:c.value,"onUpdate:modelValue":e[7]||(e[7]=l=>c.value=l),title:"\u53D1\u7968\u5217\u8868",center:"",width:"1040px",onOpen:e[8]||(e[8]=()=>y())},{default:n(()=>[a(x,{class:"mb-[10px]"},{default:n(()=>[a(s,{span:8},{default:n(()=>[a(m(Q),{size:"small",type:"daterange","start-placeholder":"\u7533\u8BF7\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7533\u8BF7\u7ED3\u675F\u65F6\u95F4",modelValue:t.value.date,"onUpdate:modelValue":e[0]||(e[0]=l=>t.value.date=l),"value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),a(s,{span:8},{default:n(()=>[a(m($),{placeholder:"\u5E73\u53F0\u7C7B\u578B",modelValue:t.value.platform_type,"onUpdate:modelValue":e[1]||(e[1]=l=>t.value.platform_type=l)},{default:n(()=>[(d(!0),z(F,null,w(m(G),l=>(d(),v(b,E({ref_for:!0},l),null,16))),256))]),_:1},8,["modelValue"])]),_:1}),a(s,{span:8},{default:n(()=>[a(i,{placeholder:"\u5BA2\u6237\u540D\u79F0",modelValue:t.value.buyer_name,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.buyer_name=l)},null,8,["modelValue"])]),_:1})]),_:1}),a(x,{class:"mb-[10px]"},{default:n(()=>[a(s,{span:8},{default:n(()=>[a(i,{placeholder:"\u53D1\u7968\u7533\u8BF7\u7F16\u7801",modelValue:t.value.invNo,"onUpdate:modelValue":e[3]||(e[3]=l=>t.value.invNo=l)},null,8,["modelValue"])]),_:1}),a(s,{span:8},{default:n(()=>[a(i,{placeholder:"\u53D1\u7968\u53F7\u7801",modelValue:t.value.inv_number,"onUpdate:modelValue":e[4]||(e[4]=l=>t.value.inv_number=l)},null,8,["modelValue"])]),_:1})]),_:1}),J(` <div flex mb-2>\r
      <div flex flex-1 gap="5" pr="20px">\r
        <el-input\r
          placeholder="\u53D1\u7968\u7533\u8BF7\u7F16\u7801"\r
          size="small"\r
          v-model="params.invNo"\r
        />\r
      </div>\r
\r
      <div flex width="120px">\r
        <el-button size="small" type="primary" @click="() => onSearch()"\r
          >\u641C\u7D22</el-button\r
        >\r
        <el-button size="small" @click="() => onSearch(true)">\u91CD\u7F6E</el-button>\r
      </div>\r
    </div> `),K((d(),v(m(W),{border:"",ref_key:"tableRef",ref:g,data:V.value,size:"small","row-key":"id",onSelectionChange:N,"max-height":"520px"},{default:n(()=>[a(C,{type:"selection",align:"center",width:"40",fixed:"left"}),(d(!0),z(F,null,w(m(le),(l,L)=>(d(),v(C,E({key:L,ref_for:!0},l,{"show-overflow-tooltip":""}),null,16))),128))]),_:1},8,["data"])),[[I,_.value]]),X("div",ae,[a(O,{"current-page":o.currentPage,"onUpdate:currentPage":e[5]||(e[5]=l=>o.currentPage=l),"page-size":o.pageSize,"onUpdate:pageSize":e[6]||(e[6]=l=>o.pageSize=l),total:o.total,onCurrentChange:y,onSizeChange:U,layout:"sizes, prev, pager, next","page-sizes":[15,50,100]},null,8,["current-page","page-size","total"]),a(R,{type:"primary",size:"small",onClick:P},{default:n(()=>e[9]||(e[9]=[Z("\u786E\u5B9A")])),_:1})])]),_:1},8,["modelValue"])}}});var se=M(te,[["__scopeId","data-v-4f4627ac"],["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/returnTicket/components/capital-modal.vue"]]);export{se as default};
