From 1f6fb0ce69738bdfea45273ccf6884a949359f6b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 11 三月 2026 17:55:56 +0800
Subject: [PATCH] 进销存升级app 1.底部操作栏图标修改
---
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