diff --git a/src/api/13_salary/api.salary.ts b/src/api/13_salary/api.salary.ts index cc44168ef..09786c1e9 100644 --- a/src/api/13_salary/api.salary.ts +++ b/src/api/13_salary/api.salary.ts @@ -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`, diff --git a/src/modules/13_salary/views/salaryEmployeeRate.vue b/src/modules/13_salary/views/salaryEmployeeRate.vue index 4879db35f..232077275 100644 --- a/src/modules/13_salary/views/salaryEmployeeRate.vue +++ b/src/modules/13_salary/views/salaryEmployeeRate.vue @@ -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(