From 8a3bfdab689684fe5ee19b2f69842e450fc7c60a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 30 一月 2026 14:02:39 +0800
Subject: [PATCH] fix: 完成生产数据分析页面

---
 src/views/procurementManagement/procurementReport/index.vue |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/views/procurementManagement/procurementReport/index.vue b/src/views/procurementManagement/procurementReport/index.vue
index 8c8f3f6..adf554d 100644
--- a/src/views/procurementManagement/procurementReport/index.vue
+++ b/src/views/procurementManagement/procurementReport/index.vue
@@ -73,12 +73,14 @@
 </template>
 
 <script setup>
-import { ref, reactive, onMounted } from 'vue'
+import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
 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 { productTreeList } from '@/api/basicData/product'
+
+const { proxy } = getCurrentInstance()
 
 // 鍝嶅簲寮忔暟鎹�
 const loading = ref(false)
@@ -103,12 +105,10 @@
   {
     label: '浜у搧澶х被',
     prop: 'productCategory',
-    width: 150,
   },
   {
     label: '瑙勬牸鍨嬪彿',
     prop: 'specificationModel',
-    width: 180
   },
   {
     label: '閲囪喘鏁伴噺',
@@ -121,7 +121,6 @@
   {
     label: '閲囪喘閲戦',
     prop: 'purchaseAmount',
-    width: 140,
     formatData: (val) => {
       return val ? `楼${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '楼0.00'
     }
@@ -142,7 +141,6 @@
   {
     label: '渚涘簲鍟嗗悕绉�',
     prop: 'supplierName',
-    width: 200
   },
   {
     label: '褰曞叆鏃ユ湡',
@@ -273,7 +271,23 @@
 }
 
 const exportReport = () => {
-  ElMessage.success('瀵煎嚭鍔熻兘寮�鍙戜腑...')
+  const params = {}
+  
+  // 鏃堕棿鑼冨洿
+  if (searchForm.dateRange && searchForm.dateRange.length === 2) {
+    params.entryDateStart = searchForm.dateRange[0]
+    params.entryDateEnd = searchForm.dateRange[1]
+  }
+  
+  // 浜у搧绫诲埆
+  if (searchForm.productCategory) {
+    const categoryName = findNodeLabelById(productOptions.value, searchForm.productCategory)
+    if (categoryName) {
+      params.productCategory = categoryName
+    }
+  }
+  
+  proxy.download("/procurementBusinessSummary/export", params, "閲囪喘涓氬姟姹囨�昏〃.xlsx")
 }
 
 

--
Gitblit v1.9.3