【update】-首页-应收账款增加导出按钮
This commit is contained in:
@@ -51,9 +51,9 @@
|
||||
<income-sort-echarts class="income-sort m-t-10"></income-sort-echarts>
|
||||
<!-- 收入分类统计 -->
|
||||
|
||||
<!-- 营收账款统计 -->
|
||||
<!-- 应收账款统计 -->
|
||||
<not-received-echarts class="m-t-10 not-receiced"></not-received-echarts>
|
||||
<!-- 营收账款统计 -->
|
||||
<!-- 应收账款统计 -->
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" icon="export" @click="handleExportXls(seriesName + '应收账款')">导出</a-button>
|
||||
</div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
@@ -101,7 +104,7 @@
|
||||
<script>
|
||||
|
||||
import { formatMoney } from '../../../utils/formatMoney'
|
||||
import { getAction } from '../../../api/manage'
|
||||
import { downloadFile, getAction } from "../../../api/manage";
|
||||
import {filterObj} from '@/utils/util'
|
||||
import StatusSlot from '../../../components/tools/StatusSlot'
|
||||
|
||||
@@ -222,7 +225,8 @@ export default {
|
||||
columnsFooter: [firstColumnFooter, ...defaultTableColumns],
|
||||
footerDataSource: [],
|
||||
url: {
|
||||
list: '/index/uncollectedList'
|
||||
list: '/index/uncollectedList',
|
||||
exportXlsUrl: '/index/exportUncollectedList'
|
||||
},
|
||||
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
|
||||
queryParam: {
|
||||
@@ -367,6 +371,16 @@ export default {
|
||||
this.ipagination = pagination
|
||||
this.loadData()
|
||||
},
|
||||
handleExportXls(fileName) {
|
||||
if (!fileName || typeof fileName != 'string') {
|
||||
fileName = '导出文件'
|
||||
}
|
||||
let param = this.getQueryParams()
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
param['selections'] = this.selectedRowKeys.join(',')
|
||||
}
|
||||
downloadFile(this.url.exportXlsUrl, fileName + '.xlsx', param)
|
||||
},
|
||||
handleOk() {
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user