|
@@ -104,8 +104,9 @@
|
|
|
>月份供应商合计导出</a-button
|
|
|
>
|
|
|
<a-button type="primary" @click="monthDepartExport('月份部门合计导出')" icon="download"
|
|
|
- >月份部门合计导出</a-button
|
|
|
- >
|
|
|
+ >月份部门合计导出</a-button>
|
|
|
+ <a-button type="primary" @click="detailExport()" icon="download"
|
|
|
+ >明细导出</a-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 合计 table rowKey="id" :scroll="{ x: 1500 }" :pagination="ipagination -->
|
|
@@ -360,6 +361,27 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ detailExport(){
|
|
|
+ downFile('/scas/supplierCapacity/excel4', this.queryParam).then(data => {
|
|
|
+ if (!data) {
|
|
|
+ this.$message.warning('文件下载失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
|
|
+ } else {
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ let link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ link.setAttribute('download', fileName + '.xls')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
// 查询按钮
|
|
|
searchQuery() {
|