This commit is contained in:
linfso 2025-06-18 13:07:53 +08:00
parent 4f18834ef9
commit 6890666d7f
2 changed files with 22 additions and 2 deletions

View File

@ -25,6 +25,14 @@ export function queryPayBackStatList(query) {
})
}
export function querySalesPayBackRateList(query) {
return request({
url: '/emis/emisSettleBill/querySalesPayBackRateList',
method: 'get',
params: query
})
}

View File

@ -93,7 +93,7 @@ function s2ab(s) {
return buf;
}
export function export_table_to_excel(id) {
export function export_table_to_excel(id,fileName) {
var theTable = document.getElementById(id);
var oo = generateArray(theTable);
var ranges = oo[1];
@ -114,7 +114,19 @@ export function export_table_to_excel(id) {
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx")
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}),fileName)
}
export function table_to_book(tableId,fileName) {
const wb = XLSX.utils.table_to_book(tableId, {raw:true})
const wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST:true, type: 'array'})
saveAs(new Blob([wbout], {type: "application/octet-stream"}),fileName)
// FileSaver.saveAs(
// new Blob([wbout],{type: 'application/octet-stream'}),
// `${excelName}.xlsx`,
// )
}
export function export_json_to_excel({header, data, filename='excel-list', autoWidth=true}={}) {