mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 01:22:33 +09:00
func : 결재함 페이징기능 추가
This commit is contained in:
@@ -82,17 +82,32 @@ const params = reactive({
|
||||
rowData: [],
|
||||
})
|
||||
|
||||
const searchParamsList = reactive({
|
||||
cateCd : '', //분야코드
|
||||
stCd : '', //등록상태
|
||||
apprStat : '', //결재상태
|
||||
regNm : '', //담당자
|
||||
regSdt: '',//등록시작일
|
||||
regEdt: '',//등록종료일
|
||||
})
|
||||
|
||||
function formatRegDt(value) {
|
||||
return value ? value.substring(0, 16) : ''
|
||||
}
|
||||
|
||||
async function getIntegratedPaymentList() {
|
||||
const today = new Date()
|
||||
searchParamsList.regSdt = new Date().setDate(today.getDate() - 30)
|
||||
|
||||
const approvalParams = {
|
||||
title: '',
|
||||
page: '1',
|
||||
row: '10',
|
||||
title: params.title,
|
||||
regSdt: formatDatefromString(params.regSdt),
|
||||
regEdt: formatDatefromString(params.regEdt),
|
||||
page: 1,
|
||||
row: itemsPerPage,
|
||||
sabun: '17131303', // 김진형 17131303, 손원창 17131304
|
||||
}
|
||||
|
||||
const result = await getIntegratedApproval(approvalParams)
|
||||
params.approvalParams = result.content.map(item => ({
|
||||
...item,
|
||||
@@ -134,16 +149,35 @@ const gubunMap = {
|
||||
SVCM: '가격조사',
|
||||
}
|
||||
|
||||
const searchApproval = async () => {
|
||||
const searchParams = {
|
||||
params: {
|
||||
title: params.title,
|
||||
page: '1',
|
||||
row: '10',
|
||||
},
|
||||
const searchApproval = async (item) => {
|
||||
|
||||
let itemPerChangePage;
|
||||
if(item == totalPages.value){
|
||||
const remain = totalPages.value % itemsPerPage
|
||||
itemPerChangePage = remain === 0? itemsPerPage : remain
|
||||
}else{
|
||||
itemPerChangePage = itemsPerPage
|
||||
}
|
||||
|
||||
const searchParams = {
|
||||
title: params.title,
|
||||
// apprStat: searchParamsList.apprStat,
|
||||
// regSdt: formatDatefromString(params.regSdt),//등록시작일
|
||||
// regEdt: formatDatefromString(params.regEdt),//등록종료일
|
||||
page: item,//페이지
|
||||
row: itemPerChangePage, //아이템갯수
|
||||
sabun: '17131303', // 김진형 17131303, 손원창 17131304
|
||||
}
|
||||
|
||||
console.log('searchParams', searchParams)
|
||||
|
||||
const result = await getIntegratedApproval(searchParams)
|
||||
params.approvalParams = result.content
|
||||
params.approvalParams = result.content.map(item => ({
|
||||
...item,
|
||||
process: gubunMap[item.gubun] || '',
|
||||
}))
|
||||
totalItems.value = result.totalElements
|
||||
totalPages.value = result.totalPages
|
||||
console.log(params.approvalParams)
|
||||
}
|
||||
|
||||
@@ -176,7 +210,10 @@ const onRowClick = async (row) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
watch(currentPage, (newParams) => {
|
||||
currentPage.value = newParams
|
||||
searchApproval(currentPage.value)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -62,7 +62,8 @@ const searchPrice = async (item) => {
|
||||
|
||||
let itemPerChangePage;
|
||||
if(item == totalPages.value){
|
||||
itemPerChangePage = totalItems.value / totalPages.value == 0? itemsPerPage : totalItems.value % itemsPerPage
|
||||
const remain = totalPages.value % itemsPerPage
|
||||
itemPerChangePage = remain === 0? itemsPerPage : remain
|
||||
}else{
|
||||
itemPerChangePage = itemsPerPage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user