6 天以前 22229c67d87f0fae4c4bc90db106b8a1e2c49b53
src/views/productionManagement/workOrder/index.vue
@@ -508,8 +508,13 @@
  import { getCurrentInstance, reactive, toRefs } from "vue";
  import FilesDia from "./components/filesDia.vue";
  import { getDeviceLedger } from "@/api/equipmentManagement/ledger.js";
  import useUserStore from "@/store/modules/user";
  const { proxy } = getCurrentInstance();
  const userStore = useUserStore();
  const isAdminUser = computed(() =>
    ["admin", "普通2", "最高1"].some(r => (userStore.roles || []).includes(r))
  );
  const currentUserId = ref("");
  const deviceOptions = ref([]);
@@ -577,9 +582,13 @@
    return ids.includes(uid);
  };
  // 判断当前用户是否可以报工(工单报工人 或 工序报工人)
  // 判断当前用户是否可以报工(工单报工人 或 工序报工人,管理员不受限)
  const canCurrentUserReport = row => {
    return isCurrentUserInUserIds(row) || isCurrentUserInProcessUserIds(row);
    return (
      isAdminUser.value ||
      isCurrentUserInUserIds(row) ||
      isCurrentUserInProcessUserIds(row)
    );
  };
  const canOperateByReportWorker = computed(() => {
@@ -1800,6 +1809,8 @@
  // 判断当前用户是否能排产
  const canScheduleByWorkOrderNo = row => {
    // 管理员可排产
    if (isAdminUser.value) return true;
    if (!row) return false;
    const uid = String(currentUserId.value || "");