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: 新增含税总价可输入反算功能
This commit is contained in:
yueli
2026-07-15 15:03:37 +08:00
parent 0651eb07fa
commit 4b1a86a870
5 changed files with 271 additions and 23 deletions

View File

@ -62,16 +62,16 @@ def filter_item_by_permissions(item_dict, user_permissions):
# 状态
'status': 'inbound_buy:status',
'inspection_status': 'inbound_buy:inspection_status',
# 数量(三组命名,覆盖 model to_dict 中所有 key)
'in_quantity': 'inbound_buy:in_quantity',
'qty_inbound': 'inbound_buy:in_quantity',
'stock_quantity': 'inbound_buy:stock_quantity',
'qty_stock': 'inbound_buy:stock_quantity',
'available_quantity': 'inbound_buy:available_quantity',
'qty_available': 'inbound_buy:available_quantity',
# 数量(对齐 sys_element 中实际存在的权限码)
'in_quantity': 'inbound_buy:qty_inbound',
'qty_inbound': 'inbound_buy:qty_inbound',
'stock_quantity': 'inbound_buy:qty_stock',
'qty_stock': 'inbound_buy:qty_stock',
'available_quantity': 'inbound_buy:qty_available',
'qty_available': 'inbound_buy:qty_available',
# 价格
'unit_price': 'inbound_buy:unit_price',
'post_tax_unit_price': 'inbound_buy:post_tax_unit_price',
'post_tax_unit_price': 'inbound_buy:unit_price',
'total_price': 'inbound_buy:total_price',
'tax_rate': 'inbound_buy:tax_rate',
'currency': 'inbound_buy:currency',