diff --git a/src/pages/app/ApprovalManagement.vue b/src/pages/app/ApprovalManagement.vue index 430cc8e..d1f081a 100644 --- a/src/pages/app/ApprovalManagement.vue +++ b/src/pages/app/ApprovalManagement.vue @@ -10,8 +10,11 @@ import {getContractList} from "/@src/service/contractApi.ts"; onBeforeMount(async () => { - await getIntegratedPaymentList() + await getIntegratedApprovalList() + const userSession = useUserSession() + params.sessionUser = userSession.user.data }) + const isModalOpen = ref(false) const selectedRow = ref(null) const prcsNo = ref('') @@ -63,6 +66,7 @@ const notyf = useNotyf() const params = reactive({ title: '', + sessionUser: '', priceData: [], regSdt:'', regEdt:'', @@ -95,7 +99,7 @@ function formatRegDt(value) { return value ? value.substring(0, 16) : '' } -async function getIntegratedPaymentList() { +async function getIntegratedApprovalList() { const today = new Date() searchParamsList.regSdt = new Date().setDate(today.getDate() - 30) @@ -107,7 +111,7 @@ async function getIntegratedPaymentList() { row: itemsPerPage, sabun: '17131303', // 김진형 17131303, 손원창 17131304 } - + const result = await getIntegratedApproval(approvalParams) params.approvalParams = result.content.map(item => ({ ...item, @@ -153,7 +157,7 @@ const searchApproval = async (item) => { let itemPerChangePage; if(item == totalPages.value){ - const remain = totalPages.value % itemsPerPage + const remain = totalItems.value % itemsPerPage itemPerChangePage = remain === 0? itemsPerPage : remain }else{ itemPerChangePage = itemsPerPage @@ -162,14 +166,15 @@ const searchApproval = async (item) => { const searchParams = { title: params.title, // apprStat: searchParamsList.apprStat, - // regSdt: formatDatefromString(params.regSdt),//등록시작일 - // regEdt: formatDatefromString(params.regEdt),//등록종료일 + regSdt: formatDatefromString(searchParamsList.regSdt),//등록시작일 + regEdt: formatDatefromString(searchParamsList.regEdt),//등록종료일 page: item,//페이지 row: itemPerChangePage, //아이템갯수 sabun: '17131303', // 김진형 17131303, 손원창 17131304 } - console.log('searchParams', searchParams) + console.log('itemPerChangePage', itemPerChangePage) + console.log('itemsPerPage', itemsPerPage) const result = await getIntegratedApproval(searchParams) params.approvalParams = result.content.map(item => ({ @@ -179,6 +184,8 @@ const searchApproval = async (item) => { totalItems.value = result.totalElements totalPages.value = result.totalPages console.log(params.approvalParams) + console.log('itemPerChangePage', itemPerChangePage) + console.log('itemsPerPage', itemsPerPage) } type User = (typeof users)[0] @@ -230,6 +237,7 @@ watch(currentPage, (newParams) => { v-model="params.title" class="input custom-text-filter" placeholder="결재제목" + @keydown.enter="searchApproval(1)" > @@ -243,7 +251,7 @@ watch(currentPage, (newParams) => {
{
{ color="primary" elevated icon="fas fa-search" - @click.stop="searchApproval" + @click.stop="searchApproval(1)" > 검색 diff --git a/src/pages/app/priceManagement.vue b/src/pages/app/priceManagement.vue index 5d9314d..6ef3922 100644 --- a/src/pages/app/priceManagement.vue +++ b/src/pages/app/priceManagement.vue @@ -62,7 +62,7 @@ const searchPrice = async (item) => { let itemPerChangePage; if(item == totalPages.value){ - const remain = totalPages.value % itemsPerPage + const remain = totalItems.value % itemsPerPage itemPerChangePage = remain === 0? itemsPerPage : remain }else{ itemPerChangePage = itemsPerPage