From 80958ace2e96fb6a8daed6a58e2dff2d51ff8616 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期三, 23 四月 2025 10:49:17 +0800
Subject: [PATCH] feat: 完成扫码业务员
---
src/pages/production/detail/wireDetail.vue | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/src/pages/production/detail/wireDetail.vue b/src/pages/production/detail/wireDetail.vue
index 6413c4e..1e67d52 100644
--- a/src/pages/production/detail/wireDetail.vue
+++ b/src/pages/production/detail/wireDetail.vue
@@ -1,12 +1,12 @@
<template>
- <view>
- <ProductCard />
+ <view class="pt-2">
+ <ProductCard :data="cardData" />
<view class="mx-3">
<wd-grid class="rounded-lg" clickable>
<wd-grid-item
icon="computer"
link-type="navigateTo"
- url="/pages/production/wire/report/wire"
+ :url="`/pages/production/wire/report/wire?id=${paramsId}`"
text="鎶ュ伐"
/>
<!-- <wd-grid-item
@@ -33,7 +33,34 @@
</template>
<script lang="ts" setup>
+import { onLoad } from "@dcloudio/uni-app";
import ProductCard from "@/components/product_card/index.vue";
+import WireApi from "@/api/product/wire";
+
+const paramsId = ref();
+const cardData = reactive({
+ deviceModel: undefined,
+ model: undefined,
+ totalAmount: undefined,
+ amount: undefined,
+ unAmount: undefined,
+});
+
+const getDetailData = async (id: string) => {
+ const { data } = await WireApi.getWireDetailById({
+ id: id,
+ });
+ cardData.deviceModel = data.deviceModel;
+ cardData.model = data.model;
+ cardData.totalAmount = data.totalAmount;
+ cardData.amount = data.amount;
+ cardData.unAmount = data.unAmount;
+};
+
+onLoad((options: any) => {
+ paramsId.value = options.id;
+ getDetailData(options.id);
+});
</script>
<style lang="scss" scoped></style>
--
Gitblit v1.9.3