From a9d97b150701e634bdb751eab277696abd136cca Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 16 六月 2026 14:39:47 +0800
Subject: [PATCH] 君歌app 1.依照web端功能修改
---
src/pages/productionDesign/bom/structure.vue | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/src/pages/productionDesign/bom/structure.vue b/src/pages/productionDesign/bom/structure.vue
new file mode 100644
index 0000000..5b7c2a7
--- /dev/null
+++ b/src/pages/productionDesign/bom/structure.vue
@@ -0,0 +1,100 @@
+<template>
+ <view class="structure-page">
+ <PageHeader :title="'BOM缁撴瀯 - ' + bomNo"
+ @back="goBack" />
+ <view class="info-card">
+ <view class="info-row">
+ <text class="info-label">浜у搧鍚嶇О锛�</text>
+ <text class="info-value">{{ productName }}-{{ productModelName }}</text>
+ </view>
+ </view>
+ <view class="structure-list"
+ v-if="dataList.length > 0">
+ <BomStructureItem v-for="(item, index) in dataList"
+ :key="index"
+ :item="item"
+ :level="0"
+ :isLast="index === dataList.length - 1"
+ :processOptions="processOptions" />
+ </view>
+ <view v-else
+ class="no-data">
+ <up-empty text="鏆傛棤缁撴瀯鏁版嵁"
+ mode="list"></up-empty>
+ </view>
+ </view>
+</template>
+
+<script setup>
+ import { ref, reactive, computed } from "vue";
+ import { onLoad } from "@dcloudio/uni-app";
+ import { queryStructureList } from "@/api/productionManagement/bom";
+ import { list as getProcessList } from "@/api/productionManagement/processManagement";
+ import BomStructureItem from "./BomStructureItem.vue";
+
+ const bomId = ref(null);
+ const bomNo = ref("");
+ const productName = ref("");
+ const dataList = ref([]);
+ const processOptions = ref([]);
+
+ const goBack = () => {
+ uni.navigateBack();
+ };
+
+ const fetchData = () => {
+ queryStructureList(bomId.value).then(res => {
+ dataList.value = res.data || [];
+ });
+ };
+
+ const fetchProcess = () => {
+ getProcessList().then(res => {
+ processOptions.value = res.data || [];
+ });
+ };
+
+ const productModelName = ref("");
+
+ onLoad(options => {
+ bomId.value = options.id;
+ bomNo.value = decodeURIComponent(options.bomNo);
+ productName.value = decodeURIComponent(options.productName);
+ productModelName.value = decodeURIComponent(options.productModelName);
+ fetchData();
+ fetchProcess();
+ });
+</script>
+
+<style scoped lang="scss">
+ .structure-page {
+ background-color: #f5f5f5;
+ min-height: 100vh;
+ padding-bottom: 120rpx;
+ }
+
+ .info-card {
+ background: #fff;
+ padding: 30rpx;
+ margin-bottom: 20rpx;
+ .info-row {
+ display: flex;
+ font-size: 28rpx;
+ .info-label {
+ color: #666;
+ }
+ .info-value {
+ color: #333;
+ font-weight: bold;
+ }
+ }
+ }
+
+ .structure-list {
+ padding: 20rpx;
+ }
+
+ .no-data {
+ padding-top: 100rpx;
+ }
+</style>
--
Gitblit v1.9.3