From 3f15d0eef89e52f3fd6d1be13ff3af010b6f0ee9 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 05 十一月 2025 15:27:44 +0800
Subject: [PATCH] 录入日期改为可选择
---
src/views/procurementManagement/paymentHistory/index.vue | 41 +++++++++++++++++++++++++++++++----------
1 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/src/views/procurementManagement/paymentHistory/index.vue b/src/views/procurementManagement/paymentHistory/index.vue
index 58e5f92..c38b4b0 100644
--- a/src/views/procurementManagement/paymentHistory/index.vue
+++ b/src/views/procurementManagement/paymentHistory/index.vue
@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="searchForm" :inline="true">
+ <el-form-item label="閲囪喘鍚堝悓鍙�">
+ <el-input
+ v-model="searchForm.purchaseContractNumber"
+ style="width: 240px"
+ placeholder="杈撳叆閲囪喘鍚堝悓鍙锋悳绱�"
+ @change="handleQuery"
+ clearable
+ :prefix-icon="Search"
+ />
+ </el-form-item>
<el-form-item label="渚涘簲鍟嗗悕绉�">
<el-input
v-model="searchForm.searchText"
@@ -32,6 +42,7 @@
>
鎼滅储
</el-button>
+ <el-button @click="handleExport">瀵煎嚭</el-button>
</el-form-item>
</el-form>
<div class="table_list">
@@ -46,14 +57,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,18 +74,23 @@
const isShowSummarySon = ref(true);
const tableColumn = ref([
{
+ label: "閲囪喘鍚堝悓鍙�",
+ prop: "purchaseContractNumber",
+ },
+ {
label: "浠樻鏃ユ湡",
prop: "paymentDate",
},
{
label: "渚涘簲鍟嗗悕绉�",
prop: "supplierName",
+ width:240
},
{
label: "浠樻閲戦",
prop: "currentPaymentAmount",
formatData: (params) => {
- return parseFloat(params).toFixed(2);
+ return params ? parseFloat(params).toFixed(2) : 0;
},
},
{
@@ -96,16 +112,15 @@
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"),
+ purchaseContractNumber: undefined,
+ paymentDate: [],
+ paymentDateStart: undefined,
+ paymentDateEnd: undefined,
});
// 鏌ヨ鍒楄〃
@@ -125,7 +140,7 @@
paymentHistoryListPage({ ...rest, ...page }).then((res) => {
tableLoading.value = false;
tableData.value = res.records;
- total.value = res.total;
+ page.total = res.total;
});
};
// 瀛愯〃鍚堣鏂规硶
@@ -155,6 +170,12 @@
getList();
};
+// 瀵煎嚭
+const handleExport = () => {
+ const { paymentDate, ...rest } = searchForm;
+ proxy.download("/purchase/paymentRegistration/export", { ...rest, ...page }, "浠樻娴佹按.xlsx");
+};
+
onMounted(() => {
getList();
});
--
Gitblit v1.9.3