From b3109bbf656ace19d6244a314fb4b18986afbe7f Mon Sep 17 00:00:00 2001 From: Yesol Choi Date: Mon, 2 Jun 2025 22:07:06 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=8C=80=EA=B8=88=EC=A7=80=EA=B8=89?= =?UTF-8?q?=EC=A4=91,=20=EB=8C=80=EA=B8=88=EC=A7=80=EA=B8=89=EC=A0=84=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20Tab=20=EC=B2=98=EB=A6=AC=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/app/DocumentManagement.vue | 140 +++++- src/pages/app/contractDetail.vue | 15 +- src/pages/app/contractManagement.vue | 4 +- src/pages/app/documentManagementDetail.vue | 512 +++++++++++++++++++++ src/service/slipApi.ts | 30 +- src/utils/types.ts | 11 + types/router.d.ts | 1 + 7 files changed, 686 insertions(+), 27 deletions(-) create mode 100644 src/pages/app/documentManagementDetail.vue diff --git a/src/pages/app/DocumentManagement.vue b/src/pages/app/DocumentManagement.vue index efc8be9..82e9013 100644 --- a/src/pages/app/DocumentManagement.vue +++ b/src/pages/app/DocumentManagement.vue @@ -1,28 +1,38 @@ diff --git a/src/service/slipApi.ts b/src/service/slipApi.ts index e98e852..2f49f9d 100644 --- a/src/service/slipApi.ts +++ b/src/service/slipApi.ts @@ -23,6 +23,30 @@ export async function saveTempSlip(params = {}) { } } +/** + * 전표 상세 조회(대금지급전) + * @property {string} params.contNo -계약번호 + * * @returns + * * @param contNo + * */ +export async function getBeforeSlipDetail(contNo: string) { + try { + const result = await axios.get(`/api/slip/${contNo}`) + return result.data + } catch (e) { + const serverError = e.response?.data; + + const message = typeof serverError?.body === 'string' + ? serverError.body + : 'Unknown error occurred'; + + const error = new Error(message); // ✅ 반드시 string만 넣기! 아니면 객체가 문자열로 나옴 + error.code = serverError?.code; + error.errTime = serverError?.errTime; + throw error; + } +} + /** * 임시전표 삭제 * @property {string} params.contNo -계약번호 @@ -48,14 +72,14 @@ export async function deleteSlipDetail(contNo: string) { } /** - * 전표 상세 조회 - * * @property {string} params.contNo -계약번호 + * 전표 상세 조회(대금지급중) + * @property {string} params.contNo -계약번호 * * @returns * * @param contNo * */ export async function getSlipDetail(contNo: string) { try { - const result = await axios.get(`/api/slip/page/${contNo}`) + const result = await axios.get(`/api/slip/detail/${contNo}`) return result.data } catch (e) { const serverError = e.response?.data; diff --git a/src/utils/types.ts b/src/utils/types.ts index 39183d7..e246e8f 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -25,4 +25,15 @@ export interface iPbAtt { size: number data: string path: string +} + +export interface ApprsList{ + abscd: string + bname: string + btext: string + lineclsf: string + posit: string + wkfid: string + wkfsq: number + wkfst: string } \ No newline at end of file diff --git a/types/router.d.ts b/types/router.d.ts index 6dd973f..cb8fa20 100644 --- a/types/router.d.ts +++ b/types/router.d.ts @@ -29,6 +29,7 @@ declare module 'vue-router/auto-routes' { '/app/contractManagement': RouteRecordInfo<'/app/contractManagement', '/app/contractManagement', Record, Record>, '/app/contractUpdate': RouteRecordInfo<'/app/contractUpdate', '/app/contractUpdate', Record, Record>, '/app/DocumentManagement': RouteRecordInfo<'/app/DocumentManagement', '/app/DocumentManagement', Record, Record>, + '/app/documentManagementDetail': RouteRecordInfo<'/app/documentManagementDetail', '/app/documentManagementDetail', Record, Record>, '/app/priceDetail': RouteRecordInfo<'/app/priceDetail', '/app/priceDetail', Record, Record>, '/app/PriceInsert': RouteRecordInfo<'/app/PriceInsert', '/app/PriceInsert', Record, Record>, '/app/priceManagement': RouteRecordInfo<'/app/priceManagement', '/app/priceManagement', Record, Record>,