From 3739a47340c8d8b6edf5fdcbb0534f5fc8d96530 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 29 一月 2026 15:02:38 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/procurementManagement/procurementReport/index.vue | 33 ++++++++++++++++++++++-----------
1 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/src/views/procurementManagement/procurementReport/index.vue b/src/views/procurementManagement/procurementReport/index.vue
index 60a900d..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)
@@ -95,8 +97,7 @@
// 缁熻鏁版嵁
const businessSummaryStats = ref({
totalAmount: 0,
- productTypes: 0,
- supplierCount: 0
+ productTypes: 0
})
// 琛ㄦ牸鍒楅厤缃紙鏍规嵁鍚庣瀛楁瀹氫箟锛�
@@ -104,12 +105,10 @@
{
label: '浜у搧澶х被',
prop: 'productCategory',
- width: 150,
},
{
label: '瑙勬牸鍨嬪彿',
prop: 'specificationModel',
- width: 180
},
{
label: '閲囪喘鏁伴噺',
@@ -122,7 +121,6 @@
{
label: '閲囪喘閲戦',
prop: 'purchaseAmount',
- width: 140,
formatData: (val) => {
return val ? `楼${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '楼0.00'
}
@@ -143,7 +141,6 @@
{
label: '渚涘簲鍟嗗悕绉�',
prop: 'supplierName',
- width: 200
},
{
label: '褰曞叆鏃ユ湡',
@@ -243,12 +240,10 @@
return sum + (parseFloat(item.purchaseAmount) || 0)
}, 0)
businessSummaryStats.value.productTypes = new Set(businessSummaryData.value.map(item => item.productCategory)).size
- businessSummaryStats.value.supplierCount = new Set(businessSummaryData.value.map(item => item.supplierName).filter(Boolean)).size
} else {
businessSummaryStats.value = {
totalAmount: 0,
- productTypes: 0,
- supplierCount: 0
+ productTypes: 0
}
}
}
@@ -276,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