diff --git a/src/modules/04_registry/components/Information/Certicate.vue b/src/modules/04_registry/components/Information/Certicate.vue index 6f858aa0d..7f4ed0899 100644 --- a/src/modules/04_registry/components/Information/Certicate.vue +++ b/src/modules/04_registry/components/Information/Certicate.vue @@ -858,6 +858,8 @@ watch( } else { inputIssueDate.value = ""; } + }else if(value.length === 0){ + issueDate.value = null } } ); @@ -872,6 +874,8 @@ watch( } else { inputExpireDate.value = ""; } + }else if(value.length === 0){ + expireDate.value = null } } ); diff --git a/src/modules/04_registry/components/Insignia.vue b/src/modules/04_registry/components/Insignia.vue index deeee17af..5e6747074 100644 --- a/src/modules/04_registry/components/Insignia.vue +++ b/src/modules/04_registry/components/Insignia.vue @@ -79,6 +79,7 @@ :error="yearInputCheck" error-message="กรุณากรอก ปี ที่ยื่นขอพระราชทานเครื่องราชฯ" /> + { rowIndex.value = props.rowIndex; insigniaId.value = props.row.insigniaId; insigniaType.value = props.row.insigniaType; - year.value = props.row.year; + year.value = props.row.year == 0 ? 0:props.row.year; no.value = props.row.no; issue.value = props.row.issue; volumeNo.value = props.row.volumeNo; @@ -1318,7 +1320,7 @@ const selectData = async (props: DataProps) => { props.row.refCommandDate == "-" ? null : props.row.refCommandDate; id.value = props.row.id; - yearInput.value = (Number(props.row.year) + 543).toLocaleString(); + yearInput.value = props.row.year !== 0 ? (Number(props.row.year) + 543).toLocaleString():''; receiveDateInput.value = convertDateDisplay(props.row.receiveDate); dateAnnounceInput.value = props.row.dateAnnounce ? convertDateDisplay(props.row.dateAnnounce as Date) @@ -1466,6 +1468,9 @@ watch( dateAnnounceInput.value = ""; } } + else if (value.length === 0) { + dateAnnounce.value = null; + } } ); watch( @@ -1479,6 +1484,9 @@ watch( refCommandDateInput.value = ""; } } + else if (value.length === 0) { + refCommandDate.value = null; + } } ); @@ -1506,6 +1514,9 @@ watch( yearInputCheck.value = false; year.value = dateVal; } + else if (value.length === 0) { + year.value = 0; + } } ); diff --git a/src/modules/04_registry/components/Train.vue b/src/modules/04_registry/components/Train.vue index 62113bd90..3acc1c6b5 100644 --- a/src/modules/04_registry/components/Train.vue +++ b/src/modules/04_registry/components/Train.vue @@ -29,7 +29,9 @@ ? props.row.startDate2 !== null ? date2Thai(props.row.startDate2) : "-" - : props.row.startDate2 !== null ? col.value + 543:'-' + : props.row.startDate2 !== null + ? col.value + 543 + : "-" }}
@@ -38,7 +40,9 @@ ? props.row.endDate2 !== null ? date2Thai(props.row.endDate2) : "-" - : props.row.endDate2 !== null ? col.value + 543:'-' + : props.row.endDate2 !== null + ? col.value + 543 + : "-" }}
@@ -166,7 +170,9 @@ dense lazy-rules :borderless="!edit" - :model-value="startDate !== 0 ? Number(startDate) + 543:null" + :model-value=" + startDate !== 0 ? Number(startDate) + 543 : null + " :label="`${'ปี เริ่มต้นการฝึกอบรม/ดูงาน'}`" >