From 16fcc7852de365daf6d8ffed2f33899827b16153 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 24 四月 2026 09:24:14 +0800
Subject: [PATCH] fix: 隐藏退货相关信息,采购报表调整

---
 src/views/procurementManagement/procurementReport/index.vue |   68 +++++++++++++++++-----------------
 1 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/src/views/procurementManagement/procurementReport/index.vue b/src/views/procurementManagement/procurementReport/index.vue
index 93eb7d9..225e38d 100644
--- a/src/views/procurementManagement/procurementReport/index.vue
+++ b/src/views/procurementManagement/procurementReport/index.vue
@@ -56,7 +56,7 @@
             </div>
             <div class="stat-item">
               <span class="stat-label">閫�娆炬�婚锛�</span>
-              <span class="stat-value">{{ businessSummaryStats.returnAmount }}</span>
+              <span class="stat-value">楼{{ businessSummaryStats.returnAmount.toLocaleString() }}</span>
             </div>
           </div>
         </div>
@@ -81,7 +81,7 @@
 import { ElMessage } from 'element-plus'
 import { Download } from '@element-plus/icons-vue'
 import PIMTable from '@/components/PIMTable/PIMTable.vue'
-import { procurementBusinessSummaryListPage } from '@/api/procurementManagement/procurementReport'
+import { procurementBusinessSummaryListPage, procurementBusinessSummaryStatistics } from '@/api/procurementManagement/procurementReport'
 import { productTreeList } from '@/api/basicData/product'
 
 const { proxy } = getCurrentInstance()
@@ -101,7 +101,8 @@
 // 缁熻鏁版嵁
 const businessSummaryStats = ref({
   totalAmount: 0,
-  productTypes: 0
+  productTypes: 0,
+  returnAmount: 0
 })
 
 // 琛ㄦ牸鍒楅厤缃紙鏍规嵁鍚庣瀛楁瀹氫箟锛�
@@ -115,6 +116,10 @@
     prop: 'specificationModel',
   },
   {
+    label: '鍘氬害(mm)',
+    prop: 'thickness',
+  },
+  {
     label: '閲囪喘鏁伴噺',
     prop: 'purchaseNum',
     width: 120,
@@ -122,24 +127,24 @@
       return val ? parseFloat(val).toLocaleString() : '0'
     }
   },
+  // {
+  //   label: '閫�璐ф暟閲�',
+  //   prop: 'returnQuantity',
+  //   width: 120,
+  //   formatData: (val) => {
+  //     return val ? parseFloat(val).toLocaleString() : '0'
+  //   }
+  // },
+  // {
+  //   label: '閫�璐ч噾棰�',
+  //   prop: 'returnAmount',
+  //   width: 120,
+  //   formatData: (val) => {
+  //     return val ? `楼${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '楼0.00'
+  //   }
+  // },
   {
-    label: '閫�璐ф暟閲�',
-    prop: 'returnQuantity',
-    width: 120,
-    formatData: (val) => {
-      return val ? parseFloat(val).toLocaleString() : '0'
-    }
-  },
-  {
-    label: '閫�璐ч噾棰�',
-    prop: 'returnAmount',
-    width: 120,
-    formatData: (val) => {
-      return val ? `楼${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '楼0.00'
-    }
-  },
-  {
-    label: '閫�娆惧偍閲�',
+    label: '璐拱閲戦',
     prop: 'purchaseAmount',
     formatData: (val) => {
       return val ? `楼${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '楼0.00'
@@ -253,20 +258,15 @@
         page.current = Number(res.data.current ?? page.current)
         page.size = Number(res.data.size ?? page.size)
       }
-      
-      // 璁$畻缁熻鏁版嵁
-      if (businessSummaryData.value.length > 0) {
-        businessSummaryStats.value.totalAmount = businessSummaryData.value.reduce((sum, item) => {
-          return sum + (parseFloat(item.purchaseAmount) || 0)
-        }, 0)
-        businessSummaryStats.value.returnAmount = businessSummaryData.value.reduce((sum, item) => {
-          return sum + (parseFloat(item.returnAmount) || 0)
-        }, 0)
-      } else {
-        businessSummaryStats.value = {
-          totalAmount: 0,
-          productTypes: 0
-        }
+    }
+
+    // 鑾峰彇缁熻鏁版嵁
+    const statsRes = await procurementBusinessSummaryStatistics(params)
+    if (statsRes && statsRes.data) {
+      businessSummaryStats.value = {
+        totalAmount: statsRes.data.purchaseTotalAmount || 0,
+        productTypes: statsRes.data.productCategoryCount || 0,
+        returnAmount: statsRes.data.returnTotalAmount || 0
       }
     }
   } catch (error) {

--
Gitblit v1.9.3