From 70551b35cac6dd0262f644cb248ba1d03ff2fa08 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期五, 22 五月 2026 14:53:10 +0800
Subject: [PATCH]   feat: 质量管理检验员筛选和传递优化   1. 检验员下拉框筛选:过程检验、出厂检验、原材料检验的检验员下拉框只显示 roleIds 包含 106 的用户,包括列表页的"检验"弹窗、"分配检验员"弹窗,以及新增/编辑弹窗     2. 检验员默认值优化:点击"检验"按钮时检验员默认为当前登录用户;选择"不合格"打开详情页时检验员从上个页面带入,修复 closeQuickCheck() 重置表单导致检验员值丢失的问题   3. 材料信息新增行修复:生产工单绑定工艺路线弹窗中,新增材料行时根据 productById 是否有值判断显示选择器还是文本

---
 src/views/qualityManagement/processInspection/index.vue |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/views/qualityManagement/processInspection/index.vue b/src/views/qualityManagement/processInspection/index.vue
index 6bfa7fb..cf1e77c 100644
--- a/src/views/qualityManagement/processInspection/index.vue
+++ b/src/views/qualityManagement/processInspection/index.vue
@@ -350,7 +350,11 @@
 }
 const open = async (row) => {
 	let userLists = await userListNoPage();
-	userList.value = userLists.data;
+	// 绛涢�� roleIds 鍖呭惈 106 鐨勭敤鎴�
+	userList.value = (userLists.data || []).filter(user => {
+		const roleIds = user.roleIds || [];
+		return roleIds.includes(106) || roleIds.includes('106');
+	});
 	currentRow.value = row
 	dialogFormVisible.value = true
 }
@@ -432,15 +436,18 @@
 // 鎵撳紑妫�楠岀粨鏋滈�夋嫨瀵硅瘽妗�
 const openQuickCheck = async (row) => {
 	currentRow.value = row;
-	// 鍔犺浇鐢ㄦ埛鍒楄〃
+	// 鍔犺浇鐢ㄦ埛鍒楄〃锛岀瓫閫� roleIds 鍖呭惈 106 鐨勭敤鎴�
 	try {
 		const userLists = await userListNoPage();
-		userList.value = userLists.data || [];
+		userList.value = (userLists.data || []).filter(user => {
+			const roleIds = user.roleIds || [];
+			return roleIds.includes(106) || roleIds.includes('106');
+		});
 	} catch (e) {
 		console.error("鍔犺浇妫�楠屽憳鍒楄〃澶辫触", e);
 		userList.value = [];
 	}
-	// 璁剧疆榛樿鍊�
+	// 璁剧疆榛樿鍊硷紙妫�楠屽憳榛樿涓哄綋鍓嶇櫥褰曠敤鎴凤級
 	quickCheckForm.value = {
 		checkResult: "鍚堟牸",
 		checkName: userStore.nickName || "",
@@ -489,10 +496,12 @@
 			getList();
 		});
 	} else {
-		// 涓嶅悎鏍硷細鎵撳紑璇︾粏濉啓椤甸潰
+		// 涓嶅悎鏍硷細鎵撳紑璇︾粏濉啓椤甸潰锛屼紶閫掓楠屽憳淇℃伅
+		// 鍏堜繚瀛樻楠屽憳鍊硷紝閬垮厤 closeQuickCheck 閲嶇疆鍚庝涪澶�
+		const checkNameToPass = quickCheckForm.value.checkName;
 		closeQuickCheck();
 		nextTick(() => {
-			formDia.value?.openDialog("edit", currentRow.value, "涓嶅悎鏍�");
+			formDia.value?.openDialog("edit", currentRow.value, "涓嶅悎鏍�", checkNameToPass);
 		});
 	}
 };

--
Gitblit v1.9.3