From b44dddd857b71e3582762e285c8f983c2e9aec8e Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Thu, 1 Oct 2026 13:48:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(gerp):=20=E4=BB=8B=E7=BB=8D=E7=B1=BB?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=A1=A8=E5=8D=95=E7=BB=9F=E4=B8=80=E6=8C=89?= =?UTF-8?q?=E5=A4=9A=E8=A1=8C=E8=BE=93=E5=85=A5=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WorkgroupIntroduction(工作组介绍)等 CharField 介绍字段此前被映射成单行 text,编辑时不好输入长文本。现按「字段名以 Introduction 结尾 或 verbose_name 含"介绍"」统一置为 textarea(TextField 类介绍字段本就已是 textarea,不受影响)。 --- gvsds/apps/gerp/form_service.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gvsds/apps/gerp/form_service.py b/gvsds/apps/gerp/form_service.py index a7559bb6..f5b802a7 100644 --- a/gvsds/apps/gerp/form_service.py +++ b/gvsds/apps/gerp/form_service.py @@ -549,6 +549,13 @@ class FormService(FormServiceBase): # 指定表隐藏主键 UUID 列(公司/部门/工作组列表页表格不显示 UUID,仅前端隐藏) if is_pk and table_name in self.HIDE_PK_UUID_IN_TABLE: col['visible'] = False + # 「介绍」类字段统一按多行输入(textarea)渲染: + # 介绍/说明类内容较长,CharField 默认只映射为单行 text + # (如 WorkgroupIntroduction 工作组介绍、DepartmentIntroduction 部门介绍) + if field_type != 'textarea' and ( + pascal_name.endswith('Introduction') or '介绍' in str(getattr(f, 'verbose_name', '') or '') + ): + col['type'] = 'textarea' # 强公司隔离:CompanyUUID 由后端自动注入,前端不可编辑 if self.company_scope and f.name == 'CompanyUUID': col['editable'] = False