yyb
16 小时以前 d648788841a802a2f56db5bd657a408b9b229d65
src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -49,6 +49,10 @@
             @close="handleQuery"></FormDia>
    <files-dia ref="filesDia"
               @close="handleQuery"></files-dia>
    <DetailDialog ref="detailDialog"
                  v-model:visible="detailDialogVisible"
                  :data="detailDialogData"
                  @close="handleQuery"></DetailDialog>
    <el-dialog v-model="dialogFormVisible"
               title="编辑检验员"
               width="30%"
@@ -93,6 +97,7 @@
  } from "vue";
  import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue";
  import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue";
  import DetailDialog from "@/views/qualityManagement/rawMaterialInspection/components/detailDialog.vue";
  import { ElMessageBox } from "element-plus";
  import {
    downloadQualityInspect,
@@ -122,7 +127,8 @@
    {
      label: "检测日期",
      prop: "checkTime",
      width: 120,
      width: 150,
      className: "date-cell",
    },
    {
      label: "供应商",
@@ -132,6 +138,8 @@
    {
      label: "检验员",
      prop: "checkName",
      width: 120,
      className: "inspector-cell",
    },
    {
      label: "产品名称",
@@ -155,18 +163,41 @@
    {
      label: "试样编号",
      prop: "sampleCode",
      width: 120,
      className: "volume-cell",
    },
    {
      label: "试样状态",
      prop: "sampleState",
      dataType: "tag",
      formatType: params => {
        if (params === "颗粒" || params === "固体" || params === "膏体") {
          return "success";
        } else {
          return "info";
        }
      },
    },
    {
      label: "检测性质",
      prop: "inspectNature",
      dataType: "tag",
      formatType: params => {
        if (params === "日常检验") {
          return "success";
        } else if (params === "入场验收") {
          return "warning";
        } else {
          return null;
        }
      },
    },
    {
      label: "取样日期",
      prop: "sampleTime",
      width: 150,
      className: "date-cell",
    },
    {
      label: "检测单位",
@@ -226,6 +257,13 @@
              return row.checkName !== userStore.nickName;
            }
            return false;
          },
        },
        {
          name: "详情",
          type: "text",
          clickFun: row => {
            openDetailDialog(row);
          },
        },
        {
@@ -292,6 +330,9 @@
  const formDia = ref();
  const filesDia = ref();
  const inspectionFormDia = ref();
  const detailDialog = ref();
  const detailDialogVisible = ref(false);
  const detailDialogData = ref({});
  const { proxy } = getCurrentInstance();
  const userStore = useUserStore();
  const changeDaterange = value => {
@@ -344,6 +385,20 @@
    nextTick(() => {
      filesDia.value?.openDialog(type, row);
    });
  };
  // 打开详情弹框
  const openDetailDialog = row => {
    // 确保qualityInspectParams字段存在
    if (!row.qualityInspectParams) {
      row.qualityInspectParams = [];
    }
    detailDialogData.value = row;
    detailDialogVisible.value = true;
    // 打开弹窗后加载指标数据
    setTimeout(() => {
      detailDialog.value?.loadIndicatorData();
    }, 100);
  };
  // 删除
@@ -448,7 +503,7 @@
  });
</script>
<style scoped>
<style scoped lang="scss">
  .app-container {
    padding: 20px;
    background-color: #f5f7fa;
@@ -517,6 +572,66 @@
  :deep(.el-table .el-table__row) {
    transition: background-color 0.3s ease;
  }
  /* 表格列样式 */
  :deep(.date-cell) {
    font-family: "Courier New", monospace;
    color: #606266;
  }
  :deep(.supplier-cell) {
    font-weight: 500;
    color: #303133;
  }
  :deep(.inspector-cell) {
    color: #409eff;
  }
  :deep(.product-cell) {
    font-weight: 500;
  }
  :deep(.model-cell) {
    color: #606266;
  }
  :deep(.unit-cell) {
    font-size: 12px;
    color: #909399;
  }
  :deep(.quantity-cell) {
    font-family: "Courier New", monospace;
    font-weight: 500;
    color: #303133;
  }
  :deep(.volume-cell) {
    font-family: "Courier New", monospace;
    color: #67c23a;
    font-weight: 500;
  }
  :deep(.state-cell) {
    font-weight: 500;
  }
  :deep(.nature-cell) {
    color: #606266;
  }
  :deep(.company-cell) {
    color: #606266;
  }
  :deep(.result-cell) {
    font-weight: 600;
  }
  :deep(.status-cell) {
    font-weight: 500;
  }
  /* 按钮样式优化 */
@@ -710,4 +825,31 @@
      font-size: 12px;
    }
  }
  :deep(.el-table) {
    .el-table__body-wrapper {
      .quantity-cell,
      .volume-cell,
      .dimension-cell {
        font-weight: 600;
        color: #409eff;
        font-family: "Courier New", monospace;
        text-shadow: 0 1px 2px rgba(64, 158, 255, 0.2);
      }
      .spec-cell {
        color: #67c23a;
        font-weight: 500;
        padding: 4px 8px;
        border-radius: 4px;
      }
      .code-cell {
        color: #e6a23c;
        font-family: "Courier New", monospace;
        font-weight: 500;
        padding: 4px 8px;
        border-radius: 4px;
      }
    }
  }
</style>