liding
2026-04-10 c05b81c7f50df80ab247a05f9f92af2d799e77cd
src/views/qualityManagement/nonconformingManagement/index.vue
@@ -5,9 +5,8 @@
        <div>
          <span class="search_title">类型:</span>
          <el-select v-model="searchForm.inspectType" clearable style="width: 200px" @change="handleQuery">
            <el-option label="原材料检验" :value="0" />
            <el-option label="过程检验" :value="1" />
            <el-option label="出厂检验" :value="2" />
            <el-option label="成品检验" :value="2" />
          </el-select>
        </div>
        <div style="margin-left: 10px">
@@ -35,7 +34,7 @@
        <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button>
      </div>
      <div>
        <el-button type="primary" @click="openForm('add')">新增</el-button>
        <!-- <el-button type="primary" @click="openForm('add')">新增</el-button> -->
        <el-button @click="handleOut">导出</el-button>
        <el-button type="danger" plain @click="handleDelete">删除</el-button>
      </div>
@@ -60,10 +59,10 @@
<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 {qualityUnqualifiedDel, qualityUnqualifiedListPage, liftTheQuarantineQualityUnqualified} from "@/api/qualityManagement/nonconformingManagement.js";
import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue";
import dayjs from "dayjs";
@@ -113,12 +112,10 @@
    dataType: "tag",
    width: 120,
    formatData: (params) => {
      if (params == 0) {
        return "原材料检验";
      } else if (params == 1) {
      if (params == 1) {
        return "过程检验";
      } else {
        return '出厂检验';
        return '成品检验';
      }
    },
    formatType: (params) => {
@@ -142,6 +139,15 @@
  {
    label: "规格型号",
    prop: "model",
  },
  {
    label: "生产批号",
    prop: "batchNo",
    width: 140,
  },
  {
    label: "料号",
    prop: "materialCode",
  },
  {
    label: "单位",
@@ -177,15 +183,15 @@
    label: "操作",
    align: "center",
    fixed: "right",
    width: 120,
    width: 100,
    operation: [
      {
        name: "编辑",
        name: "取消隔离",
        type: "text",
        clickFun: (row) => {
          openForm("edit", row);
          liftTheQuarantine(row);
        },
        disabled: (row) => row.inspectState === 1,
        showHide: (row) => row.dealResult === '隔离' && !row.quarantineLifted
      },
      {
        name: "处理",
@@ -236,7 +242,11 @@
  params.entryDate = undefined
  qualityUnqualifiedListPage(params).then(res => {
    tableLoading.value = false;
    tableData.value = res.data.records
    const records = res.data.records || [];
    tableData.value = records.map((row) => ({
      ...row,
      batchNo: row.batchNo ?? row.productionBatchNo ?? "",
    }));
    page.total = res.data.total;
  }).catch(err => {
    tableLoading.value = false;
@@ -268,6 +278,14 @@
  })
};
const liftTheQuarantine = (row) => {
  proxy.$modal.confirm("是否确认取消隔离?").then(function () {
    return liftTheQuarantineQualityUnqualified(row)
  }).then(() => {
    proxy.$modal.msgSuccess("取消隔离成功");
    getList();
  }).catch(() => {})
}
// 删除
const handleDelete = () => {
  let ids = [];