yyb
2026-05-22 552ec6b7d8ccc56c379da195fc6c9c74312b1070
src/pages/qualityManagement/processInspection/detail.vue
@@ -15,10 +15,11 @@
          </view>
          <text class="header-title">{{ detailData.productName || '-' }}</text>
          <view class="status-tags">
            <u-tag :type="getTagType(detailData.checkResult)"
            <u-tag v-if="detailData.checkResult"
                   :type="getTagType(detailData.checkResult)"
                   size="small"
                   class="status-tag">
              {{ detailData.checkResult || '-' }}
              {{ detailData.checkResult }}
            </u-tag>
            <u-tag :type="getStateTagType(detailData.inspectState)"
                   size="small"
@@ -131,7 +132,7 @@
<script setup>
  import { ref, onMounted } from "vue";
  import { onShow } from "@dcloudio/uni-app";
  import { onShow, onLoad } from "@dcloudio/uni-app";
  import PageHeader from "@/components/PageHeader.vue";
  import dayjs from "dayjs";
  import { qualityInspectParamInfo } from "@/api/qualityManagement/materialInspection.js";
@@ -204,16 +205,9 @@
    }, 1500);
  };
  // 获取页面ID
  const getPageId = () => {
    const pages = getCurrentPages();
    const currentPage = pages[pages.length - 1];
    return currentPage.options.id;
  };
  // 获取详情数据
  const getDetail = () => {
    const id = getPageId();
    const id = optionsId.value;
    if (!id) {
      showToast("参数错误");
      return;
@@ -263,6 +257,12 @@
  onMounted(() => {
    getDetail();
  });
  const optionsId = ref("");
  onLoad(options => {
    optionsId.value = options.id || "";
    getDetail();
  });
</script>
<style scoped lang="scss">