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 |   44 +++++++++++++++++++++++++++++++++-----------
 1 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/src/views/procurementManagement/paymentHistory/index.vue b/src/views/procurementManagement/paymentHistory/index.vue
index aa64726..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,27 +42,29 @@
         >
           鎼滅储
         </el-button>
+        <el-button @click="handleExport">瀵煎嚭</el-button>
       </el-form-item>
     </el-form>
     <div class="table_list">
       <PIMTable
+        rowKey="id"
         :column="tableColumn"
         :tableData="tableData"
         :page="page"
         :isSelection="true"
         :isShowSummary="isShowSummarySon"
         :summaryMethod="summarizeMainTable1"
-        :handleSelectionChange="handleSelectionChange"
+        @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";
@@ -62,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;
     },
   },
   {
@@ -95,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,
 });
 
 // 鏌ヨ鍒楄〃
@@ -124,7 +140,7 @@
   paymentHistoryListPage({ ...rest, ...page }).then((res) => {
     tableLoading.value = false;
     tableData.value = res.records;
-    total.value = res.total;
+		page.total = res.total;
   });
 };
 // 瀛愯〃鍚堣鏂规硶
@@ -154,6 +170,12 @@
   getList();
 };
 
+// 瀵煎嚭
+const handleExport = () => {
+  const { paymentDate, ...rest } = searchForm;
+  proxy.download("/purchase/paymentRegistration/export", { ...rest, ...page }, "浠樻娴佹按.xlsx");
+};
+
 onMounted(() => {
   getList();
 });

--
Gitblit v1.9.3