Merge branch 'featrue/0526-update'

This commit is contained in:
Yesol Choi
2025-05-27 16:55:17 +09:00
3 changed files with 88 additions and 6 deletions

View File

@@ -0,0 +1,83 @@
<script setup lang="ts">
import {useCodes} from '/src/stores/codeStore.ts'
const detailCode = useCodes()
export interface VSelectProps {
raw?: boolean
multiple?: boolean
cd_grp?: string
placeholder?: string
}
defineOptions({
inheritAttrs: false,
})
const modelValue = defineModel<any>({
default: '',
})
const props = defineProps<VSelectProps>()
const attrs = useAttrs()
const { field, id } = useVFieldContext({
create: false,
help: 'VSelect',
})
const internal = computed({
get() {
if (field?.value) {
return field.value.value
}
else {
return modelValue.value
}
},
set(value: any) {
if (field?.value) {
field.value.setValue(value)
}
modelValue.value = value
},
})
const classes = computed(() => {
if (props.raw) return []
return ['select', props.multiple && 'is-multiple']
})
const cdItems = ref<Array<{ cd: string; nm: string }>>([])
watch(() => props.cd_grp, async (newVal) => {
if (newVal) {
await detailCode.setDetailCode(newVal)
cdItems.value = detailCode.getCodeList(newVal)
}
}, { immediate: true })
</script>
<template>
<div :class="classes">
<select
:id="id"
v-bind="attrs"
v-model="internal"
:name="id"
:multiple="props.multiple"
@change="field?.handleChange"
@blur="field?.handleBlur"
>
<option value="null">{{ props.placeholder || '선택하세요' }}</option>
<option
v-for="item in cdItems"
:key="item.cd"
:value="item.cd"
>
<slot name="code" :item="item">
{{ item.nm }}
</slot>
</option>
</select>
</div>
</template>

View File

@@ -244,7 +244,6 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
:data="params.dtlSpecs"
:columns="params.dtlSpecsColumn"
:separators="true"
:clickable="true"
>
<template #body-cell="{ row, column, index, value }">
<!-- : 특정 컬럼이면 input, 아니면 그냥 출력 -->
@@ -340,7 +339,6 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
:columns="params.prcsBizsColumn"
:compact="true"
:separators="true"
:clickable="true"
>
<template #body-cell="{ column, index, value }">
<div>
@@ -366,7 +364,6 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
:data="apprLine"
:columns="params.felxColumn"
:separators="true"
:clickable="true"
:compact="true">
<template #body-cell="{ row, column, index, value }">
<!-- : 특정 컬럼이면 input, 아니면 그냥 출력 -->

View File

@@ -2,6 +2,7 @@
import {getDetailPrcs, updatePrice, getPrcsFileDown, deletePrcsFile} from '/src/service/priceApi'
import {type iPbAtt, type Person} from '/@src/utils/types'
import {formatBizNum, formatDatefromString} from "/@src/utils/common/comfunc.ts";
import VDefaultCodeSelect from "/@src/components/app-vuero/VDefaultCodeSelect.vue";
const notyf = useNotyf()
const loading = ref(false)
const router = useRouter()
@@ -92,6 +93,7 @@ function getDetailList(arg){
apprDt: req.apprDt,
attendCd: req.attendCd
})) //비고 데이터 없음, 승인일자 없음 todo
console.log("apprLine.value",apprLine.value)
params.prcsAtts = arg.prcsAtts
}
@@ -564,14 +566,14 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
</span>
<span v-else-if="column.key=='attendCd'" class="column">
<VField class="pr-1">
<VCodeSelect
<VDefaultCodeSelect
placeholder="재중"
cd_grp=6
v-model="row.attendCd">
<!-- <template #code>-->
<!-- <span v-if="!row.attendCd">{{"재중"}}</span>-->
<!-- </template>-->
</VCodeSelect>
</VDefaultCodeSelect>
</VField>
</span>
<span v-else