mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-19 21:15:11 +09:00
func : 결재함 검색기능 추가
fix : 변수오기 수정
This commit is contained in:
@@ -10,8 +10,11 @@ import {getContractList} from "/@src/service/contractApi.ts";
|
|||||||
|
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await getIntegratedPaymentList()
|
await getIntegratedApprovalList()
|
||||||
|
const userSession = useUserSession()
|
||||||
|
params.sessionUser = userSession.user.data
|
||||||
})
|
})
|
||||||
|
|
||||||
const isModalOpen = ref(false)
|
const isModalOpen = ref(false)
|
||||||
const selectedRow = ref<any>(null)
|
const selectedRow = ref<any>(null)
|
||||||
const prcsNo = ref<string>('')
|
const prcsNo = ref<string>('')
|
||||||
@@ -63,6 +66,7 @@ const notyf = useNotyf()
|
|||||||
|
|
||||||
const params = reactive({
|
const params = reactive({
|
||||||
title: '',
|
title: '',
|
||||||
|
sessionUser: '',
|
||||||
priceData: [],
|
priceData: [],
|
||||||
regSdt:'',
|
regSdt:'',
|
||||||
regEdt:'',
|
regEdt:'',
|
||||||
@@ -95,7 +99,7 @@ function formatRegDt(value) {
|
|||||||
return value ? value.substring(0, 16) : ''
|
return value ? value.substring(0, 16) : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getIntegratedPaymentList() {
|
async function getIntegratedApprovalList() {
|
||||||
const today = new Date()
|
const today = new Date()
|
||||||
searchParamsList.regSdt = new Date().setDate(today.getDate() - 30)
|
searchParamsList.regSdt = new Date().setDate(today.getDate() - 30)
|
||||||
|
|
||||||
@@ -107,7 +111,7 @@ async function getIntegratedPaymentList() {
|
|||||||
row: itemsPerPage,
|
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,
|
||||||
@@ -153,7 +157,7 @@ const searchApproval = async (item) => {
|
|||||||
|
|
||||||
let itemPerChangePage;
|
let itemPerChangePage;
|
||||||
if(item == totalPages.value){
|
if(item == totalPages.value){
|
||||||
const remain = totalPages.value % itemsPerPage
|
const remain = totalItems.value % itemsPerPage
|
||||||
itemPerChangePage = remain === 0? itemsPerPage : remain
|
itemPerChangePage = remain === 0? itemsPerPage : remain
|
||||||
}else{
|
}else{
|
||||||
itemPerChangePage = itemsPerPage
|
itemPerChangePage = itemsPerPage
|
||||||
@@ -162,14 +166,15 @@ const searchApproval = async (item) => {
|
|||||||
const searchParams = {
|
const searchParams = {
|
||||||
title: params.title,
|
title: params.title,
|
||||||
// apprStat: searchParamsList.apprStat,
|
// apprStat: searchParamsList.apprStat,
|
||||||
// regSdt: formatDatefromString(params.regSdt),//등록시작일
|
regSdt: formatDatefromString(searchParamsList.regSdt),//등록시작일
|
||||||
// regEdt: formatDatefromString(params.regEdt),//등록종료일
|
regEdt: formatDatefromString(searchParamsList.regEdt),//등록종료일
|
||||||
page: item,//페이지
|
page: item,//페이지
|
||||||
row: itemPerChangePage, //아이템갯수
|
row: itemPerChangePage, //아이템갯수
|
||||||
sabun: '17131303', // 김진형 17131303, 손원창 17131304
|
sabun: '17131303', // 김진형 17131303, 손원창 17131304
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('searchParams', searchParams)
|
console.log('itemPerChangePage', itemPerChangePage)
|
||||||
|
console.log('itemsPerPage', itemsPerPage)
|
||||||
|
|
||||||
const result = await getIntegratedApproval(searchParams)
|
const result = await getIntegratedApproval(searchParams)
|
||||||
params.approvalParams = result.content.map(item => ({
|
params.approvalParams = result.content.map(item => ({
|
||||||
@@ -179,6 +184,8 @@ const searchApproval = async (item) => {
|
|||||||
totalItems.value = result.totalElements
|
totalItems.value = result.totalElements
|
||||||
totalPages.value = result.totalPages
|
totalPages.value = result.totalPages
|
||||||
console.log(params.approvalParams)
|
console.log(params.approvalParams)
|
||||||
|
console.log('itemPerChangePage', itemPerChangePage)
|
||||||
|
console.log('itemsPerPage', itemsPerPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
type User = (typeof users)[0]
|
type User = (typeof users)[0]
|
||||||
@@ -230,6 +237,7 @@ watch(currentPage, (newParams) => {
|
|||||||
v-model="params.title"
|
v-model="params.title"
|
||||||
class="input custom-text-filter"
|
class="input custom-text-filter"
|
||||||
placeholder="결재제목"
|
placeholder="결재제목"
|
||||||
|
@keydown.enter="searchApproval(1)"
|
||||||
>
|
>
|
||||||
</VControl>
|
</VControl>
|
||||||
</VField>
|
</VField>
|
||||||
@@ -243,7 +251,7 @@ watch(currentPage, (newParams) => {
|
|||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
<VDatePicker
|
<VDatePicker
|
||||||
v-model.string="params.regSdt"
|
v-model.string="searchParamsList.regSdt"
|
||||||
color="green"
|
color="green"
|
||||||
:masks="masks"
|
:masks="masks"
|
||||||
trim-weeks
|
trim-weeks
|
||||||
@@ -268,7 +276,7 @@ watch(currentPage, (newParams) => {
|
|||||||
</div>
|
</div>
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
<VDatePicker
|
<VDatePicker
|
||||||
v-model.string="params.regEdt"
|
v-model.string="searchParamsList.regEdt"
|
||||||
color="green"
|
color="green"
|
||||||
:masks="masks"
|
:masks="masks"
|
||||||
trim-weeks
|
trim-weeks
|
||||||
@@ -299,7 +307,7 @@ watch(currentPage, (newParams) => {
|
|||||||
color="primary"
|
color="primary"
|
||||||
elevated
|
elevated
|
||||||
icon="fas fa-search"
|
icon="fas fa-search"
|
||||||
@click.stop="searchApproval"
|
@click.stop="searchApproval(1)"
|
||||||
>
|
>
|
||||||
검색
|
검색
|
||||||
</VButton>
|
</VButton>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ const searchPrice = async (item) => {
|
|||||||
|
|
||||||
let itemPerChangePage;
|
let itemPerChangePage;
|
||||||
if(item == totalPages.value){
|
if(item == totalPages.value){
|
||||||
const remain = totalPages.value % itemsPerPage
|
const remain = totalItems.value % itemsPerPage
|
||||||
itemPerChangePage = remain === 0? itemsPerPage : remain
|
itemPerChangePage = remain === 0? itemsPerPage : remain
|
||||||
}else{
|
}else{
|
||||||
itemPerChangePage = itemsPerPage
|
itemPerChangePage = itemsPerPage
|
||||||
|
|||||||
Reference in New Issue
Block a user