mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 10:33:28 +09:00
func : 계약관리 등록폼
- 가격조사 가져오기 활성화
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import axios from 'axios'
|
||||
import {useRouter} from "vue-router";
|
||||
import {getContractList} from "/src/service/contract";
|
||||
import regex, {formatCurrency} from "/@src/utils/common/regex.ts";
|
||||
|
||||
export type MinimalTheme = 'darker' | 'light'
|
||||
|
||||
@@ -21,57 +21,37 @@ const data = reactive({
|
||||
priceData: [],
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const contractResponse = await axios.get('/api/cont/prcs')
|
||||
data.contractData = Array.isArray(contractResponse.data) ? contractResponse.data : []
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error)
|
||||
data.contractData = []
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
await getContractListView()
|
||||
})
|
||||
|
||||
const registerFormOpen = ref(false)
|
||||
const isLoading = ref(false)
|
||||
|
||||
watch(registerFormOpen, async (isOpen) => {
|
||||
if (isOpen) {
|
||||
isLoading.value = true
|
||||
// error.value = null
|
||||
try {
|
||||
const priceResponse = await axios.get('/api/prcs/page?regSdt=1970-01-01®Edt=2070-01-01&page=1&row=10')
|
||||
console.log(priceResponse.data.content)
|
||||
data.priceData = Array.isArray(priceResponse.data.content) ? priceResponse.data.content : []
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error)
|
||||
data.priceData = []
|
||||
async function getContractListView() {
|
||||
const paymentParams = {
|
||||
params:{
|
||||
title: '',
|
||||
page: '1',
|
||||
row: '10'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
function handleRowClick(row) {
|
||||
router.push({
|
||||
name: 'DocumentManagement',
|
||||
params: { id: row.contractDetailedData },
|
||||
})
|
||||
const result = await getContractList(paymentParams)
|
||||
data.contractData = result
|
||||
console.log('result', result)
|
||||
}
|
||||
|
||||
const params = reactive({
|
||||
priceData: [],
|
||||
flexColumn: [
|
||||
{ key: 'cateNm', label: '분야' },
|
||||
{ key: 'title', label: '제목' },
|
||||
{ key: 'title', label: '계약명' },
|
||||
{ key: 'compNm', label: '계약상대자' },
|
||||
{ key: 'regNm', label: '담당자' },
|
||||
{ key: 'regSdat', label: '최초등록일' },
|
||||
{ key: 'stNm', label: '등록 상태' },
|
||||
{ key: 'title', label: '비고' },
|
||||
{ key: 'contAmt', label: '계약금액', format: formatCurrency },
|
||||
{ key: 'contNo', label: '계약번호' },
|
||||
{ key: 'signDt', label: '계약체결일' },
|
||||
{ key: 'contStat', label: '계약상태' },
|
||||
],
|
||||
prcsParams: [],
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -111,7 +91,7 @@ const params = reactive({
|
||||
</VLabel>
|
||||
<VControl>
|
||||
<input
|
||||
v-model="params.title"
|
||||
v-model="params.regNm"
|
||||
class="input custom-text-filter"
|
||||
placeholder="담당자명"
|
||||
>
|
||||
@@ -202,8 +182,9 @@ const params = reactive({
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<VButtons>
|
||||
<VButtons class="is-right">
|
||||
<VButton
|
||||
class=""
|
||||
color="primary"
|
||||
icon="fas fa-plus"
|
||||
elevated
|
||||
@@ -213,43 +194,5 @@ const params = reactive({
|
||||
등록
|
||||
</VButton>
|
||||
</VButtons>
|
||||
|
||||
<!-- 모달창 시작-->
|
||||
<VModal
|
||||
is="form"
|
||||
:open="registerFormOpen"
|
||||
title="계약관리 등록"
|
||||
size="contract-big"
|
||||
actions="right"
|
||||
@submit.prevent="registerFormOpen = false"
|
||||
@close="registerFormOpen = false"
|
||||
>
|
||||
<template #content>
|
||||
<div class="modal-form">
|
||||
<ComVFlexTable
|
||||
:data="data.priceData"
|
||||
:columns="{ cateNm: '분야',
|
||||
title: '제목',
|
||||
content: '담당자',
|
||||
stNm: '등록상태',
|
||||
stCd: '비고',
|
||||
regSabun: '선택',
|
||||
}"
|
||||
:compact="true"
|
||||
:separators="true"
|
||||
@row-click="handleRowClick"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #action>
|
||||
<VButton
|
||||
type="submit"
|
||||
color="primary"
|
||||
raised
|
||||
>
|
||||
Save Changes
|
||||
</VButton>
|
||||
</template>
|
||||
</VModal>
|
||||
</div>>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user