yuan
10 小时以前 56158a98729ba25b04f7c80d88aafa59cc41a504
src/views/qualityManagement/processInspection/index.vue
@@ -62,7 +62,7 @@
<script setup>
import { Search } from "@element-plus/icons-vue";
import {onMounted, ref} from "vue";
import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
import InspectionFormDia from "@/views/qualityManagement/processInspection/components/inspectionFormDia.vue";
import FormDia from "@/views/qualityManagement/processInspection/components/formDia.vue";
import {ElMessageBox} from "element-plus";
@@ -75,6 +75,7 @@
import FilesDia from "@/views/qualityManagement/processInspection/components/filesDia.vue";
import dayjs from "dayjs";
import {userListNoPage} from "@/api/system/user.js";
import useUserStore from "@/store/modules/user";
const data = reactive({
  searchForm: {
@@ -95,6 +96,11 @@
    width: 120
  },
  {
    label: "生产工单号",
    prop: "workOrderNo",
    width: 120
  },
  {
    label: "工序",
    prop: "process",
    width: 230
@@ -110,6 +116,10 @@
  {
    label: "规格型号",
    prop: "model",
  },
  {
    label: "UID码",
    prop: "uidNo",
  },
  {
    label: "单位",
@@ -155,7 +165,7 @@
    label: "操作",
    align: "center",
    fixed: "right",
    width: 280,
    width: 340,
    operation: [
      {
        name: "编辑",
@@ -164,7 +174,27 @@
          openForm("edit", row);
        },
            disabled: (row) => {
               return row.inspectState == 1;
               // 已提交则禁用
               if (row.inspectState == 1) return true;
               // 如果检验员有值,只有当前登录用户能编辑
               if (row.checkName) {
                  return row.checkName !== userStore.nickName;
               }
               return false;
            }
      },
      {
        name: "填写检验记录",
        type: "text",
        clickFun: (row) => {
          openInspectionForm("edit", row);
        },
            disabled: (row) => {
               if (row.inspectState == 1) return true;
               if (row.checkName) {
                  return row.checkName !== userStore.nickName;
               }
               return false;
            }
      },
      {
@@ -181,7 +211,13 @@
               submit(row.id);
            },
            disabled: (row) => {
               return row.inspectState == 1;
               // 已提交则禁用
               if (row.inspectState == 1) return true;
               // 如果检验员有值,只有当前登录用户能提交
               if (row.checkName) {
                  return row.checkName !== userStore.nickName;
               }
               return false;
            }
         },
         {
@@ -226,6 +262,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const { proxy } = getCurrentInstance()
const userStore = useUserStore()
const changeDaterange = (value) => {
  searchForm.value.entryDateStart = undefined;
  searchForm.value.entryDateEnd = undefined;