yuan
2026-06-12 7726b6cdab80596d2e2f7dd3fe1ec3dfbdeee155
src/views/qualityManagement/finalInspection/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="app-container">
    <div class="search_form">
    <div class="search_form mb20">
      <div>
        <span class="search_title">产品名称:</span>
        <el-input
@@ -123,8 +123,18 @@
    prop: "unit",
  },
  {
    label: "数量",
    label: "总数量",
    prop: "quantity",
    width: 100
  },
  {
    label: "合格数量",
    prop: "qualifiedQuantity",
    width: 100
  },
  {
    label: "不合格数量",
    prop: "unqualifiedQuantity",
    width: 100
  },
  {
@@ -133,27 +143,43 @@
    width: 120
  },
  {
    label: "检测结果",
    prop: "checkResult",
    label: "合格率",
    prop: "passRate",
    width: 100,
    dataType: "tag",
    formatData: (params) => {
      if (params == null || params === '') return '—';
      const n = Number(params);
      if (Number.isNaN(n)) return '—';
      return `${n.toFixed(2)}%`;
    },
    formatType: (params) => {
      if (params == '不合格') {
        return "danger";
      } else if (params == '合格') {
        return "success";
      } else {
        return null;
      }
      if (params == null || params === '') return 'info';
      const n = Number(params);
      if (Number.isNaN(n)) return 'info';
      if (n === 100) return 'success';
      if (n >= 75) return 'primary';
      if (n >= 50) return 'warning';
      if (n >= 25) return 'danger';
      return 'danger';
    },
  },
  {
    label: "提交状态",
    prop: "inspectState",
    dataType: "tag",
    formatData: (params) => {
      if (params) {
        return "已提交";
      } else {
        return "未提交";
      }
    },
    formatType: (params) => {
      if (params) {
        return "success";
      } else {
        return "info";
      }
    },
  },
@@ -181,6 +207,13 @@
        }
      },
      {
        name: "查看",
        type: "text",
        clickFun: (row) => {
          openForm("view", row);
        },
      },
      {
        name: "附件",
        type: "text",
        clickFun: (row) => {