func : 결재함 상세조회 활성화

This commit is contained in:
Kasi
2025-05-27 18:56:04 +09:00
parent 8ed89d386e
commit 82260eef05
3 changed files with 156 additions and 51 deletions

View File

@@ -14,7 +14,6 @@ export async function getIntegratedApproval(params = {}) {
params,
headers: { sabun: params.sabun },
})
console.log(result)
if (result.status === 200) {
return result.data
}
@@ -63,3 +62,34 @@ export async function updateIntegratedApproval(params = {}) {
}
}
/**
* 결재번호를 가격조사 번호로 변경
* @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 = {}) {
try {
const result = await axios.get(`/api/appr/conveter/${params.apprNo}`,{
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)
}
}