给基础报表的导出走接口查询逻辑

This commit is contained in:
jishenghua
2024-01-14 20:05:55 +08:00
parent 9f2dee507e
commit 71e10b9fcb
14 changed files with 100 additions and 62 deletions

View File

@@ -153,14 +153,17 @@
})
},
exportExcel() {
let aoa = [['仓库', '条码', '名称', '规格', '型号', '扩展信息', '单位', '库存', '最低安全库存', '最高安全库存', '建议入库量', '建议出库量']]
let list = []
let head = '仓库,条码,名称,规格,型号,扩展信息,单位,库存,最低安全库存,最高安全库存,建议入库量,建议出库量'
for (let i = 0; i < this.dataSource.length; i++) {
let item = []
let ds = this.dataSource[i]
let item = [ds.depotName, ds.barCode, ds.mname, ds.mstandard, ds.mmodel, ds.materialOther, ds.materialUnit,
ds.currentNumber, ds.lowSafeStock, ds.highSafeStock, ds.lowCritical, ds.highCritical]
aoa.push(item)
item.push(ds.depotName, ds.barCode, ds.mname, ds.mstandard, ds.mmodel, ds.materialOther, ds.materialUnit,
ds.currentNumber, ds.lowSafeStock, ds.highSafeStock, ds.lowCritical, ds.highCritical)
list.push(item)
}
openDownloadDialog(sheet2blob(aoa), '库存预警')
let tip = '库存预警查询'
this.handleExportXlsPost('库存预警', '库存预警', head, tip, list)
}
}
}