资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:131k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form Cask_Wrappage
- BorderStyle = 1 'Fixed Single
- Caption = "包装物档案"
- ClientHeight = 7110
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 9375
- HelpContextID = 1711004
- Icon = "包装物管理系统_基础设置_包装物档案.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form2"
- MaxButton = 0 'False
- ScaleHeight = 7110
- ScaleWidth = 9375
- StartUpPosition = 2 '屏幕中心
- Begin TabDlg.SSTab StTab
- Height = 6435
- Left = 30
- TabIndex = 8
- Top = 660
- Width = 9330
- _ExtentX = 16457
- _ExtentY = 11351
- _Version = 393216
- Style = 1
- Tabs = 2
- TabHeight = 520
- TabCaption(0) = "列表视图"
- TabPicture(0) = "包装物管理系统_基础设置_包装物档案.frx":08CA
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "CzxsGrid"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).ControlCount= 1
- TabCaption(1) = "单张视图"
- TabPicture(1) = "包装物管理系统_基础设置_包装物档案.frx":08E6
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Frame1"
- Tab(1).ControlCount= 1
- Begin VB.Frame Frame1
- Height = 6015
- Left = -74910
- TabIndex = 11
- Top = 330
- Width = 9135
- Begin VB.CommandButton BcCommand
- Caption = "保存(&S)"
- Height = 300
- Left = 6690
- TabIndex = 5
- Top = 210
- Width = 1120
- End
- Begin VB.CommandButton QxCommand
- Cancel = -1 'True
- Caption = "取消(&C)"
- Height = 300
- Left = 7890
- TabIndex = 6
- Top = 210
- Width = 1120
- End
- Begin TabDlg.SSTab SSTab1
- Height = 5625
- Left = 90
- TabIndex = 13
- Top = 300
- Width = 8925
- _ExtentX = 15743
- _ExtentY = 9922
- _Version = 393216
- Style = 1
- TabHeight = 520
- TabCaption(0) = "基本信息"
- TabPicture(0) = "包装物管理系统_基础设置_包装物档案.frx":0902
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame2"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).ControlCount= 1
- TabCaption(1) = "附属物"
- TabPicture(1) = "包装物管理系统_基础设置_包装物档案.frx":091E
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Grid_Layout"
- Tab(1).Control(1)= "Ydtext"
- Tab(1).Control(2)= "Ydcommand"
- Tab(1).Control(3)= "YdCombo"
- Tab(1).ControlCount= 4
- TabCaption(2) = "包装参数"
- TabPicture(2) = "包装物管理系统_基础设置_包装物档案.frx":093A
- Tab(2).ControlEnabled= 0 'False
- Tab(2).Control(0)= "Grid_Datum"
- Tab(2).Control(1)= "YdCombo2"
- Tab(2).Control(2)= "Ydtext2"
- Tab(2).Control(3)= "Ydcommand22"
- Tab(2).ControlCount= 4
- Begin VB.CommandButton Ydcommand22
- Height = 300
- Left = -68550
- Picture = "包装物管理系统_基础设置_包装物档案.frx":0956
- Style = 1 'Graphical
- TabIndex = 25
- Top = 360
- Visible = 0 'False
- Width = 300
- End
- Begin VB.TextBox Ydtext2
- BackColor = &H80000018&
- BorderStyle = 0 'None
- Height = 330
- Left = -67710
- MultiLine = -1 'True
- TabIndex = 24
- Top = 360
- Visible = 0 'False
- Width = 1185
- End
- Begin VB.ComboBox YdCombo2
- Height = 300
- Left = -68520
- Style = 2 'Dropdown List
- TabIndex = 23
- Top = 390
- Visible = 0 'False
- Width = 1155
- End
- Begin VB.ComboBox YdCombo
- Height = 300
- Left = -68100
- Style = 2 'Dropdown List
- TabIndex = 21
- Top = 480
- Visible = 0 'False
- Width = 1155
- End
- Begin VB.CommandButton Ydcommand
- Height = 300
- Left = -68460
- Picture = "包装物管理系统_基础设置_包装物档案.frx":0CE0
- Style = 1 'Graphical
- TabIndex = 20
- Top = 600
- Visible = 0 'False
- Width = 300
- End
- Begin VB.TextBox Ydtext
- BackColor = &H80000018&
- BorderStyle = 0 'None
- Height = 330
- Left = -70140
- MultiLine = -1 'True
- TabIndex = 19
- Top = 510
- Visible = 0 'False
- Width = 1185
- End
- Begin VB.Frame Frame2
- Height = 5175
- Left = 120
- TabIndex = 14
- Top = 330
- Width = 8685
- Begin VB.CommandButton Ydcommand1
- Height = 300
- Index = 3
- Left = 4020
- Picture = "包装物管理系统_基础设置_包装物档案.frx":106A
- Style = 1 'Graphical
- TabIndex = 30
- Top = 1470
- Visible = 0 'False
- Width = 300
- End
- Begin VB.CommandButton Ydcommand1
- Height = 300
- Index = 2
- Left = 4020
- Picture = "包装物管理系统_基础设置_包装物档案.frx":13F4
- Style = 1 'Graphical
- TabIndex = 29
- Top = 1110
- Visible = 0 'False
- Width = 300
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 4
- Left = 1485
- TabIndex = 4
- Text = "4"
- Top = 1860
- Width = 2835
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 3
- Left = 1485
- TabIndex = 3
- Text = "3"
- Top = 1485
- Width = 2535
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 2
- Left = 1485
- TabIndex = 2
- Text = "2"
- Top = 1110
- Width = 2535
- End
- Begin VB.CommandButton Ydcommand1
- Height = 300
- Index = 0
- Left = 4590
- Picture = "包装物管理系统_基础设置_包装物档案.frx":177E
- Style = 1 'Graphical
- TabIndex = 15
- Top = 390
- Visible = 0 'False
- Width = 300
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 1
- Left = 1485
- TabIndex = 1
- Text = "1"
- Top = 735
- Width = 2835
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 0
- Left = 1485
- TabIndex = 0
- Text = "0"
- Top = 360
- Width = 2835
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- Caption = "备注:"
- Height = 180
- Index = 5
- Left = 450
- TabIndex = 28
- Top = 1980
- Width = 450
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- Caption = "类别:"
- Height = 180
- Index = 2
- Left = 450
- TabIndex = 27
- Top = 1590
- Width = 450
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- Caption = "计量单位:"
- Height = 180
- Index = 4
- Left = 450
- TabIndex = 18
- Top = 1140
- Width = 810
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- Caption = "包装物名称:"
- Height = 180
- Index = 1
- Left = 450
- TabIndex = 17
- Top = 780
- Width = 990
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- Caption = "包装物编码:"
- Height = 180
- Index = 0
- Left = 450
- TabIndex = 16
- Top = 420
- Width = 990
- End
- End
- Begin VSFlex8Ctl.VSFlexGrid Grid_Layout
- Height = 5025
- Left = -74880
- TabIndex = 22
- Top = 480
- Width = 8685
- _cx = 5080
- _cy = 5080
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483643
- ForeColorSel = -2147483640
- BackColorBkg = 8421504
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = 0 'False
- AllowBigSelection= 0 'False
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 5000
- Cols = 10
- FixedRows = 1
- FixedCols = 0
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- ShowComboButton = 1
- WordWrap = -1 'True
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- DataMember = ""
- ComboSearch = 3
- AutoSizeMouse = -1 'True
- FrozenRows = 0
- FrozenCols = 0
- AllowUserFreezing= 0
- BackColorFrozen = 0
- ForeColorFrozen = 0
- WallPaperAlignment= 9
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- Begin VSFlex8Ctl.VSFlexGrid Grid_Datum
- Height = 5025
- Left = -74880
- TabIndex = 26
- Top = 480
- Width = 8685
- _cx = 5080
- _cy = 5080
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483643
- ForeColorSel = -2147483640
- BackColorBkg = 8421504
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = 0 'False
- AllowBigSelection= 0 'False
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 5000
- Cols = 10
- FixedRows = 1
- FixedCols = 0
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- ShowComboButton = 1
- WordWrap = -1 'True
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- DataMember = ""
- ComboSearch = 3
- AutoSizeMouse = -1 'True
- FrozenRows = 0
- FrozenCols = 0
- AllowUserFreezing= 0
- BackColorFrozen = 0
- ForeColorFrozen = 0
- WallPaperAlignment= 9
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- Height = 180
- Index = 3
- Left = 555
- TabIndex = 12
- Top = 1740
- Width = 90
- End
- End
- Begin VSFlex8Ctl.VSFlexGrid CzxsGrid
- Height = 5955
- Left = 90
- TabIndex = 7
- Top = 390
- Width = 9135
- _cx = 5080
- _cy = 5080
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = 8421504
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 5000
- Cols = 10
- FixedRows = 1
- FixedCols = 0
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- ShowComboButton = 1
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- DataMember = ""
- ComboSearch = 3
- AutoSizeMouse = -1 'True
- FrozenRows = 0
- FrozenCols = 0
- AllowUserFreezing= 0
- BackColorFrozen = 0
- ForeColorFrozen = 0
- WallPaperAlignment= 9
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 9
- Top = 0
- Width = 9375
- _ExtentX = 16536
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 15
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- ImageKey = "sz"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- Object.ToolTipText = "点击或按Ctrl+P打印表格"
- ImageKey = "dy"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "预览"
- Key = "yl"
- ImageKey = "yl"
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "增加"
- Key = "zj"
- Object.ToolTipText = "点击或按Ctrl+A增加记录"
- ImageKey = "xz"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "修改"
- Key = "xg"
- ImageKey = "xg"
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "删除"
- Key = "sc"
- Object.ToolTipText = "点击或按Ctrl+D删除当前记录"
- ImageKey = "sc"
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "增行"
- Key = "zh"
- ImageKey = "zh"
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "删行"
- Key = "sh"
- ImageKey = "sh"
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "sx"
- ImageKey = "sx"
- EndProperty
- BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 525
- Left = 6870
- TabIndex = 10
- Top = 0
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 926
- ButtonWidth = 1455
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 3
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "保存格式"
- Key = "bcgs"
- ImageKey = "bcgs"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "默认列宽"
- Key = "hfmrgs"
- ImageKey = "mrlk"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "显示项目"
- Key = "szxsxm"
- ImageKey = "xsxm"
- EndProperty
- EndProperty
- End
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 0
- Top = 420
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 29
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":1B08
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":1EA2
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":223C
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":25D6
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":2970
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":2D0A
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":30A4
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":343E
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":37D8
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":3B72
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":3F0C
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":42A6
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":4640
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":49DA
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":4D74
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":510E
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":54A8
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":5842
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":5BDC
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":5F76
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":6310
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":66AA
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":6A44
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":6DDE
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":7178
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":7512
- Key = "dz"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":78AC
- Key = "ph"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":7C46
- Key = "fz"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "包装物管理系统_基础设置_包装物档案.frx":7FE0
- Key = "dw"
- EndProperty
- EndProperty
- End
- End
- Attribute VB_Name = "Cask_Wrappage"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**********************************************************
- '* 模 块 名 称 :包装物档案
- '* 功 能 描 述 :
- '* 程序员姓名 :邹力
- '* 最后修改人 :邹力
- '* 最后修改时间:2001/12/03
- '* 备 注:封版(*所有自定义部分程序均用[>> <<]括起)
- '**********************************************************
- Dim Rec_CodeSet As New ADODB.Recordset '编码设置表
- Dim jdzygs As Integer '控件焦点转移个数
- Dim Lrzt As Integer '录入包装物标志(0-非录入包装物 1-增加 2-修改)
- Dim ReportTitle As String '报表主标题
- Dim Str_RightEdit As String '编辑(新增、修改、删除)权限索引
- '以下为固定使用变量(网格)
- Dim Cxnrrec As New ADODB.Recordset '显示查询内容动态集
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim Tsxx As String '系统提示信息
- Dim Qslz As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd As Double '网格数据行高度
- Dim GridBoolean() As Boolean '网格列信息(布尔型)
- Dim GridStr() As String '网格列信息(字符型)
- Dim GridInt() As Integer '网格列信息(整型)
- Dim Szzls As Integer '数组总列数(网格列数-1)
- '以下为固定使用变量(文本框)
- Dim Textvar() As Variant '存储变体型文本框信息
- Dim Textboolean() As Boolean '存储布尔型文本框信息
- Dim Textint() As Integer '存储整型文本框信息
- Dim Textstr() As String '存储字符型文本框信息
- Dim Max_Text_Index As Integer '最大录入文本框索引值
- Dim TextGroupCode As String '文本框录入分组编码
- Dim TextValiLock As Boolean '文本框失去焦点是否进行有效性控制判断
- Dim TextValiJudgeLock() As Boolean '文本框录入有效性判断控制锁
- Dim CurTextIndex As Integer '当前文本框索引值
- Dim TextChangeLock As Boolean '文本框内容变换控制锁
- Dim Bln_Cancel As Boolean '取消按钮信息传递
- '******* sup_Product
- Dim Cxnrrec1 As New ADODB.Recordset '显示查询内容动态集
- Dim GridCode1 As String '显示网格网格代码
- Dim GridInf1() As Variant '整个网格设置信息
- Dim Tsxx1 As String '系统提示信息
- Dim Qslz1 As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd1 As Double '网格数据行高度
- Dim GridBoolean1() As Boolean '网格列信息(布尔型)
- Dim GridStr1() As String '网格列信息(字符型)
- Dim GridInt1() As Integer '网格列信息(整型)
- Dim Szzls1 As Integer '数组总列数(网格列数-1)
- Dim Pmbcsjhs1 As Long '屏幕网格保持数据行数(大于等于1)
- Dim Fzxwghs1 As Integer '辅助项网格行数(包括合计行)
- Dim Sfxshjwg1 As Boolean '是否显示合计网格
- Dim Sfblbzkd1 As Boolean '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
- Dim Dqlrwgh1 As Long '当前录入数据网格行
- Dim Dqlrwgl1 As Long '当前录入数据网格列
- Dim Dqlkwgh1 As Long '刚刚离开网格行(不一定为录入行)
- Dim Dqlkwgl1 As Long '刚刚离开网格列
- Dim Dqtoprow1 As Long '当前录入状态时最上端可视行
- Dim Dqleftcol1 As Long '当前录入状态时最左端可视列
- Dim Zdlrqnr1 As String '字段录入修改前内容(用来判断内容是否修改)
- Dim Wbkbhlock1 As Boolean '文本框改变值锁
- Dim changelock1 As Boolean '网格行列改变控制锁(用来区别用户改变.程序改变)
- Dim Gdtlock1 As Boolean '滚动条滚动控制(用来区别用户改变.程序改变)
- Dim Yxxpdlock1 As Boolean '字段有效性判断锁(内容不修改不需进行字段有效性判断)
- Dim Hyxxpdlock1 As Boolean '行有效性判断锁(字段内容不修改不需进行行有效性判断)
- Dim Valilock1 As Boolean '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
- Dim Shsfts1 As Boolean '删除记录行是否提示
- '******* sup_ProLine
- Dim Cxnrrec2 As New ADODB.Recordset '显示查询内容动态集
- Dim GridCode2 As String '显示网格网格代码
- Dim GridInf2() As Variant '整个网格设置信息
- Dim Tsxx2 As String '系统提示信息
- Dim Qslz2 As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd2 As Double '网格数据行高度
- Dim GridBoolean2() As Boolean '网格列信息(布尔型)
- Dim GridStr2() As String '网格列信息(字符型)
- Dim GridInt2() As Integer '网格列信息(整型)
- Dim Szzls2 As Integer '数组总列数(网格列数-1)
- Dim Pmbcsjhs2 As Long '屏幕网格保持数据行数(大于等于1)
- Dim Fzxwghs2 As Integer '辅助项网格行数(包括合计行)
- Dim Sfxshjwg2 As Boolean '是否显示合计网格
- Dim Sfblbzkd2 As Boolean '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
- Dim Dqlrwgh2 As Long '当前录入数据网格行
- Dim Dqlrwgl2 As Long '当前录入数据网格列
- Dim Dqlkwgh2 As Long '刚刚离开网格行(不一定为录入行)
- Dim Dqlkwgl2 As Long '刚刚离开网格列
- Dim Dqtoprow2 As Long '当前录入状态时最上端可视行
- Dim Dqleftcol2 As Long '当前录入状态时最左端可视列
- Dim Zdlrqnr2 As String '字段录入修改前内容(用来判断内容是否修改)
- Dim Wbkbhlock2 As Boolean '文本框改变值锁
- Dim changelock2 As Boolean '网格行列改变控制锁(用来区别用户改变.程序改变)
- Dim Gdtlock2 As Boolean '滚动条滚动控制(用来区别用户改变.程序改变)
- Dim Yxxpdlock2 As Boolean '字段有效性判断锁(内容不修改不需进行字段有效性判断)
- Dim Hyxxpdlock2 As Boolean '行有效性判断锁(字段内容不修改不需进行行有效性判断)
- Dim Valilock2 As Boolean '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
- Dim Shsfts2 As Boolean '删除记录行是否提示
- Dim RecTemp As ADODB.Recordset
- Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
- jdzygs = 10
- Select Case KeyAscii
- Case vbKeyReturn
- If Kjjdzy(jdzygs) Then
- KeyAscii = 0
- End If
- Case 39 '屏蔽"'"
- KeyAscii = 0
- End Select
- End Sub
- Private Sub Form_Load()
- '打印报表标题信息
- ReportTitle = "包装物档案"
- '调入打印页面设置窗体
- XtReportCode = "Cask_Wrappage"
- Load Dyymctbl
- '以下为文本框处理程序(读入文本框录入信息)
- TextGroupCode = "Cask_Wrappage"
- Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())
- Call Wbkcsh
- '调入网格设置信息
- GridCode = "Cask_Wrappage"
- Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Szzls = CzxsGrid.Cols - 1
- CzxsGrid.Cols = CzxsGrid.Cols + 2
- CzxsGrid.ColHidden(CzxsGrid.Cols - 1) = True
- CzxsGrid.ColHidden(CzxsGrid.Cols - 2) = True
- '调 入 网 格 附属物
- GridCode1 = "Cask_Appertain"
- Call BzWgcsh(Grid_Layout, GridCode1, GridInf1(), GridBoolean1(), GridInt1(), GridStr1())
- Qslz1 = GridInf1(1)
- Sjhgd1 = GridInf1(2)
- Szzls1 = Grid_Layout.Cols - 1
- Pmbcsjhs1 = GridInf1(3)
- Fzxwghs1 = GridInf1(4)
- Sfblbzkd1 = GridInf1(5)
- Shsfts1 = GridInf1(6)
- Sfxshjwg1 = GridInf1(7)
- '调 入 网 格 包装参数
- GridCode2 = "Cask_Parameter"
- Call BzWgcsh(Grid_Datum, GridCode2, GridInf2(), GridBoolean2(), GridInt2(), GridStr2())
- Qslz2 = GridInf2(1)
- Sjhgd2 = GridInf2(2)
- Szzls2 = Grid_Datum.Cols - 1
- Pmbcsjhs2 = GridInf2(3)
- Fzxwghs2 = GridInf2(4)
- Sfblbzkd2 = GridInf2(5)
- Shsfts2 = GridInf2(6)
- Sfxshjwg2 = GridInf2(7)
- '重置网格
- With Grid_Layout
- .Rows = Pmbcsjhs1 + .FixedRows + Fzxwghs1 + 1
- For Jsqte = .FixedRows To .Rows - 1
- .RowHeight(Jsqte) = Sjhgd1
- Next Jsqte
- .Clear 1
- changelock1 = True
- .Select .FixedRows, Qslz1
- changelock1 = False
- End With
- With Grid_Datum
- .Rows = Pmbcsjhs2 + .FixedRows + Fzxwghs2 + 1
- For Jsqte = .FixedRows To .Rows - 1
- .RowHeight(Jsqte) = Sjhgd2
- Next Jsqte
- .Clear 1
- changelock2 = True
- .Select .FixedRows, Qslz
- changelock2 = False
- End With
- SzToolbar.Buttons("zh").Enabled = False
- SzToolbar.Buttons("sh").Enabled = False
- '填 充 网 格
- Call Cxnrtcwg
- '初始化ToolBar,Tab卡包装物
- StTab.Tab = 0
- StTab.TabEnabled(1) = False
- Frame1.Enabled = False
- '设置为非录入包装物
- Lrzt = 0
- '编辑(新增、修改、删除)权限索引
- Str_RightEdit = "Cask_WrappageEdit"
- End Sub
- Private Sub Cxnrtcwg() '查询内容填充网格
- Dim Sqlstr As String '查询连接串
- Dim Jsqte As Long '查询临时使用变量
- '为加快显示速度,将网格刷新动作冻结
- CzxsGrid.Redraw = False
- '[>>查询连接串
- Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName " & _
- "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
- "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
- "Gy_UnitSet.UnitCode Order By WrappageCode"
- '<<]
- Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With Cxnrrec
- CzxsGrid.Rows = CzxsGrid.FixedRows
- If .EOF And .BOF Then
- CzxsGrid.Redraw = True
- Exit Sub
- End If
- Jsqte = CzxsGrid.FixedRows
- Do While Not .EOF
- CzxsGrid.AddItem ""
- Call Jltcwg(Cxnrrec, Jsqte) '调入填充网格子过程
- CzxsGrid.RowHeight(Jsqte) = Sjhgd '设置网格高度
- .MoveNext
- Jsqte = Jsqte + 1
- Loop
- End With
- '将网格刷新动作解冻
- CzxsGrid.Redraw = True
- End Sub
- Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long) '记录内容填充网格
- '[>>以下为自定义部分
- With Jlbrec
- CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(!WrappageCode & "") '包装物编码
- CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(!WrappageName & "") '包装物名称
- CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(!UnitName & "") '计量单位名称
- CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(!SortName & "") '类别名称
- CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(!Remark & "") '备注
- CzxsGrid.TextMatrix(Rowjsq, CzxsGrid.Cols - 2) = Trim(!UnitCode & "") '计量单位编码
- CzxsGrid.TextMatrix(Rowjsq, CzxsGrid.Cols - 1) = Trim(!SortCode & "") '类别编码
- End With
- '以上为自定义部分<<]
- End Sub
- Private Sub Form_Unload(Cancel As Integer) '窗体卸载
- Set Cxnrrec = Nothing
- Set Rec_CodeSet = Nothing
- Unload Dyymctbl
- End Sub
- Private Function Bclrsj() As Boolean '判断录入数据有效性,并保存数据
- Dim Jsqte As Integer
- '对文本框录入内容进行为零和为空判断(固定不变)
- With Rec_CodeSet
- For Jsqte = 0 To Max_Text_Index
- If Textint(Jsqte, 8) = 1 Then '字段不能为空
- If Len(Trim(LrText(Jsqte).Text)) = 0 Then
- Tsxx = Textstr(Jsqte, 7) & "不能为空!"
- SSTab1.Tab = 0
- Call Xtxxts(Tsxx, 0, 1)
- LrText(Jsqte).SetFocus
- Bclrsj = False
- Exit Function
- End If
- Else
- If Textint(Jsqte, 8) = 2 Then '字段不能为零
- If Val(Trim(LrText(Jsqte).Text)) = 0 Then
- Tsxx = Textstr(Jsqte, 7) & "不能为零!"
- SSTab1.Tab = 0
- Call Xtxxts(Tsxx, 0, 1)
- LrText(Jsqte).SetFocus
- Bclrsj = False
- Exit Function
- End If
- End If
- End If
- Next Jsqte
- '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
- For Jsqte = 0 To Max_Text_Index
- If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
- If Not TextYxxpd(Jsqte) Then
- Exit Function
- End If
- End If
- Next Jsqte
- If Lrzt = 1 Then '增 加
- '[>>判断编码是否重复
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Wrappage WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If Not .EOF Then
- Tsxx = "包装物编码重复!"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(0).SetFocus
- Bclrsj = False
- Exit Function
- End If
- '判断名称是否重复
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Wrappage WHERE WrappageName= '" + Trim(LrText(1).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If Not .EOF Then
- Tsxx = "包装物名称重复!"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(1).SetFocus
- Bclrsj = False
- Exit Function
- End If
- '判断记录内容无误后,将记录内容写入数据表
- On Error GoTo Swcwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- .AddNew
- .Fields("WrappageCode") = Trim(LrText(0).Text) '包装物编码
- .Fields("WrappageName") = Trim(LrText(1).Text) '包装物名称
- .Fields("UnitCode") = Trim(LrText(2).Tag) '计量单位编码
- .Fields("SortCode") = Trim(LrText(3).Tag) '类型编码
- .Fields("Remark") = Trim(LrText(4).Text) '备注
- .Update
- Cw_DataEnvi.DataConnect.Execute "delete Cask_Appertain where WrappageCode= '" & Trim(LrText(0).Text) & "'"
- '附属物
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- For Jsqte = Grid_Layout.FixedRows To Grid_Layout.Rows - 1
- If Grid_Layout.TextMatrix(Jsqte, 0) = "*" Then
- .AddNew
- .Fields("WrappageCode") = Trim(LrText(0).Text) '包装物编码
- .Fields("AppertainCode") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("001", GridStr1(), Szzls1))) '附属物编码
- .Fields("UnitPrice") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("004", GridStr1(), Szzls1))) '单价
- .Fields("Quantity") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("005", GridStr1(), Szzls1))) '数量
- .Fields("Remark") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("006", GridStr1(), Szzls1))) '备注
- .Fields("DataType") = 1 '数据类型
- .Update
- End If
- Next Jsqte
- '包装参数
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- For Jsqte = Grid_Datum.FixedRows To Grid_Datum.Rows - 1
- If Grid_Datum.TextMatrix(Jsqte, 0) = "*" Then
- .AddNew
- .Fields("WrappageCode") = Trim(LrText(0).Text) '包装物编码
- .Fields("AppertainCode") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("001", GridStr2(), Szzls2))) '物料编码
- .Fields("UnitPrice") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("005", GridStr2(), Szzls2))) '单价
- .Fields("Quantity") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("006", GridStr2(), Szzls2))) '数量
- .Fields("Remark") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("007", GridStr2(), Szzls2))) '备注
- .Fields("DataType") = 2 '数据类型
- .Update
- End If
- Next Jsqte
- Cw_DataEnvi.DataConnect.CommitTrans
- '将记录加入网格
- Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName " & _
- "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
- "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
- "Gy_UnitSet.UnitCode WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'"
- Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With CzxsGrid
- .AddItem ""
- .RowHeight(.Rows - 1) = Sjhgd
- .Select .Rows - 1, Qslz
- Call Jltcwg(Cxnrrec, .Rows - 1)
- End With
- Tsxx = "保存完毕!"
- Call Xtxxts(Tsxx, 0, 4)
- Call Cshlrxx(1)
- LrText(0).SetFocus
- '将网格按编码排序
- With CzxsGrid
- .Col = Sydz("001", GridStr(), Szzls)
- CzxsGrid.Sort = flexSortStringAscending
- End With
- '<<]
- Else '否则为修改记录
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Wrappage WHERE WrappageName= '" + Trim(LrText(1).Text) + "' and WrappageCode<>'" & Trim(LrText(0).Text) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If Not .EOF Then
- Tsxx = "包装物名称!"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(1).SetFocus
- Bclrsj = False
- Exit Function
- End If
- On Error GoTo Swcwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Wrappage WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If Not .EOF Then
- .Fields("WrappageName") = Trim(LrText(1).Text) '包装物名称
- .Fields("UnitCode") = Trim(LrText(2).Tag) '计量单位编码
- .Fields("SortCode") = Trim(LrText(3).Tag) '类型编码
- .Fields("Remark") = Trim(LrText(4).Text) '备注
- .Update
- End If
- Cw_DataEnvi.DataConnect.Execute "delete Cask_Appertain where WrappageCode= '" & Trim(LrText(0).Text) & "'"
- '附属物
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- For Jsqte = Grid_Layout.FixedRows To Grid_Layout.Rows - 1
- If Grid_Layout.TextMatrix(Jsqte, 0) = "*" Then
- .AddNew
- .Fields("WrappageCode") = Trim(LrText(0).Text) '包装物编码
- .Fields("AppertainCode") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("001", GridStr1(), Szzls1))) '附属物编码
- .Fields("UnitPrice") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("004", GridStr1(), Szzls1))) '单价
- .Fields("Quantity") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("005", GridStr1(), Szzls1))) '数量
- .Fields("Remark") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("006", GridStr1(), Szzls1))) '备注
- .Fields("DataType") = 1 '数据类型
- .Update
- End If
- Next Jsqte
- '包装参数
- If .State = 1 Then .Close
- .Open "SELECT * FROM Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- For Jsqte = Grid_Datum.FixedRows To Grid_Datum.Rows - 1
- If Grid_Datum.TextMatrix(Jsqte, 0) = "*" Then
- .AddNew
- .Fields("WrappageCode") = Trim(LrText(0).Text) '包装物编码
- .Fields("AppertainCode") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("001", GridStr2(), Szzls2))) '物料编码
- .Fields("UnitPrice") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("005", GridStr2(), Szzls2))) '单价
- .Fields("Quantity") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("006", GridStr2(), Szzls2))) '数量
- .Fields("Remark") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("007", GridStr2(), Szzls2))) '备注
- .Fields("DataType") = 2 '数据类型
- .Update
- End If
- Next Jsqte
- Cw_DataEnvi.DataConnect.CommitTrans
- '刷新当前网格
- Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName " & _
- "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
- "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
- "Gy_UnitSet.UnitCode WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'"
- Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Not Cxnrrec.EOF Then
- With CzxsGrid
- Call Jltcwg(Cxnrrec, .Row)
- End With
- Else
- Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
- Call Xtxxts(Tsxx, 0, 4)
- Exit Function
- End If
- End If
- '保存记录成功,函数返回真值
- Bclrsj = True
- Exit Function
- End With
- Swcwcl:
- Cw_DataEnvi.DataConnect.RollbackTrans
- Tsxx = "存盘过程中出现错误,程序自动恢复保存前包装物!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Function
- End Function
- Private Function Cshlrxx(lrztxx As Integer) As Boolean '初始化录入字段信息
- TextChangeLock = True '关闭文本框Chang事件
- Grid_Layout.Clear 1
- Grid_Datum.Clear 1
- SSTab1.Tab = 0
- If lrztxx = 1 Then
- '增加新记录时将文本框清空
- For Jsqte = 0 To Max_Text_Index
- If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
- LrText(Jsqte).Text = ""
- LrText(Jsqte).Tag = ""
- End If
- TextValiJudgeLock(Jsqte) = True
- Next Jsqte
- '[>>
- '在此处可添加新增记录时初始化设置
- '<<]
- Else
- '修改记录时根据记录关键字(编码)从数据表中读入其他字段内容
- With RecTemp
- Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName " & _
- "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
- "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
- "Gy_UnitSet.UnitCode Where WrappageCode='" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- '记录如存在则读入其内容,否则提示记录已被其他人删除
- If Not RecTemp.EOF Then
- LrText(0).Text = Trim(RecTemp!WrappageCode & "") '包装物编码
- LrText(1).Text = Trim(RecTemp!WrappageName & "") '包装物名称
- LrText(2).Tag = Trim(RecTemp!UnitCode & "") '计量单位编码
- LrText(2).Text = Trim(RecTemp!UnitName & "") '计量单位名称
- LrText(3).Tag = Trim(RecTemp!SortCode & "") '类别编码
- LrText(3).Text = Trim(RecTemp!SortName & "") '类别名称
- LrText(4).Text = Trim(RecTemp!Remark & "") '备注
- '附属物
- Sqlstr = "SELECT Cask_Wrappage.*,Cask_Appertain.*,Gy_UnitSet.UnitName FROM Cask_Wrappage INNER JOIN " & _
- "Cask_Appertain ON Cask_Wrappage.WrappageCode =Cask_Appertain.AppertainCode LEFT OUTER " & _
- "Join Gy_UnitSet ON Cask_Wrappage.UnitCode =Gy_UnitSet.UnitCode Where Cask_Appertain.WrappageCode='" & Trim(LrText(0).Text) & "' and DataType=1"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- Jsqte = Grid_Layout.FixedRows
- Do While Not RecTemp.EOF
- If Jsqte >= Grid_Layout.Rows Then
- Grid_Layout.AddItem ""
- End If
- Grid_Layout.TextMatrix(Jsqte, 0) = "*"
- Grid_Layout.TextMatrix(Jsqte, Sydz("001", GridStr1(), Szzls1)) = Trim("" & RecTemp!AppertainCode) '附属物编码
- Grid_Layout.TextMatrix(Jsqte, Sydz("002", GridStr1(), Szzls1)) = Trim("" & RecTemp!WrappageName) '附属物名称
- Grid_Layout.TextMatrix(Jsqte, Sydz("003", GridStr1(), Szzls1)) = Trim("" & RecTemp!UnitName) '计量单位
- Grid_Layout.TextMatrix(Jsqte, Sydz("004", GridStr1(), Szzls1)) = IIf(Val(RecTemp!UnitPrice) = 0, "", RecTemp!UnitPrice) '单价
- Grid_Layout.TextMatrix(Jsqte, Sydz("005", GridStr1(), Szzls1)) = IIf(Val(RecTemp!Quantity) = 0, "", RecTemp!Quantity) '数量
- Grid_Layout.TextMatrix(Jsqte, Sydz("006", GridStr1(), Szzls1)) = Trim("" & RecTemp!Remark) '备注
- Grid_Layout.RowHeight(Jsqte) = Sjhgd1
- RecTemp.MoveNext
- Jsqte = Jsqte + 1
- Loop
- If RecTemp.RecordCount >= GridInf1(3) Then
- Grid_Layout.AddItem ""
- Grid_Layout.RowHeight(Jsqte) = Sjhgd1
- Else
- Grid_Layout.Rows = 16
- End If
- '包装参数
- Sqlstr = "SELECT Cask_Appertain.*,Gy_Material.MName,Gy_Material.Model,Gy_UnitSet.UnitName " & _
- "FROM Gy_Material INNER JOIN Cask_Appertain ON Gy_Material.MNumber =" & _
- "Cask_Appertain.AppertainCode LEFT OUTER JOIN Gy_UnitSet ON Gy_Material.PrimaryUnit =" & _
- "Gy_UnitSet.UnitCode Where Gy_Material.StopFlag<>1 and Cask_Appertain.WrappageCode='" & Trim(LrText(0).Text) & "' and DataType=2"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- Jsqte = Grid_Datum.FixedRows
- Do While Not RecTemp.EOF
- If Jsqte >= Grid_Datum.Rows Then
- Grid_Datum.AddItem ""
- End If
- Grid_Datum.TextMatrix(Jsqte, 0) = "*"
- Grid_Datum.TextMatrix(Jsqte, Sydz("001", GridStr2(), Szzls2)) = Trim("" & RecTemp!AppertainCode) '物料编号
- Grid_Datum.TextMatrix(Jsqte, Sydz("002", GridStr2(), Szzls2)) = Trim("" & RecTemp!MName) '物料名称
- Grid_Datum.TextMatrix(Jsqte, Sydz("003", GridStr2(), Szzls2)) = Trim("" & RecTemp!model) '规格型号
- Grid_Datum.TextMatrix(Jsqte, Sydz("004", GridStr2(), Szzls2)) = Trim("" & RecTemp!UnitName) '计量单位
- Grid_Datum.TextMatrix(Jsqte, Sydz("005", GridStr2(), Szzls2)) = IIf(Val(RecTemp!UnitPrice) = 0, "", RecTemp!UnitPrice) '单价
- Grid_Datum.TextMatrix(Jsqte, Sydz("006", GridStr2(), Szzls2)) = IIf(Val(RecTemp!Quantity) = 0, "", RecTemp!Quantity) '数量
- Grid_Datum.TextMatrix(Jsqte, Sydz("007", GridStr2(), Szzls2)) = Trim("" & RecTemp!Remark) '备注
- Grid_Datum.RowHeight(Jsqte) = Sjhgd2
- RecTemp.MoveNext
- Jsqte = Jsqte + 1
- Loop
- If RecTemp.RecordCount >= GridInf2(3) Then
- Grid_Datum.AddItem ""
- Grid_Datum.RowHeight(Jsqte) = Sjhgd2
- Else
- Grid_Datum.Rows = 16
- End If
- Else
- Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
- Call Xtxxts(Tsxx, 0, 4)
- Call Cancel
- TextChangeLock = False
- Exit Function
- End If
- End With
- End If
- Cshlrxx = True
- TextChangeLock = False
- End Function
- Private Sub Scdqjl() '删 除 当 前 记 录
- Dim yhAnswer As Integer
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- '非数据行不能删除
- If CzxsGrid.Row < CzxsGrid.FixedRows Then
- Exit Sub
- End If
- '用户确认是否删除记录
- Tsxx = "请确认是否删除当前记录?"
- yhAnswer = Xtxxts(Tsxx, 2, 2)
- If yhAnswer = 2 Then
- Exit Sub
- End If
- On Error GoTo Cwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- '[以下需自定义部分
- Cw_DataEnvi.DataConnect.Execute "delete Cask_Appertain where WrappageCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
- Cw_DataEnvi.DataConnect.Execute "delete Cask_Wrappage where WrappageCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
- '以上为自定义部分]
- Cw_DataEnvi.DataConnect.CommitTrans
- CzxsGrid.RemoveItem CzxsGrid.Row
- Exit Sub
- Cwcl:
- Cw_DataEnvi.DataConnect.RollbackTrans
- If Err.Number = -2147217873 Then '(-2147217873 为SQL Server 2000通过建立外键产生的错误号)
- Tsxx = "该包装物已经被使用,不能删除!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Sub
- Else
- Tsxx = "出现未知情况,该包装物不能被删除!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Sub
- End If
- End Sub
- '*******************以下区域为编写自定义过程区域**********************
- Private Sub Lrsjhx() '文本框录入数据回写
- With Grid_Layout
- If YdCombo.Visible Then
- .Text = Trim(YdCombo.Text)
- End If
- If Ydtext.Visible Then
- .Text = Trim(Ydtext.Text)
- End If
- '(如果字段录入内容发生变化,则打开有效性判断锁)
- If Zdlrqnr1 <> Trim(.Text) Then
- Yxxpdlock1 = False
- Hyxxpdlock1 = False
- End If
- '如果字段录入内容不为空则写数据行有效性标志
- If Len(Trim(.Text)) <> 0 Then
- Call Xyxhbz(.Row)
- End If
- '隐藏文本框,帮助按钮,列表组合框
- Call Ycwbk
- End With
- End Sub
- Private Sub Lrsjhx2() '文本框录入数据回写
- With Grid_Datum
- If YdCombo2.Visible Then
- .Text = Trim(YdCombo2.Text)
- End If
- If Ydtext2.Visible Then
- .Text = Trim(Ydtext2.Text)
- End If
- '(如果字段录入内容发生变化,则打开有效性判断锁)
- If Zdlrqnr2 <> Trim(.Text) Then
- Yxxpdlock2 = False
- Hyxxpdlock2 = False
- End If
- '如果字段录入内容不为空则写数据行有效性标志
- If Len(Trim(.Text)) <> 0 Then
- Call Xyxhbz2(.Row)
- End If
- '隐藏文本框,帮助按钮,列表组合框
- Call Ycwbk2
- End With
- End Sub
- Private Sub Xyxhbz(sjh As Long) '写行有效性标志,并判断是否增行
- With Grid_Layout
- If .TextMatrix(sjh, 0) = "*" Then
- Exit Sub
- End If
- .TextMatrix(sjh, 0) = "*"
- If sjh >= .Rows - Fzxwghs1 - 1 Then
- .AddItem ""
- .RowHeight(.Rows - 1) = Sjhgd
- End If
- End With
- End Sub
- Private Sub Xyxhbz2(sjh As Long) '写行有效性标志,并判断是否增行
- With Grid_Datum
- If .TextMatrix(sjh, 0) = "*" Then
- Exit Sub
- End If
- .TextMatrix(sjh, 0) = "*"
- If sjh >= .Rows - Fzxwghs2 - 1 Then
- .AddItem ""
- .RowHeight(.Rows - 1) = Sjhgd
- End If
- End With
- End Sub
- Private Sub Ycwbk() '隐藏文本框,帮助按钮,列表组合框
- Valilock1 = True
- Ydtext.Visible = False
- YdCombo.Visible = False
- Ydcommand.Visible = False
- End Sub
- Private Sub Ycwbk2() '隐藏文本框,帮助按钮,列表组合框
- Valilock2 = True
- Ydtext2.Visible = False
- YdCombo2.Visible = False
- Ydcommand22.Visible = False
- End Sub
- Private Sub xswbk() '在当前选中单元显示文本框,列表框,帮助按钮(通用)
- Dim Wbkpy As Integer, Wbkpy1 As Integer '文本框偏移量
- If CBoolean Then
- Exit Sub
- End If
- '如果单据操作状态为浏览状态则不能显示录入载体
- If Grid_Layout.Row < Grid_Layout.FixedRows Then
- Exit Sub
- End If
- If Grid_Layout.ColHidden(Grid_Layout.Col) Then
- Exit Sub
- End If
- '显示文本框前返回有效行列(解决滚动条问题)
- Call Xldqh
- Call Xldql
- '隐藏文本框,帮助按钮,列表组合框
- Call Ycwbk
- With Grid_Layout
- Dqlrwgh1 = .Row
- Dqlrwgl1 = .Col
- If Not GridBoolean1(.Col, 1) Or .Row < .FixedRows Then
- Exit Sub
- End If
- Wbkpy = 30
- Wbkpy1 = 15
- If GridBoolean1(.Col, 3) Then
- YdCombo.Left = .CellLeft + .Left + Wbkpy
- YdCombo.Top = .CellTop + .Top + Wbkpy
- YdCombo.Width = .CellWidth - Wbkpy1
- Call Wbkcl
- YdCombo.Visible = True
- YdCombo.SetFocus
- Ydcommand.Visible = False
- Ydtext.Visible = False
- Else
- If GridBoolean1(.Col, 2) Then
- Ydcommand.Left = .Left + .CellLeft + .CellWidth - Ydcommand.Width + Wbkpy
- Ydcommand.Top = .Top + .CellTop + .CellHeight - Ydcommand.Height + Wbkpy
- Ydcommand.Visible = True
- Else
- Ydcommand.Visible = False
- End If
- Ydtext.Left = .CellLeft + .Left + Wbkpy
- Ydtext.Top = .CellTop + .Top + Wbkpy
- If Ydcommand.Visible Then
- If Sfblbzkd1 Then
- Ydtext.Width = .CellWidth - Ydcommand.Width
- Else
- Ydtext.Width = .CellWidth - Wbkpy1
- End If
- Else
- Ydtext.Width = .CellWidth - Wbkpy1
- End If
- Ydtext.Height = .CellHeight - Wbkpy1
- If GridInt1(.Col, 2) <> 0 Then
- Ydtext.MaxLength = GridInt1(.Col, 2)
- Else
- Ydtext.MaxLength = 3000
- End If
- Call Wbkcl
- On Error Resume Next
- Ydtext.Visible = True
- Ydtext.SetFocus
- End If
- Dqtoprow1 = .TopRow
- Dqleftcol1 = .LeftCol
- '重置锁值
- Valilock1 = False
- Wbkbhlock1 = False
- End With
- End Sub
- Private Sub xswbk2() '在当前选中单元显示文本框,列表框,帮助按钮(通用)
- Dim Wbkpy As Integer, Wbkpy1 As Integer '文本框偏移量
- If CBoolean Then
- Exit Sub
- End If
- '如果单据操作状态为浏览状态则不能显示录入载体
- If Grid_Datum.Row < Grid_Datum.FixedRows Then
- Exit Sub
- End If
- If Grid_Datum.ColHidden(Grid_Datum.Col) Then
- Exit Sub
- End If
- '显示文本框前返回有效行列(解决滚动条问题)
- Call Xldqh2
- Call Xldql2
- '隐藏文本框,帮助按钮,列表组合框
- Call Ycwbk2
- With Grid_Datum
- Dqlrwgh2 = .Row
- Dqlrwgl2 = .Col
- If Not GridBoolean2(.Col, 1) Or .Row < .FixedRows Then
- Exit Sub
- End If
- Wbkpy = 30
- Wbkpy1 = 15
- If GridBoolean2(.Col, 3) Then
- YdCombo2.Left = .CellLeft + .Left + Wbkpy
- YdCombo2.Top = .CellTop + .Top + Wbkpy
- YdCombo2.Width = .CellWidth - Wbkpy1
- Call Wbkcl2
- YdCombo2.Visible = True
- YdCombo2.SetFocus
- Ydcommand22.Visible = False
- Ydtext2.Visible = False
- Else
- If GridBoolean2(.Col, 2) Then
- Ydcommand22.Left = .Left + .CellLeft + .CellWidth - Ydcommand22.Width + Wbkpy
- Ydcommand22.Top = .Top + .CellTop + .CellHeight - Ydcommand22.Height + Wbkpy
- Ydcommand22.Visible = True
- Else
- Ydcommand22.Visible = False
- End If
- Ydtext2.Left = .CellLeft + .Left + Wbkpy
- Ydtext2.Top = .CellTop + .Top + Wbkpy
- If Ydcommand22.Visible Then
- If Sfblbzkd2 Then
- Ydtext2.Width = .CellWidth - Ydcommand22.Width
- Else
- Ydtext2.Width = .CellWidth - Wbkpy1
- End If
- Else
- Ydtext2.Width = .CellWidth - Wbkpy1
- End If
- Ydtext2.Height = .CellHeight - Wbkpy1
- If GridInt2(.Col, 2) <> 0 Then
- Ydtext2.MaxLength = GridInt2(.Col, 2)
- Else
- Ydtext2.MaxLength = 3000
- End If
- Call Wbkcl2
- Ydtext2.Visible = True
- Ydtext2.SetFocus
- End If
- Dqtoprow2 = .TopRow
- Dqleftcol2 = .LeftCol
- '重置锁值
- Valilock2 = False
- Wbkbhlock2 = False
- End With
- End Sub
- Private Sub Wbkcl() '文本框录入之前处理(根据实际情况)
- Dim xswbrr As String
- With Grid_Layout
- Zdlrqnr1 = Trim(.Text)
- xswbrr = Trim(.Text)
- If GridBoolean1(.Col, 3) Then '列表框录入
- '填充列表框程序
- Call FillCombo(YdCombo, GridStr1(.Col, 5), xswbrr, 0)
- Else
- Wbkbhlock1 = True
- '====以下为用户自定义
- Ydtext.Text = xswbrr
- '====以上为用户自定义
- Wbkbhlock1 = False
- Ydtext.SelStart = Len(Ydtext.Text)
- End If
- End With
- End Sub
- Private Sub Wbkcl2() '文本框录入之前处理(根据实际情况)
- Dim xswbrr As String
- With Grid_Datum
- Zdlrqnr2 = Trim(.Text)
- xswbrr = Trim(.Text)
- If GridBoolean2(.Col, 3) Then '列表框录入
- '填充列表框程序
- Call FillCombo(YdCombo2, GridStr2(.Col, 5), xswbrr, 0)
- Else
- Wbkbhlock2 = True
- '====以下为用户自定义
- Ydtext2.Text = xswbrr
- '====以上为用户自定义
- Wbkbhlock2 = False
- Ydtext2.SelStart = Len(Ydtext2.Text)
- End If
- End With
- End Sub
- Private Sub Xldqh() '显露当前行
- Dim Toprowte As Long
- With Grid_Layout
- Toprowte = 0
- Do While .CellTop + .RowHeight(.Row) + Fzxwghs1 * Sjhgd > .Height And .TopRow <> Toprowte
- Toprowte = .TopRow
- .TopRow = .TopRow + 1
- Loop
- Toprowte = 0
- Do While .CellTop < .FixedRows * .RowHeight(0) And .TopRow <> Toprowte
- Toprowte = .TopRow
- .TopRow = .TopRow - 1
- Loop
- End With
- End Sub
- Private Sub Xldqh2() '显露当前行
- Dim Toprowte As Long
- With Grid_Datum
- Toprowte = 0
- Do While .CellTop + .RowHeight(.Row) + Fzxwghs2 * Sjhgd > .Height And .TopRow <> Toprowte
- Toprowte = .TopRow
- .TopRow = .TopRow + 1
- Loop
- Toprowte = 0