import{_ as E,d as T,n as p,d3 as I,r as i,aw as M,o as m,A as v,y as r,e as g,h as n,H as C,B as O,i as l,cY as R,c as j,F as q,z as H}from"./index.js";import{d as Y}from"./index.3dfad87f.js";import{C as G,t as J}from"./tragelog.6608fb39.js";const K={flex:"","mb-2":""},Q={flex:"","flex-1":"",gap:"5",pr:"20px"},W={flex:"",width:"120px"},X={flex:"","justify-between":"","mt-2":""},Z=T({__name:"capital-modal",emits:["on-add-order"],setup($,{expose:b,emit:S}){const u=p(!1),c=p([]);G.filter(({field:a})=>a!=="status");const w=S,f=p(null),{run:N,data:V,loading:k,pagination:o}=I({initalData:[],isList:!0,initalPagination:{currentPage:1,pageSize:15,total:0}}),s=p({tradNo:"",logNo:""}),d=()=>{const{pageSize:a,currentPage:e}=o;N(Y({status:"2",tag_type:0,...s.value,page:e,size:a}))};function D(){u.value=!1,w("on-add-order",l(c.value[0]))}function P(a){if(a.length>1){const e=a.pop();f.value.clearSelection(),f.value.toggleRowSelection(e,!0),c.value=[e]}else c.value=[a[0]]}function z(a=!1){a&&(s.value={tradNo:"",logNo:""}),o.currentPage=1,d()}function B(){o.currentPage=1,d()}return b({onDisplay:()=>u.value=!0}),(a,e)=>{const x=i("el-input"),_=i("el-button"),y=i("el-table-column"),A=i("el-pagination"),U=i("el-dialog"),h=M("loading");return m(),v(U,{"close-on-click-modal":!1,"close-on-press-escape":!1,modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=t=>u.value=t),title:"\u8D44\u91D1\u8BA4\u9886",center:"",onOpen:e[7]||(e[7]=()=>d())},{default:r(()=>[g("div",K,[g("div",Q,[n(x,{placeholder:"\u8D44\u91D1\u7F16\u7801",size:"small",modelValue:s.value.tradNo,"onUpdate:modelValue":e[0]||(e[0]=t=>s.value.tradNo=t)},null,8,["modelValue"]),n(x,{placeholder:"\u8BA4\u9886\u7F16\u7801",size:"small",modelValue:s.value.logNo,"onUpdate:modelValue":e[1]||(e[1]=t=>s.value.logNo=t)},null,8,["modelValue"])]),g("div",W,[n(_,{size:"small",type:"primary",onClick:e[2]||(e[2]=()=>z())},{default:r(()=>e[8]||(e[8]=[C("\u641C\u7D22")])),_:1}),n(_,{size:"small",onClick:e[3]||(e[3]=()=>z(!0))},{default:r(()=>e[9]||(e[9]=[C("\u91CD\u7F6E")])),_:1})])]),O((m(),v(l(R),{border:"",ref_key:"tableRef",ref:f,data:l(V),size:"small","row-key":"id",onSelectionChange:P,"max-height":"520px"},{default:r(()=>[n(y,{type:"selection",align:"center",width:"40",fixed:"left"}),(m(!0),j(q,null,H(l(J),({field:t,label:F,width:L})=>(m(),v(y,{key:t,prop:t,label:F,width:L,"show-overflow-tooltip":""},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])),[[h,l(k)]]),g("div",X,[n(A,{total:l(o).total,"current-page":l(o).currentPage,"onUpdate:currentPage":e[4]||(e[4]=t=>l(o).currentPage=t),"page-size":l(o).pageSize,"onUpdate:pageSize":e[5]||(e[5]=t=>l(o).pageSize=t),onCurrentChange:d,onSizeChange:B,layout:"sizes, prev, pager, next","page-sizes":[15,50,100]},null,8,["total","current-page","page-size"]),n(_,{type:"primary",size:"small",onClick:D},{default:r(()=>e[10]||(e[10]=[C("\u786E\u5B9A")])),_:1})])]),_:1},8,["modelValue"])}}});var le=E(Z,[["__scopeId","data-v-31127b90"],["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/refund/components/capital-modal.vue"]]);export{le as default};
