Merge branch 'featrue/0526-update'

This commit is contained in:
Yesol Choi
2025-05-30 15:29:27 +09:00
3 changed files with 44 additions and 18 deletions

View File

@@ -196,7 +196,12 @@ const onFileChange = (e: any) => {
size: file.size, size: file.size,
data: result.split(',')[1], 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) reader.readAsDataURL(file)
@@ -275,6 +280,7 @@ function onInput(row, column){
<textarea <textarea
v-model="generalParams.content" v-model="generalParams.content"
class="input custom-text-filter" class="input custom-text-filter"
style="height: 100px;"
placeholder="내용" placeholder="내용"
ref="contentRef" ref="contentRef"
/> />
@@ -291,7 +297,7 @@ function onInput(row, column){
icon="fas fa-plus" icon="fas fa-plus"
elevated elevated
@click="showTable = !showTable" @click="showTable = !showTable"
style="width: 19%;" style="width: 21.4%;"
> >
견적사 입력 견적사 입력
</VButton> </VButton>

View File

@@ -40,17 +40,17 @@ const params = reactive({
async function getPriceListData(){ async function getPriceListData(){
const today = new Date() const today = new Date()
searchParamsList.regSdt = new Date().setDate(today.getDate() - 30) searchParamsList.regSdt = new Date().setDate(today.getDate() - 30)
searchParamsList.regEdt = new Date().setDate(today.getDate())
const priceBase = { const priceBase = {
params:{ params:{
regSdt: formatDatefromString(searchParamsList.regSdt), regSdt: formatDatefromString(searchParamsList.regSdt),
regEdt: formatDatefromString(searchParamsList.regEdt), regEdt: formatDatefromString(searchParamsList.regEdt),
page: 1, page: 1,
row: itemsPerPage row: itemsPerPage //todo 혹시 1페이지가 8개 보다 갯수가 적을수 있다. 30일 동안
} }
} }
const result = await getPriceList(priceBase) const result = await getPriceList(priceBase)
console.log("result.content",result.content)
params.priceData = result.content params.priceData = result.content
console.log("result",result) console.log("result",result)
//페이지 관련 값 설정 //페이지 관련 값 설정

View File

@@ -69,6 +69,7 @@ const params = reactive({
const pbAtts = ref<iPbAtt[]>(params.prcsAtts) const pbAtts = ref<iPbAtt[]>(params.prcsAtts)
function getDetailList(arg){ function getDetailList(arg){
console.log("arg res",arg)
params.prcsNo = arg.prcsNo params.prcsNo = arg.prcsNo
params.stCd = arg.stCd params.stCd = arg.stCd
params.cateSelect = arg.cateCd params.cateSelect = arg.cateCd
@@ -83,6 +84,7 @@ function getDetailList(arg){
generalParams.regEdat = arg.regEdat generalParams.regEdat = arg.regEdat
apprLine.value = arg.apprMst.apprReqs.map(req => ({ apprLine.value = arg.apprMst.apprReqs.map(req => ({
gubunCd: req.gubunCd, gubunCd: req.gubunCd,
gubunNm: req.gubunNm,
deptCd: req.deptCd, deptCd: req.deptCd,
deptNm: req.deptNm, deptNm: req.deptNm,
sabun: req.sabun, sabun: req.sabun,
@@ -109,15 +111,16 @@ const validation = () => {
return false 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){ if(resultGu.length > 0){
console.log("resultGu",resultGu)
notyf.error("결재선 구분값을 입력해주세요") notyf.error("결재선 구분값을 입력해주세요")
return false return false
} }
if(apprLine.value.length < 2){ if(apprLine.value.length < 2){
notyf.error("결재선은 두 명이상 입력해주세요.") notyf.error("결재선은 본인 외 2명이상 필수입니다.")
return false return false
} }
const result = apprLine.value.filter((item)=> item.gubunCd === '0200' ) const result = apprLine.value.filter((item)=> item.gubunCd === '0200' )
@@ -126,6 +129,11 @@ const validation = () => {
notyf.error("결재는 한 명입니다.") notyf.error("결재는 한 명입니다.")
return false return false
} }
const resultLastItem = apprLine.value[apprLine.value.length-1].gubunCd
if(resultLastItem != '0200'){
notyf.error("결재선의 마지막은 결재자이어야 함")
return false
}
return true return true
} }
@@ -258,7 +266,12 @@ const onFileChange = (e: any) => {
size: file.size, size: file.size,
data: result.split(',')[1], 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) reader.readAsDataURL(file)
@@ -329,7 +342,7 @@ const moveDown = (index: number) => {
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<td>분야</td> <td>분야<span style="color: red">*</span></td>
<td colspan="2"> <td colspan="2">
<span class="column is-7"> <span class="column is-7">
<VField class="pr-2"> <VField class="pr-2">
@@ -339,7 +352,7 @@ const moveDown = (index: number) => {
</VField> </VField>
</span> </span>
</td> </td>
<td>제목</td> <td>제목<span style="color: red">*</span></td>
<td colspan="6"> <td colspan="6">
<div class="column is-fullhd"> <div class="column is-fullhd">
<VField class="pr-2"> <VField class="pr-2">
@@ -355,7 +368,7 @@ const moveDown = (index: number) => {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>내용</td> <td>내용<span style="color: red">*</span></td>
<td colspan="10"> <td colspan="10">
<div class="column is-fullhd"> <div class="column is-fullhd">
<VField class="pr-2"> <VField class="pr-2">
@@ -373,14 +386,14 @@ const moveDown = (index: number) => {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>견적요청</td> <td>견적요청<span style="color: red">*</span></td>
<td colspan="9"> <td colspan="9">
<VButton <VButton
color="primary" color="primary"
icon="fas fa-plus" icon="fas fa-plus"
elevated elevated
@click="showTable = !showTable" @click="showTable = !showTable"
style="width: 19%;" style="width: 21.4%;"
> >
견적사 입력 견적사 입력
</VButton> </VButton>
@@ -422,7 +435,7 @@ const moveDown = (index: number) => {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>규격입력</td> <td>규격입력<span style="color: red">*</span></td>
<td colspan="2"> <td colspan="2">
<VButton <VButton
:color="params.btnChangeFlag? 'success':'primary'" :color="params.btnChangeFlag? 'success':'primary'"
@@ -483,7 +496,7 @@ const moveDown = (index: number) => {
</template> </template>
</VModal> </VModal>
</td> </td>
<td>등록기간</td> <td>등록기간<span style="color: red">*</span></td>
<td colspan="6"> <td colspan="6">
<div class="columns"> <div class="columns">
<div class="column is-4"> <div class="column is-4">
@@ -582,8 +595,6 @@ const moveDown = (index: number) => {
</div> </div>
<span> <span>
<i class="fa fa-download estimate-file-download" @click="onPrcsFileDownload(f.prcsNo, f.fileOrd, f.logiFnm)" /> <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)" /> <i class="fa fa-trash estimate-file-delete" @click="onFilDelete(f.prcsNo, i, f.fileOrd)" />
</span> </span>
</div> </div>
@@ -614,7 +625,16 @@ const moveDown = (index: number) => {
<template #body-cell="{ row, column, index, value }"> <template #body-cell="{ row, column, index, value }">
<!-- : 특정 컬럼이면 input, 아니면 그냥 출력 --> <!-- : 특정 컬럼이면 input, 아니면 그냥 출력 -->
<div class="w-100"> <div class="w-100">
<span v-if="column.key=='gubunCd'" class="column"> <span v-if="(index==0 && column.key != 'gubunCd' && column.key != 'attendCd')" class="column">
{{value}}
</span>
<span v-else-if="(index==0 && column.key == 'gubunCd')" class="column">
{{"입안"}}
</span>
<span v-else-if="(index==0 && column.key == 'attendCd')" class="column">
{{"재중"}}
</span>
<span v-else-if="column.key=='gubunCd'" class="column">
<VField class="pr-1"> <VField class="pr-1">
<VCodeSelect <VCodeSelect
cd_grp=7 cd_grp=7
@@ -631,7 +651,7 @@ const moveDown = (index: number) => {
</VField> </VField>
</span> </span>
<span v-else-if="column.key === 'actions'" class="flex gap-1"> <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="moveDown(index)" icon="lucide:chevron-down" />
<VCustomButton @click="onPriceDelete(index)">{{"삭제"}}</VCustomButton> <VCustomButton @click="onPriceDelete(index)">{{"삭제"}}</VCustomButton>
</span> </span>