From 7b60f24e07f54634503e5b37e6ca5f85d4ad743f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 07 八月 2026 15:41:39 +0800
Subject: [PATCH] 天津_建诚恒商贸 1.备件管理-新增独立备件出库功能入口,支持直接完成备件领用出库操作。 2.设备保养-支持按日期分组折叠展示,分组条目可展开查看明细;单条明细行末尾增加【保养完成】操作按钮,可单独办结单条保养任务;折叠汇总状态下,新增【一键保养完成】批量操作按钮,快速办结当前分组全部保养项。 3.设备巡检-按日期分组折叠展示,分组支持展开查看明细;每条巡检明细后增设【巡检完成】按钮,支持单独办结单条巡检记录;分组折叠未展开状态下,提供【一键巡检完成】批量操作,统一办结该分组下所有巡检任务。 4.增值税对比-优化数据展示逻辑,列表展示各订单增值税明细;页面右侧新增柱状可视化图表,直观对比进销项增值税数据。 5.管理驾驶舱-指标修改:将顶部「销售产品数」调整为「销售订单数」;时间筛选:页面左上角新增日期范围下拉筛选控件,所有统计指标标注当前筛选时段;

---
 src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue |   53 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
index 3b04ffa..3a06632 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
@@ -23,11 +23,12 @@
 </template>
 
 <script setup>
-import { ref, onMounted } from 'vue'
+import { ref, onMounted, inject, watch } from 'vue'
 import * as echarts from 'echarts'
 import Echarts from '@/components/Echarts/echarts.vue'
 import PanelHeader from './PanelHeader.vue'
 import ProductTypeSwitch from './ProductTypeSwitch.vue'
+import { productInOutAnalysis } from '@/api/viewIndex.js'
 
 const productType = ref(1) // 1=鍘熸潗鏂� 2=鍗婃垚鍝� 3=鎴愬搧
 
@@ -50,17 +51,17 @@
   itemHeight: 12,
   textStyle: { color: '#B8C8E0', fontSize: 14 },
   data: [
-    { name: '鍑哄簱', itemStyle: { color: '#4EE4FF' } },
-    { name: '鍏ュ簱', itemStyle: { color: '#00D68F' } },
+    { name: '鍑哄簱', itemStyle: { color: 'rgba(11, 137, 254, 1)' } },
+    { name: '鍏ュ簱', itemStyle: { color: 'rgba(11, 249, 254, 1)' } },
   ],
 }
 
 const xAxis1 = ref([
   {
     type: 'category',
-    data: ['6/9', '6/10', '6/11', '6/12', '6/13', '6/14', '6/15'],
+    data: [],
     axisTick: { show: false },
-    axisLine: { show: false,lineStyle: { color: 'rgba(184, 200, 224, 0.3)' } },
+    axisLine: { show: false, lineStyle: { color: 'rgba(184, 200, 224, 0.3)' } },
     axisLabel: { color: '#B8C8E0', fontSize: 12 },
     splitLine: { show: false, lineStyle: { type: 'dashed', color: 'rgba(184, 200, 224, 0.2)' } },
   },
@@ -74,7 +75,7 @@
     axisLine: { show: false },
     axisTick: { show: false },
     axisLabel: { color: '#B8C8E0', fontSize: 12 },
-    splitLine: { lineStyle: {  color: '#B8C8E0' } },
+    splitLine: { lineStyle: { color: '#B8C8E0' } },
   },
 ]
 
@@ -86,7 +87,7 @@
     showSymbol: true,
     symbol: 'circle',
     symbolSize: 8,
-    lineStyle: { color: 'rgba(11, 137, 254,1', width: 2 },
+    lineStyle: { color: 'rgba(11, 137, 254, 1)', width: 2 },
     itemStyle: { color: 'rgba(11, 137, 254, 1)', borderWidth: 0 },
     areaStyle: {
       color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -94,7 +95,7 @@
         { offset: 1, color: 'rgba(11, 137, 254, 0.05)' },
       ]),
     },
-    data: [80, 100, 140, 160, 120, 150, 180],
+    data: [],
     emphasis: { focus: 'series' },
   },
   {
@@ -104,7 +105,6 @@
     showSymbol: true,
     symbol: 'circle',
     symbolSize: 8,
-    
     lineStyle: { color: 'rgba(11, 249, 254, 1)', width: 2 },
     itemStyle: { color: 'rgba(11, 249, 254, 1)', borderWidth: 0 },
     areaStyle: {
@@ -113,7 +113,7 @@
         { offset: 1, color: 'rgba(11, 249, 254, 0.05)' },
       ]),
     },
-    data: [160, 200, 200, 200, 170, 200, 200],
+    data: [],
     emphasis: { focus: 'series' },
   },
 ])
@@ -132,11 +132,38 @@
   },
 }
 
-const handleFilterChange = () => {
-  // 鍙寜 productType 鍒囨崲鍚庤姹傚嚭鍏ュ簱鎺ュ彛锛屾澶勪粎棰勭暀
+const dateRange = inject('psiDateRange', null)
+
+const fetchData = () => {
+  const params = { type: productType.value, ...(dateRange?.value || {}) }
+  productInOutAnalysis(params)
+    .then((res) => {
+      if (res.code === 200 && Array.isArray(res.data)) {
+        const list = res.data
+        xAxis1.value[0].data = list.map((d) => d.date)
+        lineSeries.value[0].data = list.map((d) => Number(d.outCount) || 0)
+        lineSeries.value[1].data = list.map((d) => Number(d.inCount) || 0)
+      }
+    })
+    .catch((err) => {
+      console.error('鑾峰彇浜у搧鍑哄叆搴撳垎鏋愬け璐�:', err)
+    })
 }
 
-onMounted(() => {})
+const handleFilterChange = () => {
+  fetchData()
+}
+
+const dataDashboardRefreshTick = inject('dataDashboardRefreshTick', null)
+if (dataDashboardRefreshTick) {
+  watch(dataDashboardRefreshTick, () => {
+    fetchData()
+  })
+}
+
+onMounted(() => {
+  fetchData()
+})
 </script>
 
 <style scoped>

--
Gitblit v1.9.3