From 6a415a072a98d64d2f95d16eef73b6d7270b8d56 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 30 五月 2026 15:14:25 +0800
Subject: [PATCH] 新疆马铃薯 1.首页问题:挪新系统ui,需要确认一下页面数据完整。 2.协同办公:挪新系统 3.营销管理:客户往来取消回款金额字段,改为点击左侧客户时显示与该客户的所有订单信息,以及发货情况。销售可以选好对应的采购订单方便质量追溯。 4.采购管理:供应商往来同上逻辑,显示是否收货,也加上采购退货和采购报表功能。 5.采购加上设备备件选项,设备备件入库到备件库存。设备,仓储不足时做采购提醒。 6.仓储物流:得区分成品库和原料库(不存在半成品,成品只有一个产品,很好确认),原材料需要有批号,采集原料库需要做好仓库字段,让他们可以区分哪个仓库,然后把数采设备信息做一个实时的显示。总库存显示好当前存在的批次信息。 7.质量:只有不通过才需要填写对应的数据信息。在外侧做好选择通过不通过。过程,出厂检验无法对应到生产订单,那就对应到销售订单。 8.决策分析:基础数据分析和进销存分析,质量数据分析需要重新设计

---
 src/views/procurementManagement/paymentLedger/index.vue |  204 ++++++++++++++++++++++++++-------------------------
 1 files changed, 104 insertions(+), 100 deletions(-)

diff --git a/src/views/procurementManagement/paymentLedger/index.vue b/src/views/procurementManagement/paymentLedger/index.vue
index 99b4b39..ba84a4c 100644
--- a/src/views/procurementManagement/paymentLedger/index.vue
+++ b/src/views/procurementManagement/paymentLedger/index.vue
@@ -17,7 +17,7 @@
       <div></div>
     </div>
     <el-row :gutter="20">
-      <el-col :span="14">
+      <el-col :span="8">
         <div class="table_list">
           <el-table ref="multipleTable"
                     border
@@ -42,10 +42,6 @@
                              prop="contractAmounts"
                              show-overflow-tooltip
                              :formatter="formattedNumber" />
-            <el-table-column label="浠樻閲戦(鍏�)"
-                             prop="paymentAmount"
-                             show-overflow-tooltip
-                             :formatter="formattedNumber" />
             <el-table-column label="搴斾粯閲戦(鍏�)"
                              prop="payableAmount"
                              show-overflow-tooltip>
@@ -64,25 +60,54 @@
                       :limit="page.size" />
         </div>
       </el-col>
-      <el-col :span="10">
+      <el-col :span="16">
         <div class="table_list">
-          <PIMTable rowKey="id"
-                    :column="tableColumnSon"
-                    :tableData="originalTableDataSon"
-                    :isSelection="false"
-                    :isShowPagination="true"
-                    :page="sonPage"
-                    :tableLoading="tableLoadingSon"
-                    :isShowSummary="isShowSummarySon"
-                    :summaryMethod="summarizeMainTable1"
-                    height="calc(100vh - 18.5em)"
-                    @pagination="sonPaginationSearch">
-            <template #payableAmountSlot="{ row }">
-              <el-text type="danger">
-                {{ parseFloat(row.payableAmount).toFixed(2) }}
-              </el-text>
-            </template>
-          </PIMTable>
+          <div class="table-header" v-if="selectedSupplierName">
+            <span class="supplier-title">渚涘簲鍟嗭細{{ selectedSupplierName }}</span>
+          </div>
+          <el-table border
+                    v-loading="tableLoadingSon"
+                    :data="originalTableDataSon"
+                    :header-cell-style="{ background: '#F0F1F5', color: '#333333' }"
+                    height="calc(100vh - 20em)"
+                    style="width: 100%"
+                    tooltip-effect="dark"
+                    :show-summary="isShowSummarySon"
+                    :summary-method="summarizeMainTable1">
+            <el-table-column align="center"
+                             label="搴忓彿"
+                             type="index"
+                             width="60" />
+            <el-table-column label="鍚堝悓绛捐鏃ユ湡"
+                             prop="executionDate"
+                             show-overflow-tooltip/>
+            <el-table-column label="閲囪喘鍚堝悓鍙�"
+                             prop="purchaseContractNumber"
+                             show-overflow-tooltip/>
+            <el-table-column label="椤圭洰鍚嶇О"
+                             prop="projectName"
+                             show-overflow-tooltip/>
+            <el-table-column label="鍚堝悓閲戦(鍏�)"
+                             prop="contractAmount"
+                             show-overflow-tooltip
+                             :formatter="formattedNumber" />
+            <el-table-column label="鏀惰揣鐘舵��"
+                             prop="status"
+                             show-overflow-tooltip
+                             width="100">
+              <template #default="{ row }">
+                <el-tag :type="getReceiptStatusType(row.status)" size="small">
+                  {{ receiptStatusText[row.status] || '鏈煡鐘舵��' }}
+                </el-tag>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination v-show="sonPage.total > 0"
+                      @pagination="sonPaginationSearch"
+                      :total="sonPage.total"
+                      :layout="sonPage.layout"
+                      :page="sonPage.current"
+                      :limit="sonPage.size" />
         </div>
       </el-col>
     </el-row>
@@ -90,12 +115,12 @@
 </template>
 
 <script setup>
-  import { ref, toRefs } from "vue";
+  import { ref, toRefs, reactive, getCurrentInstance } from "vue";
   import { Search } from "@element-plus/icons-vue";
   import {
     paymentLedgerList,
-    paymentRecordList,
   } from "@/api/procurementManagement/paymentLedger.js";
+  import { gePurchaseListPage } from "@/api/procurementManagement/invoiceEntry.js";
   import Pagination from "../../../components/PIMTable/Pagination.vue";
 
   const tableData = ref([]);
@@ -119,48 +144,13 @@
   const isShowSummary = ref(true);
   const { searchForm } = toRefs(data);
   const currentSupplierId = ref("");
+  const selectedSupplierName = ref("");
   const rowClick = row => {
     currentSupplierId.value = row.supplierId;
+    selectedSupplierName.value = row.supplierName;
     sonPage.current = 1;
-    getPaymenRecordtList(row.supplierId);
+    getPurchaseList(row.supplierName);
   };
-  // 瀛愭ā鍧�
-  const tableColumnSon = ref([
-    {
-      label: "鍚堝悓绛捐鏃ユ湡",
-      prop: "executionDate",
-      width: 110,
-    },
-    {
-      label: "閲囪喘鍚堝悓鍙�",
-      prop: "purchaseContractNumber",
-      width: 150,
-    },
-    {
-      label: "鍚堝悓閲戦(鍏�)",
-      prop: "contractAmount",
-      width: 200,
-      formatData: params => {
-        return params ? parseFloat(params).toFixed(2) : 0;
-      },
-    },
-    {
-      label: "浠樻閲戦(鍏�)",
-      prop: "paymentAmount",
-      width: 200,
-      formatData: params => {
-        return params ? parseFloat(params).toFixed(2) : 0;
-      },
-    },
-    {
-      label: "搴斾粯閲戦(鍏�)",
-      dataType: "slot",
-      width: 200,
-      prop: "payableAmount",
-      slot: "payableAmountSlot",
-    },
-  ]);
-  const tableDataSon = ref([]);
   const originalTableDataSon = ref([]);
   const tableLoadingSon = ref(false);
   const isShowSummarySon = ref(true);
@@ -170,32 +160,23 @@
   const summarizeMainTable = param => {
     return proxy.summarizeTable(
       param,
-      ["contractAmounts", "paymentAmount", "payableAmount"],
+      ["contractAmounts", "payableAmount"],
       {
-        ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
-        futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+        ticketsNum: { noDecimal: true },
+        futureTickets: { noDecimal: true },
       }
     );
   };
   // 瀛愯〃鍚堣鏂规硶
   const summarizeMainTable1 = param => {
-    let summarizeTable = proxy.summarizeTable(
+    return proxy.summarizeTable(
       param,
-      ["contractAmount", "invoiceAmount", "paymentAmount"],
+      ["contractAmount"],
       {
-        ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
-        futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+        ticketsNum: { noDecimal: true },
+        futureTickets: { noDecimal: true },
       }
     );
-    if (originalTableDataSon.value.length > 0) {
-      summarizeTable[summarizeTable.length - 1] =
-        originalTableDataSon.value[
-          originalTableDataSon.value.length - 1
-        ].payableAmount.toFixed(2);
-    } else {
-      summarizeTable[summarizeTable.length - 1] = 0.0;
-    }
-    return summarizeTable;
   };
   /** 鎼滅储鎸夐挳鎿嶄綔 */
   const handleQuery = () => {
@@ -219,16 +200,20 @@
       total.value = result.total || 0;
       if (tableData.value.length > 0) {
         currentSupplierId.value = tableData.value[0].supplierId;
+        selectedSupplierName.value = tableData.value[0].supplierName;
         sonPage.current = 1;
-        getPaymenRecordtList(tableData.value[0].supplierId);
+        getPurchaseList(tableData.value[0].supplierName);
+      } else {
+        originalTableDataSon.value = [];
+        selectedSupplierName.value = "";
       }
     });
   };
 
-  const getPaymenRecordtList = supplierId => {
+  const getPurchaseList = supplierName => {
     tableLoadingSon.value = true;
-    paymentRecordList({
-      supplierId: supplierId,
+    gePurchaseListPage({
+      supplierName: supplierName,
       current: sonPage.current,
       size: sonPage.size,
     })
@@ -236,9 +221,8 @@
         tableLoadingSon.value = false;
         let result = res.data;
         if (Array.isArray(result)) {
-          tableDataSon.value = result;
+          originalTableDataSon.value = result;
           sonPage.total = result.length;
-          handlePagination({ page: sonPage.current, limit: sonPage.size });
         } else {
           originalTableDataSon.value = result.records || [];
           sonPage.total = result.total || 0;
@@ -248,30 +232,37 @@
         tableLoadingSon.value = false;
       });
   };
-  const handlePagination = ({ page, limit }) => {
-    console.log(page, limit);
-    sonPage.current = page;
-    sonPage.size = limit;
-
-    const start = (page - 1) * limit;
-    const end = start + limit;
-
-    originalTableDataSon.value = tableDataSon.value.slice(start, end);
-  };
 
   const sonPaginationSearch = pagination => {
-    // 鎺ユ敹鍒嗛〉鍣ㄥ弬鏁� { page, limit }
     sonPage.current = pagination.page;
     sonPage.size = pagination.limit;
-    getPaymenRecordtList(currentSupplierId.value);
+    getPurchaseList(selectedSupplierName.value);
   };
+
   const formattedNumber = (row, column, cellValue) => {
-    if (column.property !== "supplierName") {
+    if (cellValue !== undefined && cellValue !== null && !isNaN(cellValue)) {
       return parseFloat(cellValue).toFixed(2);
-    } else {
-      return cellValue;
     }
+    return "0.00";
   };
+
+  // 鏀惰揣鐘舵�佹枃鏈槧灏�
+  const receiptStatusText = {
+    1: '寰呮敹璐�',
+    2: '鏀惰揣涓�',
+    3: '宸叉敹璐�'
+  };
+
+  // 鏀惰揣鐘舵�佹爣绛剧被鍨�
+  const getReceiptStatusType = (status) => {
+    const typeMap = {
+      1: 'info',
+      2: 'warning',
+      3: 'success'
+    };
+    return typeMap[status] || 'info';
+  };
+
   getList();
 </script>
 
@@ -291,4 +282,17 @@
   .pagination-container {
     margin-top: 0;
   }
+
+  .table-header {
+    margin-bottom: 10px;
+    padding: 10px;
+    background-color: #f5f7fa;
+    border-radius: 4px;
+
+    .supplier-title {
+      font-weight: bold;
+      font-size: 14px;
+      color: #303133;
+    }
+  }
 </style>

--
Gitblit v1.9.3