导出BOM调整格列位置
This commit is contained in:
@@ -1306,8 +1306,8 @@ Public Class form_BomManage
|
|||||||
|
|
||||||
Dim tmpGrid As New FlexCell.Grid
|
Dim tmpGrid As New FlexCell.Grid
|
||||||
tmpGrid.DisplayRowNumber = True
|
tmpGrid.DisplayRowNumber = True
|
||||||
tmpGrid.Cols = DestBomGridCols.MAX + 1
|
tmpGrid.Cols = DestBomGridCols.MAX + 1 - 2 + 1
|
||||||
tmpGrid.Rows = GrdSourceBom.Rows
|
tmpGrid.Rows = GrdSourceBom.Rows + 3
|
||||||
|
|
||||||
tmpGrid.BackColorFixed = tmpGrid.BackColor1
|
tmpGrid.BackColorFixed = tmpGrid.BackColor1
|
||||||
|
|
||||||
@@ -1316,47 +1316,61 @@ Public Class form_BomManage
|
|||||||
tmpGrid.Cell(0, DestBomGridCols.料号PN).Text = "料号PN"
|
tmpGrid.Cell(0, DestBomGridCols.料号PN).Text = "料号PN"
|
||||||
tmpGrid.Cell(0, DestBomGridCols.物料名称).Text = "物料名称"
|
tmpGrid.Cell(0, DestBomGridCols.物料名称).Text = "物料名称"
|
||||||
tmpGrid.Cell(0, DestBomGridCols.规格描述).Text = "规格描述"
|
tmpGrid.Cell(0, DestBomGridCols.规格描述).Text = "规格描述"
|
||||||
tmpGrid.Cell(0, DestBomGridCols.单位).Text = "单位"
|
tmpGrid.Cell(0, DestBomGridCols.单位).Text = "使用位置"
|
||||||
tmpGrid.Cell(0, DestBomGridCols.用量).Text = "用量"
|
tmpGrid.Cell(0, DestBomGridCols.用量).Text = "单位"
|
||||||
tmpGrid.Cell(0, DestBomGridCols.使用位置).Text = "使用位置"
|
tmpGrid.Cell(0, DestBomGridCols.使用位置).Text = "用量"
|
||||||
tmpGrid.Cell(0, DestBomGridCols.单价).Text = "单价"
|
tmpGrid.Cell(0, DestBomGridCols.单价 + 1).Text = "备注"
|
||||||
tmpGrid.Cell(0, DestBomGridCols.单位总价).Text = "单位总价"
|
'tmpGrid.Cell(0, DestBomGridCols.单价).Text = "单价"‘ 2026 01 23 飞书 DMS工具优化方案,基于原本功能合并表格模版
|
||||||
|
'tmpGrid.Cell(0, DestBomGridCols.单位总价).Text = "单位总价"
|
||||||
|
|
||||||
tmpGrid.Cell(1, DestBomGridCols.序号 + 1).Text = "序号"
|
tmpGrid.Range(1, 1, 1, tmpGrid.Cols - 1).Alignment = FlexCell.AlignmentEnum.LeftGeneral
|
||||||
tmpGrid.Cell(1, DestBomGridCols.工艺流程 + 1).Text = "工艺流程"
|
tmpGrid.Range(1, 1, 1, tmpGrid.Cols - 1).Merge()
|
||||||
tmpGrid.Cell(1, DestBomGridCols.料号PN + 1).Text = "料号PN"
|
'文件编号:DE-BOM-2025040101
|
||||||
tmpGrid.Cell(1, DestBomGridCols.物料名称 + 1).Text = "物料名称"
|
tmpGrid.Cell(1, 1).Text = "文件编号:DE-BOM-" & DateTime.Now.ToString("yyyyMMddHH")
|
||||||
tmpGrid.Cell(1, DestBomGridCols.规格描述 + 1).Text = "规格描述"
|
tmpGrid.Range(2, 1, 2, tmpGrid.Cols - 1).Alignment = FlexCell.AlignmentEnum.LeftGeneral
|
||||||
tmpGrid.Cell(1, DestBomGridCols.单位 + 1).Text = "单位"
|
tmpGrid.Range(2, 1, 2, tmpGrid.Cols - 1).Merge()
|
||||||
tmpGrid.Cell(1, DestBomGridCols.用量 + 1).Text = "用量"
|
'文件日期: 2025-04-01
|
||||||
tmpGrid.Cell(1, DestBomGridCols.使用位置 + 1).Text = "使用位置"
|
tmpGrid.Cell(2, 1).Text = "文件日期: " & DateTime.Now.ToString("yyyy-MM-dd")
|
||||||
tmpGrid.Cell(1, DestBomGridCols.单价 + 1).Text = "单价"
|
|
||||||
tmpGrid.Cell(1, DestBomGridCols.单位总价 + 1).Text = "单位总价"
|
|
||||||
|
|
||||||
For i = 2 To tmpGrid.Rows - 1
|
|
||||||
If String.IsNullOrEmpty(GrdSourceBom.Cell(i, SourceGridCols.料号PN).Text) Then
|
|
||||||
tmpGrid.Cell(i, DestBomGridCols.单价 + 1).Text = "Totel:"
|
|
||||||
|
|
||||||
|
|
||||||
Dim totel As Double = 0
|
tmpGrid.Cell(4, DestBomGridCols.序号 + 1).Text = "序号"
|
||||||
For j = 2 To i - 1
|
tmpGrid.Cell(4, DestBomGridCols.工艺流程 + 1).Text = "工艺流程"
|
||||||
totel += tmpGrid.Cell(j, DestBomGridCols.单位总价 + 1).DoubleValue
|
tmpGrid.Cell(4, DestBomGridCols.料号PN + 1).Text = "料号PN"
|
||||||
Next
|
tmpGrid.Cell(4, DestBomGridCols.物料名称 + 1).Text = "物料名称"
|
||||||
|
tmpGrid.Cell(4, DestBomGridCols.规格描述 + 1).Text = "规格描述"
|
||||||
|
tmpGrid.Cell(4, DestBomGridCols.单位 + 1).Text = "使用位置"
|
||||||
|
tmpGrid.Cell(4, DestBomGridCols.用量 + 1).Text = "单位"
|
||||||
|
tmpGrid.Cell(4, DestBomGridCols.使用位置 + 1).Text = "用量"
|
||||||
|
tmpGrid.Cell(4, DestBomGridCols.单价 + 1).Text = "备注"
|
||||||
|
'tmpGrid.Cell(1, DestBomGridCols.单价 + 1).Text = "单价"
|
||||||
|
'tmpGrid.Cell(1, DestBomGridCols.单位总价 + 1).Text = "单位总价"
|
||||||
|
|
||||||
tmpGrid.Cell(i, DestBomGridCols.单位总价 + 1).Text = totel
|
|
||||||
Continue For
|
|
||||||
End If
|
For i = 5 To tmpGrid.Rows - 1
|
||||||
|
'If String.IsNullOrEmpty(GrdSourceBom.Cell(i, SourceGridCols.料号PN).Text) Then
|
||||||
|
' tmpGrid.Cell(i, DestBomGridCols.单价 + 1).Text = "Totel:"
|
||||||
|
|
||||||
|
|
||||||
|
' Dim totel As Double = 0
|
||||||
|
' For j = 2 To i - 1
|
||||||
|
' totel += tmpGrid.Cell(j, DestBomGridCols.单位总价 + 1).DoubleValue
|
||||||
|
' Next
|
||||||
|
|
||||||
|
' tmpGrid.Cell(i, DestBomGridCols.单位总价 + 1).Text = totel
|
||||||
|
' Continue For
|
||||||
|
'End If
|
||||||
|
|
||||||
tmpGrid.Cell(i, DestBomGridCols.序号 + 1).Text = i - 1
|
tmpGrid.Cell(i, DestBomGridCols.序号 + 1).Text = i - 1
|
||||||
tmpGrid.Cell(i, DestBomGridCols.工艺流程 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.工艺流程).Text
|
tmpGrid.Cell(i, DestBomGridCols.工艺流程 + 1).Text = GrdSourceBom.Cell(i - 1 - 3, SourceGridCols.工艺流程).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.料号PN + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.料号PN).Text
|
tmpGrid.Cell(i, DestBomGridCols.料号PN + 1).Text = GrdSourceBom.Cell(i - 1 - 3, SourceGridCols.料号PN).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.物料名称 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.物料名称).Text
|
tmpGrid.Cell(i, DestBomGridCols.物料名称 + 1).Text = GrdSourceBom.Cell(i - 1 - 3, SourceGridCols.物料名称).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.规格描述 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.规格描述).Text
|
tmpGrid.Cell(i, DestBomGridCols.规格描述 + 1).Text = GrdSourceBom.Cell(i - 1 - 3, SourceGridCols.规格描述).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.单位 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.单位).Text
|
tmpGrid.Cell(i, DestBomGridCols.单位 + 1).Text = GrdSourceBom.Cell(i - 1 - 3, SourceGridCols.使用位置).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.用量 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.用量).Text
|
tmpGrid.Cell(i, DestBomGridCols.用量 + 1).Text = GrdSourceBom.Cell(i - 1 - 3, SourceGridCols.单位).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.使用位置 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.使用位置).Text
|
tmpGrid.Cell(i, DestBomGridCols.使用位置 + 1).Text = GrdSourceBom.Cell(i - 1 - 3, SourceGridCols.用量).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.单价 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.单价).Text
|
'tmpGrid.Cell(i, DestBomGridCols.单价 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.单价).Text
|
||||||
tmpGrid.Cell(i, DestBomGridCols.单位总价 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.用量).IntegerValue * GrdSourceBom.Cell(i - 1, SourceGridCols.单价).DoubleValue
|
'tmpGrid.Cell(i, DestBomGridCols.单位总价 + 1).Text = GrdSourceBom.Cell(i - 1, SourceGridCols.用量).IntegerValue * GrdSourceBom.Cell(i - 1, SourceGridCols.单价).DoubleValue
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
Reference in New Issue
Block a user