Merge branch 'develop' of github.com:Frappet/hrms-mgt into develop

This commit is contained in:
Warunee Tamkoo 2025-09-09 10:11:28 +07:00
commit fd0b78ecbc
5 changed files with 40 additions and 17 deletions

View file

@ -47,6 +47,7 @@ export default {
exportCandidateListNew: (id: string) => `${recruit_report}candidate-new/${id}`,
reportCandidateListNew: (id: string) => `${recruit}report/candidate-new/${id}`,
examReport: (id: string,no:string) => `${recruit}report/exam/${id}/${no}`,
};

View file

@ -102,7 +102,7 @@ const baseColumns = ref<QTableProps["columns"]>([
{
name: "position",
align: "left",
label: "ตำแหน่ง",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
@ -119,11 +119,11 @@ const baseColumns = ref<QTableProps["columns"]>([
format(val, row) {
let name = "";
if (row.posType && row.position) {
name = `${row.posType} (${row.position})`;
name = `${row.posType} (${row.posLevel})`;
} else if (row.posType) {
name = `${row.posType}`;
} else if (row.position) {
name = `(${row.position})`;
} else if (row.posLevel) {
name = `(${row.posLevel})`;
} else name = "-";
return name;
},
@ -213,9 +213,9 @@ function formatHistoryOwnerData(data: HistoryPos[]) {
return data.map((item) => ({
...item,
fullname:
item.prefix && item.firstName && item.lastName
? `${item.prefix} ${item.firstName} ${item.lastName}`.trim()
: "-",
item.firstName
? `${item.prefix}${item.firstName} ${item.lastName}`.trim()
: "ว่าง",
}));
}

View file

@ -248,11 +248,34 @@ async function clickPassExam(id: string) {
async function clickCandidateList(id: string) {
showLoader();
await http
.get(config.API.exportCandidateListNew(id))
.get(config.API.reportCandidateListNew(id), {
headers: {
accept:
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"content-Type": "application/json",
},
responseType: "blob",
})
.then(async (res) => {
const data = res.data.result;
data.reportName = `CandidateList`;
await genReport(data, "รายชื่อผู้มีสิทธิ์สอบ", "pdf");
const data = res.data;
if (data) {
// Blob array buffer
const blob = new Blob([data]);
// URL Blob
const url = URL.createObjectURL(blob);
//
const link = document.createElement("a");
link.href = url;
link.download = `CandidateList.xlsx`; //
document.body.appendChild(link);
link.click();
// URL
URL.revokeObjectURL(url);
}
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
@ -705,9 +728,7 @@ onMounted(async () => {
"
>
<q-icon name="mdi-file-excel-outline" size="20px" />
<q-tooltip
>นำเขาไฟลผลการสอบ (ญชรายช)</q-tooltip
>
<q-tooltip>นำเขาไฟลผลการสอบ (ญชรายช)</q-tooltip>
</q-btn>
<div v-else>
{{ props.row.score.resultCount }}
@ -722,8 +743,7 @@ onMounted(async () => {
icon="mdi-file-excel-outline"
>
<q-tooltip
>นำเขาไฟลผลการสอบ (ญชรายช)
กคร</q-tooltip
>นำเขาไฟลผลการสอบ (ญชรายช) กคร</q-tooltip
>
</q-btn>

View file

@ -24,6 +24,7 @@ interface listMain {
positionDate: Date;
leaveDate: Date;
id: string;
nodeId: string;
}
//ข้อมูลจาก api
interface listMainAPI {

View file

@ -195,7 +195,8 @@ async function fecthlistOthet() {
e.positionLevelOld &&
e.positionNumberOld &&
e.positionDate &&
e.leaveDate !== null
e.leaveDate !== null &&
e.nodeId !== null
);
rows2.value = listData;
rows2Data.value = listData;