From 3576bc2e689ef8ebb6b439084b00ddcec1247eb9 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 30 一月 2026 14:54:57 +0800
Subject: [PATCH] fix: 原材料、过程、出厂检验分配检验员后,其他用户编辑、提交按钮需置灰。只有分配的检验账户登录后才能编辑、提交操作。
---
src/views/qualityManagement/rawMaterialInspection/index.vue | 20 +++++++++++++++++---
src/views/qualityManagement/finalInspection/index.vue | 20 +++++++++++++++++---
src/views/qualityManagement/processInspection/index.vue | 20 +++++++++++++++++---
3 files changed, 51 insertions(+), 9 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 17e74b1..764e999 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/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/finalInspection/components/inspectionFormDia.vue";
import FormDia from "@/views/qualityManagement/finalInspection/components/formDia.vue";
import {ElMessageBox} from "element-plus";
@@ -75,6 +75,7 @@
import FilesDia from "@/views/qualityManagement/finalInspection/components/filesDia.vue";
import dayjs from "dayjs";
import {userListNoPage} from "@/api/system/user.js";
+import useUserStore from "@/store/modules/user";
const data = reactive({
searchForm: {
@@ -159,7 +160,13 @@
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;
}
},
{
@@ -176,7 +183,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;
}
},
{
@@ -216,6 +229,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const { proxy } = getCurrentInstance()
+const userStore = useUserStore()
const userList = ref([]);
const form = ref({
checkName: ""
diff --git a/src/views/qualityManagement/processInspection/index.vue b/src/views/qualityManagement/processInspection/index.vue
index cebda55..cad87aa 100644
--- a/src/views/qualityManagement/processInspection/index.vue
+++ b/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: {
@@ -164,7 +165,13 @@
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;
}
},
{
@@ -181,7 +188,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 +239,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const { proxy } = getCurrentInstance()
+const userStore = useUserStore()
const changeDaterange = (value) => {
searchForm.value.entryDateStart = undefined;
searchForm.value.entryDateEnd = undefined;
diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue
index c9ea3db..f50ddb8 100644
--- a/src/views/qualityManagement/rawMaterialInspection/index.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -64,7 +64,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/rawMaterialInspection/components/inspectionFormDia.vue";
import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue";
import {ElMessageBox} from "element-plus";
@@ -77,6 +77,7 @@
import FilesDia from "@/views/qualityManagement/rawMaterialInspection/components/filesDia.vue";
import dayjs from "dayjs";
import {userListNoPage} from "@/api/system/user.js";
+import useUserStore from "@/store/modules/user";
const data = reactive({
searchForm: {
@@ -166,7 +167,13 @@
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;
}
},
{
@@ -183,7 +190,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;
}
},
{
@@ -228,6 +241,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const {proxy} = getCurrentInstance()
+const userStore = useUserStore()
const changeDaterange = (value) => {
searchForm.value.entryDateStart = undefined;
searchForm.value.entryDateEnd = undefined;
--
Gitblit v1.9.3