genreport

This commit is contained in:
setthawutttty 2024-03-18 17:31:36 +07:00
parent 816b6dd5c9
commit ae096150ef
2 changed files with 14 additions and 13 deletions

View file

@ -20,6 +20,7 @@ export default {
salaryRateList: salaryRate,
salaryRateListByid: (id: string) => `${salaryRate}/${id}`,
salaryReportByid: (id: string) => `${salary}/report/${id}`,
salaryReportemployeeByid: (id: string) => `${salary}/report/employee/${id}`,
salaryPeriod: () => `${salary}/period`,
salaryPeriodActive: () => `${salary}/period/active`,

View file

@ -184,19 +184,19 @@ function updatePageSize(newPagination: NewPagination) {
/** click download */
function clickDownload() {
// showLoader();
// http
// .get(config.API.salaryReportByid(salaryEmployeeId.value))
// .then((res) => {
// const dataList = res.data.result;
// genReportXLSX(dataList, "");
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
showLoader();
http
.get(config.API.salaryReportemployeeByid(salaryEmployeeId.value))
.then((res) => {
const dataList = res.data.result;
genReportXLSX(dataList, "อัตราเงินเดือน");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
watch(