แก้ ฟิลเตอร์

This commit is contained in:
setthawutttty 2025-01-23 11:12:35 +07:00
parent 3e3147686c
commit 8ad8e9354a
2 changed files with 15 additions and 1 deletions

View file

@ -23,7 +23,8 @@ const rowsHistoryData = ref<InsigniaFormType[]>([]);
const $q = useQuasar();
const mode = ref<boolean>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -78,6 +79,9 @@ const columns = ref<QTableProps["columns"]>([
field: "insigniaId",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return `${row.insignia.name} (${row.insignia.shortName})`;
},
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
@ -87,6 +91,9 @@ const columns = ref<QTableProps["columns"]>([
label: "ลำดับชั้น",
sortable: true,
field: (v) => v.insignia.insigniaType.name,
format: (val, row) => {
return `${row.insignia.insigniaType.name}`;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -278,6 +285,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
field: "insigniaId",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return `${row.insignia.name} (${row.insignia.shortName})`;
},
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
@ -287,6 +297,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
label: "ลำดับชั้น",
sortable: true,
field: (v) => v.insignia.insigniaType.name,
format: (val, row) => {
return `${row.insignia.insigniaType.name}`;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>

View file

@ -24,6 +24,7 @@ const props = defineProps({
});
function close() {
modal.value = false;
filter.value = ''
}
function dateThaiRange(val: [Date, Date]) {