เพิ่มฟิล ผู้ดำเนินการ/วันที่แก้ไข

This commit is contained in:
setthawutttty 2024-12-17 15:37:23 +07:00
parent b7835fdd25
commit 9a4c11c6c4
15 changed files with 411 additions and 33 deletions

View file

@ -22,7 +22,8 @@ const $q = useQuasar();
const mode = ref<boolean>($q.screen.gt.xs);
const mixin = useCounterMixin();
const dataStore = useDataStore();
const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -32,6 +33,8 @@ const visibleColumns = ref<string[]>([
"detail",
"remark",
"reference",
"lastUpdateFullName",
"lastUpdatedAt",
]);
const columns = ref<QTableProps["columns"]>([
@ -79,6 +82,29 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdateFullName",
align: "left",
label: "ผู้ดำเนินการ",
sortable: true,
field: "lastUpdateFullName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "lastUpdatedAt",
format: (v) => date2Thai(v),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumnsHistory = ref<string[]>([
@ -284,7 +310,7 @@ onMounted(async () => {
{{ props.row.status ? props.row.status : "-" }}
</div>
<div v-else>
{{ col.value }}
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>