From 1cf342fa23a6c34bd9dd1ff4e416cd255c044fdd Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 02 四月 2026 11:41:17 +0800
Subject: [PATCH] Merge branch 'dev_银川_中盛建材' of http://114.132.189.42:9002/r/product-inventory-management into dev_银川_中盛建材

---
 src/views/index.vue                                                    |  109 ++++++++++++++++++++++++++++++------
 src/views/productionManagement/productStructure/Detail/index.vue       |    2 
 src/views/productionManagement/processRoute/index.vue                  |    2 
 src/api/productionManagement/productionProcess.js                      |   13 ++--
 src/api/viewIndex.js                                                   |    7 ++
 src/views/productionManagement/processRoute/processRouteItem/index.vue |    4 
 src/views/productionManagement/processRoute/index2.vue                 |    2 
 7 files changed, 110 insertions(+), 29 deletions(-)

diff --git a/src/api/productionManagement/productionProcess.js b/src/api/productionManagement/productionProcess.js
index 4ec5c36..34e3e01 100644
--- a/src/api/productionManagement/productionProcess.js
+++ b/src/api/productionManagement/productionProcess.js
@@ -43,11 +43,12 @@
 }
 
 // 宸ュ簭鏌ヨ
-export function list() {
-    return request({
-        url: "/productProcess/list",
-        method: "get",
-    });
+export function list(query) {
+  return request({
+    url: "/productProcess/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 瀵煎叆鏁版嵁
@@ -69,7 +70,7 @@
 }
 
 // 鑾峰彇宸ュ簭鍙傛暟鍒楄〃
-export function getProcessParamList(processId,params) {
+export function getProcessParamList(processId, params) {
   return request({
     url: `/productProcessParam/list/${processId}`,
     method: "get",
diff --git a/src/api/viewIndex.js b/src/api/viewIndex.js
index 8b5d144..96bdc25 100644
--- a/src/api/viewIndex.js
+++ b/src/api/viewIndex.js
@@ -326,3 +326,10 @@
     method: "get",
   });
 };
+// 绠$悊缁熻
+export const getManageStatistics = () => {
+  return request({
+    url: "/home/manage",
+    method: "get",
+  });
+};
diff --git a/src/views/index.vue b/src/views/index.vue
index 2e8ed36..cf17886 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -75,7 +75,7 @@
                    :xAxis="salesAmountXAxis"
                    :yAxis="salesAmountYAxis"
                    :series="salesAmountSeries"
-                   style="height: 300px" />
+                   style="height: 90%" />
         </section>
       </div>
       <div class="right-col">
@@ -169,27 +169,51 @@
         <section class="section-card mini-table-wrap"
                  v-if="isSectionVisible('planTable')">
           <div class="section-title">鏈�杩戞姤宸�</div>
-          <el-table :data="planTable"
+          <el-table :data="reportingTable"
                     size="small"
-                    stripe>
-            <el-table-column prop="planNo"
-                             label="鐝"
+                    stripe
+                    :loading="reportingTableLoading">
+            <el-table-column prop="productNo"
+                             label="鎶ュ伐缂栧彿"
                              min-width="150" />
-            <el-table-column prop="product"
+            <el-table-column prop="schedule"
+                             label="鐝粍"
+                             min-width="80">
+              <template #default="{ row }">
+                <el-tag :type="row.schedule === '鐧界彮' ? 'primary' : 'warning'">{{ row.schedule || '-' }}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column prop="postName"
                              label="鍒涘缓浜�"
-                             min-width="120" />
-            <el-table-column prop="product"
+                             min-width="100" />
+            <el-table-column prop="createTime"
                              label="鎶ュ伐鏃堕棿"
-                             min-width="120" />
-            <el-table-column prop="qty"
+                             min-width="150">
+              <template #default="{ row }">
+                {{ row.createTime ? dayjs(row.createTime).format('YYYY-MM-DD HH:mm:ss') : '' }}
+              </template>
+            </el-table-column>
+            <el-table-column prop="productName"
                              label="浜у搧"
-                             min-width="90" />
-            <el-table-column prop="issued"
+                             min-width="120">
+              <template #default="{ row }">
+                <el-tag :type="row.productName === '鐮屽潡' ? 'primary' : 'warning'">{{ row.productName || '-' }}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column prop="totalQuantity"
                              label="鐢熶骇鏁伴噺"
-                             min-width="90" />
-            <el-table-column prop="issued"
+                             min-width="100">
+              <template #default="{ row }">
+                <span style="color:rgba(18, 148, 212, 0.8);">{{ row.totalQuantity || '-' }}</span> 鏂�
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity"
                              label="鍚堟牸鏁伴噺"
-                             min-width="90" />
+                             min-width="100">
+              <template #default="{ row }">
+                <span style="color:rgba(0, 228, 99, 0.8);">{{ row.quantity || '-' }}</span> 鏂�
+              </template>
+            </el-table-column>
           </el-table>
         </section>
       </div>
@@ -269,9 +293,12 @@
     processDataProductionStatistics,
     qualityInspectionStatistics,
     nonComplianceWarning,
+    getManageStatistics,
   } from "@/api/viewIndex.js";
   import { energyConsumptionDetailStatistics } from "@/api/energyManagement/energyType";
   import { getSalesAmountAnalysis } from "@/api/reportAnalysis/salesStatistics";
+  import { productionReportListPage } from "@/api/productionManagement/productionReporting.js";
+  import dayjs from "dayjs";
 
   const router = useRouter();
   const userStore = useUserStore();
@@ -454,8 +481,8 @@
     { name: "宸插畬鎴愯鍗曟暟", value: "-" },
     { name: "鏈畬鎴愯鍗曟暟", value: "-" },
     { name: "閮ㄥ垎瀹屾垚璁㈠崟鏁�", value: "-" },
-    { name: "璐ㄦ鎬绘暟", value: "-" },
-    { name: "杩囩▼妫�鎬绘暟", value: "-" },
+    { name: "鏉ユ枡妫�鎬绘暟", value: "-" },
+    // { name: "杩囩▼妫�鎬绘暟", value: "-" },
   ]);
 
   const pendingTasks = reactive([]);
@@ -773,7 +800,33 @@
       });
   };
 
-  const planTable = reactive([]);
+  // 鎶ュ伐琛ㄦ牸鏁版嵁
+  const reportingTable = ref([]);
+  const reportingTableLoading = ref(false);
+
+  // 鑾峰彇鏈�杩戞姤宸ユ暟鎹�
+  const fetchReportingData = () => {
+    reportingTableLoading.value = true;
+    productionReportListPage({
+      current: 1,
+      size: 5, // 鍙樉绀烘渶杩�5鏉�
+    })
+      .then(res => {
+        if (res.code === 200) {
+          console.log(res.data.records || []);
+          reportingTable.value = res.data.records || [];
+        } else {
+          reportingTable.value = [];
+        }
+      })
+      .catch(error => {
+        console.error("鑾峰彇鎶ュ伐鏁版嵁澶辫触:", error);
+        reportingTable.value = [];
+      })
+      .finally(() => {
+        reportingTableLoading.value = false;
+      });
+  };
   const recentTrendCards = reactive([
     {
       key: "planIssued",
@@ -1204,6 +1257,24 @@
     //   console.error("expenseCompositionAnalysis鎺ュ彛鑾峰彇澶辫触:", error);
     // }
   };
+  const loadManageStatistics = async () => {
+    try {
+      const res = await getManageStatistics();
+      const data = res?.data || {};
+      businessFocus[0].value = `${pickFirstNumber(data, ["total"])} 鏉;
+      businessFocus[1].value = `${pickFirstNumber(data, ["completed"])} 鏉;
+      businessFocus[2].value = `${pickFirstNumber(data, ["uncompleted"])} 鏉;
+      businessFocus[3].value = `${pickFirstNumber(data, [
+        "partialCompleted",
+      ])} 鏉;
+      businessFocus[4].value = `${pickFirstNumber(data, [
+        "materialInspection",
+      ])} 鏉;
+      // businessFocus[5].value = `${pickFirstNumber(data, [""])} 鏉;
+    } catch (error) {
+      console.error("manageStatistics鎺ュ彛鑾峰彇澶辫触:", error);
+    }
+  };
 
   const refreshDashboardData = () => {
     // loadHomeTodos();
@@ -1212,8 +1283,10 @@
     // loadQualityData();
     // loadCostComposition();
     // loadWarningCenter();
+    loadManageStatistics();
     updateEnergyTypeChart();
     fetchSalesAmountChartData();
+    fetchReportingData();
     lastUpdatedAt.value = new Date().toLocaleString();
   };
 
diff --git a/src/views/productionManagement/processRoute/index.vue b/src/views/productionManagement/processRoute/index.vue
index d066a54..16151d3 100644
--- a/src/views/productionManagement/processRoute/index.vue
+++ b/src/views/productionManagement/processRoute/index.vue
@@ -247,7 +247,7 @@
         bomId: row.bomId || null,
         description: row.description || "",
         type: "route",
-        status: row.status || false,
+        status: row.status ?? false,
       },
     });
   };
diff --git a/src/views/productionManagement/processRoute/index2.vue b/src/views/productionManagement/processRoute/index2.vue
index 71fe53c..a161a62 100644
--- a/src/views/productionManagement/processRoute/index2.vue
+++ b/src/views/productionManagement/processRoute/index2.vue
@@ -1770,7 +1770,7 @@
 
   // 椤甸潰鍔犺浇鏃惰幏鍙栧伐搴忓垪琛�
   onMounted(() => {
-    getProcessListApi()
+    getProcessListApi({ dateType: 1 })
       .then(res => {
         // 澶勭悊杩斿洖鐨勬暟鎹紝鏄犲皠鍒伴〉闈㈤渶瑕佺殑鏍煎紡
         availableProcessList.value = (res.data || []).map(item => ({
diff --git a/src/views/productionManagement/processRoute/processRouteItem/index.vue b/src/views/productionManagement/processRoute/processRouteItem/index.vue
index 5963998..99eaad2 100644
--- a/src/views/productionManagement/processRoute/processRouteItem/index.vue
+++ b/src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -529,7 +529,7 @@
 
   // 鑾峰彇宸ュ簭鍒楄〃
   const getProcessList = () => {
-    processList({})
+    processList({ dateType: 1 })
       .then(res => {
         processOptions.value = res.data || [];
       })
@@ -548,7 +548,7 @@
       dictLabel: route.query.dictLabel || "",
       bomId: route.query.bomId || null,
       description: route.query.description || "",
-      status: route.query.status != 1,
+      status: !(route.query.status == 1 || route.query.status === "false"),
     };
     if (pageType.value === "order") {
       queryList2(route.query.orderId)
diff --git a/src/views/productionManagement/productStructure/Detail/index.vue b/src/views/productionManagement/productStructure/Detail/index.vue
index 252c8fc..8fb474f 100644
--- a/src/views/productionManagement/productStructure/Detail/index.vue
+++ b/src/views/productionManagement/productStructure/Detail/index.vue
@@ -274,7 +274,7 @@
   };
 
   const fetchProcessOptions = async () => {
-    const { data } = await list();
+    const { data } = await list({ dateType: 1 });
     dataValue.processOptions = data as any;
   };
 

--
Gitblit v1.9.3