From dd0bd13d6f0746d2f9388ee712119b96d648bd50 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 12 Feb 2024 09:54:38 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20issue=20=E0=B8=88?= =?UTF-8?q?=E0=B8=B2=E0=B8=81=20=E0=B9=80=E0=B8=97=E0=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/04_registry/components/Coin.vue | 14 ++++++-------- src/modules/04_registry/components/Other.vue | 2 +- src/modules/04_registry/components/Train.vue | 4 ---- src/modules/04_registry/interface/request/Coin.ts | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/modules/04_registry/components/Coin.vue b/src/modules/04_registry/components/Coin.vue index bb063ca96..9b1ebf2cc 100644 --- a/src/modules/04_registry/components/Coin.vue +++ b/src/modules/04_registry/components/Coin.vue @@ -121,8 +121,6 @@ :readonly="!edit" :borderless="!edit" v-model="issuer" - :rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]" - hide-bottom-space :label="`${'ผู้มีอำนาจลงนาม'}`" @update:modelValue="clickEditRow" /> @@ -188,7 +186,7 @@ lazy-rules :borderless="!edit" :model-value=" - refCommandDate == null ? null : date2Thai(refCommandDate) + refCommandDate == null ? null : date2Thai(refCommandDate as Date) " hide-bottom-space :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" @@ -304,7 +302,7 @@ const issuer = ref(); const detail = ref(); const issueDate = ref(new Date()); const refCommandNo = ref(); -const refCommandDate = ref(new Date()); +const refCommandDate = ref(new Date()); const myForm = ref(); //form data input const edit = ref(false); //เช็คการกดปุ่มแก้ไขใน dialog const modal = ref(false); //modal add detail @@ -502,9 +500,9 @@ const fetchData = async () => { issuer: e.issuer, detail: e.detail, issueDate: new Date(e.issueDate), - refCommandNo: e.refCommandNo, + refCommandNo: e.refCommandNo == '' ? '-':e.refCommandNo, refCommandDate: - e.refCommandDate == null ? null : new Date(e.refCommandDate), + e.refCommandDate == null ? '-' : new Date(e.refCommandDate), createdAt: new Date(e.createdAt), createdFullName: e.createdFullName, }); @@ -613,7 +611,7 @@ const saveData = async () => { issueDate: dateToISO(issueDate.value), refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -641,7 +639,7 @@ const editData = async () => { issueDate: dateToISO(issueDate.value), refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); diff --git a/src/modules/04_registry/components/Other.vue b/src/modules/04_registry/components/Other.vue index 33bf1d312..fe58707e1 100644 --- a/src/modules/04_registry/components/Other.vue +++ b/src/modules/04_registry/components/Other.vue @@ -26,7 +26,7 @@
{{ date2Thai(col.value) }}
-
+
{{ col.value }}
diff --git a/src/modules/04_registry/components/Train.vue b/src/modules/04_registry/components/Train.vue index b91b5678b..a5fcd583f 100644 --- a/src/modules/04_registry/components/Train.vue +++ b/src/modules/04_registry/components/Train.vue @@ -87,16 +87,12 @@
diff --git a/src/modules/04_registry/interface/request/Coin.ts b/src/modules/04_registry/interface/request/Coin.ts index 583338641..596a6ab60 100644 --- a/src/modules/04_registry/interface/request/Coin.ts +++ b/src/modules/04_registry/interface/request/Coin.ts @@ -10,7 +10,7 @@ interface RequestItemsObject { detail: string; issueDate: Date; refCommandNo: string; - refCommandDate: Date | null; + refCommandDate: Date | null | string; createdFullName: string; createdAt: Date; }