รายการเลื่อนเงินเดือนข้าราชการ ฯ => ปรับ API Report
This commit is contained in:
parent
0c3cd367c3
commit
cee77d4ac6
4 changed files with 196 additions and 209 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue