fix : 전표폼 로드시, 첫번째값 선택되서 보이도록 세팅

This commit is contained in:
Yesol Choi
2025-06-05 10:42:34 +09:00
parent 3d797e701f
commit 0a9355c766
2 changed files with 7 additions and 2 deletions

View File

@@ -16,9 +16,12 @@ onBeforeMount(async ()=>{
result = await getSlipDetail(props.apprNo) result = await getSlipDetail(props.apprNo)
} }
getDetailList(result) getDetailList(result)
apprLine.value = result.zwf0011t.apprs
selectedTab.value = apprLine.value[0].value
}) })
const notyf = useNotyf() const notyf = useNotyf()
const apprLine = ref<VTabsItem[]>([])
const getDetailList = (item) => { const getDetailList = (item) => {
console.log("getDetailList",item) console.log("getDetailList",item)
params.contNo = item.contNo params.contNo = item.contNo

View File

@@ -11,6 +11,8 @@ onBeforeMount(async ()=>{
const result = await getBeforeSlipDetail(history.state.key) const result = await getBeforeSlipDetail(history.state.key)
// 대금지급 전 slip api 에서 결재선까지 받아옴 // 대금지급 전 slip api 에서 결재선까지 받아옴
getDetailList(result) getDetailList(result)
apprLine.value = result.zwf0011t.apprs
selectedTab.value = apprLine.value[0].value
}) })
const notyf = useNotyf() const notyf = useNotyf()
@@ -261,7 +263,7 @@ watch(
{ deep: true } { deep: true }
) )
const onPriceDelete = (index: number) => { const onDocDelete = (index: number) => {
if(apprLine.value.length-1 !== params.flexColumn.length if(apprLine.value.length-1 !== params.flexColumn.length
|| (params.flexColumn.length == 8 && apprLine.value.length-1 == params.flexColumn.length)) || (params.flexColumn.length == 8 && apprLine.value.length-1 == params.flexColumn.length))
@@ -646,7 +648,7 @@ const moveDown = (index: number) => {
<span v-else-if="column.key === 'actions'" class="flex gap-1"> <span v-else-if="column.key === 'actions'" class="flex gap-1">
<VCustomButton v-if="index != 1" @click="moveUp(index)" icon="lucide:arrow-up" /> <VCustomButton v-if="index != 1" @click="moveUp(index)" icon="lucide:arrow-up" />
<VCustomButton @click="moveDown(index)" icon="lucide:arrow-down" /> <VCustomButton @click="moveDown(index)" icon="lucide:arrow-down" />
<VCustomButton @click="onPriceDelete(index)">{{"삭제"}}</VCustomButton> <VCustomButton @click="onDocDelete(index)">{{"삭제"}}</VCustomButton>
</span> </span>
</template> </template>
</ComVFlexTable> </ComVFlexTable>