From b7acf69e89d4e5cc1b92304add88fd9277a616f7 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 17 四月 2026 10:22:58 +0800
Subject: [PATCH] fix(报工管理): 修复审核按钮权限控制逻辑
---
src/views/productionManagement/productionReporting/index.vue | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index 62ae588..52e040a 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/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",
--
Gitblit v1.9.3