mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 03:22:48 +09:00
fix : 삭제 기능 정리
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { savePrice } from '/src/service/priceApi'
|
import { savePrice } from '/src/service/priceApi'
|
||||||
import { Person } from '/@src/utils/types'
|
import { Person } from '/@src/utils/types'
|
||||||
import {formatBizNum} from "/@src/utils/common/comfunc.ts";
|
import {formatBizNum,formatDate} from "/@src/utils/common/comfunc.ts";
|
||||||
|
|
||||||
const notyf = useNotyf()
|
const notyf = useNotyf()
|
||||||
const showTable = ref(false)
|
const showTable = ref(false)
|
||||||
@@ -14,6 +14,7 @@ const cateSelectRef = ref()
|
|||||||
const titleRef = ref()
|
const titleRef = ref()
|
||||||
const contentRef = ref()
|
const contentRef = ref()
|
||||||
const prcsBizsRef = ref()
|
const prcsBizsRef = ref()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const generalParams = reactive({
|
const generalParams = reactive({
|
||||||
title: "",
|
title: "",
|
||||||
@@ -56,7 +57,7 @@ const params = reactive({
|
|||||||
{ key: 'qty', label: '수량', editable: true },
|
{ key: 'qty', label: '수량', editable: true },
|
||||||
{ key: '', label: '단가(VAT별도)', editable: false },
|
{ key: '', label: '단가(VAT별도)', editable: false },
|
||||||
{ key: '', label: '금액(VAT별도)', editable: false },
|
{ key: '', label: '금액(VAT별도)', editable: false },
|
||||||
{ key: '', label: '삭제', editable: false },
|
{ key: 'delete', label: '삭제', editable: false },
|
||||||
],
|
],
|
||||||
dtlSpecs: [], //상세 규격 입력 데이터
|
dtlSpecs: [], //상세 규격 입력 데이터
|
||||||
})
|
})
|
||||||
@@ -120,7 +121,7 @@ const savePriceOne = async () => {
|
|||||||
res = await savePrice(paramsPrice)
|
res = await savePrice(paramsPrice)
|
||||||
|
|
||||||
if(res.request.status == '200'){
|
if(res.request.status == '200'){
|
||||||
notyf.primary('수정 되었습니다.')
|
notyf.primary('등록 되었습니다.')
|
||||||
router.push({path: '/app/priceManagement'})
|
router.push({path: '/app/priceManagement'})
|
||||||
}
|
}
|
||||||
}catch(e){
|
}catch(e){
|
||||||
@@ -171,16 +172,17 @@ const onDetailDelete = (index: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDate(dateStr) {
|
const onPayDelete = (index: number) => {
|
||||||
if (!dateStr) return ''
|
console.log("params.felxColumn.length",params.felxColumn.length)
|
||||||
const date = new Date(dateStr)
|
console.log("params.felxColumn.length",apprLine.value.length)
|
||||||
return date.toLocaleDateString('ko-KR', {
|
if(apprLine.value.length-1 !== params.felxColumn.length
|
||||||
year: 'numeric',
|
|| (params.felxColumn.length == 6 && apprLine.value.length-1 == params.felxColumn.length))
|
||||||
month: '2-digit',
|
{
|
||||||
day: '2-digit',
|
apprLine.value.splice(index, 1)
|
||||||
}).replace(/\./g, '-').replace(/\s/g, '').replace(/-$/,'')
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const fileInput = ref<HTMLInputElement | null>(null)
|
const fileInput = ref<HTMLInputElement | null>(null)
|
||||||
const fileName = ref('')
|
const fileName = ref('')
|
||||||
|
|
||||||
@@ -345,6 +347,7 @@ function onInput(row, column){
|
|||||||
:columns="params.dtlSpecsColumn"
|
:columns="params.dtlSpecsColumn"
|
||||||
:separators="true"
|
:separators="true"
|
||||||
:clickable="true"
|
:clickable="true"
|
||||||
|
:compact="true"
|
||||||
>
|
>
|
||||||
<template #body-cell="{ row, column, index, value }">
|
<template #body-cell="{ row, column, index, value }">
|
||||||
<!-- 예: 특정 컬럼이면 input, 아니면 그냥 값 출력 -->
|
<!-- 예: 특정 컬럼이면 input, 아니면 그냥 값 출력 -->
|
||||||
@@ -355,7 +358,7 @@ function onInput(row, column){
|
|||||||
class="editable-input"
|
class="editable-input"
|
||||||
/>
|
/>
|
||||||
<span v-else-if="column.key=='num'">{{index+1}}</span>
|
<span v-else-if="column.key=='num'">{{index+1}}</span>
|
||||||
<span v-else class="lnil lnil-close"
|
<span v-else-if="column.key=='delete'" class="lnil lnil-close"
|
||||||
@click="onDetailDelete(index)">{{ value }}</span>
|
@click="onDetailDelete(index)">{{ value }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -440,7 +443,6 @@ function onInput(row, column){
|
|||||||
style="display: none"
|
style="display: none"
|
||||||
@change="onFileChange"
|
@change="onFileChange"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span v-if="fileName" class="file-name">{{ fileName }}</span>
|
<span v-if="fileName" class="file-name">{{ fileName }}</span>
|
||||||
</VField>
|
</VField>
|
||||||
</td>
|
</td>
|
||||||
@@ -486,8 +488,9 @@ function onInput(row, column){
|
|||||||
v-model="row.attendCd"/>
|
v-model="row.attendCd"/>
|
||||||
</VField>
|
</VField>
|
||||||
</span>
|
</span>
|
||||||
<span v-else
|
<span v-else-if="column.key=='actions'" class="lnil lnil-close"
|
||||||
@click="onDetailDelete(index)">{{value}}</span>
|
@click="onPayDelete(index)"/>
|
||||||
|
<span v-else>{{value}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ComVFlexTable>
|
</ComVFlexTable>
|
||||||
|
|||||||
@@ -67,14 +67,13 @@ const params = reactive({
|
|||||||
{ key: 'qty', label: '수량', editable: true },
|
{ key: 'qty', label: '수량', editable: true },
|
||||||
{ key: '', label: '단가(VAT별도)', editable: false },
|
{ key: '', label: '단가(VAT별도)', editable: false },
|
||||||
{ key: '', label: '금액(VAT별도)', editable: false },
|
{ key: '', label: '금액(VAT별도)', editable: false },
|
||||||
{ key: '', label: '삭제', editable: false },
|
{ key: 'delete', label: '삭제', editable: false },
|
||||||
],
|
],
|
||||||
dtlSpecs: [], //상세 규격 입력 데이터
|
dtlSpecs: [], //상세 규격 입력 데이터
|
||||||
btnChangeFlag: false
|
btnChangeFlag: false
|
||||||
})
|
})
|
||||||
|
|
||||||
function getDetailList(arg){
|
function getDetailList(arg){
|
||||||
console.log("arg",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
|
||||||
@@ -366,7 +365,7 @@ function onInput(row, column){
|
|||||||
class="editable-input"
|
class="editable-input"
|
||||||
/>
|
/>
|
||||||
<span v-else-if="column.key=='num'">{{index+1}}</span>
|
<span v-else-if="column.key=='num'">{{index+1}}</span>
|
||||||
<span v-else class="lnil lnil-close"
|
<span v-else-if="column.key=='delete'" class="lnil lnil-close"
|
||||||
@click="onDetailDelete(index)">{{ value }}</span>
|
@click="onDetailDelete(index)">{{ value }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user