refactor: move action buttons to right panel for User mode in material validation
Move the four action buttons (全选, 取消全选, 确认删除, 执行删除) from the top control panel to the right-side panel below 显示全部 for User mode. Admin users continue to see these buttons in the top control panel. Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
@@ -185,6 +185,8 @@ class MaterialValidationTab(BaseTab):
|
||||
)
|
||||
self.start_button.pack(side=tk.LEFT, padx=5)
|
||||
|
||||
# 全选、取消全选、确认删除、执行删除按钮 - 仅管理员显示在顶部控制面板
|
||||
if self.session_manager.is_admin():
|
||||
# 全选按钮
|
||||
self.select_all_button = ttk.Button(
|
||||
button_frame,
|
||||
@@ -377,6 +379,45 @@ class MaterialValidationTab(BaseTab):
|
||||
)
|
||||
self.btn_show_all.pack(fill=tk.X, pady=2)
|
||||
|
||||
# 分隔线
|
||||
ttk.Separator(button_frame, orient='horizontal').pack(fill=tk.X, pady=5)
|
||||
|
||||
# 全选按钮
|
||||
self.select_all_button = ttk.Button(
|
||||
button_frame,
|
||||
text="全选",
|
||||
command=lambda: self._select_all(check=True),
|
||||
state=tk.DISABLED
|
||||
)
|
||||
self.select_all_button.pack(fill=tk.X, pady=2)
|
||||
|
||||
# 取消全选按钮
|
||||
self.deselect_all_button = ttk.Button(
|
||||
button_frame,
|
||||
text="取消全选",
|
||||
command=lambda: self._select_all(check=False),
|
||||
state=tk.DISABLED
|
||||
)
|
||||
self.deselect_all_button.pack(fill=tk.X, pady=2)
|
||||
|
||||
# 确认删除按钮
|
||||
self.confirm_delete_button = ttk.Button(
|
||||
button_frame,
|
||||
text="确认删除",
|
||||
command=self.confirm_deletion,
|
||||
state=tk.DISABLED
|
||||
)
|
||||
self.confirm_delete_button.pack(fill=tk.X, pady=2)
|
||||
|
||||
# 执行删除按钮
|
||||
self.execute_delete_button = ttk.Button(
|
||||
button_frame,
|
||||
text="执行删除",
|
||||
command=self.start_delete_execution,
|
||||
state=tk.DISABLED
|
||||
)
|
||||
self.execute_delete_button.pack(fill=tk.X, pady=2)
|
||||
|
||||
def _hide_checked_items(self):
|
||||
"""隐藏所有已勾选的物料"""
|
||||
checked_items = self.tree.get_checked_items()
|
||||
|
||||
Reference in New Issue
Block a user