mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 14:33:28 +09:00
fix : 계약관리 등록폼 수정
- 체크박스 여부에 따른 input창 disable
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
import axios from 'axios'
|
||||
import {saveContract} from "/@src/service/contract.ts";
|
||||
import type {iPbAtt} from "/@src/utils/types.ts";
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
const registerFormOpen = ref(false)
|
||||
const loading = ref(false)
|
||||
const notyf = useNotyf()
|
||||
const router = useRouter()
|
||||
const params = reactive({
|
||||
cateCd: '',
|
||||
contNo: '',
|
||||
@@ -46,7 +48,7 @@ const completedPriceDataParams = reactive({
|
||||
svyDt:'',
|
||||
reason:'',
|
||||
estimates: [],
|
||||
exeYn: false,
|
||||
excYn: false,
|
||||
page: 1,
|
||||
row: 5,
|
||||
})
|
||||
@@ -158,7 +160,6 @@ function handlePriceRowClick(row) {
|
||||
}
|
||||
|
||||
registerFormOpen.value = false
|
||||
priceSearchCheckBoxStatus.value = !!row
|
||||
console.log(row)
|
||||
console.log(completedPriceDataParams.contAmt)
|
||||
}
|
||||
@@ -184,31 +185,23 @@ const saveContOne = async () => {
|
||||
const paramsCont ={
|
||||
prcsNo: completedPriceDataParams.prcsNo,
|
||||
bizNo: completedPriceDataParams.bizNo,
|
||||
cateCd: priceSearchCheckBoxStatus.value ? selectedCode.value : completedPriceDataParams.cateCd,
|
||||
compNm: completedPriceDataParams.compNm,
|
||||
title: completedPriceDataParams.title,
|
||||
regSdat: formatMonthDate(completedPriceDataParams.regSdat),
|
||||
regEdat: formatMonthDate(completedPriceDataParams.regEdat),
|
||||
contAmt: completedPriceDataParams.contAmt,
|
||||
signDt: formatMonthDate(completedPriceDataParams.svyDt),
|
||||
signDt: formatMonthDate(completedPriceDataParams.regSdat),
|
||||
reason: completedPriceDataParams.reason,
|
||||
exeYn: true, // 가격조사 예외여부 확인필요
|
||||
// contAtts: pbAtts.value.,
|
||||
// cateCd: completedPriceDataParams.cateCd,
|
||||
// cateNm: completedPriceDataParams.cateNm,
|
||||
// content: completedPriceDataParams.content,
|
||||
// regSabun: completedPriceDataParams.regSabun,
|
||||
// regNm: completedPriceDataParams.regNm,
|
||||
// regDt: formatMonthDate(completedPriceDataParams.regDt),
|
||||
// stCd: completedPriceDataParams.stCd,
|
||||
// stNm: completedPriceDataParams.stNm,
|
||||
|
||||
excYn: priceSearchCheckBoxStatus.value, // 가격조사 예외여부 확인필요
|
||||
contAtts: params.contAtts,
|
||||
}
|
||||
console.log(pbAtts)
|
||||
res = await saveContract(paramsCont)
|
||||
|
||||
if(res.request.status == '200'){
|
||||
notyf.primary('등록 되었습니다.')
|
||||
router.push({path: '/app/contractManagement'})
|
||||
// router.push({path: '/app/contractManagement'})
|
||||
}
|
||||
}catch(e){
|
||||
notyf.error(e.message)
|
||||
@@ -217,7 +210,7 @@ const saveContOne = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const pbAtts = ref<iPbAtt[]>([params.contAtts])
|
||||
const pbAtts = ref<iPbAtt[]>(params.contAtts)
|
||||
|
||||
const onFileChange = (e, idx) => {
|
||||
const file = e.target.files[0]
|
||||
@@ -239,6 +232,28 @@ const onFileChange = (e, idx) => {
|
||||
reader.readAsDataURL(file)
|
||||
}
|
||||
|
||||
function resetForm() {
|
||||
completedPriceDataParams.prcsNo = ''
|
||||
completedPriceDataParams.bizNo = ''
|
||||
completedPriceDataParams.compNm = ''
|
||||
completedPriceDataParams.title = ''
|
||||
completedPriceDataParams.regSdat = ''
|
||||
completedPriceDataParams.regEdat = ''
|
||||
completedPriceDataParams.contAmt = ''
|
||||
completedPriceDataParams.reason = ''
|
||||
selectedCode.value = ''
|
||||
pbAtts.value = []
|
||||
// 기타 입력값도 여기에 추가
|
||||
}
|
||||
|
||||
watch(
|
||||
() => priceSearchCheckBoxStatus.value,
|
||||
() => {resetForm()}
|
||||
)
|
||||
|
||||
function routerMove() {
|
||||
router.push({path: '/app/contractManagement'})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -264,6 +279,7 @@ const onFileChange = (e, idx) => {
|
||||
<VCodeSelect
|
||||
v-model="selectedCode"
|
||||
cd_grp="5"
|
||||
:disabled="!priceSearchCheckBoxStatus"
|
||||
/></VField>
|
||||
</span>
|
||||
</td>
|
||||
@@ -299,7 +315,7 @@ const onFileChange = (e, idx) => {
|
||||
<VField class="is-flex">
|
||||
<VControl raw subcontrol>
|
||||
<VCheckbox
|
||||
label="가격조사여부"
|
||||
label="예외사유"
|
||||
color="info"
|
||||
v-model="priceSearchCheckBoxStatus"
|
||||
/>
|
||||
@@ -329,6 +345,7 @@ const onFileChange = (e, idx) => {
|
||||
v-model="completedPriceDataParams.title"
|
||||
class="input custom-text-filter"
|
||||
placeholder="계약명"
|
||||
:disabled="!priceSearchCheckBoxStatus"
|
||||
>
|
||||
</VControl>
|
||||
</VField>
|
||||
@@ -343,6 +360,7 @@ const onFileChange = (e, idx) => {
|
||||
v-model="completedPriceDataParams.bizNo"
|
||||
class="input custom-text-filter"
|
||||
placeholder="사업자번호"
|
||||
:disabled="!priceSearchCheckBoxStatus"
|
||||
>
|
||||
</VControl>
|
||||
</VField>
|
||||
@@ -354,6 +372,7 @@ const onFileChange = (e, idx) => {
|
||||
v-model="completedPriceDataParams.compNm"
|
||||
class="input custom-text-filter"
|
||||
placeholder="업체명"
|
||||
:disabled="!priceSearchCheckBoxStatus"
|
||||
>
|
||||
</VControl>
|
||||
</VField>
|
||||
@@ -388,6 +407,7 @@ const onFileChange = (e, idx) => {
|
||||
:value="formatMonthDate(completedPriceDataParams.regSdat)"
|
||||
class="input custom-text-filter"
|
||||
placeholder="계약체결일"
|
||||
:disabled="!priceSearchCheckBoxStatus"
|
||||
>
|
||||
</VControl>
|
||||
</VField>
|
||||
@@ -398,23 +418,7 @@ const onFileChange = (e, idx) => {
|
||||
>
|
||||
계 약 금 액
|
||||
</VButton>
|
||||
<VModal
|
||||
actions="center"
|
||||
title="계약금액"
|
||||
>
|
||||
<template #content>
|
||||
<VPlaceholderSection
|
||||
title="Go Premium"
|
||||
subtitle="Unlock more features and business tools by going premium"
|
||||
/>
|
||||
</template>
|
||||
<template #action>
|
||||
<VButton color="primary" raised>
|
||||
등록
|
||||
</VButton>
|
||||
</template>
|
||||
</VModal>
|
||||
</td>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<VField>
|
||||
<VControl>
|
||||
@@ -422,6 +426,7 @@ const onFileChange = (e, idx) => {
|
||||
v-model="completedPriceDataParams.contAmt"
|
||||
class="input custom-text-filter"
|
||||
placeholder="금액"
|
||||
:disabled="!priceSearchCheckBoxStatus"
|
||||
>
|
||||
</VControl>
|
||||
</VField>
|
||||
@@ -533,7 +538,7 @@ const onFileChange = (e, idx) => {
|
||||
</table>
|
||||
<div class="bottom-button">
|
||||
<VButton @click="saveContOne">저 장</VButton>
|
||||
<VButton>취 소</VButton>
|
||||
<VButton @click="routerMove">취 소</VButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user