@@ -116,10 +202,10 @@ const contractPeriod = computed(() => {
| 분야 |
-
+
|
@@ -136,28 +222,19 @@ const contractPeriod = computed(() => {
title="계약관리 등록"
size="contract-big"
actions="right"
- @submit.prevent="registerFormOpen = false"
- @close="registerFormOpen = false"
>
-
-
- Save Changes
-
-
@@ -166,6 +243,7 @@ const contractPeriod = computed(() => {
@@ -175,7 +253,7 @@ const contractPeriod = computed(() => {
@@ -190,7 +268,7 @@ const contractPeriod = computed(() => {
@@ -204,7 +282,7 @@ const contractPeriod = computed(() => {
@@ -215,7 +293,7 @@ const contractPeriod = computed(() => {
@@ -249,7 +327,7 @@ const contractPeriod = computed(() => {
@@ -283,7 +361,7 @@ const contractPeriod = computed(() => {
@@ -311,7 +389,7 @@ const contractPeriod = computed(() => {
@@ -333,10 +411,10 @@ const contractPeriod = computed(() => {
|
-
+
@@ -364,20 +442,36 @@ const contractPeriod = computed(() => {
| 첨부파일 |
-
+
등록
+ |
+
+
+
+
+
+
+ {{ input.file ? input.file.name : '첨부된 파일 없음' }}
+ {{ input.description }}
+
+
|
- |
-
- 전 표 (임시)
-
저 장
취 소
@@ -389,11 +483,14 @@ const contractPeriod = computed(() => {
diff --git a/src/pages/app/contractManagement.vue b/src/pages/app/contractManagement.vue
index 31cd036..3685e16 100644
--- a/src/pages/app/contractManagement.vue
+++ b/src/pages/app/contractManagement.vue
@@ -1,6 +1,6 @@
@@ -111,7 +91,7 @@ const params = reactive({
@@ -202,8 +182,9 @@ const params = reactive({
/>
-
+
-
-
-
-
-
-
-
-
-
-
- Save Changes
-
-
-
- >
+
diff --git a/src/pages/app/paymentManagement.vue b/src/pages/app/paymentManagement.vue
index c3d42bc..806bf21 100644
--- a/src/pages/app/paymentManagement.vue
+++ b/src/pages/app/paymentManagement.vue
@@ -3,17 +3,20 @@
import { getIntegratedApproval, updateIntegratedApproval } from '/src/service/integratedPayment'
import type { VFlexTableWrapperSortFunction, VFlexTableWrapperFilterFunction } from '/src/components/app-vuero/ComVFlexTableWrapper.vue'
import { users } from '/src/data/layouts/card-grid-v1'
+import PriceDetail from "/@src/pages/app/priceDetail.vue";
onBeforeMount(async () => {
await getIntegratedPaymentList()
})
const isModalOpen = ref(false)
const selectedRow = ref(null)
+const prcsNo = ref('PRCS-20250521020')
const masks = ref({
modelValue: 'YYYY-MM-DD',
})
+
const params = reactive({
title: '',
priceData: [],
@@ -40,7 +43,7 @@ const params = reactive({
})
function formatRegDt(value) {
- return value ? value.substring(0, 16) : ''
+ return value ? value.toString().replace(/[^0-9]/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',') : ''
}
async function getIntegratedPaymentList() {
@@ -67,8 +70,8 @@ async function updateIntegratedPaymentList() {
}
const result = await updateIntegratedApproval(paymentUpdateParams)
console.log(result)
- alert('결재승인완료')
- window.location.reload(true)
+ notyf.error("견적서가 없습니다.")
+ router.push('/app/paymentManagement')
}
const gubunMap = {
@@ -246,101 +249,14 @@ const onRowClick = (row: any) => {
-
+
반려
diff --git a/src/service/contract.ts b/src/service/contract.ts
index e69de29..37eabf7 100644
--- a/src/service/contract.ts
+++ b/src/service/contract.ts
@@ -0,0 +1,52 @@
+import axios from 'axios'
+
+/**
+ * 계약관리 조회(페이징)
+ * @property {string} params.page - 페이지
+ * @property {string} params.row - 아이템갯수
+ *
+ */``
+export async function getContractList(params = {}) {
+ try {
+ const result = await axios.get(`/api/cont/page`,params)
+ return result.data
+ } catch (e) {
+ if (e.response) {
+ if (e.response.status >= 500) {
+ throw new Error('서버 오류가 발생했습니다.')
+ } else if (e.response.status >= 400) {
+ throw new Error('잘못된 요청입니다.')
+ } else if (e.response._data && e.response._data.message) {
+ throw new Error(e.response._data.message)
+ }
+ }
+ throw new Error(e.message || '알 수 없는 오류')
+ }
+}
+
+/**
+ * 계약관리 저장
+ * @param {object} params
+ * @property {string} params.cateNm - 분야
+ * @property {string} params.cateNm - 결제상태
+ * @property {string} params.regNm - 담당자
+ * @property {string} params.regSdat - 등록기간
+ * @returns
+ */
+export async function saveContract(params = {}) {
+ try {
+ const result = await axios.post(`/api/cont`,params)
+ return result
+ } catch (e) {
+ const serverError = e.response?.data;
+
+ const message = typeof serverError?.body === 'string'
+ ? serverError.body
+ : 'Unknown error occurred';
+
+ const error = new Error(message); // ✅ 반드시 string만 넣기! 아니면 객체가 문자열로 나옴
+ error.code = serverError?.code;
+ error.errTime = serverError?.errTime;
+ throw error;
+ }
+}
\ No newline at end of file
diff --git a/src/service/integratedPayment.ts b/src/service/integratedPayment.ts
index eed5d2c..75928eb 100644
--- a/src/service/integratedPayment.ts
+++ b/src/service/integratedPayment.ts
@@ -17,12 +17,6 @@ export async function getIntegratedApproval(params = {}) {
console.log(result)
if (result.status === 200) {
return result.data
- } else if (result.status >= 500) {
- throw new Error('서버 오류가 발생했습니다.')
- } else if (result.status >= 400) {
- throw new Error('잘못된 요청입니다.')
- } else {
- throw new Error(`예상치 못한 상태코드: ${result.status}`)
}
} catch (e) {
if (e.response) {
@@ -55,10 +49,6 @@ export async function updateIntegratedApproval(params = {}) {
})
if (result.status === 200) {
return result.data
- } else if (result.status >= 500) {
- throw new Error('서버 오류가 발생했습니다.')
- } else {
- throw new Error(`예상치 못한 상태코드: ${result.status}`)
}
}
catch (e) {
diff --git a/src/utils/common/regex.ts b/src/utils/common/regex.ts
new file mode 100644
index 0000000..f8c5fe0
--- /dev/null
+++ b/src/utils/common/regex.ts
@@ -0,0 +1,21 @@
+/**
+ * Resolve after `time` has been spend.
+ *
+ * @param time Time in milliseconds to wait
+ */
+
+const regex = {
+ bizNo: /^[0-9]{3}-[0-9]{2}-[0-9]{5}$/i,
+ email: /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i,
+ password: /^(?=.*[a-zA-Z])(?=.*[!@#$%^*+=-])(?=.*[0-9]).{8,15}$/i,
+ currency: /\B(?=(\d{3})+(?!\d))/g,
+}
+
+// 천단위 콤마 포맷 함수 추가
+export function formatCurrency(value) {
+ if (value === null || value === undefined || value === '') return ''
+ const num = Number(value.toString().replace(/[^0-9.]/g, ''))
+ return isNaN(num) ? '' : num.toLocaleString()
+}
+
+export default regex
\ No newline at end of file
|