|
|
9bcd02c742
|
fix: update_buy perm_code=None 导致 NoneType 崩溃 + validateUnique 编辑时排除自身改用 Number() 防类型不一致
|
2026-07-17 16:57:46 +08:00 |
|
|
|
3c0954598c
|
perf: 综合安全加固 — RBAC严格映射+异步邮件+字段权限白名单+前端对齐+导入模板
本次提交包含本会话所有修改的最终统一提交
## 权限系统重构
- permission_service.py: 添加入库/采购操作元素 + ensure_default_permissions
- field_permissions.py: 严格1-to-1 Default Deny 字段映射(StockBuy/Semi/Product/MaterialBase)
- decorators.py: _expand_operation_perms 双向粒度桥接 + prevent_double_submit
- deploy_production.sql: 修复 sys_element 别名码(qty_inbound→in_quantity)
## 采购模块
- purchase.py: 权限驱动可见性 + inbound_purchase独立权限 + 价格字段过滤
- purchase_service.py: 异步邮件 + 三阶段批量模糊匹配防N+1
- purchase/index.vue: canApprove严格操作权限 + upload重复修复
## 导出/入
- base_service.py: export_excel 流式写入防OOM + get_latest_specs 优化
- import_service.py + import_api.py: Excel批量导入(模板+预览+执行)
- ImportDialog.vue: 三步骤导入弹窗
## 异步邮件
- email_service.py: send_email_async (守护线程)
- inventory_task.py: send_email→send_email_async
## 前端对齐
- product/semi/buy.vue: 列对齐in_quantity/stock_quantity/available_quantity + localStorage缓存V2
- buyOdoo.vue: 排序修复 + 导入按钮 + 移除点击展开加载
- BomManage.vue: 懒加载分组 + 导入按钮
- list.vue: 导入按钮
- Selection.vue + borrow/apply: BOM匹配修复 + 导入按钮
- outbound/create.vue: 出库类型必选
- AppMain.vue: 移除transition白屏修复
- material_base.ts, outbound.ts, bom.ts, stock.ts: 新增API函数
|
2026-07-17 13:07:12 +08:00 |
|
|
|
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 |
|
|
|
477da7c434
|
fix-security-correct-field-permission-mapping-and-403-denial
|
2026-04-14 15:37:39 +08:00 |
|
|
|
ae05f3bb75
|
fix-security-field-permission-matching
|
2026-04-14 15:09:15 +08:00 |
|
|
|
ae1fd1afd4
|
fix-security-permission-codes
|
2026-04-14 14:49:53 +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 |
|
|
|
ac7774e0e3
|
fix(api): gracefully handle integrity error on inbound record deletion
|
2026-03-25 10:48:43 +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 |
|
|
|
893be24071
|
feat: add column sorting and advanced filtering for purchase inbound
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-03-02 15:39:32 +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 |
|
|
|
657c916703
|
feat: add post-tax unit price, company filter, and frontend price linkage
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 15:58:55 +08:00 |
|
|
|
3c1c822f88
|
feat: add pre/post-tax price linkage, hide barcode, and tablet adapt
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 15:44:10 +08:00 |
|
|
|
afcf90a859
|
feat: enforce field-level permissions for buy and service modules
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 15:03:44 +08:00 |
|
|
|
379bc5786f
|
feat: implement RBAC for inbound buy module with field-level permissions
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 11:48:33 +08:00 |
|
|
|
5f3ceef3fd
|
修改采购件对于两个搜索框的bug修复
|
2026-02-11 13:39:02 +08:00 |
|
|
|
5532c87684
|
基础信息展示以及搜索逻辑进行修复
|
2026-02-11 13:12:05 +08:00 |
|
|
|
ec16ef8d20
|
对于采购件的内容进行修改,使其填写更加便利加上库位自动加载上一次的逻辑
|
2026-02-11 08:38:12 +08:00 |
|
|
|
d594ed7ef1
|
采购人根据历史上传记录来
|
2026-02-10 17:41:53 +08:00 |
|
|
|
8ee2a9a45b
|
采购人走用户的表
|
2026-02-10 17:20:06 +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 |
|
|
|
1e5627dc0a
|
修改采购件入库逻辑
|
2026-02-05 11:37:06 +08:00 |
|
|
|
cf6a4a8957
|
添加条形码内容
|
2026-02-02 15:06:20 +08:00 |
|
|
|
6f4917f57e
|
针对于采购页面进行优化逻辑
|
2026-01-28 11:49:59 +08:00 |
|
|
|
3afea217b7
|
物料-采购件入库页面功能实现
|
2026-01-27 15:50:23 +08:00 |
|