From 84e3953ec23a393fdfdadb21463ed502a494e27f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 31 十月 2025 16:22:28 +0800
Subject: [PATCH] 采购管理-添加导出功能
---
src/views/procurementManagement/paymentHistory/index.vue | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/src/views/procurementManagement/paymentHistory/index.vue b/src/views/procurementManagement/paymentHistory/index.vue
index 8811129..62ac579 100644
--- a/src/views/procurementManagement/paymentHistory/index.vue
+++ b/src/views/procurementManagement/paymentHistory/index.vue
@@ -32,6 +32,7 @@
>
鎼滅储
</el-button>
+ <el-button @click="handleExport">瀵煎嚭</el-button>
</el-form-item>
</el-form>
<div class="table_list">
@@ -46,14 +47,14 @@
@selection-change="handleSelectionChange"
:tableLoading="tableLoading"
@pagination="pagination"
- :total="total"
+ :total="page.total"
></PIMTable>
</div>
</div>
</template>
<script setup>
-import { ref } from "vue";
+import { ref, reactive, getCurrentInstance, onMounted } from "vue";
import { Search } from "@element-plus/icons-vue";
import { paymentHistoryListPage } from "@/api/procurementManagement/paymentEntry.js";
import useFormData from "@/hooks/useFormData";
@@ -63,12 +64,17 @@
const isShowSummarySon = ref(true);
const tableColumn = ref([
{
+ label: "閲囪喘鍚堝悓鍙�",
+ prop: "purchaseContractNumber",
+ },
+ {
label: "浠樻鏃ユ湡",
prop: "paymentDate",
},
{
label: "渚涘簲鍟嗗悕绉�",
prop: "supplierName",
+ width:240
},
{
label: "浠樻閲戦",
@@ -96,16 +102,14 @@
const page = reactive({
current: 1,
size: 100,
+ total: 0,
});
const total = ref(0);
const { form: searchForm } = useFormData({
searchText: undefined,
- paymentDate: [
- dayjs().startOf("month").format("YYYY-MM-DD"),
- dayjs().endOf("month").format("YYYY-MM-DD"),
- ],
- paymentDateStart: dayjs().startOf("month").format("YYYY-MM-DD"),
- paymentDateEnd: dayjs().endOf("month").format("YYYY-MM-DD"),
+ paymentDate: [],
+ paymentDateStart: undefined,
+ paymentDateEnd: undefined,
});
// 鏌ヨ鍒楄〃
@@ -125,7 +129,7 @@
paymentHistoryListPage({ ...rest, ...page }).then((res) => {
tableLoading.value = false;
tableData.value = res.records;
- total.value = res.total;
+ page.total = res.total;
});
};
// 瀛愯〃鍚堣鏂规硶
@@ -155,6 +159,12 @@
getList();
};
+// 瀵煎嚭
+const handleExport = () => {
+ const { paymentDate, ...rest } = searchForm;
+ proxy.download("/purchase/paymentRegistration/export", { ...rest, ...page }, "浠樻娴佹按.xlsx");
+};
+
onMounted(() => {
getList();
});
--
Gitblit v1.9.3