feat: add material type management dialog with checkbox filter
- Add MaterialTypeManagementDialog for managing MaterialsTypeToBeDeleted table - Implement checkbox-based filtering by manager name with dynamic manager list - Support CRUD operations: create, read, update, delete with local caching - Add "类型管理" button in material validation tab to open the dialog - Include select all/deselect all functionality for manager filters - Track pending changes and show unsaved changes warning Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ from io import StringIO
|
||||
from contextlib import redirect_stdout
|
||||
from gui.widgets import FileSelector, LogText
|
||||
from gui.config_manager import ConfigManager
|
||||
from gui.material_type_management_dialog import MaterialTypeManagementDialog
|
||||
import pandas as pd
|
||||
|
||||
|
||||
@@ -287,6 +288,14 @@ class MaterialValidationTab(ttk.Frame):
|
||||
)
|
||||
self.export_button.pack(side=tk.LEFT, padx=5)
|
||||
|
||||
# 类型管理按钮
|
||||
self.type_management_button = ttk.Button(
|
||||
button_frame,
|
||||
text="类型管理",
|
||||
command=self.open_type_management
|
||||
)
|
||||
self.type_management_button.pack(side=tk.LEFT, padx=5)
|
||||
|
||||
def _create_result_table(self, parent):
|
||||
"""创建结果表格"""
|
||||
# 新列定义:选择、材料名称、材料代码、规格、型号、负责人
|
||||
@@ -802,3 +811,7 @@ class MaterialValidationTab(ttk.Frame):
|
||||
except Exception as e:
|
||||
messagebox.showerror("错误", f"导出失败:{str(e)}")
|
||||
self.log_text.error(f"导出失败:{str(e)}")
|
||||
|
||||
def open_type_management(self):
|
||||
"""打开类型管理窗口"""
|
||||
dialog = MaterialTypeManagementDialog(self, title="物料类型管理")
|
||||
|
||||
Reference in New Issue
Block a user