mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 07:13:44 +09:00
fix : 코드 정리 및 가격조사 기능 추가 완료
This commit is contained in:
@@ -194,6 +194,22 @@ const onDetailDelete = (index: number) => {
|
||||
}
|
||||
}
|
||||
|
||||
const fileInput = ref<HTMLInputElement | null>(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){
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -260,6 +279,55 @@ function onInput(row, column){
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>견적요청</td>
|
||||
<td colspan="9">
|
||||
<VButton
|
||||
color="primary"
|
||||
icon="fas fa-plus"
|
||||
elevated
|
||||
@click="showTable = !showTable"
|
||||
style="width: 19%;"
|
||||
>
|
||||
견적사 입력
|
||||
</VButton>
|
||||
<div v-if="showTable" class="mt-2">
|
||||
<ComVFlexTable
|
||||
:key="params.prcsBizs.length"
|
||||
:data="params.prcsBizs"
|
||||
:columns="params.prcsBizsColumn"
|
||||
:compact="true"
|
||||
:separators="true"
|
||||
:clickable="true"
|
||||
>
|
||||
<template #body-cell="{ row, column, index, value }">
|
||||
<div>
|
||||
<!-- 다른 editable 컬럼은 input -->
|
||||
<input
|
||||
v-if="column.editable"
|
||||
v-model="row[column.key]"
|
||||
class="editable-input"
|
||||
@blur="onInput(row, column)"
|
||||
/>
|
||||
<span v-else-if="column.key=='num'">{{index + 1}}</span>
|
||||
<!-- readonly 출력 -->
|
||||
<span v-else class="lnil lnil-close"
|
||||
@click="onDelete(index)">{{ value }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</ComVFlexTable>
|
||||
<div class="mt-2">
|
||||
<VButton
|
||||
color="primary"
|
||||
icon="fas fa-plus"
|
||||
@click="addNewEstimateRow"
|
||||
>
|
||||
행 추가
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>규격입력</td>
|
||||
<td colspan="2">
|
||||
@@ -268,6 +336,7 @@ function onInput(row, column){
|
||||
icon="fas fa-plus"
|
||||
elevated
|
||||
@click="detailActionsOpen = true"
|
||||
style="width: 100%;"
|
||||
>
|
||||
<span v-if="params.btnChangeFlag == false"> 상세 규격 입력</span>
|
||||
<span v-else-if="params.btnChangeFlag"> 상세 규격 등록 완료</span>
|
||||
@@ -372,71 +441,21 @@ function onInput(row, column){
|
||||
<tr>
|
||||
<td>첨부파일</td>
|
||||
<td colspan="3">
|
||||
<VField class="file has-name is-right">
|
||||
<div class="file-label">
|
||||
<input
|
||||
class="file-input"
|
||||
type="file"
|
||||
name="resume">
|
||||
<span class="file-cta">
|
||||
<span class="file-icon">
|
||||
<i class="fas fa-cloud-upload-alt"/>
|
||||
</span>
|
||||
<span class="file-label">첨부파일</span>
|
||||
</span>
|
||||
<span class="file-name light-text">2022.xls</span>
|
||||
</div>
|
||||
<VField class="file has-name is-left">
|
||||
<VButton @click="openFileDialog">
|
||||
파일 첨부
|
||||
</VButton>
|
||||
<input
|
||||
ref="fileInput"
|
||||
type="file"
|
||||
style="display: none"
|
||||
@change="onFileChange"
|
||||
/>
|
||||
|
||||
<span v-if="fileName" class="file-name">{{ fileName }}</span>
|
||||
</VField>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>견적요청</td>
|
||||
<td colspan="6">
|
||||
<VButton
|
||||
color="primary"
|
||||
icon="fas fa-plus"
|
||||
elevated
|
||||
@click="showTable = !showTable"
|
||||
>
|
||||
견적사 입력
|
||||
</VButton>
|
||||
<div v-if="showTable" class="mt-2">
|
||||
<ComVFlexTable
|
||||
:key="params.prcsBizs.length"
|
||||
:data="params.prcsBizs"
|
||||
:columns="params.prcsBizsColumn"
|
||||
:compact="true"
|
||||
:separators="true"
|
||||
:clickable="true"
|
||||
>
|
||||
<template #body-cell="{ row, column, index, value }">
|
||||
<div>
|
||||
<!-- 다른 editable 컬럼은 input -->
|
||||
<input
|
||||
v-if="column.editable"
|
||||
v-model="row[column.key]"
|
||||
class="editable-input"
|
||||
@blur="onInput(row, column)"
|
||||
/>
|
||||
<span v-else-if="column.key=='num'">{{index + 1}}</span>
|
||||
<!-- readonly 출력 -->
|
||||
<span v-else class="lnil lnil-close"
|
||||
@click="onDelete(index)">{{ value }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</ComVFlexTable>
|
||||
<div class="mt-2">
|
||||
<VButton
|
||||
color="primary"
|
||||
icon="fas fa-plus"
|
||||
@click="addNewEstimateRow"
|
||||
>
|
||||
행 추가
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user