capital-modal.cd7c242c.js 2.9 KB

1
  1. import{_ as L,d as E,w as p,bv as M,r as i,aC as T,o as c,G as v,C as r,b as m,l as n,M as C,H as I,u as l,bo as O,c as R,F as j,D as q}from"./index.42bf163d.js";import{d as G}from"./index.b737e659.js";import{C as H,t as J}from"./tragelog.f3ef66d3.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=E({__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:w,data:D,loading:N,pagination:o}=M({initalData:[],isList:!0,initalPagination:{currentPage:1,pageSize:15,total:0}}),s=p({tradNo:"",logNo:""}),d=()=>{const{pageSize:a,currentPage:e}=o;w(G({status:"2",...s.value,page:e,size:a}))};function V(){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 h(){o.currentPage=1,d()}return y({onDisplay:()=>u.value=!0}),(a,e)=>{const b=i("el-input"),f=i("el-button"),x=i("el-table-column"),P=i("el-pagination"),B=i("el-dialog"),U=T("loading");return c(),v(B,{"close-on-click-modal":!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(b,{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(b,{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(D),size:"small","row-key":"id",onSelectionChange:k,"max-height":"520px"},{default:r(()=>[n(x,{type:"selection",align:"center",width:"40"}),(c(!0),R(j,null,q(l(J),({field:t,label:A,width:F})=>(c(),v(x,{key:t,prop:t,label:A,width:F,"show-overflow-tooltip":""},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])),[[U,l(N)]]),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:h,layout:"sizes, prev, pager, next","page-sizes":[15,50,100]},null,8,["total","current-page","page-size"]),n(f,{type:"primary",size:"small",onClick:V},{default:r(()=>[C("\u786E\u5B9A")]),_:1})])]),_:1},8,["modelValue"])}}});var ae=L(Y,[["__scopeId","data-v-31127b90"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/refund/components/capital-modal.vue"]]);export{ae as default};