Add complete UI layer for BOM spec addition operations
- Add frmAddSpec user form with interactive UI for spec management - Implement dynamic checkbox generation for material name selection - Support both macro and granular selection modes for target materials - Add strategy selection dropdown (APPEND/CLONE) - Add cDynamicEvent class for handling dynamic control events - Integrate with mSpecAdditionManager for pipeline execution - Provide real-time validation and user feedback - Enable fine-grained control over which specific BOM rows to modify This creates a user-friendly interface layer on top of the existing strategy pattern architecture, allowing users to visually select materials and execute spec addition operations through a graphical form instead of direct code manipulation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
24
VBA/ClassModules/cDynamicEvent.cls
Normal file
24
VBA/ClassModules/cDynamicEvent.cls
Normal file
@@ -0,0 +1,24 @@
|
||||
' ==============================================================================
|
||||
' 模块名称: cDynamicEvent
|
||||
' 模块类别: 类模块 (Class Module)
|
||||
' 模块职责: 捕获在 Frame 中动态生成的 CheckBox 的点击事件,并触发主窗体的刷新
|
||||
' ==============================================================================
|
||||
Option Explicit
|
||||
|
||||
' 声明一个带有事件的复选框对象
|
||||
Public WithEvents dynCheckBox As MSForms.CheckBox
|
||||
|
||||
' 指向主窗体的引用,用于调用主窗体的方法
|
||||
Public parentForm As Object
|
||||
|
||||
' ------------------------------------------------------------------------------
|
||||
' 当动态生成的复选框被点击时,触发此事件
|
||||
' ------------------------------------------------------------------------------
|
||||
Private Sub dynCheckBox_Click()
|
||||
' 如果父窗体存在,且用户勾选了"显示具体物料",则通知父窗体刷新下方列表
|
||||
If Not parentForm Is Nothing Then
|
||||
If parentForm.chkShowDetails.value = True Then
|
||||
parentForm.RefreshDetailsPanel
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Reference in New Issue
Block a user