mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 03:12:27 +09:00
func - 계약관리 페이징처리 기능 추가
func - 계약관리 대금청구 버튼 조건부 색상변경 추가 func - 결재함 '구분값' 에 따른 모달 컴포넌트 변경완료
This commit is contained in:
@@ -5,9 +5,12 @@ import { users } from '/src/data/layouts/card-grid-v1'
|
|||||||
import PriceDetail from "/@src/pages/app/priceDetail.vue";
|
import PriceDetail from "/@src/pages/app/priceDetail.vue";
|
||||||
import {conveterNo, updateApprovalStatus} from "/@src/service/approvalApi.ts";
|
import {conveterNo, updateApprovalStatus} from "/@src/service/approvalApi.ts";
|
||||||
import {formatDatefromString} from "/@src/utils/common/comfunc.ts";
|
import {formatDatefromString} from "/@src/utils/common/comfunc.ts";
|
||||||
import {getPriceList} from "/@src/service/priceApi.ts";
|
import DocumentManagementDetail from "/@src/pages/app/documentManagementDetail.vue";
|
||||||
import {getContractList} from "/@src/service/contractApi.ts";
|
|
||||||
|
|
||||||
|
const gubunMap = {
|
||||||
|
SAP: '전표생성',
|
||||||
|
SVCM: '가격조사',
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await getIntegratedApprovalList()
|
await getIntegratedApprovalList()
|
||||||
@@ -18,47 +21,12 @@ onBeforeMount(async () => {
|
|||||||
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>('')
|
||||||
|
let apprNo = ref<string>('')
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const totalItems = ref(0) // 전체 아이템 수
|
const totalItems = ref(0) // 전체 아이템 수
|
||||||
const currentPage = ref<number>(1) // 현재 페이지
|
const currentPage = ref<number>(1) // 현재 페이지
|
||||||
const itemsPerPage = 8
|
const itemsPerPage = 8
|
||||||
const totalPages = ref(1)
|
const totalPages = ref(1)
|
||||||
|
|
||||||
async function getApprovalListData(){
|
|
||||||
const today = new Date()
|
|
||||||
searchParamsList.regSdt = new Date().setDate(today.getDate() - 30)
|
|
||||||
searchParamsList.regEdt = new Date().setDate(today.getDate())
|
|
||||||
|
|
||||||
const priceBase = {
|
|
||||||
params:{
|
|
||||||
regSdt: formatDatefromString(searchParamsList.regSdt),
|
|
||||||
regEdt: formatDatefromString(searchParamsList.regEdt),
|
|
||||||
page: 1,
|
|
||||||
row: itemsPerPage
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const result = await getPriceList(priceBase)
|
|
||||||
params.priceData = result.content
|
|
||||||
//페이지 관련 값 설정
|
|
||||||
totalItems.value = result.totalElements
|
|
||||||
totalPages.value = result.totalPages
|
|
||||||
}
|
|
||||||
|
|
||||||
const searchApprovalDoc = async (item) => {
|
|
||||||
const searchParams = {
|
|
||||||
params: {
|
|
||||||
title : searchParamsList.title, //제목
|
|
||||||
regSdt: formatDatefromString(searchParamsList.regSdt),//등록시작일
|
|
||||||
regEdt: formatDatefromString(searchParamsList.regEdt),//등록종료일
|
|
||||||
page: item,//페이지
|
|
||||||
row: itemsPerPage //아이템갯수
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const result = await getContractList(searchParams)
|
|
||||||
params.priceData = result.content
|
|
||||||
totalItems.value = result.totalElements
|
|
||||||
}
|
|
||||||
|
|
||||||
const masks = ref({
|
const masks = ref({
|
||||||
modelValue: 'YYYY-MM-DD',
|
modelValue: 'YYYY-MM-DD',
|
||||||
})
|
})
|
||||||
@@ -95,6 +63,7 @@ const searchParamsList = reactive({
|
|||||||
regEdt: '',//등록종료일
|
regEdt: '',//등록종료일
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function formatRegDt(value) {
|
function formatRegDt(value) {
|
||||||
return value ? value.substring(0, 16) : ''
|
return value ? value.substring(0, 16) : ''
|
||||||
}
|
}
|
||||||
@@ -148,10 +117,7 @@ async function updateIntegratedPaymentRejectionFunc() {
|
|||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
const gubunMap = {
|
|
||||||
SAP: '전표생성',
|
|
||||||
SVCM: '가격조사',
|
|
||||||
}
|
|
||||||
|
|
||||||
const searchApproval = async (item) => {
|
const searchApproval = async (item) => {
|
||||||
|
|
||||||
@@ -173,9 +139,6 @@ const searchApproval = async (item) => {
|
|||||||
sabun: '17131303', // 김진형 17131303, 손원창 17131304
|
sabun: '17131303', // 김진형 17131303, 손원창 17131304
|
||||||
}
|
}
|
||||||
|
|
||||||
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 => ({
|
||||||
...item,
|
...item,
|
||||||
@@ -183,15 +146,14 @@ 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('itemPerChangePage', itemPerChangePage)
|
|
||||||
console.log('itemsPerPage', itemsPerPage)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type User = (typeof users)[0]
|
type User = (typeof users)[0]
|
||||||
|
|
||||||
const onRowClick = async (row) => {
|
const onRowClick = async (row) => {
|
||||||
params.rowData = row
|
params.rowData = row
|
||||||
|
console.log(row)
|
||||||
|
apprNo = row.apprNo
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
apprNo: row.apprNo,
|
apprNo: row.apprNo,
|
||||||
@@ -326,7 +288,6 @@ watch(currentPage, (newParams) => {
|
|||||||
@row-click="onRowClick"
|
@row-click="onRowClick"
|
||||||
>
|
>
|
||||||
</ComVFlexTable>
|
</ComVFlexTable>
|
||||||
|
|
||||||
<!-- 모달 컴포넌트 추가 -->
|
<!-- 모달 컴포넌트 추가 -->
|
||||||
<VModal
|
<VModal
|
||||||
is="form"
|
is="form"
|
||||||
@@ -338,14 +299,15 @@ watch(currentPage, (newParams) => {
|
|||||||
@close="isModalOpen = false"
|
@close="isModalOpen = false"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<PriceDetail :prcsNo="prcsNo" />
|
<PriceDetail v-if="params.rowData.gubun === 'SVCM'" :prcsNo="prcsNo" />
|
||||||
|
<document-management-detail v-else-if="params.rowData.gubun === 'SAP'" :apprNo="apprNo" />
|
||||||
|
<div v-else>지원하지 않는 구분입니다.</div>
|
||||||
</template>
|
</template>
|
||||||
<template #action>
|
<template #action>
|
||||||
<VButton type="submit" color="info" raised @click="updateIntegratedPaymentRejectionFunc">반려</VButton>
|
<VButton type="submit" color="info" raised @click="updateIntegratedPaymentRejectionFunc">반려</VButton>
|
||||||
<VButton type="submit" color="primary" raised @click="updateIntegratedPaymentApprovalFunc">승인</VButton>
|
<VButton type="submit" color="primary" raised @click="updateIntegratedPaymentApprovalFunc">승인</VButton>
|
||||||
</template>
|
</template>
|
||||||
</VModal>
|
</VModal>
|
||||||
|
|
||||||
<VFlexPagination
|
<VFlexPagination
|
||||||
:item-per-page="itemsPerPage"
|
:item-per-page="itemsPerPage"
|
||||||
:total-items="totalItems"
|
:total-items="totalItems"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {getContractList} from "/src/service/contractApi";
|
import {getContractList} from "/src/service/contractApi";
|
||||||
import regex, {formatCurrency} from "/@src/utils/common/regex.ts";
|
import {formatCurrency} from "/@src/utils/common/regex.ts";
|
||||||
import { formatDatefromString } from '/@src/utils/common/comfunc'
|
import { formatDatefromString } from '/@src/utils/common/comfunc'
|
||||||
|
|
||||||
const emits = defineEmits(['on-search', 'on-tr-click'])
|
const emits = defineEmits(['on-search', 'on-tr-click'])
|
||||||
@@ -9,8 +9,10 @@ const masks = ref({
|
|||||||
modelValue: 'YYYY-MM-DD',
|
modelValue: 'YYYY-MM-DD',
|
||||||
})
|
})
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const totalItems = ref(0) // 전체 아이템 수
|
||||||
const selectedCode = ref()
|
const currentPage = ref<number>(1) // 현재 페이지
|
||||||
|
const itemsPerPage = 8
|
||||||
|
const totalPages = ref(1)
|
||||||
|
|
||||||
watch(selUser, (value) => {
|
watch(selUser, (value) => {
|
||||||
console.log(value)
|
console.log(value)
|
||||||
@@ -29,39 +31,71 @@ onBeforeMount(async () => {
|
|||||||
|
|
||||||
async function getContractListView() {
|
async function getContractListView() {
|
||||||
const today = new Date()
|
const today = new Date()
|
||||||
params.regSdt = new Date().setDate(today.getDate() - 30)
|
params.signSdt = new Date().setDate(today.getDate() - 30)
|
||||||
|
|
||||||
const contractParams = {
|
const contractParams = {
|
||||||
params:{
|
params:{
|
||||||
regSdt:formatDatefromString(params.regSdt),
|
regSdt: formatDatefromString(params.signSdt),
|
||||||
regEdt:'',
|
regEdt: formatDatefromString(params.signEdt),
|
||||||
page: '1',
|
page: 1,
|
||||||
row: '10'
|
row: itemsPerPage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const result = await getContractList(contractParams)
|
const result = await getContractList(contractParams)
|
||||||
data.contractData = result
|
data.contractData = result.content
|
||||||
|
console.log('result', data.contractData)
|
||||||
|
//페이지 관련 값 설정
|
||||||
|
totalItems.value = result.totalElements
|
||||||
|
totalPages.value = result.totalPages
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSearch = async () => {
|
const searchParamsList = reactive({
|
||||||
const contractParams = {
|
cateCd : '', //분야코드
|
||||||
params:{
|
contNo : '', // 계약번호
|
||||||
cateCd: selectedCode.value,
|
stCd : '', //등록상태
|
||||||
regSdt:formatDatefromString(params.regSdt),
|
apprStat : '', //결재상태
|
||||||
regEdt:formatDatefromString(params.regEdt),
|
regNm : '', //담당자
|
||||||
page: '1',
|
regSdt: '',//등록시작일
|
||||||
row: '10'
|
regEdt: '',//등록종료일
|
||||||
|
})
|
||||||
|
const searchContract = async (item) => {
|
||||||
|
|
||||||
|
let itemPerChangePage;
|
||||||
|
if(item == totalPages.value){
|
||||||
|
const remain = totalItems.value % itemsPerPage
|
||||||
|
itemPerChangePage = remain === 0? itemsPerPage : remain
|
||||||
|
}else{
|
||||||
|
itemPerChangePage = itemsPerPage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const searchParams = {
|
||||||
|
cateCd: params.selectedCode,
|
||||||
|
apprNo: params.contNo,
|
||||||
|
regNm: params.regNm,
|
||||||
|
signSdt: formatDatefromString(params.signSdt),//계약시작일
|
||||||
|
signEdt: formatDatefromString(params.signEdt),//계약종료일
|
||||||
|
page: item,//페이지
|
||||||
|
row: itemPerChangePage, //아이템갯수
|
||||||
}
|
}
|
||||||
const result = await getContractList(contractParams)
|
|
||||||
data.contractData = result
|
console.log('itemPerChangePage', itemPerChangePage)
|
||||||
|
console.log('itemsPerPage', itemsPerPage)
|
||||||
|
|
||||||
|
const result = await getContractList({ params: searchParams })
|
||||||
|
data.contractData = result.content
|
||||||
|
totalItems.value = result.totalElements
|
||||||
|
totalPages.value = result.totalPages
|
||||||
|
console.log(result)
|
||||||
|
console.log(result.totalPages)
|
||||||
}
|
}
|
||||||
|
|
||||||
const params = reactive({
|
const params = reactive({
|
||||||
sessionUser:'',
|
sessionUser:'',
|
||||||
contNo: '',
|
contNo: '',
|
||||||
regNm: '',
|
regNm: '',
|
||||||
regSdt:'',
|
signSdt:'',
|
||||||
regEdt: '',
|
signEdt: '',
|
||||||
|
selectedCode:'',
|
||||||
flexColumn: [
|
flexColumn: [
|
||||||
{ key: 'cateNm', label: '분야', cellClass: 'contractColumn1'},
|
{ key: 'cateNm', label: '분야', cellClass: 'contractColumn1'},
|
||||||
{ key: 'title', label: '계약명', cellClass: 'contractColumn2' },
|
{ key: 'title', label: '계약명', cellClass: 'contractColumn2' },
|
||||||
@@ -93,6 +127,11 @@ function getBilling(row){
|
|||||||
router.push({ path: '/app/documentManagementDetail', state: { key: row.contNo}})
|
router.push({ path: '/app/documentManagementDetail', state: { key: row.contNo}})
|
||||||
} //detail로 수정하기 현재 : 대금지급전
|
} //detail로 수정하기 현재 : 대금지급전
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(currentPage, (newParams) => {
|
||||||
|
currentPage.value = newParams
|
||||||
|
searchContract(currentPage.value)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -107,7 +146,7 @@ function getBilling(row){
|
|||||||
</VLabel>
|
</VLabel>
|
||||||
<VCodeSelect
|
<VCodeSelect
|
||||||
cd_grp=5
|
cd_grp=5
|
||||||
v-model="selectedCode"/>
|
v-model="params.selectedCode"/>
|
||||||
</VField>
|
</VField>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-2">
|
<div class="column is-2">
|
||||||
@@ -121,6 +160,7 @@ function getBilling(row){
|
|||||||
v-model="params.contNo"
|
v-model="params.contNo"
|
||||||
class="input custom-text-filter"
|
class="input custom-text-filter"
|
||||||
placeholder="계약번호"
|
placeholder="계약번호"
|
||||||
|
@keydown.enter="searchContract(1)"
|
||||||
>
|
>
|
||||||
</VControl>
|
</VControl>
|
||||||
</VField>
|
</VField>
|
||||||
@@ -135,6 +175,7 @@ function getBilling(row){
|
|||||||
v-model="params.regNm"
|
v-model="params.regNm"
|
||||||
class="input custom-text-filter"
|
class="input custom-text-filter"
|
||||||
placeholder="담당자명"
|
placeholder="담당자명"
|
||||||
|
@keydown.enter="searchContract(1)"
|
||||||
>
|
>
|
||||||
</VControl>
|
</VControl>
|
||||||
</VField>
|
</VField>
|
||||||
@@ -148,7 +189,7 @@ function getBilling(row){
|
|||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
<VDatePicker
|
<VDatePicker
|
||||||
v-model="params.regSdt"
|
v-model="params.signSdt"
|
||||||
color="green"
|
color="green"
|
||||||
:masks="masks"
|
:masks="masks"
|
||||||
trim-weeks
|
trim-weeks
|
||||||
@@ -173,7 +214,7 @@ function getBilling(row){
|
|||||||
</div>
|
</div>
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
<VDatePicker
|
<VDatePicker
|
||||||
v-model="params.regEdt"
|
v-model="params.signEdt"
|
||||||
color="green"
|
color="green"
|
||||||
:masks="masks"
|
:masks="masks"
|
||||||
trim-weeks
|
trim-weeks
|
||||||
@@ -199,12 +240,12 @@ function getBilling(row){
|
|||||||
</div>
|
</div>
|
||||||
<div class="column is-2" style="position:relative;">
|
<div class="column is-2" style="position:relative;">
|
||||||
<div style="margin-top: 1.8rem">
|
<div style="margin-top: 1.8rem">
|
||||||
<VButtons>
|
<VButtons class="buttons">
|
||||||
<VButton
|
<VButton
|
||||||
color="primary"
|
color="primary"
|
||||||
elevated
|
elevated
|
||||||
icon="fas fa-search"
|
icon="fas fa-search"
|
||||||
@click="onSearch"
|
@click.stop="searchContract(1)"
|
||||||
>
|
>
|
||||||
검색
|
검색
|
||||||
</VButton>
|
</VButton>
|
||||||
@@ -240,7 +281,15 @@ function getBilling(row){
|
|||||||
<template #body-cell-charge="{ row }">
|
<template #body-cell-charge="{ row }">
|
||||||
<div>
|
<div>
|
||||||
<VButton
|
<VButton
|
||||||
v-if="row.contStatCd!='0000' && row.contStatCd!='0100'"
|
v-if="row.contStatCd==='0200'"
|
||||||
|
color="danger"
|
||||||
|
size="big"
|
||||||
|
@click.stop="getBilling(row)"
|
||||||
|
>
|
||||||
|
대금청구
|
||||||
|
</VButton>
|
||||||
|
<VButton
|
||||||
|
v-else-if="['0300', '0400', '0500'].includes(row.contStatCd)"
|
||||||
color="info"
|
color="info"
|
||||||
size="big"
|
size="big"
|
||||||
@click.stop="getBilling(row)"
|
@click.stop="getBilling(row)"
|
||||||
@@ -260,6 +309,11 @@ function getBilling(row){
|
|||||||
</ComVFlexTable>
|
</ComVFlexTable>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<VFlexPagination
|
||||||
|
:item-per-page="itemsPerPage"
|
||||||
|
:total-items="totalItems"
|
||||||
|
v-model:current-page="currentPage"
|
||||||
|
/>
|
||||||
<VButtons class="is-right">
|
<VButtons class="is-right">
|
||||||
<VButton
|
<VButton
|
||||||
class=""
|
class=""
|
||||||
|
|||||||
@@ -114,12 +114,10 @@ function getDetailList(arg){
|
|||||||
completedPriceDataParams.contEdat = arg.contEdat
|
completedPriceDataParams.contEdat = arg.contEdat
|
||||||
completedPriceDataParams.contAmt = arg.contAmt
|
completedPriceDataParams.contAmt = arg.contAmt
|
||||||
priceSearchCheckBoxStatus.value = arg.excYn
|
priceSearchCheckBoxStatus.value = arg.excYn
|
||||||
//completedPriceDataParams.svyDt = arg.signDt //계약체결일 todo
|
|
||||||
completedPriceDataParams.reason = arg.reason
|
completedPriceDataParams.reason = arg.reason
|
||||||
completedPriceDataParams.signDt = arg.signDt
|
completedPriceDataParams.signDt = arg.signDt
|
||||||
params.contStatCd = arg.contStatCd
|
params.contStatCd = arg.contStatCd
|
||||||
params.contNo = arg.contNo
|
params.contNo = arg.contNo
|
||||||
console.log("params.contNo",params.contNo)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatMonthDate(dateStr) {
|
function formatMonthDate(dateStr) {
|
||||||
|
|||||||
@@ -4,10 +4,15 @@ import {getSlipDetail, saveTempSlip} from "/@src/service/slipApi.ts";
|
|||||||
import {formatDatefromStringDate} from "/@src/utils/common/comfunc.ts";
|
import {formatDatefromStringDate} from "/@src/utils/common/comfunc.ts";
|
||||||
import {VTabsItem} from "/@src/components/app-vuero/VCustomTabs.vue";
|
import {VTabsItem} from "/@src/components/app-vuero/VCustomTabs.vue";
|
||||||
|
|
||||||
|
|
||||||
|
const props = defineProps<{apprNo : string}>();
|
||||||
|
console.log(props.apprNo)
|
||||||
|
|
||||||
onBeforeMount(async ()=>{
|
onBeforeMount(async ()=>{
|
||||||
const result = await getSlipDetail(history.state.key)
|
const result = await getSlipDetail(props.apprNo)
|
||||||
getDetailList(result)
|
getDetailList(result)
|
||||||
})
|
})
|
||||||
|
|
||||||
const notyf = useNotyf()
|
const notyf = useNotyf()
|
||||||
const getDetailList = (item) => {
|
const getDetailList = (item) => {
|
||||||
console.log("getDetailList",item)
|
console.log("getDetailList",item)
|
||||||
|
|||||||
Reference in New Issue
Block a user