fix : 아이콘 붙이기 및 pdf 파일만 업로드 되도록 수정, 다건 파일 업로드 일시 확인 필요

This commit is contained in:
Yesol Choi
2025-05-30 15:17:05 +09:00
parent 71a6890657
commit 854c18e2e9
2 changed files with 15 additions and 7 deletions

View File

@@ -196,7 +196,12 @@ const onFileChange = (e: any) => {
size: file.size,
data: result.split(',')[1],
}
pbAtts.value.push(pbAtt)
notyf.dismissAll()
if(pbAtt.logiFnm.includes('.pdf')) {
pbAtts.value.push(pbAtt)
}else{
notyf.error("pdf 파일만 업로드 가능합니다.")
}
}
reader.readAsDataURL(file)

View File

@@ -111,9 +111,10 @@ const validation = () => {
return false
}
const resultGu = apprLine.value.filter((item)=> !item.gubunCd)
const resultGu = apprLine.value.filter((item,index)=> index != 0 && !item.gubunCd)
if(resultGu.length > 0){
console.log("resultGu",resultGu)
notyf.error("결재선 구분값을 입력해주세요")
return false
}
@@ -182,7 +183,6 @@ const updatePriceOne = async () => {
})), //결재선 데이터
}
res = await updatePrice(paramsPrice)
console.log("update res",res)
notyf.dismissAll()
if(res.request.status == '200'){
notyf.primary('수정 되었습니다.')
@@ -266,7 +266,12 @@ const onFileChange = (e: any) => {
size: file.size,
data: result.split(',')[1],
}
pbAtts.value.push(pbAtt)
notyf.dismissAll()
if(pbAtt.logiFnm.includes('.pdf')) { //todo 여러개 올릴 때 이슈 발생 확인 필요
pbAtts.value.push(pbAtt)
}else{
notyf.error("pdf 파일만 업로드 가능합니다.")
}
}
reader.readAsDataURL(file)
@@ -590,8 +595,6 @@ const moveDown = (index: number) => {
</div>
<span>
<i class="fa fa-download estimate-file-download" @click="onPrcsFileDownload(f.prcsNo, f.fileOrd, f.logiFnm)" />
</span>
<span>
<i class="fa fa-trash estimate-file-delete" @click="onFilDelete(f.prcsNo, i, f.fileOrd)" />
</span>
</div>
@@ -648,7 +651,7 @@ const moveDown = (index: number) => {
</VField>
</span>
<span v-else-if="column.key === 'actions'" class="flex gap-1">
<VCustomButton @click="moveUp(index)" icon="lucide:chevron-up" />
<VCustomButton v-if="index != 1" @click="moveUp(index)" icon="lucide:chevron-up" />
<VCustomButton @click="moveDown(index)" icon="lucide:chevron-down" />
<VCustomButton @click="onPriceDelete(index)">{{"삭제"}}</VCustomButton>
</span>