From b5be6d85c9927a378abca172ea6bef2933657f8e Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 29 六月 2026 14:35:08 +0800
Subject: [PATCH] 客户往来数据源修改

---
 src/pages/sales/receiptPaymentLedger/detail.vue |   59 ++++++++++++++++++++++++++++++++---------------------------
 1 files changed, 32 insertions(+), 27 deletions(-)

diff --git a/src/pages/sales/receiptPaymentLedger/detail.vue b/src/pages/sales/receiptPaymentLedger/detail.vue
index b494332..10aa9aa 100644
--- a/src/pages/sales/receiptPaymentLedger/detail.vue
+++ b/src/pages/sales/receiptPaymentLedger/detail.vue
@@ -11,16 +11,16 @@
         <text class="summary-value">{{ tableData.length }}</text>
       </view>
       <view class="summary-item">
-        <text class="summary-label">寮�绁ㄦ�婚噾棰�</text>
-        <text class="summary-value">{{ formatAmount(invoiceTotal) }}</text>
+        <text class="summary-label">鍚堝悓鎬婚噾棰�</text>
+        <text class="summary-value">{{ formatAmount(contractTotal) }}</text>
       </view>
       <view class="summary-item">
-        <text class="summary-label">鍥炴鎬婚噾棰�</text>
-        <text class="summary-value highlight">{{ formatAmount(receiptTotal) }}</text>
+        <text class="summary-label">宸插嚭搴撴�婚噾棰�</text>
+        <text class="summary-value highlight">{{ formatAmount(shippedTotal) }}</text>
       </view>
       <view class="summary-item">
-        <text class="summary-label">搴旀敹鎬婚噾棰�</text>
-        <text class="summary-value danger">{{ formatAmount(unReceiptTotal) }}</text>
+        <text class="summary-label">鏈嚭搴撴�婚噾棰�</text>
+        <text class="summary-value danger">{{ formatAmount(unshippedTotal) }}</text>
       </view>
     </view>
     <!-- 鍥炴璁板綍鏄庣粏鍒楄〃 -->
@@ -36,27 +36,27 @@
                        size="16"
                        color="#ffffff"></up-icon>
             </view>
-            <text class="item-index">{{ index + 1 }}</text>
+            <text class="item-index">{{ item.salesContractNo || index + 1 }}</text>
           </view>
-          <view class="item-date">{{ item.happenTime }}</view>
+          <view class="item-date">{{ item.executionDate || '-' }}</view>
         </view>
         <up-divider></up-divider>
         <view class="item-details">
           <view class="detail-row">
-            <text class="detail-label">寮�绁ㄩ噾棰�(鍏�)</text>
-            <text class="detail-value">{{ formatAmount(item.invoiceTotal) }}</text>
+            <text class="detail-label">鍚堝悓閲戦(鍏�)</text>
+            <text class="detail-value">{{ formatAmount(item.contractAmount) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">鍥炴閲戦(鍏�)</text>
-            <text class="detail-value highlight">{{ formatAmount(item.receiptPaymentAmount) }}</text>
+            <text class="detail-label">宸插嚭搴撻噾棰�(鍏�)</text>
+            <text class="detail-value highlight">{{ formatAmount(item.shippedAmount) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">搴旀敹閲戦(鍏�)</text>
-            <text class="detail-value danger">{{ formatAmount(item.unReceiptPaymentAmount) }}</text>
+            <text class="detail-label">鏈嚭搴撻噾棰�(鍏�)</text>
+            <text class="detail-value danger">{{ formatAmount(item.unshippedAmount) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">鍙戠敓鏃ユ湡</text>
-            <text class="detail-value">{{ item.receiptPaymentDate }}</text>
+            <text class="detail-label">閿�鍞悎鍚屽彿</text>
+            <text class="detail-value">{{ item.salesContractNo || '-' }}</text>
           </view>
         </view>
       </view>
@@ -71,7 +71,7 @@
 <script setup>
   import { ref, computed, onMounted } from "vue";
   import { onShow } from "@dcloudio/uni-app";
-  import { customerInteractions } from "@/api/salesManagement/receiptPayment.js";
+  import { customewTransactionsDetails } from "@/api/salesManagement/receiptPayment.js";
 
   // 瀹㈡埛淇℃伅
   const customerId = ref("");
@@ -79,21 +79,21 @@
   // 琛ㄦ牸鏁版嵁
   const tableData = ref([]);
 
-  const invoiceTotal = computed(() => {
+  const contractTotal = computed(() => {
     return tableData.value.reduce((sum, item) => {
-      return sum + (parseFloat(item.invoiceTotal) || 0);
+      return sum + (parseFloat(item.contractAmount) || 0);
     }, 0);
   });
 
-  const receiptTotal = computed(() => {
+  const shippedTotal = computed(() => {
     return tableData.value.reduce((sum, item) => {
-      return sum + (parseFloat(item.receiptPaymentAmount) || 0);
+      return sum + (parseFloat(item.shippedAmount) || 0);
     }, 0);
   });
 
-  const unReceiptTotal = computed(() => {
+  const unshippedTotal = computed(() => {
     return tableData.value.reduce((sum, item) => {
-      return sum + (parseFloat(item.unReceiptPaymentAmount) || 0);
+      return sum + (parseFloat(item.unshippedAmount) || 0);
     }, 0);
   });
 
@@ -125,13 +125,18 @@
     showLoadingToast("鍔犺浇涓�...");
     const param = {
       customerId: customerId.value,
-      current: -1,
-      size: -1,
+      current: 1,
+      size: 100,
     };
 
-    customerInteractions(param)
+    customewTransactionsDetails(param)
       .then(res => {
-        tableData.value = res.data;
+        const data = res?.data;
+        if (Array.isArray(data)) {
+          tableData.value = data;
+        } else {
+          tableData.value = data?.records || res?.records || [];
+        }
         closeToast();
       })
       .catch(() => {

--
Gitblit v1.9.3