ระบบพัฒนา => ประวัติ
This commit is contained in:
parent
ce19411e38
commit
bb60ab089c
4 changed files with 136 additions and 31 deletions
|
|
@ -17,11 +17,18 @@ async function genReportXLSX(
|
|||
showLoader();
|
||||
await axios
|
||||
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||
headers: {
|
||||
accept:
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"content-Type": "application/json",
|
||||
},
|
||||
headers:
|
||||
type == "xlsx"
|
||||
? {
|
||||
accept:
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"content-Type": "application/json",
|
||||
}
|
||||
: {
|
||||
accept: "application/pdf",
|
||||
"content-Type": "application/json",
|
||||
},
|
||||
|
||||
responseType: "blob",
|
||||
})
|
||||
.then((res) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue