8 天以前 22229c67d87f0fae4c4bc90db106b8a1e2c49b53
src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -146,7 +146,7 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick, computed} from "vue";
import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue";
import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue";
import {ElMessageBox} from "element-plus";
@@ -261,7 +261,7 @@
               if (row.inspectState == 1) return true;
               // 如果检验员有值,只有当前登录用户能编辑
               if (row.checkName) {
                  return row.checkName !== userStore.nickName;
                  return row.checkName !== userStore.nickName && !isAdminUser.value;
               }
               return false;
            }
@@ -284,7 +284,7 @@
               if (row.inspectState == 1) return true;
               // 如果检验员有值,只有当前登录用户能提交
               if (row.checkName) {
                  return row.checkName !== userStore.nickName;
                  return row.checkName !== userStore.nickName && !isAdminUser.value;
               }
               return false;
            }
@@ -368,6 +368,9 @@
const inspectionFormDia = ref()
const {proxy} = getCurrentInstance()
const userStore = useUserStore()
const isAdminUser = computed(() =>
  ["admin", "普通2", "最高1"].some(r => (userStore.roles || []).includes(r))
)
const changeDaterange = (value) => {
  searchForm.value.entryDateStart = undefined;
  searchForm.value.entryDateEnd = undefined;