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

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

@@ -288,14 +288,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.number, ds.barCode, ds.mname, ds.standard, ds.model, ds.mUnit, ds.operNumber, ds.unitPrice,
ds.allPrice, ds.taxRate, ds.taxMoney, ds.sname, ds.dname, ds.operTime, ds.newRemark]
aoa.push(item)
item.push(ds.number, ds.barCode, ds.mname, ds.standard, ds.model, ds.mUnit, ds.operNumber, ds.unitPrice,
ds.allPrice, ds.taxRate, ds.taxMoney, ds.sname, ds.dname, ds.operTime, ds.newRemark)
list.push(item)
}
openDownloadDialog(sheet2blob(aoa), '入库明细')
let tip = '单据日期:' + this.queryParam.beginTime + '~' + this.queryParam.endTime
this.handleExportXlsPost('入库明细', '入库明细', head, tip, list)
}
}
}