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/projectProfit/index.vue | 21 ++++++++++
src/views/customerService/feedbackRegistration/index.vue | 19 +++++++++
src/views/reportAnalysis/taxComparison/index.vue | 21 ++++++++++
src/views/lavorissue/ledger/index.vue | 4 +-
src/views/customerService/afterSalesHandling/index.vue | 19 +++++++++
5 files changed, 78 insertions(+), 6 deletions(-)
diff --git a/src/views/customerService/afterSalesHandling/index.vue b/src/views/customerService/afterSalesHandling/index.vue
index 818270d..65a7551 100644
--- a/src/views/customerService/afterSalesHandling/index.vue
+++ b/src/views/customerService/afterSalesHandling/index.vue
@@ -30,6 +30,7 @@
<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
>鎼滅储</el-button
>
+ <el-button @click="handleOut" style="margin-left: 10px">瀵煎嚭</el-button>
</div>
</div>
<div class="table_list">
@@ -50,7 +51,7 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
-import {onMounted, ref} from "vue";
+import {onMounted, ref, getCurrentInstance, nextTick} from "vue";
import FormDia from "@/views/customerService/afterSalesHandling/components/formDia.vue";
import {ElMessageBox} from "element-plus";
import {afterSalesServiceDelete, afterSalesServiceListPage} from "@/api/customerService/index.js";
@@ -225,6 +226,22 @@
proxy.$modal.msg("宸插彇娑�");
});
};
+
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/afterSalesService/exportTwo", {}, "鍞悗澶勭悊.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getList();
});
diff --git a/src/views/customerService/feedbackRegistration/index.vue b/src/views/customerService/feedbackRegistration/index.vue
index 780de93..0825aac 100644
--- a/src/views/customerService/feedbackRegistration/index.vue
+++ b/src/views/customerService/feedbackRegistration/index.vue
@@ -23,6 +23,7 @@
</div>
<div>
<el-button type="primary" @click="openForm('add')">鏂板</el-button>
+ <el-button @click="handleOut">瀵煎嚭</el-button>
<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
</div>
</div>
@@ -44,7 +45,7 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
-import {onMounted, ref} from "vue";
+import {onMounted, ref, getCurrentInstance, nextTick} from "vue";
import FormDia from "@/views/customerService/feedbackRegistration/components/formDia.vue";
import {ElMessageBox} from "element-plus";
import {afterSalesServiceDelete, afterSalesServiceListPage} from "@/api/customerService/index.js";
@@ -202,6 +203,22 @@
proxy.$modal.msg("宸插彇娑�");
});
};
+
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/afterSalesService/export", {}, "鍙嶉鐧昏.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getList();
});
diff --git a/src/views/lavorissue/ledger/index.vue b/src/views/lavorissue/ledger/index.vue
index 6b7e5a8..19d0e59 100644
--- a/src/views/lavorissue/ledger/index.vue
+++ b/src/views/lavorissue/ledger/index.vue
@@ -32,7 +32,7 @@
<div></div>
<div>
<el-button type="primary" @click="add" icon="Plus"> 鏂板 </el-button>
-<!-- <el-button @click="handleOut" icon="download">瀵煎嚭</el-button>-->
+ <el-button @click="handleOut" icon="download">瀵煎嚭</el-button>
<el-button
type="danger"
icon="Delete"
@@ -263,7 +263,7 @@
type: "warning",
})
.then(() => {
- proxy.download(`/lavorIssue/exportCopy`, {season: filters.season}, "鍔充繚鍙拌处.xlsx");
+ proxy.download(`/lavorIssue/export`, {}, "鍔充繚鍙拌处.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
diff --git a/src/views/reportAnalysis/projectProfit/index.vue b/src/views/reportAnalysis/projectProfit/index.vue
index c987e3c..1aa36c1 100644
--- a/src/views/reportAnalysis/projectProfit/index.vue
+++ b/src/views/reportAnalysis/projectProfit/index.vue
@@ -7,6 +7,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">
@@ -29,7 +30,10 @@
<script setup>
import { usePaginationApi } from "@/hooks/usePaginationApi";
import { getPurchaseList } from "@/api/procurementManagement/projectProfit";
-import { onMounted } from "vue";
+import { onMounted, getCurrentInstance } from "vue";
+import { ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
defineOptions({
name: "椤圭洰鍒╂鼎",
@@ -98,6 +102,21 @@
onCurrentChange(page);
};
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/purchase/report/export", {}, "椤圭洰鍒╂鼎.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getTableData();
});
diff --git a/src/views/reportAnalysis/taxComparison/index.vue b/src/views/reportAnalysis/taxComparison/index.vue
index a97ca4f..d27ab07 100644
--- a/src/views/reportAnalysis/taxComparison/index.vue
+++ b/src/views/reportAnalysis/taxComparison/index.vue
@@ -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: "澧炲�肩◣姣斿",
@@ -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