zhangwencui
2026-01-19 187041ecb09b7b1e911e12423e4db90b5d1d2d28
src/views/productionManagement/productStructure/Detail/index.vue
@@ -22,13 +22,11 @@
        </el-button>
      </template>
    </PageHeader>
    <el-table
        :data="tableData"
    <el-table :data="tableData"
        border
        :preserve-expanded-content="false"
        :default-expand-all="true"
        style="width: 100%"
    >
              style="width: 100%">
      <el-table-column type="expand">
        <template #default="props">
          <el-form ref="form"
@@ -123,7 +121,9 @@
                  </el-form-item>
                </template>
              </el-table-column>
              <el-table-column label="操作" fixed="right" width="100">
              <el-table-column label="操作"
                               fixed="right"
                               width="100">
                <template #default="{ row, $index }">
                  <el-button v-if="dataValue.isEdit"
                             type="danger"
@@ -136,11 +136,13 @@
          </el-form>
        </template>
      </el-table-column>
      <el-table-column label="BOM编号" prop="bomNo" />
      <el-table-column label="产品名称" prop="productName" />
      <el-table-column label="规格型号" prop="model" />
      <el-table-column label="BOM编号"
                       prop="bomNo" />
      <el-table-column label="产品名称"
                       prop="productName" />
      <el-table-column label="规格型号"
                       prop="model" />
    </el-table>
    <product-select-dialog v-if="dataValue.showProductDialog"
                           v-model:model-value="dataValue.showProductDialog"
                           @confirm="handleProduct" />
@@ -171,25 +173,29 @@
);
const form = ref();
const route = useRoute()
const router = useRouter()
  const route = useRoute();
  const router = useRouter();
const routeId = computed({
  get() {
    return route.query.id;
  },
  set(val) {
    emit('update:router', val)
  }
      emit("update:router", val);
    },
});
// 从路由参数获取产品信息
const routeBomNo = computed(() => route.query.bomNo || '');
const routeProductName = computed(() => route.query.productName || '');
const routeProductModelName = computed(() => route.query.productModelName || '');
  const routeBomNo = computed(() => route.query.bomNo || "");
  const routeProductName = computed(() => route.query.productName || "");
  const routeProductModelName = computed(
    () => route.query.productModelName || ""
  );
const routeOrderId = computed(() => route.query.orderId);
const pageType = computed(() => route.query.type);
const isOrderPage = computed(() => pageType.value === 'order' && routeOrderId.value);
  const isOrderPage = computed(
    () => pageType.value === "order" && routeOrderId.value
  );
const dataValue = reactive({
  dataList: [],
@@ -206,8 +212,8 @@
    productName: "",
    model: "",
    bomNo: "",
  }
])
    },
  ]);
const openDialog = index => {
  dataValue.currentRowIndex = index;
@@ -253,8 +259,8 @@
            productStructureList: dataValue.dataList || [],
          }).then(res => {
            router.push({
              path: '/productionManagement/productionManagement/productStructure/index',
            })
              path: "/productionManagement/productionManagement/productStructure/index",
            });
            ElMessage.success("保存成功");
            dataValue.loading = false;
          });