From 092f67b26c5ab06a479341f5af80ea8e1642d43e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 16:08:24 +0800
Subject: [PATCH] 劳保、售后管理-添加导出功能
---
src/views/reportAnalysis/taxComparison/index.vue | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/src/views/reportAnalysis/taxComparison/index.vue b/src/views/reportAnalysis/taxComparison/index.vue
index 4ed69a5..d27ab07 100644
--- a/src/views/reportAnalysis/taxComparison/index.vue
+++ b/src/views/reportAnalysis/taxComparison/index.vue
@@ -4,7 +4,7 @@
<el-form-item label="鏃ユ湡">
<el-date-picker
style="width: 240px"
- v-model="filters.dateRange"
+ v-model="filters.month"
value-format="YYYY-MM"
format="YYYY-MM"
type="month"
@@ -16,6 +16,7 @@
<el-form-item>
<el-button type="primary" @click="getTableData"> 鎼滅储 </el-button>
<el-button @click="resetFilters"> 閲嶇疆 </el-button>
+ <el-button @click="handleOut"> 瀵煎嚭 </el-button>
</el-form-item>
</el-form>
<div class="table_list">
@@ -36,8 +37,11 @@
<script setup>
import { usePaginationApi } from "@/hooks/usePaginationApi";
-import { onMounted } from "vue";
+import { onMounted, getCurrentInstance } from "vue";
import { getTaxList } from "@/api/procurementManagement/taxComparison";
+import { ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
defineOptions({
name: "澧炲�肩◣姣斿",
@@ -55,7 +59,7 @@
} = usePaginationApi(
getTaxList,
{
- dateRange: [], // 鏉ョエ鏃ユ湡
+ month: [], // 鏉ョエ鏃ユ湡
},
[
{
@@ -87,6 +91,21 @@
onCurrentChange(page);
};
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/purchase/report/exportTwo", {}, "澧炲�肩◣姣斿.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getTableData();
});
--
Gitblit v1.9.3