fix: 결재선 마지막 체크 로직 추가

This commit is contained in:
Yesol Choi
2025-05-30 11:34:29 +09:00
parent 4a9aec2d96
commit 801663b743

View File

@@ -69,6 +69,7 @@ const params = reactive({
const pbAtts = ref<iPbAtt[]>(params.prcsAtts)
function getDetailList(arg){
console.log("arg res",arg)
params.prcsNo = arg.prcsNo
params.stCd = arg.stCd
params.cateSelect = arg.cateCd
@@ -83,6 +84,7 @@ function getDetailList(arg){
generalParams.regEdat = arg.regEdat
apprLine.value = arg.apprMst.apprReqs.map(req => ({
gubunCd: req.gubunCd,
gubunNm: req.gubunNm,
deptCd: req.deptCd,
deptNm: req.deptNm,
sabun: req.sabun,
@@ -117,7 +119,7 @@ const validation = () => {
}
if(apprLine.value.length < 2){
notyf.error("결재선은 두 명이상 입력해주세요.")
notyf.error("결재선은 본인 외 2명이상 필수입니다.")
return false
}
const result = apprLine.value.filter((item)=> item.gubunCd === '0200' )
@@ -126,6 +128,11 @@ const validation = () => {
notyf.error("결재는 한 명입니다.")
return false
}
const resultLastItem = apprLine.value[apprLine.value.length-1].gubunCd
if(resultLastItem != '0200'){
notyf.error("결재선의 마지막은 결재자이어야 함")
return false
}
return true
}
@@ -175,6 +182,7 @@ const updatePriceOne = async () => {
})), //결재선 데이터
}
res = await updatePrice(paramsPrice)
console.log("update res",res)
notyf.dismissAll()
if(res.request.status == '200'){
notyf.primary('수정 되었습니다.')
@@ -614,7 +622,16 @@ const moveDown = (index: number) => {
<template #body-cell="{ row, column, index, value }">
<!-- : 특정 컬럼이면 input, 아니면 그냥 출력 -->
<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">
{{row.gubunNm}}
</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">
<VCodeSelect
cd_grp=7