capital-modal.4ec694.js 3.0 KB

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