|
|
@@ -24,7 +24,15 @@
|
|
|
<year-month-select v-model="yearAndMonth" :showAllYear="false" style="margin: 6px 0 20px;"></year-month-select>
|
|
|
</div>
|
|
|
<template v-if="listData.length">
|
|
|
- <common-list v-for="(item, index) of listData" :data="item" :type="type" :key="index" style="margin-bottom: 25px;" @printClick="handlePrintClick"></common-list>
|
|
|
+ <common-list
|
|
|
+ v-for="(item, index) of listData"
|
|
|
+ :data="item"
|
|
|
+ :type="type"
|
|
|
+ :key="index"
|
|
|
+ style="margin-bottom: 25px;"
|
|
|
+ @printClick="handlePrintClick"
|
|
|
+ @exportClick="handleExportClick"
|
|
|
+ ></common-list>
|
|
|
</template>
|
|
|
<el-empty v-else description="暂无数据"></el-empty>
|
|
|
|
|
|
@@ -63,6 +71,9 @@ import { getList } from "@/api/yfCostManage/yfCostStatistics/clCost";
|
|
|
import moment from "moment";
|
|
|
import Decimal from "decimal.js";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+import {exportBloByPost} from "@/api/common";
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
+import {downloadXls} from "@/util/util";
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
|
@@ -170,7 +181,13 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.printWideTable.printTable(true);
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleExportClick({ xmId, useDate, yearAndMonth }) {
|
|
|
+ const exportParams = { useDate, xmId, yearAndMonth, type: this.type };
|
|
|
+ exportBloByPost(`/api/kd-scientific/goods/yanfalingliaodan/export?${this.website.tokenHeader}=${getToken()}`, exportParams).then(res => {
|
|
|
+ downloadXls(res.data, `${this.pageTitle}.xlsx`);
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|