This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-24 15:38:41 +07:00
parent 99dc42737d
commit 975113fe3f

View file

@ -256,7 +256,7 @@ const columns = computed<QTableProps["columns"]>(() => {
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return val ? date2Thai(row.dateAppointFull) : "";
return val ? date2Thai(val) : "";
},
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
@ -541,8 +541,7 @@ async function onSearch() {
gender: item.gender ?? "-",
status: item.relationship ?? "-",
education: item.degree ?? "-",
dateAppoint: item.dateAppoint ? date2Thai(item.dateAppoint) : "-",
dateAppointFull: item.dateAppoint,
dateAppoint: item.dateAppoint ?? "-",
age: item.age ?? "-",
currentPosition: item.currentPosition ?? "-",
lengthPosition: item.lengthPosition ?? "-",
@ -564,8 +563,12 @@ async function onSearch() {
function exportToExcel() {
const newData = rows.value.map((e: any) => {
const { dateAppointFull, profileId, empType, ...rest } = e;
return { ...rest, dateRetireLaw: date2Thai(e.dateRetireLaw) };
const { profileId, empType, ...rest } = e;
return {
...rest,
dateAppoint: date2Thai(e.dateAppoint),
dateRetireLaw: date2Thai(e.dateRetireLaw),
};
});
const headers = columns.value?.map((item: any) => item.label) || []; //