From 8e5ede49987bcfa4e56e98641fb11070210f4f35 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 11 三月 2026 17:50:49 +0800
Subject: [PATCH] 进销存升级app 1.底部操作栏图标修改 2.首页生产报工调准没反应修改

---
 src/pages/index.vue |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/src/pages/index.vue b/src/pages/index.vue
index bc5e836..3c122d7 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -213,7 +213,7 @@
     label: "鐢熶骇鎶ュ伐",
     icon: "/static/images/icon/shengchanbaogong@2x.png",
     bgColor: "linear-gradient(135deg,#3b82f6,#2563eb)",
-    route: "/pages/productionManagement/productionReport/index",
+    action: "scan",
   },
   {
     label: "璁惧宸℃",
@@ -250,6 +250,28 @@
 }
 
 function handleQuickTool(item) {
+  if (item?.action === "scan") {
+    // 鐢熶骇鎶ュ伐 - 璋冪敤鎵爜
+    uni.scanCode({
+      success: (res) => {
+        console.log("鎵爜缁撴灉:", res);
+        // 瑙f瀽鎵爜缁撴灉骞惰烦杞埌鐢熶骇鎶ュ伐椤甸潰
+        try {
+          const scanResult = JSON.parse(res.result);
+          uni.navigateTo({
+            url: `/pages/productionManagement/productionReport/index?orderRow=${encodeURIComponent(JSON.stringify(scanResult))}`
+          });
+        } catch (e) {
+          console.error("鎵爜缁撴灉瑙f瀽澶辫触:", e);
+          uni.showToast({ title: "鏃犳晥鐨勪簩缁寸爜", icon: "none" });
+        }
+      },
+      fail: (err) => {
+        console.error("鎵爜澶辫触:", err);
+      }
+    });
+    return;
+  }
   if (!item?.route) return;
   uni.navigateTo({ url: item.route });
 }

--
Gitblit v1.9.3