From 376cab4afba8fd1b8be67cae067ed917462c2e16 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期四, 18 十二月 2025 09:05:12 +0800
Subject: [PATCH] 添加设备报修和保养附件管理功能,维修保养过程描述
---
src/views/reportAnalysis/projectProfit/index.vue | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/src/views/reportAnalysis/projectProfit/index.vue b/src/views/reportAnalysis/projectProfit/index.vue
index 82031bb..aff47b7 100644
--- a/src/views/reportAnalysis/projectProfit/index.vue
+++ b/src/views/reportAnalysis/projectProfit/index.vue
@@ -4,13 +4,18 @@
<el-form-item label="瀹㈡埛鍚嶇О">
<el-input v-model="filters.customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" />
</el-form-item>
+ <el-form-item label="椤圭洰鍚嶇О">
+ <el-input v-model="filters.projectName" placeholder="璇疯緭鍏�" clearable />
+ </el-form-item>
<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">
<PIMTable
+ rowKey="id"
:column="columns"
:tableLoading="loading"
:tableData="dataList"
@@ -19,7 +24,7 @@
size: pagination.pageSize,
total: pagination.total,
}"
- @pagination="onCurrentChange"
+ @pagination="changePage"
></PIMTable>
</div>
</div>
@@ -28,7 +33,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: "椤圭洰鍒╂鼎",
@@ -47,6 +55,7 @@
getPurchaseList,
{
customerName: undefined,
+ projectName: undefined,
},
[
{
@@ -92,6 +101,26 @@
]
);
+const changePage = ({ page }) => {
+ pagination.currentPage = page;
+ onCurrentChange(page);
+};
+
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/purchase/report/export", {}, "椤圭洰鍒╂鼎.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getTableData();
});
--
Gitblit v1.9.3