Merge branch 'oat_dev' into develop

This commit is contained in:
oat 2024-02-15 16:06:13 +07:00
commit a95d56ce0c

View file

@ -28,7 +28,7 @@ a
>
<div v-if="col.name == 'issueDate'" class="table_ellipsis">
{{
props.row.isDate == "true"
props.row.isDate == true
? date2Thai(props.row.issueDate2)
: col.value + 543
}}
@ -149,6 +149,7 @@ a
:model-value="issueDate + 543"
hide-bottom-space
:label="`${'วันที่ได้รับ'}`"
:readonly="!edit"
>
<template v-slot:prepend>
<q-icon
@ -191,6 +192,7 @@ a
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
hide-bottom-space
:label="`${'วันที่ได้รับ'}`"
:readonly="!edit"
>
<template v-slot:prepend>
<q-icon
@ -269,7 +271,7 @@ a
mask="##/##/####"
dense
:error="dayCheckedRef"
error-message="กรุณากรอกเอกสารอ้างอิง (ลงวันที่)"
error-message="กรุณากรอกเอกสารอ้างอิง (ลงวันที่) หรือเว้นว่าง"
/>
<datepicker
v-else
@ -298,6 +300,7 @@ a
"
hide-bottom-space
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
:readonly="!edit"
>
<template v-slot:prepend>
<q-icon
@ -651,6 +654,9 @@ watch(
dayCheckedRef.value = true;
inputDateRef.value = "";
}
} else if (value.length === 0) {
dayCheckedRef.value = false;
refCommandDate.value = null;
}
}
);
@ -764,6 +770,10 @@ const clickAdd = async () => {
* กดบนทกใน dialog
*/
const clickSave = async () => {
if (inputDateRef.value.length != 0 && inputDateRef.value.length != 10) {
dayCheckedRef.value = true;
return "";
}
myForm.value.validate().then(async (result: boolean) => {
if (result) {
if (modalEdit.value) {
@ -918,8 +928,9 @@ const selectData = async (props: any) => {
id.value = props.row.id;
inputYear.value = props.row.issueDate + 543;
inputDate.value = convertDateDisplay(props.row.issueDate2);
inputDateRef.value = convertDateDisplay(props.row.refCommandDate);
inputDateRef.value = props.row.refCommandDate
? convertDateDisplay(props.row.refCommandDate)
: "";
await checkRowPage();
};