fix : 코드 정리 및 가격조사 기능 추가 완료

This commit is contained in:
Yesol Choi
2025-05-26 11:12:10 +09:00
parent 2673aa7dc7
commit 0f4272ed48
4 changed files with 124 additions and 77 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import {getDetailPrcs, updatePrcsNo} from '/src/service/priceApi'
import {getDetailPrcs, updatePrcsNo, putSurveyPrcsNo} from '/src/service/priceApi'
import { type Person } from '/@src/utils/types'
const notyf = useNotyf()
@@ -87,6 +87,7 @@ function getDetailList(arg){
apprStat: req.apprStat,
attendNm: req.attendNm
})) //비고 데이터 없음, 승인일자 없음 todo
console.log(" apprLine.value", apprLine.value)
}
const updateState = async () => {
@@ -119,6 +120,22 @@ function formatDate(dateStr) {
}).replace(/\./g, '-').replace(/\s/g, '').replace(/-$/,'')
}
const onChangeFinal = async () => {
let res = null
try {
loading.value = true
res = await putSurveyPrcsNo(params.prcsNo)
notyf.dismissAll()
if (res.request.status === 200) {
notyf.primary('가격조사 완료 되었습니다.')
router.push({path: '/app/contractManagement'})
}
} catch (e) {
notyf.error(e.message)
} finally {
loading.value = false
}
}
</script>
<template>
@@ -185,12 +202,12 @@ function formatDate(dateStr) {
<td>규격입력</td>
<td colspan="2">
<VButton
:color="params.btnChangeFlag? 'success':'primary'"
color='success'
icon="fas fa-plus"
elevated
@click="detailActionsOpen = true"
>
<span> 상세 규격 입력</span>
<span> 상세 규격 등록 완료</span>
</VButton>
<VModal
:open="detailActionsOpen"
@@ -316,14 +333,24 @@ function formatDate(dateStr) {
<tr>
<td>견적요청</td>
<td colspan="6">
<div style="display: flex; justify-content: flex-end; gap: 8px;">
<VButton
color="primary"
icon="fas fa-plus"
elevated
@click="showTable = !showTable"
>
견적사 입력
견적사 확인
</VButton>
<VButton
color="primary"
icon="fas fa-plus"
elevated
@click="onChangeFinal"
>
가격조사 완료
</VButton>
</div>
<div v-if="showTable" class="mt-2">
<ComVFlexTable
:key="params.prcsBizs.length"
@@ -369,7 +396,8 @@ function formatDate(dateStr) {
<template #body-cell="{ row, column, index, value }">
<!-- : 특정 컬럼이면 input, 아니면 그냥 출력 -->
<div>
<span>{{value}}</span>
<span v-if="column.key=='attendNm' && !value">{{'재중'}}</span>
<span v-else>{{value}}</span>
</div>
</template>
</ComVFlexTable>