capital-modal.3611d13d.js 2.9 KB

1
  1. import{_ as E,r as U,D as u,az as A,ak as L,v as d,as as R,o as c,M as z,J as p,q as v,w as n,N as M,x as C,bk as q,p as H,L as O,K as T,W as b,bp as j}from"./index.04880f91.js";import{b as I}from"./index.754c106e.js";import{i as J}from"./configs.80dd5359.js";const K={flex:"","mb-2":""},W={flex:"","flex-1":"",gap:"5",pr:"20px"},G={flex:"",width:"120px"},Q=b("\u641C\u7D22"),X=b("\u91CD\u7F6E"),Y={flex:"","justify-between":"","mt-2":""},Z=b("\u786E\u5B9A"),$=U({__name:"capital-modal",emits:["on-add-order"],setup(ee,{expose:w,emit:k}){const x=u([]),_=u([]),a=u({invNo:"",inv_out:"",inv_company:""}),f=u(!1),m=u(!1),g=u(null),F=A(),l=L({pageSize:10,currentPage:1,total:0});async function y(){const{pageSize:o,currentPage:e}=l;f.value=!0;const{code:s,message:i,data:r}=await I({status:"3",size:o,page:e,...a.value});F({code:s,message:i,handler:()=>{l.total=r.count,x.value=r.list}}),f.value=!1}function D(){m.value=!1,k("on-add-order",C(_.value[0]))}function S(o){if(o.length>1){const e=o.pop();g.value.clearSelection(),g.value.toggleRowSelection(e,!0),_.value=[e]}else _.value=[o[0]]}function V(o=!1){o&&(a.value={invNo:"",inv_out:"",inv_company:""}),l.currentPage=1,y()}return w({onDisplay:()=>m.value=!0}),(o,e)=>{const s=d("el-input"),i=d("el-button"),r=d("el-table-column"),h=d("el-pagination"),N=d("el-dialog"),P=R("loading");return c(),z(N,{modelValue:m.value,"onUpdate:modelValue":e[7]||(e[7]=t=>m.value=t),title:"\u53D1\u7968\u5217\u8868",center:"",width:"1040px",onOpen:e[8]||(e[8]=()=>y())},{default:p(()=>[v("div",K,[v("div",W,[n(s,{placeholder:"\u53D1\u7968\u7533\u8BF7\u7F16\u53F7",size:"small",modelValue:a.value.invNo,"onUpdate:modelValue":e[0]||(e[0]=t=>a.value.invNo=t)},null,8,["modelValue"]),n(s,{placeholder:"\u4E1A\u52A1\u516C\u53F8\u7F16\u53F7",size:"small",modelValue:a.value.inv_out,"onUpdate:modelValue":e[1]||(e[1]=t=>a.value.inv_out=t)},null,8,["modelValue"]),n(s,{placeholder:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",size:"small",modelValue:a.value.inv_company,"onUpdate:modelValue":e[2]||(e[2]=t=>a.value.inv_company=t)},null,8,["modelValue"])]),v("div",G,[n(i,{size:"small",type:"primary",onClick:e[3]||(e[3]=()=>V())},{default:p(()=>[Q]),_:1}),n(i,{size:"small",onClick:e[4]||(e[4]=()=>V(!0))},{default:p(()=>[X]),_:1})])]),M((c(),z(C(q),{border:"",ref_key:"tableRef",ref:g,data:x.value,size:"small","row-key":"id",onSelectionChange:S},{default:p(()=>[n(r,{type:"selection",width:"55"}),(c(!0),H(T,null,O(C(J),(t,B)=>(c(),z(r,j({key:B},t,{"show-overflow-tooltip":""}),null,16))),128))]),_:1},8,["data"])),[[P,f.value]]),v("div",Y,[n(h,{"current-page":l.currentPage,"onUpdate:current-page":e[5]||(e[5]=t=>l.currentPage=t),"page-size":l.pageSize,"onUpdate:page-size":e[6]||(e[6]=t=>l.pageSize=t),total:l.total,onCurrentChange:y},null,8,["current-page","page-size","total"]),n(i,{type:"primary",size:"small",onClick:D},{default:p(()=>[Z]),_:1})])]),_:1},8,["modelValue"])}}});var oe=E($,[["__scopeId","data-v-44be7580"]]);export{oe as default};