From 665c18b68a5dedba63e00f89f763539967fb7f08 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期二, 03 六月 2025 16:20:36 +0800
Subject: [PATCH] feat: 拉丝添加报工,铝杆支持扫码输入
---
src/pages/production/detail/wireDetail.vue | 62 +++++++++++++++++++++++++++---
1 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/src/pages/production/detail/wireDetail.vue b/src/pages/production/detail/wireDetail.vue
index 5e4276c..305e6e0 100644
--- a/src/pages/production/detail/wireDetail.vue
+++ b/src/pages/production/detail/wireDetail.vue
@@ -1,29 +1,77 @@
<template>
- <view>
- <ProductCard />
+ <view class="pt-2">
+ <ProductCard
+ :data="cardData"
+ :map="{
+ deviceModel: 'deviceModel',
+ model: 'model',
+ totalAmount: 'totalAmount',
+ amount: 'amount',
+ unAmount: 'unAmount',
+ }"
+ />
<view class="mx-3">
<wd-grid class="rounded-lg" clickable>
<wd-grid-item
icon="computer"
link-type="navigateTo"
- url="/pages/production/report/wire"
+ :url="`/pages/production/wire/report/wire?id=${paramsId}&model=${cardData.model}&oneLength=${cardData.oneLength}`"
text="鎶ュ伐"
/>
- <wd-grid-item icon="chart" text="鑷" />
- <wd-grid-item icon="tips" text="鏉傚伐" />
+ <!-- <wd-grid-item
+ icon="chart"
+ text="鑷"
+ link-type="navigateTo"
+ url="/pages/production/wire/selfInspect/index"
+ /> -->
<wd-grid-item
+ icon="tips"
+ link-type="navigateTo"
+ :url="`/pages/production/wire/backman/index?id=${paramsId}`"
+ text="鏉傚伐"
+ />
+ <!-- <wd-grid-item
icon="wallet"
link-type="navigateTo"
- url="/pages/production/receive/index"
+ url="/pages/production/wire/receive/index"
text="鏉愭枡棰嗙敤"
- />
+ /> -->
</wd-grid>
</view>
</view>
</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,
+ oneLength: 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;
+ cardData.oneLength = data.oneLength;
+};
+
+onLoad((options: any) => {
+ paramsId.value = options.id;
+ getDetailData(options.id);
+});
</script>
<style lang="scss" scoped></style>
--
Gitblit v1.9.3