แก้ ฟิลเตอร์

This commit is contained in:
setthawutttty 2024-12-23 16:22:36 +07:00
parent 2f1572bde0
commit f8d5fe7ba0
7 changed files with 94 additions and 98 deletions

View file

@ -113,6 +113,9 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format: (val, row) => {
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
},
},
{
name: "dateOfBirth",
@ -124,6 +127,9 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
return date2Thai(row.dateOfBirth);
},
},
{
name: "createdAt",
@ -136,6 +142,9 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
sortOrder: "da",
format(val, row) {
return date2Thai(row.createdAt);
},
},
{
name: "status",
@ -147,6 +156,9 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
return statusText(row.status);
},
},
]);
@ -545,9 +557,6 @@ onMounted(async () => {
</div>
</div>
</div>
<div v-else-if="col.name == 'status'">
{{ props.row.status ? statusText(props.row.status) : "-" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>