- {{
- props.row.isDate == true
- ? date2Thai(props.row.issueDate2)
- : col.value + 543
- }}
-
-
- {{
- props.row.refCommandDate
- ? date2Thai(props.row.refCommandDate)
- : "-"
- }}
-
-
+
{{ col.value ? col.value : "-" }}
+
+ แก้ไขข้อมูล
+
ประวัติแก้ไขประกาศเกียรติคุณ
+
@@ -464,7 +515,7 @@ async function clickHistory(row: RequestItemsObject) {
round
color="primary"
icon="mdi-pencil-outline"
- @click.stop.prevent="onClickOpenDialog()"
+ @click="onClickOpenDialog(true, props)"
>
แก่ไขข้อมุล
@@ -492,21 +543,7 @@ async function clickHistory(row: RequestItemsObject) {
-
- {{
- props.row.isDate == true
- ? date2Thai(props.row.issueDate2)
- : col.value + 543
- }}
-
-
- {{
- props.row.refCommandDate
- ? date2Thai(props.row.refCommandDate)
- : "-"
- }}
-
-
+
{{ col.value ? col.value : "-" }}
@@ -526,7 +563,7 @@ async function clickHistory(row: RequestItemsObject) {
{{ year + 543 }}
{{
@@ -563,7 +600,12 @@ async function clickHistory(row: RequestItemsObject) {
outlined
lazy-rules
hide-bottom-space
- :model-value="issueDate ? issueDate + 543 : ''"
+ class="inputgreen"
+ :model-value="
+ declHonorData.issueDateYear
+ ? declHonorData.issueDateYear + 543
+ : null
+ "
:rules="[
(val:string) =>
!!val ||
@@ -587,7 +629,7 @@ async function clickHistory(row: RequestItemsObject) {
borderless
week-start="0"
menu-class-name="modalfix"
- v-model="issueDate2"
+ v-model="declHonorData.issueDate"
:locale="'th'"
:enableTimePicker="false"
v-else
@@ -602,14 +644,13 @@ async function clickHistory(row: RequestItemsObject) {
(editRow = true)"
>
@@ -629,7 +670,8 @@ async function clickHistory(row: RequestItemsObject) {
outlined
lazy-rules
hide-bottom-space
- v-model="issuer"
+ class="inputgreen"
+ v-model="declHonorData.issuer"
:label="`${'ผู้มีอำนาจลงนาม'}`"
@update:modelValue="() => (editRow = true)"
/>
@@ -640,7 +682,8 @@ async function clickHistory(row: RequestItemsObject) {
outlined
lazy-rules
hide-bottom-space
- v-model="detail"
+ class="inputgreen"
+ v-model="declHonorData.detail"
:label="`${'รายละเอียด'}`"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
@update:modelValue="() => (editRow = true)"
@@ -652,7 +695,8 @@ async function clickHistory(row: RequestItemsObject) {
outlined
lazy-rules
hide-bottom-space
- v-model="refCommandNo"
+ class="inputgreen"
+ v-model="declHonorData.refCommandNo"
:label="`${'เลขที่คำสั่ง'}`"
@update:modelValue="() => (editRow = true)"
>
@@ -667,7 +711,7 @@ async function clickHistory(row: RequestItemsObject) {
borderless
week-start="0"
menu-class-name="modalfix"
- v-model="refCommandDate"
+ v-model="declHonorData.refCommandDate"
:locale="'th'"
:enableTimePicker="false"
>
@@ -683,11 +727,14 @@ async function clickHistory(row: RequestItemsObject) {
outlined
clearable
hide-bottom-space
+ class="inputgreen"
:model-value="
- refCommandDate == null ? null : date2Thai(refCommandDate)
+ declHonorData.refCommandDate == null
+ ? null
+ : date2Thai(declHonorData.refCommandDate)
"
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
- @clear="refCommandDate = null"
+ @clear="declHonorData.refCommandDate = null"
@update:modelValue="() => (editRow = true)"
>
@@ -734,17 +781,7 @@ async function clickHistory(row: RequestItemsObject) {
-
- {{ col.value ? date2Thai(col.value) : "-" }}
-
-
+
{{ col.value ? col.value : "-" }}
diff --git a/src/modules/04_registryNew/interface/request/DeclarationHonor.ts b/src/modules/04_registryNew/interface/request/DeclarationHonor.ts
index 46d4ab710..c4668fef0 100644
--- a/src/modules/04_registryNew/interface/request/DeclarationHonor.ts
+++ b/src/modules/04_registryNew/interface/request/DeclarationHonor.ts
@@ -1,20 +1,24 @@
-interface gDataProps {
- row: RequestItemsObject;
- rowIndex: number;
+interface RequestItemsObject {
+ profileId: string;
+ isActive: boolean;
+ detail: string;
+ issueDate: Date | null;
+ issuer: string;
+ refCommandDate: Date | null;
+ refCommandNo: string;
+ isDate: boolean;
}
-//ข้อมูล
-interface RequestItemsObject {
+interface FormData {
id: string;
+ isActive: boolean;
+ isDate: string | null;
issuer: string;
detail: string;
- issueDate: number | null;
- issueDate2: Date;
+ issueDate: Date | null;
+ issueDateYear: number;
refCommandNo: string;
- refCommandDate: Date | null | string;
- createdFullName: string;
- createdAt: Date;
- isDate: string;
+ refCommandDate: Date | null;
}
//columns
@@ -30,4 +34,4 @@ interface Columns {
};
}
-export type { RequestItemsObject, Columns };
+export type { RequestItemsObject, FormData, Columns };
diff --git a/src/modules/04_registryNew/interface/response/DeclarationHonor.ts b/src/modules/04_registryNew/interface/response/DeclarationHonor.ts
index 2b6eb44ac..3993ada12 100644
--- a/src/modules/04_registryNew/interface/response/DeclarationHonor.ts
+++ b/src/modules/04_registryNew/interface/response/DeclarationHonor.ts
@@ -1,15 +1,19 @@
-//ข้อมูล
interface ResponseObject {
- id: string;
- issuer: string;
- detail: string;
- issueDate: number;
- issueDate2: Date;
- refCommandNo: string;
- refCommandDate: Date | null;
- createdFullName: string;
createdAt: Date;
- isDate: string;
+ createdFullName: string;
+ createdUserId: string;
+ detail: string;
+ id: string;
+ isActive: boolean;
+ isDate: boolean;
+ issueDate: Date;
+ issuer: string;
+ lastUpdateFullName: string;
+ lastUpdateUserId: string;
+ lastUpdatedAt: Date;
+ profileId: string;
+ refCommandDate: Date;
+ refCommandNo: string;
}
export type { ResponseObject };