20260914223013

This commit is contained in:
oneao committed 2026-09-14 22:30:13 +08:00
1 parent 549c8bd2eb
commit 63514476d7
60 files changed
+6478 -2004

No files matched your search

+82
View File
@@ -0,0 +1,82 @@
/* ============================================================================
FMS 模块注册脚本 — 联系人(v_b_contact)
依据文档:FMS业务表设计.md
使用说明:
1. 先执行 fms_business_contact.sql 建表与视图,再执行本脚本。
2. 脚本只写模块元数据(s_module / s_field)并修正菜单路由,不含业务数据。
3. 界面配置(s_module_schema 的 view / edit)由 FieldNameSync 从旧库 s_columnLib 同步生成。
4. 脚本可重复执行:先清空本模块的 s_field / s_module 行再重建。
============================================================================ */
SET NOCOUNT ON;
GO
/* ============================================================================
模块定义
============================================================================ */
delete from dbo.s_field where b_module_id = 'v_b_contact';
GO
delete from dbo.s_module where b_id = 'v_b_contact';
GO
insert into dbo.s_module (b_id, b_parent_id, b_depth, b_path, b_name, b_i18n, b_module_type,
b_view_table, b_save_table, b_key_field, b_canuse, b_xh)
values ('v_b_contact', 'base', 1, '/base/v_b_contact/', N'联系人', 'module.v_b_contact',
'data', 'v_b_contact', 'b_contact', 'b_id', 1, 20);
GO
/* ============================================================================
字段定义(b_name 先用字段编码占位,随后由 FieldNameSync 同步旧库中文名)
============================================================================ */
insert into dbo.s_field (b_module_id, b_field, b_name, b_i18n, b_type, b_canuse, b_xh)
values ('v_b_contact', 'b_id', 'b_id', null, 'number', 1, 10),
('v_b_contact', 'b_ywid', 'b_ywid', null, 'input', 1, 20),
('v_b_contact', 'b_name_ch', 'b_name_ch', null, 'input', 1, 30),
('v_b_contact', 'b_name_en', 'b_name_en', null, 'input', 1, 40),
('v_b_contact', 'b_sex', 'b_sex', null, 'input', 1, 50),
('v_b_contact', 'b_phone', 'b_phone', null, 'input', 1, 60),
('v_b_contact', 'b_mobilephone', 'b_mobilephone', null, 'input', 1, 70),
('v_b_contact', 'b_fax', 'b_fax', null, 'input', 1, 80),
('v_b_contact', 'b_email', 'b_email', null, 'input', 1, 90),
('v_b_contact', 'b_duty', 'b_duty', null, 'input', 1, 100),
('v_b_contact', 'b_homephone', 'b_homephone', null, 'input', 1, 110),
('v_b_contact', 'b_cate_id', 'b_cate_id', null, 'input', 1, 120),
('v_b_contact', 'b_homeaddr', 'b_homeaddr', null, 'input', 1, 130),
('v_b_contact', 'b_bz', 'b_bz', null, 'input', 1, 140),
('v_b_contact', 'b_departmentname', 'b_departmentname', null, 'input', 1, 150),
('v_b_contact', 'b_picture', 'b_picture', null, 'input', 1, 160),
('v_b_contact', 'b_customer_id', 'b_customer_id', null, 'input', 1, 170),
('v_b_contact', 'b_owner_id', 'b_owner_id', null, 'input', 1, 180),
('v_b_contact', 'b_isdefault', 'b_isdefault', null, 'checkbox', 1, 190),
('v_b_contact', 'b_taste', 'b_taste', null, 'input', 1, 200),
('v_b_contact', 'b_habit', 'b_habit', null, 'input', 1, 210),
('v_b_contact', 'b_homesituation', 'b_homesituation', null, 'input', 1, 220),
('v_b_contact', 'v_ownername', 'v_ownername', null, 'input', 1, 230),
('v_b_contact', 'v_ownerdepartment', 'v_ownerdepartment', null, 'input', 1, 240),
('v_b_contact', 'b_showcolor', 'b_showcolor', null, 'input', 1, 250),
('v_b_contact', 'v_customer_name', 'v_customer_name', null, 'input', 1, 260),
('v_b_contact', 'b_birthday', 'b_birthday', null, 'date', 1, 270),
('v_b_contact', 'b_name', 'b_name', null, 'input', 1, 280),
('v_b_contact', 'b_type1_id', 'b_type1_id', null, 'input', 1, 290),
('v_b_contact', 'b_htbegindate', 'b_htbegindate', null, 'date', 1, 300),
('v_b_contact', 'b_htenddate', 'b_htenddate', null, 'date', 1, 310),
('v_b_contact', 'b_created_by', 'b_created_by', null, 'input', 1, 320),
('v_b_contact', 'b_created_at', 'b_created_at', null, 'datetime', 1, 330),
('v_b_contact', 'b_updated_by', 'b_updated_by', null, 'input', 1, 340),
('v_b_contact', 'b_updated_at', 'b_updated_at', null, 'datetime', 1, 350),
('v_b_contact', 'b_state', 'b_state', null, 'input', 1, 360);
GO
/* ============================================================================
菜单路由修正:联系人菜单原为占位(/dashboard 且路径缺前导斜杠)
============================================================================ */
update dbo.s_menu
set b_route = '/base/contact',
b_path = '/base/contact/'
where b_id = 'contact';
GO