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