'''
e.Form.BaseForm.Close
e.Form.BaseForm.Opacity = 0
If Not Tables.Contains("temp入库单") Then
Dim dtb As New DataTableBuilder("temp入库单")
dtb.AddDef("入库日期", Gettype(Date))
dtb.AddDef("内外销", Gettype(String), 5)
dtb.AddDef("fa piao号", Gettype(String), 30)
dtb.AddDef("客户", Gettype(String), 20)
dtb.AddDef("客户PO", Gettype(String), 35)
dtb.AddDef("客户PN", Gettype(String), 80)
dtb.AddDef("订单批号", Gettype(String), 16)
dtb.AddDef("产品尺寸", Gettype(String), 85)
dtb.AddDef("磁性能", Gettype(String), 20)
dtb.AddDef("覆盖层", Gettype(String), 15)
dtb.AddDef("重量", Gettype(Double), "", "重量_(kg)")
dtb.AddDef("数量", Gettype(Integer))
dtb.AddDef("含税采购价", Gettype(Double), "", "含税单价_(RMB)")
dtb.AddDef("含税金额", Gettype(Double), "", "含税金额_(RMB)")
dtb.AddDef("所属部门", Gettype(String), 10)
dtb.AddDef("开piao名称", Gettype(String), 6)
dtb.AddDef("备注", Gettype(String), 100)
dtb.Build()
With Tables("temp入库单")
.SetColVisibleWidth(Tables("成本入库").GetColVisibleWidth())
.Cols("入库日期").TextAlign = TextAlignEnum.Center
.Cols("内外销").TextAlign = TextAlignEnum.Center
.Cols("所属部门").TextAlign = TextAlignEnum.Center
.DataTable.DataCols("重量").Decimals = 3
.DataTable.DataCols("重量").SetFormat("0.000")
.DataTable.DataCols("含税采购价").SetFormat("0.0000")
.DataTable.DataCols("含税金额").SetFormat("0.00")
.Cols("重量").GrandTotal = True
.Cols("含税金额").GrandTotal = True
.GrandTotal = True
End With
End If
Forms("成本入库单").Open()
MainTable= Tables("temp入库单")