รายการเลื่อนเงินเดือนข้าราชการ ฯ => ปรับ API Report

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-05 11:59:12 +07:00
parent 0c3cd367c3
commit cee77d4ac6
4 changed files with 196 additions and 209 deletions

View file

@ -332,14 +332,21 @@ function onClickDownload(data: DataOption) {
});
} else {
if (props.rootId && props.periodId) {
const url = config.API.salaryReportListsByid(
data.id,
props.rootId,
props.periodId
);
const isGovernmentId =
data.id === "gov-01" ||
data.id === "gov-04" ||
data.id === "gov-05" ||
data.id === "gov-07";
const finalUrl = isGovernmentId ? `${url}/${store.tabGroup}` : url;
http
.get(
config.API.salaryReportListsByid(
data.id,
props.rootId,
props.periodId
)
)
.get(finalUrl)
.then((res) => {
const dataList = res.data.result;
genReportXLSX(dataList, data.name);