refactor: standardize variable naming and file formatting

- Rename Quantity to quantity in BomItem for consistent naming convention
- Update references in MainModule to use lowercase quantity
- Add newlines at end of files for consistency
- Update vba_metadata.json with new source path and document module

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-02 10:01:57 +08:00
parent f3047bccb8
commit 6e45d6bdd2
8 changed files with 19 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ Public RowNumber As Long ' 行号
Public Module As String ' 模块 Public Module As String ' 模块
Public code As String ' 代号 Public code As String ' 代号
Public Name As String ' 名称 Public Name As String ' 名称
Public Quantity As Double ' 数量 Public quantity As Double ' 数量
Public SelectCondition As String ' 选择条件 Public SelectCondition As String ' 选择条件
Public Remark As String ' 备注 Public Remark As String ' 备注
Public category As String ' 类别 Public category As String ' 类别
@@ -46,7 +46,7 @@ Public Sub LoadFromRow(ws As Worksheet, row As Long)
Me.Module = CStr(ws.Cells(row, 2).value) ' B列: 模块 Me.Module = CStr(ws.Cells(row, 2).value) ' B列: 模块
Me.code = CStr(ws.Cells(row, 3).value) ' C列: 代号 Me.code = CStr(ws.Cells(row, 3).value) ' C列: 代号
Me.Name = CStr(ws.Cells(row, 4).value) ' D列: 名称 Me.Name = CStr(ws.Cells(row, 4).value) ' D列: 名称
Me.Quantity = CDbl(ws.Cells(row, 5).value) ' E列: 数量 Me.quantity = CDbl(ws.Cells(row, 5).value) ' E列: 数量
Me.SelectCondition = CStr(ws.Cells(row, 6).value) ' F列: 选择条件 Me.SelectCondition = CStr(ws.Cells(row, 6).value) ' F列: 选择条件
Me.Remark = CStr(ws.Cells(row, 7).value) ' G列: 备注 Me.Remark = CStr(ws.Cells(row, 7).value) ' G列: 备注
Me.category = CStr(ws.Cells(row, 8).value) ' H列: 类别 Me.category = CStr(ws.Cells(row, 8).value) ' H列: 类别

View File

@@ -0,0 +1,4 @@
Private Sub CommandButton1_Click()
Call ProcessProductModels
Call ProcessOrdersToBIP
End Sub

View File

@@ -275,7 +275,7 @@ Private Function CreateOutputRowArray(FullModel As String, _
rowData(col) = item.Module: col = col + 1 rowData(col) = item.Module: col = col + 1
rowData(col) = item.code: col = col + 1 rowData(col) = item.code: col = col + 1
rowData(col) = item.Name: col = col + 1 rowData(col) = item.Name: col = col + 1
rowData(col) = item.Quantity: col = col + 1 rowData(col) = item.quantity: col = col + 1
rowData(col) = item.category: col = col + 1 rowData(col) = item.category: col = col + 1
rowData(col) = item.Code66: col = col + 1 rowData(col) = item.Code66: col = col + 1
Else Else

View File

@@ -1,6 +1,12 @@
{ {
"source_file": "C:\\Users\\pengq\\Downloads\\AutoBOM\\AutoBOM\\YTHN-100_-_Claude3.xlsm", "source_file": "C:\\Users\\Administrator\\Desktop\\新BOM\\AutoBOM\\YTHN-100.xlsm",
"modules": { "modules": {
"Sheet9.cls": {
"name": "Sheet9",
"type": "DocumentModules",
"attributes": {},
"file": "DocumentModules\\Sheet9.cls"
},
"MainModule.bas": { "MainModule.bas": {
"name": "MainModule", "name": "MainModule",
"type": "Modules", "type": "Modules",