ทะเบียนประวัติ ปรับ table
This commit is contained in:
parent
fb5017b0e2
commit
0a6feb0c9c
13 changed files with 143 additions and 116 deletions
|
|
@ -31,10 +31,10 @@
|
|||
"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
||||
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
|
|
@ -334,10 +334,10 @@
|
|||
"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
||||
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
@ -395,7 +395,7 @@ const detail = ref<string>();
|
|||
const reference = ref<string>();
|
||||
const minDate = ref<Date>();
|
||||
const refCommandNo = ref<string>();
|
||||
const refCommandDate = ref<Date | null|string>(new Date());
|
||||
const refCommandDate = ref<Date | null | string>(new Date());
|
||||
const myForm = ref<any>(); //form data input
|
||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||
const modal = ref<boolean>(false); //modal add detail
|
||||
|
|
@ -681,7 +681,7 @@ const fetchData = async () => {
|
|||
reference: e.reference,
|
||||
refCommandNo: e.refCommandNo,
|
||||
refCommandDate:
|
||||
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
|
||||
e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
});
|
||||
|
|
@ -726,7 +726,8 @@ const getData = () => {
|
|||
detail.value = row.detail;
|
||||
reference.value = row.reference;
|
||||
refCommandNo.value = row.refCommandNo;
|
||||
refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date;
|
||||
refCommandDate.value =
|
||||
row.refCommandDate == "-" ? "" : (row.refCommandDate as Date);
|
||||
id.value = row.id;
|
||||
};
|
||||
|
||||
|
|
@ -792,7 +793,9 @@ const saveData = async () => {
|
|||
reference: reference.value,
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -821,7 +824,9 @@ const editData = async () => {
|
|||
reference: reference.value,
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -904,7 +909,8 @@ const selectData = async (props: DataProps) => {
|
|||
detail.value = props.row.detail;
|
||||
reference.value = props.row.reference;
|
||||
refCommandNo.value = props.row.refCommandNo;
|
||||
refCommandDate.value = props.row.refCommandDate =='-' ? '':props.row.refCommandDate as Date;
|
||||
refCommandDate.value =
|
||||
props.row.refCommandDate == "-" ? "" : (props.row.refCommandDate as Date);
|
||||
id.value = props.row.id;
|
||||
|
||||
inputDateStart.value = convertDateDisplay(dateStart.value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue