gaoluyang
3 天以前 8e5ede49987bcfa4e56e98641fb11070210f4f35
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);
        // 解析扫码结果并跳转到生产报工页面
        try {
          const scanResult = JSON.parse(res.result);
          uni.navigateTo({
            url: `/pages/productionManagement/productionReport/index?orderRow=${encodeURIComponent(JSON.stringify(scanResult))}`
          });
        } catch (e) {
          console.error("扫码结果解析失败:", 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 {