mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 11:13:43 +09:00
fix : 코드 정리 및 함수 변경하기
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import {getDetailPrcs, updatePrcsNo, putSurveyPrcsNo} from '/src/service/priceApi'
|
||||
import { type Person } from '/@src/utils/types'
|
||||
import {formatDatefromString} from "/@src/utils/common/comfunc.ts";
|
||||
|
||||
|
||||
const notyf = useNotyf()
|
||||
const loading = ref(false)
|
||||
@@ -12,7 +14,7 @@ const props = defineProps<{
|
||||
|
||||
|
||||
onBeforeMount(async ()=>{
|
||||
let result = null
|
||||
let result;
|
||||
if(history.state.key === undefined) {
|
||||
result = await getDetailPrcs(props.prcsNo)
|
||||
} else {
|
||||
@@ -21,7 +23,6 @@ onBeforeMount(async ()=>{
|
||||
getDetailList(result)
|
||||
})
|
||||
|
||||
const showTable = ref(false)
|
||||
const detailActionsOpen = ref(false)
|
||||
const apprLine = defineModel<Person[]>()
|
||||
|
||||
@@ -84,8 +85,8 @@ function getDetailList(arg){
|
||||
email: req.email,
|
||||
}))
|
||||
params.dtlSpecs = arg.dtlSpecs
|
||||
generalParams.regSdat = formatDate(arg.regSdat)
|
||||
generalParams.regEdat = formatDate(arg.regEdat)
|
||||
generalParams.regSdat = formatDatefromString(arg.regSdat)
|
||||
generalParams.regEdat = formatDatefromString(arg.regEdat)
|
||||
apprLine.value = arg.apprMst.apprReqs.map(req => ({
|
||||
gubunNm: req.gubunNm,
|
||||
deptCd: req.deptCd,
|
||||
@@ -120,16 +121,6 @@ const updateState = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
function formatDate(dateStr) {
|
||||
if (!dateStr) return ''
|
||||
const date = new Date(dateStr)
|
||||
return date.toLocaleDateString('ko-KR', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
}).replace(/\./g, '-').replace(/\s/g, '').replace(/-$/,'')
|
||||
}
|
||||
|
||||
const onChangeFinal = async () => {
|
||||
let res = null
|
||||
try {
|
||||
@@ -370,7 +361,7 @@ const onChangeFinal = async () => {
|
||||
:separators="true"
|
||||
:clickable="true"
|
||||
>
|
||||
<template #body-cell="{ row, column, index, value }">
|
||||
<template #body-cell="{ column, index, value }">
|
||||
<div>
|
||||
<span v-if="column.key=='num'">{{index + 1}}</span>
|
||||
<!-- readonly 출력 -->
|
||||
@@ -415,7 +406,7 @@ const onChangeFinal = async () => {
|
||||
</VButton>
|
||||
<VButton
|
||||
to="/app/priceManagement"
|
||||
v-if="params.stCd === '0100' | '0200' | '0300' | '0400'"
|
||||
v-if="params.stCd === '0100' || '0200' || '0300' || '0400'"
|
||||
color="info"
|
||||
>
|
||||
닫기
|
||||
|
||||
Reference in New Issue
Block a user