filter dateAppoint

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-19 17:39:45 +07:00
parent 78de1bd91e
commit 438aa09866
4 changed files with 27 additions and 25 deletions

View file

@ -23,7 +23,7 @@ import DialogHeader from "@/components/DialogHeader.vue";
const $q = useQuasar();
const mixin = useCounterMixin();
const { messageError } = mixin;
const { messageError, date2Thai } = mixin;
const store = useRegistryNewDataStore();
const router = useRouter();
@ -60,62 +60,52 @@ const columns = ref<QTableProps["columns"]>([
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
sortable: false,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullName",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
sortable: false,
field: "fullName",
headerStyle: "font-size: 14px; min-width: 200px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "posNo",
align: "left",
label: "ตำแหน่งเลขที่",
sortable: true,
sortable: false,
field: "posNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
sortable: false,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "posPath",
align: "left",
label: "ตำแหน่งประเภท",
sortable: true,
sortable: false,
field: "posType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "posLevel",
align: "left",
label: "ระดับ",
sortable: true,
sortable: false,
field: "posLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -124,19 +114,27 @@ const columns = ref<QTableProps["columns"]>([
? row.posTypeShortName + " " + row.posLevel
: row.posLevel;
},
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "org",
align: "left",
label: "สังกัด",
sortable: true,
sortable: false,
field: "org",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "dateAppoint",
align: "left",
label: "วันที่บรรจุ",
sortable: false,
field: "dateAppoint",
headerStyle: "font-size: 14px",
format(val, row) {
return date2Thai(val);
},
style: "font-size: 14px",
},
// {
// name: "year",
@ -170,6 +168,7 @@ const visibleColumns = ref<string[]>([
"posType",
"posLevel",
"org",
"dateAppoint",
]);
const pagination = ref({
page: formFilter.value.page,