From 0f4272ed48c8cc7e5f4e22f53b1550fa0b67e35a Mon Sep 17 00:00:00 2001 From: Yesol Choi Date: Mon, 26 May 2025 11:12:10 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=BD=94=EB=93=9C=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC=20=EB=B0=8F=20=EA=B0=80=EA=B2=A9=EC=A1=B0=EC=82=AC=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/app/PriceInsert.vue | 9 --- src/pages/app/priceDetail.vue | 38 +++++++-- src/pages/app/priceUpdate.vue | 143 +++++++++++++++++++--------------- src/service/priceApi.ts | 11 ++- 4 files changed, 124 insertions(+), 77 deletions(-) diff --git a/src/pages/app/PriceInsert.vue b/src/pages/app/PriceInsert.vue index 58eae7c..da21728 100644 --- a/src/pages/app/PriceInsert.vue +++ b/src/pages/app/PriceInsert.vue @@ -181,15 +181,6 @@ function formatDate(dateStr) { }).replace(/\./g, '-').replace(/\s/g, '').replace(/-$/,'') } -const onPayDelete = (index: number) => { - - if(params.dtlSpecs.length-1 !== params.dtlSpecsColumn.length - || (params.dtlSpecsColumn.length == 8 && params.dtlSpecs.length-1 == params.dtlSpecsColumn.length)) - { - params.dtlSpecs.splice(index, 1) - } -} - const fileInput = ref(null) const fileName = ref('') diff --git a/src/pages/app/priceDetail.vue b/src/pages/app/priceDetail.vue index b72aa5a..4603a46 100644 --- a/src/pages/app/priceDetail.vue +++ b/src/pages/app/priceDetail.vue @@ -1,5 +1,5 @@ diff --git a/src/pages/app/priceUpdate.vue b/src/pages/app/priceUpdate.vue index ff19037..ddad72a 100644 --- a/src/pages/app/priceUpdate.vue +++ b/src/pages/app/priceUpdate.vue @@ -194,6 +194,22 @@ const onDetailDelete = (index: number) => { } } +const fileInput = ref(null) +const fileName = ref('') + +function openFileDialog() { + fileInput.value?.click() +} + +function onFileChange(event: Event) { + const target = event.target as HTMLInputElement + if (target.files && target.files.length > 0) { + fileName.value = target.files[0].name + // 여기서 파일 업로드 로직을 추가할 수 있습니다. + // 예: emit('file-selected', target.files[0]) + } +} + function onInput(row, column){ if (column.key === 'bizNo') { const raw =row[column.key].replace(/\D/g, '') @@ -216,6 +232,9 @@ function onInput(row, column){ + + + @@ -260,6 +279,55 @@ function onInput(row, column){ + + 견적요청 + + + 견적사 입력 + +
+ + + +
+ + 행 추가 + +
+
+ + 규격입력 @@ -268,6 +336,7 @@ function onInput(row, column){ icon="fas fa-plus" elevated @click="detailActionsOpen = true" + style="width: 100%;" > 상세 규격 입력 상세 규격 등록 완료 @@ -372,71 +441,21 @@ function onInput(row, column){ 첨부파일 - -
- - - - - - 첨부파일 - - 2022.xls -
+ + + 파일 첨부 + + + + {{ fileName }} - - 견적요청 - - - 견적사 입력 - -
- - - -
- - 행 추가 - -
-
- - diff --git a/src/service/priceApi.ts b/src/service/priceApi.ts index 24ad28d..5a5c900 100644 --- a/src/service/priceApi.ts +++ b/src/service/priceApi.ts @@ -233,7 +233,16 @@ export async function putSurveyPrcsNo(params = {}) { const result = await axios.put(`/api/prcs/survey${params}`) return result.data } catch (e) { - throw new Error(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; } }