fix : 명칭수정 및 Api 분류

This commit is contained in:
Kasi
2025-05-28 09:53:17 +09:00
parent 7e04e14a16
commit 4e3e0d942f
9 changed files with 73 additions and 66 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import axios from 'axios'
import {saveContract} from "/@src/service/contract.ts";
import {saveContract} from "/src/service/contractApi.ts";
import type {iPbAtt} from "/@src/utils/types.ts";
import {useRouter} from "vue-router";
@@ -636,7 +636,7 @@ function onBizNoChange() {
}
tr:nth-child(7) > td {
padding: 0px 12px;
padding: 0 12px;
}
}
@@ -668,7 +668,7 @@ function onBizNoChange() {
background-color: silver;
}
.field {
margin-bottom: 0px;
margin-bottom: 0;
}
.file-label {

View File

@@ -1,8 +1,7 @@
<script setup lang="ts">
import axios from 'axios'
import { getContractDetail, updateContract, saveContract } from "/@src/service/contract.ts";
import { getDetailPrcs } from "/@src/service/priceApi.ts";
import { getContractDetail, updateContract, saveContract } from "/src/service/contractApi.ts";
onBeforeMount(async ()=>{
const result = await getContractDetail(history.state.key)

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import {getContractList} from "/src/service/contract";
import {getContractList} from "/src/service/contractApi";
import regex, {formatCurrency} from "/@src/utils/common/regex.ts";
const emits = defineEmits(['on-search', 'on-tr-click'])
@@ -27,14 +27,14 @@ onBeforeMount(async () => {
})
async function getContractListView() {
const paymentParams = {
const approvalParams = {
params:{
title: '',
page: '1',
row: '10'
}
}
const result = await getContractList(paymentParams)
const result = await getContractList(approvalParams)
data.contractData = result
console.log('result', result)
}

View File

@@ -1,8 +1,7 @@
<script setup lang="ts">
import axios from 'axios'
import { getContractDetail, updateContract, saveContract } from "/@src/service/contract.ts";
import { getDetailPrcs } from "/@src/service/priceApi.ts";
import { getContractDetail, updateContract, saveContract } from "/src/service/contractApi.ts";
onBeforeMount(async ()=>{
const result = await getContractDetail(history.state.key)

View File

@@ -1,8 +1,9 @@
<script setup lang="ts">
import {conveterNo, getIntegratedApproval, updateIntegratedStatus} from '/src/service/integratedPayment'
import { getIntegratedApproval } from '/src/service/integratedApproval'
import type { VFlexTableWrapperSortFunction, VFlexTableWrapperFilterFunction } from '/src/components/app-vuero/ComVFlexTableWrapper.vue'
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";
onBeforeMount(async () => {
@@ -70,7 +71,7 @@ async function updateIntegratedPaymentApprovalFunc() {
apprStatCd: '0200', // 결재 상태변경 (결재승인 0200 결재회수 0300 결재반려 0400)
reason: '',
}
const result = await updateIntegratedStatus(paymentUpdateParams)
const result = await updateApprovalStatus(paymentUpdateParams)
notyf.primary("결재승인완료")
window.location.reload()
}
@@ -83,7 +84,7 @@ async function updateIntegratedPaymentRejectionFunc() {
apprStatCd: '0400', // 결재 상태변경 (결재승인 0200 결재회수 0300 결재반려 0400)
reason: '',
}
const result = await updateIntegratedStatus(paymentUpdateParams)
const result = await updateApprovalStatus(paymentUpdateParams)
notyf.primary("결재반려완료")
window.location.reload()
}

View File

@@ -1,38 +1,7 @@
import axios from 'axios'
/**
* ()
* @param {object} params
* @property {string} params.page -
* @property {string} params.row -
* @property {string} params.title -
* @returns
*/
export async function getIntegratedApproval(params = {}) {
try {
const result = await axios.get(`/api/itg/appr/req`, {
params,
headers: { sabun: params.sabun },
})
if (result.status === 200) {
return result.data
}
} catch (e) {
if (e.response) {
if (e.response.status >= 500) {
throw new Error('서버 오류가 발생했습니다.')
} else if (e.response.status >= 400) {
throw new Error('잘못된 요청입니다.')
} else if (e.response._data && e.response._data.message) {
throw new Error(e.response._data.message)
}
}
throw new Error(e.message || '알 수 없는 오류')
}
}
/**
* ()
*
* @param {object} params
* @property {string} params.apprNo -
* @property {string} params.apprOrd -
@@ -41,7 +10,7 @@ export async function getIntegratedApproval(params = {}) {
* @property {string} params.reason - ( 0400)
* @returns
*/
export async function updateIntegratedStatus(params = {}) {
export async function updateApprovalStatus(params = {}) {
try {
const result = await axios.put(`/api/appr`, params, {
headers: { sabun: params.sabun },
@@ -62,14 +31,37 @@ export async function updateIntegratedStatus(params = {}) {
}
}
/**
*
* @param {object} params
* @property {string} params.prcsNo -
* @returns
*/
export async function getApprovalDetailsRetrieve(params = {}) {
try {
const result = await axios.get(`/api/appr/conveter/${params.prcsNo}`,{
headers: { sabun: params.sabun },
})
if (result.status === 200) {
return result.data
}
}
catch (e) {
if (e.response) {
if (e.response.status >= 500) {
throw new Error('서버 오류가 발생했습니다.')
} else if (e.response.status >= 400) {
throw new Error('잘못된 요청입니다.')
}
}
throw new Error(e.message)
}
}
/**
*
* @param {object} params
* @property {string} params.apprNo -
* @property {string} params.apprOrd -
* @property {string} params.sabun -
* @property {string} params.apprStatCd -
* @property {string} params.reason - ( 0400)
* @returns
*/
export async function conveterNo(params = {}) {

View File

@@ -0,0 +1,32 @@
import axios from 'axios'
/**
* 통합결재목록(부서) 조회
* @param {object} params
* @property {string} params.page - 페이지번호
* @property {string} params.row - 행 개수
* @property {string} params.title - 제목
* @returns
*/
export async function getIntegratedApproval(params = {}) {
try {
const result = await axios.get(`/api/itg/appr/req`, {
params,
headers: { sabun: params.sabun },
})
if (result.status === 200) {
return result.data
}
} catch (e) {
if (e.response) {
if (e.response.status >= 500) {
throw new Error('서버 오류가 발생했습니다.')
} else if (e.response.status >= 400) {
throw new Error('잘못된 요청입니다.')
} else if (e.response._data && e.response._data.message) {
throw new Error(e.response._data.message)
}
}
throw new Error(e.message || '알 수 없는 오류')
}
}

View File

@@ -1,16 +0,0 @@
import axios from 'axios'
/**
* 가격조사 상세조회
* @param {object} params
* @property {string} params.prcsNo - 가격조사번호
* @returns
*/
export async function getIntegratedApproval(params) {
try {
const result = await axios.get(`/api/itg/appr,${params}`)
return result.data
} catch (e) {
throw new Error(e)
}
}