张诺
11 小时以前 b7acf69e89d4e5cc1b92304add88fd9277a616f7
src/views/productionManagement/productionReporting/index.vue
@@ -180,6 +180,9 @@
  import { productionProductMainListPage, productAudit } from "@/api/productionManagement/productionProductMain.js";
  import { userListNoPageByTenantId } from "@/api/system/user.js";
  import InputModal from "@/views/productionManagement/productionReporting/Input.vue";
  import useUserStore from "@/store/modules/user";
  const userStore = useUserStore();
  const data = reactive({
    searchForm: {
@@ -209,13 +212,18 @@
      width: 120,
    },
    {
      label: "工序",
      prop: "process",
      width: 120,
    },
    {
      label: "报工人员",
      prop: "nickName",
      width: 120,
    },
    {
      label: "工序",
      prop: "process",
     {
      label: "审核人",
      prop: "auditUserName",
      width: 120,
    },
     {
@@ -268,11 +276,6 @@
      width: 120,
    },
    {
      label: "审核人",
      prop: "sureAuditUserName",
      width: 120,
    },
    {
      label: "备注信息",
      prop: "auditOpinion",
      minWidth: 120,
@@ -305,11 +308,10 @@
        },
        {
          name:"审核",
          color: "#E6A23C",
          clickFun: row => {
            handleAudit(row);
          },
          disabled: row => Number(row?.auditStatus) !== 0, // 已审核时禁用审核按钮
          disabled: row => Number(row?.auditStatus) !== 0 || row.auditUserId !== userStore.id, // 已审核或不是指定审核人时禁用
        },
      ],
    },
@@ -503,10 +505,14 @@
   // 审核
  const handleAudit = (row) => {
    if (Number(row?.auditStatus) === 1) {
    if (Number(row?.auditStatus) !== 0) {
      ElMessage.warning("该工单已审核");
      return;
    }
    if (row.auditUserId !== userStore.id) {
      ElMessage.warning("您不是该工单的指定审核人");
      return;
    }
    // 重置表单,默认选择通过
    form.value = {
      auditResult: "1",