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