From c899675f6cd2303dc802ee7d04d4bf5dc903ac02 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 18 三月 2026 11:37:31 +0800
Subject: [PATCH] 进销存升级app 1.工作台图标替换

---
 src/pages/index.vue |   41 ++++++++++++++++++++++++++++++-----------
 1 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/src/pages/index.vue b/src/pages/index.vue
index 0c17b0f..3c122d7 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -55,7 +55,6 @@
                 </view>
               </view>
             </view>
-            <image class="card-icon" :src="imgSales" mode="widthFix" />
           </view>
 
           <view class="overview-card purchase">
@@ -72,7 +71,6 @@
                 </view>
               </view>
             </view>
-            <image class="card-icon" :src="imgPurchase" mode="widthFix" />
           </view>
 
           <view class="overview-card stock">
@@ -89,7 +87,6 @@
                 </view>
               </view>
             </view>
-            <image class="card-icon" :src="imgStock" mode="widthFix" />
           </view>
         </view>
       </view>
@@ -207,9 +204,6 @@
 import { computed, onMounted, ref } from "vue";
 import { analysisCustomerContractAmounts, getBusiness } from "@/api/viewIndex";
 
-const imgSales = "/static/images/index/xiaoshoushuju.png";
-const imgPurchase = "/static/images/index/caigoushuju.png";
-const imgStock = "/static/images/index/kucunshuju.png";
 const imgNum1 = "/static/images/index/num1.png";
 const imgNum2 = "/static/images/index/num2.png";
 const imgNum3 = "/static/images/index/num3.png";
@@ -219,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: "璁惧宸℃",
@@ -256,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 });
 }
@@ -576,7 +592,7 @@
 }
 
 .scroll {
-  height: calc(100vh - env(safe-area-inset-top) - 10px);
+  min-height: calc(100vh - env(safe-area-inset-top) - 10px);
 }
 
 .section {
@@ -686,13 +702,16 @@
 }
 
 .overview-card.sales {
-  background: linear-gradient(135deg, #e9fbff 0%, #d8fbff 100%);
+  background: url("/static/images/index/xiaoshoushuju.png") no-repeat center center;
+  background-size: cover;
 }
 .overview-card.purchase {
-  background: linear-gradient(135deg, #fff4e7 0%, #ffe7ce 100%);
+  background: url("/static/images/index/caigoushuju.png") no-repeat center center;
+  background-size: cover;
 }
 .overview-card.stock {
-  background: linear-gradient(135deg, #eaf0ff 0%, #dbe6ff 100%);
+  background: url("/static/images/index/kucunshuju.png") no-repeat center center;
+  background-size: cover;
 }
 
 .card-left {

--
Gitblit v1.9.3