create-redink.ff17d471.js 2.2 KB

1
  1. import{_ as E,d as I,w as f,bv as c,r as s,aC as U,o as i,G as d,C as r,H as F,u as a,l as u,c as j,F as q,D as G,bw as H,b as M,M as y}from"./index.3f1ca816.js";import{c as T}from"./index.db675051.js";import{i as J}from"./configs.ae46c65e.js";import{a as K,b as O}from"./index.84ca44b2.js";const Q={"w-full":"",flex:"","justify-end":"","mt-2":""},W=I({__name:"create-redink",emits:["reload"],setup(X,{expose:C,emit:b}){const l=f(!1),g=f([]),h=o=>g.value=o,m=()=>{l.value=!1,b("reload")},k={pageSize:15,currentPage:1,total:0},{data:z,pagination:n,getPaginationParams:w,run:x,loading:A}=c({initalData:[],isList:!0,initalPagination:k}),p=()=>{x(T({status:"3",...w()}))},{run:B,loading:Y}=c({success:m}),{run:D,loading:Z}=c({success:m}),P=()=>{const o=g.value.map(({invNo:e})=>e);if(o.length===1)return D(K({invNo:o[0]}));B(O({invArr:o}))};function S(){n.currentPage=1,p()}return C({onDisplay(){l.value=!0,p()}}),(o,e)=>{const v=s("el-table-column"),R=s("el-table"),V=s("el-pagination"),_=s("el-button"),L=s("el-dialog"),N=U("loading");return i(),d(L,{title:"\u521B\u5EFA\u7EA2\u51B2\u53D1\u7968",center:"",modelValue:l.value,"onUpdate:modelValue":e[4]||(e[4]=t=>l.value=t),"close-on-click-modal":!1},{default:r(()=>[F((i(),d(R,{data:a(z),"row-key":"invNo",onSelectionChange:h,"max-height":"520px"},{default:r(()=>[u(v,{type:"selection",align:"center",width:"40px"}),(i(!0),j(q,null,G(a(J),t=>(i(),d(v,H({key:t.prop},t,{"show-overflow-tooltip":"","reserve-selection":""}),null,16))),128))]),_:1},8,["data"])),[[N,a(A)]]),u(V,{"current-page":a(n).currentPage,"onUpdate:currentPage":e[0]||(e[0]=t=>a(n).currentPage=t),"page-size":a(n).pageSize,"onUpdate:pageSize":e[1]||(e[1]=t=>a(n).pageSize=t),total:a(n).total,onCurrentChange:e[2]||(e[2]=()=>p()),onSizeChange:S,layout:"sizes, prev, pager, next","page-sizes":[15,50,100]},null,8,["current-page","page-size","total"]),M("div",Q,[u(_,{type:"primary",size:"small",onClick:P},{default:r(()=>[y("\u786E\u5B9A")]),_:1}),u(_,{size:"small",onClick:e[3]||(e[3]=()=>l.value=!1)},{default:r(()=>[y("\u53D6\u6D88")]),_:1})])]),_:1},8,["modelValue"])}}});var ne=E(W,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/redInk/components/create-redink.vue"]]);export{ne as default};