yyb
13 小时以前 65193cc9b4e27aad36a65eca447e6c62f6ee037f
src/views/qualityManagement/nonconformingManagement/index.vue
@@ -1,3 +1,4 @@
// 不合格管理
<template>
  <div class="app-container">
    <div class="search_form">
@@ -51,8 +52,10 @@
          :tableLoading="tableLoading"
          @pagination="pagination"
          :total="page.total"
      ></PIMTable>
      >
      </PIMTable>
    </div>
    <DetailDia ref="detailDiaRef" />
    <FormDia ref="formDia" @close="handleQuery"></FormDia>
    <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
  </div>
@@ -60,11 +63,12 @@
<script setup>
import { Search } from "@element-plus/icons-vue";
import {onMounted, ref} from "vue";
import {onMounted, ref, reactive, toRefs, nextTick, getCurrentInstance} from "vue";
import FormDia from "@/views/qualityManagement/nonconformingManagement/components/formDia.vue";
import {ElMessageBox} from "element-plus";
import {qualityUnqualifiedDel, qualityUnqualifiedListPage} from "@/api/qualityManagement/nonconformingManagement.js";
import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue";
import DetailDia from "@/views/qualityManagement/nonconformingManagement/components/detailDia.vue";
import dayjs from "dayjs";
const data = reactive({
@@ -72,12 +76,9 @@
    inspectType: "",
    inspectState: "",
    productName: "",
    entryDate: [
      dayjs().format("YYYY-MM-DD"),
      dayjs().add(1, "day").format("YYYY-MM-DD"),
    ], // 录入日期
    entryDateStart: dayjs().format("YYYY-MM-DD"),
    entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
    entryDate: undefined, // 录入日期
    entryDateStart: undefined,
    entryDateEnd: undefined,
  },
});
const { searchForm } = toRefs(data);
@@ -176,17 +177,39 @@
    width: 120
  },
  {
    label: "原因分析",
    prop: "reasonAnalysis",
    slot: "reasonAnalysis",
    width: 120
  },
  {
    label: "预防与纠正措施",
    prop: "preventiveCorrective",
    slot: "preventiveCorrective",
    width: 120
  },
  {
    label: "工时损失",
    prop: "lossWorking",
    width: 140
  },
  {
    label: "材料费损失",
    prop: "lossMaterial",
    width: 140
  },
  {
    dataType: "action",
    label: "操作",
    align: "center",
    fixed: "right",
    width: 120,
    width: 140,
    operation: [
      {
        name: "编辑",
        name: "详情",
        type: "text",
        clickFun: (row) => {
          openForm("edit", row);
          openDetailDialog(row);
        },
      },
      {
@@ -195,6 +218,7 @@
        clickFun: (row) => {
          openInspectionForm("edit", row);
        },
        disabled: (row) => row.inspectState === 1,
      },
    ],
  },
@@ -209,6 +233,7 @@
});
const formDia = ref()
const inspectionFormDia = ref()
const detailDiaRef = ref()
const { proxy } = getCurrentInstance()
const changeDaterange = (value) => {
@@ -250,15 +275,27 @@
// 打开弹框
const openForm = (type, row) => {
  if (type !== 'add' && row?.inspectState === 1) {
    proxy.$modal.msgWarning("已处理的数据不能再编辑");
    return;
  }
  nextTick(() => {
    formDia.value?.openDialog(type, row)
  })
};
// 打开处理弹框
const openInspectionForm = (type, row) => {
  if (row?.inspectState === 1) {
    proxy.$modal.msgWarning("已处理的数据不能再处理");
    return;
  }
  nextTick(() => {
    inspectionFormDia.value?.openDialog(type, row)
  })
};
// 打开详情弹框
const openDetailDialog = (row) => {
  detailDiaRef.value?.openDialog(row);
};
// 删除
@@ -304,4 +341,12 @@
});
</script>
<style scoped></style>
<style scoped>
.text-ellipsis {
  display: inline-block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>