|
|
c07f25b646
|
fix: Fail-Closed 字段级安全加固 — 堵住15+端点价格泄露
## stock.py
- _make_price_stripper(): 工厂函数,选单前缀自动剥离所有价格/成本字段
- _do_get_stock_list(permission_prefix): 每个item.to_dict()后剥离价格
- /all 端点: 非AI模式自动剥离价格字段
- /list 端点: permission_prefix='outbound_selection' 传递
## outbound.py
- /bom-match-stock: 返回前按stock_type剥离全部价格/成本字段
- /scan: result.pop('price', None)
## scrap.py
- /scan: result.pop('price', None)
- /records: 每条记录剥离 cost_at_scrap, total_loss
## transactions.py
- filter_item_by_permissions: 从空字典恢复完整20字段映射
- /borrow/stock-list: permission_prefix='op_borrow_apply' 传递
## buy.py / semi.py / product.py
- submit 成功响应剥离所有价格/成本字段(不泄露给前端)
## bom.py
- /base/list: 剥离 referencePrice
|
2026-07-16 11:26:05 +08:00 |
|
|
|
4b1a86a870
|
fix: 对齐field_to_perm与sys_element权限码 + 税率6% + 含税总价反算
- buy/semi/product: 数量字段映射对齐sys_element实际注册码(qty_inbound/qty_stock/qty_available)
- 数据库: 补全buy(9)+semi(10)+product(13)缺失权限码
- deploy_production.sql: 同步更新
- buy.vue: 税率新增6%选项, 价格联动以含税为主输入, 税率变化保持最后编辑价格不变
- buy.vue: 新增含税总价可输入反算功能
|
2026-07-15 15:03:37 +08:00 |
|
|
|
8f468a0a39
|
fix: 修复全局字段权限导致数据显示为空的问题
根因: /permissions/role/<role_code> 接口要求 system_permission,
非管理员角色无法获取自身权限 → 权限数组为空 → 前后端字段全被过滤
修复:
- permission.py: 查自己角色不再需要 system_permission, 解除权限死锁
- 5个 inbound API: 恢复完整 field_to_perm 映射, 每个字段均可独立权限管控
- 补齐遗漏字段(qty_inbound/qty_stock/qty_available/request_id/request_no)
- buy.vue: 入库表单价格字段加入 hasFormFieldPermission 守卫
|
2026-07-14 16:09:41 +08:00 |
|
|
|
4f5965db02
|
feat: JWT多租户数据权限隔离 & 主管系统管理权限 & 含税单价补齐
## 多租户公司数据隔离
- 新增 get_current_company_filter() 工具函数 (decorators.py)
SUPER_ADMIN: 可传company_name参数过滤或传ALL看全量
其他角色: 强制隔离到JWT中的company_name
- 重构 base_service.py / buy_service.py: 用集中式函数替换内联公司过滤
- SysRolePermission 表新增 company_name 字段,支持同角色不同公司权限
- get_user_permissions() 新增 company_name 参数,查公司定制+全局模板权限
- permission.py API 新增 @permission_required 拦截 + 公司过滤
- 19个API/service文件传递 company_name 到权限查询
## 主管系统管理权限
- delete_user() 允许SUPERVISOR删除同公司用户 (原仅SUPER_ADMIN)
- get_all_users() 新增 company_name 参数过滤
- 用户列表/权限分配 API 应用 get_current_company_filter()
- 前端 UserCreate.vue: 超管可见公司下拉框,主管隐藏部门字段
## 前端多租户适配
- material/list.vue / buy.vue: 公司下拉框仅超管可见,默认ALL
- UserCreate.vue: 新增搜索栏公司筛选,部门字段按角色显隐
- auth.ts: getUserList() 支持 params 参数
## Bug修复: 含税单价字段补齐
- buy.vue: 表格列/高级筛选/排序/权限映射新增 post_tax_unit_price
- buy_service.py: allowed_fields/sort_field_map 新增 post_tax_unit_price
|
2026-07-13 15:12:22 +08:00 |
|
|
|
8a2da1ac1e
|
半成品/成品入库:BOM 编号下拉按父件规格联动过滤(前后端双端改造)
- 后端 /inbound/{semi,product}/search-bom 增加 parent_spec 可选参数,Service 层在 MaterialBase.spec_model 上加等值过滤
|
2026-06-04 16:01:48 +08:00 |
|
|
|
4a4baa2f8f
|
fix: sort warehouse tree by name, fix tree batch delete cascade, and implement safe history location autofill
|
2026-04-08 17:32:00 +08:00 |
|
|
|
7421ef3231
|
fix(api): expose real 500 error stack trace and fix missing func import
|
2026-03-25 10:56:31 +08:00 |
|
|
|
032479fe38
|
fix: capture and persist target object names for delete, outbound, and borrow operations in audit logs
|
2026-03-20 15:47:13 +08:00 |
|
|
|
878d11af28
|
fix: reset stock quantity color and enforce location validation for all inbound operations
|
2026-03-18 17:04:23 +08:00 |
|
|
|
b1cc280a71
|
feat: 重构全局搜索框为复合条件选择,支持按名称、俗名、规格进行精准查杂
|
2026-03-11 13:37:52 +08:00 |
|
|
|
ea28ee1c86
|
feat: 为核心业务 API 全面挂载审计日志装饰器
|
2026-03-10 17:16:57 +08:00 |
|
|
|
5d813c24bc
|
feat: 采购/半成品/成品列表拆分SKU独立搜索框
|
2026-03-09 17:29:24 +08:00 |
|
|
|
a5fcbd70f8
|
feat: add table sorting and advanced filtering for products
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-03-02 16:36:24 +08:00 |
|
|
|
cf75b80e13
|
半成品成品价格于BOM表关联
|
2026-03-02 13:39:52 +08:00 |
|
|
|
e61c179d77
|
修改半成品和成品新增时候搜索下拉框显示问题,新增负责人和生产人历史记录功能
|
2026-02-28 17:27:57 +08:00 |
|
|
|
f7cfb5a346
|
修改半成品和成品新增时候搜索下拉框显示问题,新增负责人和生产人历史记录功能
|
2026-02-28 17:08:35 +08:00 |
|
|
|
281a41c549
|
feat: add company, category and material_type filters to product list
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 17:23:33 +08:00 |
|
|
|
a0993767fe
|
fix: make SUPER_ADMIN role checks case-insensitive across app
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 17:04:22 +08:00 |
|
|
|
5bc3dab31c
|
feat: add field-level permission control for inbound modules
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 14:52:12 +08:00 |
|
|
|
1d2e8feced
|
feat: apply RBAC permission control to product module
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 13:03:27 +08:00 |
|
|
|
853374de5d
|
将半成品和成品跟bom表进行相关联
|
2026-02-12 17:16:24 +08:00 |
|
|
|
9f0134b2e4
|
feat: add material search filters to semi, product, service modules
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-11 14:42:16 +08:00 |
|
|
|
94ff7cecdc
|
feat: add backend autocomplete for suppliers and users in inbound
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-10 13:51:19 +08:00 |
|
|
|
e027ebd4a9
|
盘库操作初设计
|
2026-02-06 10:16:37 +08:00 |
|
|
|
cad5fd696c
|
修正新增入库时3个组件的名称筛选逻辑
|
2026-02-05 15:04:06 +08:00 |
|
|
|
10e53cab23
|
修改半成品与成品出入库相关联逻辑
|
2026-02-05 13:17:39 +08:00 |
|
|
|
aa40d4a6da
|
成品入库与出库相关联
|
2026-02-05 11:58:35 +08:00 |
|
|
|
efcd2d923c
|
对于成品的条形码进行功能实现
|
2026-02-03 09:17:28 +08:00 |
|
|
|
06ba2d7563
|
采购件,半成品,产品页面初步完成
|
2026-01-29 09:27:56 +08:00 |
|
|
|
3afea217b7
|
物料-采购件入库页面功能实现
|
2026-01-27 15:50:23 +08:00 |
|