This commit is contained in:
李鹏宇
2025-07-26 21:43:27 +08:00
parent 6468cdb1e8
commit 76ddff97ef
@@ -108,9 +108,9 @@ patch(FormController.prototype, {
const currentUserId = this.env.services.user.userId;
if (resModel && resId) {
// 1. 判断是否存在 self_users_ids(经办人)字段
if (fields.users_ids) {
const result = await this.orm.read(resModel, [resId], ["users_ids"]);
const selfUsers = result[0]?.users_ids || [];
if (fields.self_users_ids) {
const result = await this.orm.read(resModel, [resId], ["self_users_ids"]);
const selfUsers = result[0]?.self_users_ids || [];
if (!selfUsers.includes(currentUserId)) {
this.buttonState.showEditButton = false;
return; // 如果不是经办人,直接返回