+
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:88k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{65A39231-6133-11D1-BAA2-444553540000}#1.0#0"; "VSLIGHT6.OCX"
- Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Begin VB.Form Class_frmEmp
- Caption = "类别人员选择"
- ClientHeight = 8595
- ClientLeft = 315
- ClientTop = 390
- ClientWidth = 11880
- HelpContextID = 2212009
- Icon = "基础设置_类别人员选择.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- LockControls = -1 'True
- ScaleHeight = 8595
- ScaleWidth = 11880
- WindowState = 2 'Maximized
- Begin VB.TextBox Ydtext
- BackColor = &H00C0FFFF&
- BorderStyle = 0 'None
- Height = 300
- Left = 9570
- MultiLine = -1 'True
- TabIndex = 9
- Top = 2820
- Visible = 0 'False
- Width = 1185
- End
- Begin VB.ComboBox YdCombo
- Height = 300
- Left = 9570
- Style = 2 'Dropdown List
- TabIndex = 8
- Top = 3210
- Visible = 0 'False
- Width = 1695
- End
- Begin VB.CommandButton Ydcommand
- Height = 300
- Left = 11370
- Picture = "基础设置_类别人员选择.frx":1042
- Style = 1 'Graphical
- TabIndex = 7
- Top = 3210
- Visible = 0 'False
- Width = 300
- End
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 540
- Left = 9330
- TabIndex = 2
- Top = 30
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 953
- ButtonWidth = 1455
- ButtonHeight = 953
- Appearance = 1
- Style = 1
- ImageList = "ImageList2"
- _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
- Begin VB.PictureBox Pic_Title
- BackColor = &H00FFFFFF&
- Height = 825
- Left = 0
- Picture = "基础设置_类别人员选择.frx":13CC
- ScaleHeight = 765
- ScaleWidth = 11715
- TabIndex = 1
- Top = 570
- Width = 11775
- Begin MSComctlLib.ImageCombo ImgCbo_Sort
- Height = 315
- Left = 930
- TabIndex = 5
- Top = 240
- Width = 2655
- _ExtentX = 4683
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- Text = "ImageCombo1"
- End
- Begin VB.Label Lbl_Count
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 180
- Left = 8430
- TabIndex = 6
- Top = 300
- Width = 540
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "工资类别"
- Height = 180
- Left = 90
- TabIndex = 4
- Top = 300
- Width = 720
- End
- End
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 1
- Left = 7620
- Top = 90
- End
- Begin VSFlex8Ctl.VSFlexGrid CzxsGrid
- Height = 7545
- Left = 0
- TabIndex = 0
- Top = 1410
- Width = 9285
- _ExtentX = 16378
- _ExtentY = 13309
- 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 = 16777215
- ForeColor = -2147483640
- BackColorFixed = 13826538
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = -2147483636
- BackColorAlternate= 16777215
- 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 = 50
- Cols = 10
- FixedRows = 1
- FixedCols = 1
- 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
- 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 'False
- ShowComboButton = -1 'True
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- Begin MSComctlLib.ImageList ImageList2
- Left = 0
- Top = 0
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 40
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1E30C
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1E6A6
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1EA40
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1EDDA
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1F174
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1F50E
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1F8A8
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1FC42
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":1FFDC
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":20376
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":20710
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":20AAA
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":20E44
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":211DE
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":21578
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":21912
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":21CAC
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":22046
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":223E0
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2277A
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":22B14
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":22EAE
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":23248
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":235E2
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2397C
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":23D16
- Key = "dz"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":240B0
- Key = "ph"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2444A
- Key = "fz"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":247E4
- Key = "dw"
- EndProperty
- BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":24B7E
- Key = "hf"
- EndProperty
- BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":24F18
- Key = "pz"
- EndProperty
- BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":252B2
- Key = "check"
- EndProperty
- BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2564C
- Key = "qs"
- EndProperty
- BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":259E6
- Key = "fullcheck"
- EndProperty
- BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":25D80
- Key = "qq"
- EndProperty
- BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2611A
- Key = "bcw"
- EndProperty
- BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":264B4
- Key = "ye"
- EndProperty
- BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2684E
- Key = ""
- EndProperty
- BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":26BE8
- Key = "frist"
- EndProperty
- BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":26F82
- Key = "dj"
- EndProperty
- EndProperty
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 570
- Left = 0
- TabIndex = 3
- Top = 0
- Width = 11880
- _ExtentX = 20955
- _ExtentY = 1005
- ButtonWidth = 820
- ButtonHeight = 953
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 19
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- ImageKey = "sz"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- 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"
- ImageKey = "xz"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "查询"
- Key = "cx"
- ImageKey = "cx"
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "全选"
- Key = "all"
- ImageKey = "pz"
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "停发"
- Key = "stop"
- ImageIndex = 34
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "恢复"
- Key = "resume"
- ImageKey = "hf"
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "删除"
- Key = "sc"
- ImageKey = "sc"
- EndProperty
- BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "银行"
- Key = "bank"
- ImageKey = "zd"
- EndProperty
- BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "sx"
- ImageKey = "sx"
- EndProperty
- BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.ImageList ImageList1
- Left = 6990
- Top = 30
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 34
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2731C
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":276B6
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":27A50
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":27DEA
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":28184
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2851E
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":288B8
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":28C52
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":28FEC
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":29386
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":29720
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":29ABA
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":29E54
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2A1EE
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2A588
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2A922
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2ACBC
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2B056
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2B3F0
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2B78A
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2BB24
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2BEBE
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2C258
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2C5F2
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2C98C
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2CD26
- Key = "dz"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2D0C0
- Key = "ph"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2D45A
- Key = "fz"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2D7F4
- Key = "dw"
- EndProperty
- BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2DB8E
- Key = "hf"
- EndProperty
- BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2DF28
- Key = "pz"
- EndProperty
- BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2E2C2
- Key = "check"
- EndProperty
- BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2E65C
- Key = ""
- EndProperty
- BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "基础设置_类别人员选择.frx":2E9F6
- Key = ""
- EndProperty
- EndProperty
- End
- End
- Begin VB.Label Lab_OperStatus
- BackColor = &H000080FF&
- Caption = "1"
- Height = 345
- Left = 11040
- TabIndex = 10
- Top = 2790
- Visible = 0 'False
- Width = 345
- End
- End
- Attribute VB_Name = "Class_frmEmp"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**************************************************************************
- '* 模 块 名 称 :类别人员选择
- '* 功 能 描 述 :选择每个类别需计算工资的人员
- '* 程序员姓名 :田建秀
- '* 最后修改人 :田建秀
- '* 最后修改时间:2001/12/12
- '* 备 注:
- '**************************************************************************
- Dim ReportTitle As String '报表主标题
- Dim Tsxx As String '系统信息提示(Fixed)
- Dim Str_QueryCondi As String '用户录入查询条件
- Dim Sql As String
- Dim ICondition As String '增加条件字符串
- Dim QCondition As String '查询条件字符串
- Dim i As Long
- Dim coll As New Collection
- Dim SortId As String
- Dim Rsc As New ADODB.Recordset
- Dim BankCode As String
- Dim Str_RightEdit As String '编辑(增加、停发、恢复、删除)权限索引
- Dim Str_RightBank As String '银行(银行、账号)
- '以下为固定使用变量(网格)
- Dim Cxnrrec As New ADODB.Recordset '显示查询内容动态集
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim Pmbcsjhs As Long '屏幕网格保持数据行数(大于等于1)
- Dim Fzxwghs As Integer '辅助项网格行数(包括合计行)
- Dim Sfxshjwg As Boolean '是否显示合计网格
- Dim Qslz As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd As Double '网格数据行高度
- Dim GridBoolean() As Boolean '网格列信息(布尔型)
- Dim GridStr() As String '网格列信息(字符型)
- Dim GridInt() As Integer '网格列信息(整型)
- Dim Sfblbzkd As Boolean '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
- Dim Dqlrwgh As Long '当前录入数据网格行
- Dim Dqlrwgl As Long '当前录入数据网格列
- Dim Dqlkwgh As Long '刚刚离开网格行(不一定为录入行)
- Dim Dqlkwgl As Long '刚刚离开网格列
- Dim Dqtoprow As Long '当前录入状态时最上端可视行
- Dim Dqleftcol As Long '当前录入状态时最左端可视列
- Dim Zdlrqnr As String '字段录入修改前内容(用来判断内容是否修改)
- Dim Wbkbhlock As Boolean '文本框改变值锁
- Dim Changelock As Boolean '网格行列改变控制锁(用来区别用户改变.程序改变)
- Dim Gdtlock As Boolean '滚动条滚动控制(用来区别用户改变.程序改变)
- Dim Yxxpdlock As Boolean '字段有效性判断锁(内容不修改不需进行字段有效性判断)
- Dim Hyxxpdlock As Boolean '行有效性判断锁(字段内容不修改不需进行行有效性判断)
- Dim Valilock As Boolean '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
- Dim Shsfts As Boolean '删除记录行是否提示
- Dim Szzls As Integer '网格信息数组最大下标值(网格列数-1)
- Private Sub Form_Resize() '根据窗体大小来调整网格,标题栏大小(Fixed)
- On Error Resume Next
- With CzxsGrid
- .Width = Me.Width - 160
- .Height = Me.Height - .Top - 400
- End With
- With Pic_Title
- .Width = Me.Width - 160
- End With
- GsToolbar.Left = Me.Width - GsToolbar.Width - 140
- Call Cxxswbk
- End Sub
- Private Sub Form_Load() '窗体装入
- '初始化各种锁值(Fixed)
- Changelock = False '网格行列改变控制锁
- Gdtlock = False '滚动条滚动控制
- Yxxpdlock = True '字段有效性判断锁
- Hyxxpdlock = True '行有效性判断锁
- Wbkbhlock = False '文本框内容改变锁
- '调入打印页面设置窗体
- ReportTitle = "工资类别的人员"
- XtReportCode = "PM_SortEmp"
- Load Dyymctbl
- '调整标题栏及网格、格式工具条位置(Fixed)
- Pic_Title.Left = 40
- Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
- CzxsGrid.Left = Pic_Title.Left
- CzxsGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
- '调 入 网 格(Fixed)
- GridCode = "PM_SortEmp"
- Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Pmbcsjhs = GridInf(3)
- Fzxwghs = GridInf(4)
- Sfblbzkd = GridInf(5)
- Shsfts = GridInf(6)
- Sfxshjwg = GridInf(7)
- Szzls = CzxsGrid.Cols - 1
- CzxsGrid.TextMatrix(0, 0) = "职工ID号"
- CzxsGrid.TextMatrix(0, 1) = "银行编号"
- ImgCbo_Sort.Text = ""
- Sql = " and czybm='" & Xtczybm & "'"
- Call DynaFillImageCombo(ImgCbo_Sort, "PM_SortEmp", 0, Sql)
- SortId = GetComboKey(ImgCbo_Sort, 0)
- Lbl_Count.Caption = ""
- ICondition = ""
- If ImgCbo_Sort.ComboItems.Count <> 0 Then
- toolEnable
- Else
- toolUnEnable
- End If
- '填 充 网 格
- Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
- " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
- " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on " & _
- " p.BankCode=b.BankCode " & _
- " where sortid='" & SortId & "' and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
- Call Cxnrtcwg(Sql)
- Pub_FrmSortChoice.SortId = SortId
- QCondition = ""
- '设置状态为修改状态
- Lab_OperStatus = "2"
- '编辑(新增、修改、删除)权限索引
- Str_RightEdit = "Pm_SortEmp_Edit"
- '银行
- Str_RightBank = "Pm_SortEmp_Bank"
- End Sub
- Private Sub Form_KeyPress(KeyAscii As Integer) '限制录入字符"'"
- Select Case KeyAscii
- Case 39 '屏蔽字符"'"
- KeyAscii = 0
- End Select
- End Sub
- Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) '支持热键操作
- If Shift = 2 Then
- Select Case UCase(Chr(KeyCode))
- Case "P" 'Ctrl+P 打印
- If Tlb_Action.Buttons("dy").Enabled Then
- Call bbyl(False)
- End If
- End Select
- End If
- End Sub
- Private Sub Cxnrtcwg(Sqlstr As String) '查询内容填充网格
- Dim jsqte As Long '查询临时使用变量
- '为加快显示速度,将网格刷新动作冻结
- CzxsGrid.Redraw = False
- '[>>查询连接串
- '<<]
- Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With Cxnrrec
- CzxsGrid.Rows = CzxsGrid.FixedRows
- If .EOF And .BOF Then
- CzxsGrid.Redraw = True
- Lbl_Count.Caption = ""
- 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
- Lbl_Count = "共" & CzxsGrid.Rows - 1 & "人"
- End Sub
- Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long) '记录内容填充网格
- '[>>以下为自定义部分
- With Jlbrec
- CzxsGrid.TextMatrix(Rowjsq, 0) = Trim(.Fields("EmpID") & "") '职工ID号
- CzxsGrid.TextMatrix(Rowjsq, 1) = Trim(.Fields("BankCode") & "") '职工ID号
- CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("DeptCode") & "") '部门编号
- CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "") '部门名称
- CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("EmpNO") & "") '工号
- CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("EmpName") & "") '姓名
- CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = .Fields("HaltFlag") '停发
- CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("BankName") & "") '银行名称
- CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("Accounts") & "") '银行账号
- End With
- '以上为自定义部分<<]
- End Sub
- Private Sub ImgCbo_Sort_Click()
- SortId = GetComboKey(ImgCbo_Sort, 0)
- Pub_FrmSortChoice.SortId = SortId
- ICondition = ""
- QCondition = ""
- Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
- " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
- " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on " & _
- " p.BankCode=b.BankCode " & _
- " where sortid='" & SortId & "' and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
- Call Cxnrtcwg(Sql)
- End Sub
- Private Sub Form_Unload(Cancel As Integer) '窗体卸载
- If Not Fun_Drfrmyxxpd Then
- Cancel = True
- Exit Sub
- End If
- Set Cxnrrec = Nothing
- Set Rsc = Nothing
- '卸载打印页面窗体
- Unload Dyymctbl
- End Sub
- Private Sub CzxsGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long) '网格列发生移动时自动交换网格索引信息
- Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
- End Sub
- Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button) '网格格式调整(Fixed)
- Select Case Button.Key
- Case "bcgs" '保存表格格式
- Call Bcwggs(CzxsGrid, GridCode, GridStr())
- Case "hfmrgs" '恢复默认格式
- Call Hfmrgs(CzxsGrid, GridCode, GridStr())
- Case "szxsxm" '设置显示项目
- Call Szxsxm(CzxsGrid, GridCode)
- End Select
- End Sub
- Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- '屏蔽文本框,下拉组合框有效性判断
- Valilock = True
- '屏蔽网格失去焦点产生的有效性判断
- Changelock = True
- Select Case Button.Key
- Case "ymsz" '页面设置
- Dyymctbl.Show 1
- Case "yl" '预 览
- Call bbyl(True)
- Case "dy" '打 印
- Call bbyl(False)
- Case "zj" '增 加
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- Call AddEmp
- Case "cx" '查 询
- Squery
- Case "all" '全 选
- With CzxsGrid
- If .Rows > .FixedRows Then
- .Row = .FixedRows
- .RowSel = .Rows - 1
- End If
- End With
- Case "stop" '停 发
- Call StopH(1)
- Case "resume" '恢 复
- Call StopH(0)
- Case "sc" '删 除
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- Call DelEmp
- Case "bank" '银 行
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightBank, Xtczybm, 1, True) Then
- Exit Sub
- End If
- BankChoice
- Case "sx" '刷 新
- Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
- " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
- " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on " & _
- " p.BankCode=b.BankCode " & _
- " where sortid='" & SortId & "' and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
- Call Cxnrtcwg(Sql)
- Case "bz" '帮 助
- Call F1bz
- Case "fh" '退 出
- Unload Me
- End Select
- '解 锁
- Valilock = False
- Changelock = False
- End Sub
- Private Sub BankChoice()
- Dim SqlT As String
- With CzxsGrid
- If .Rows = .FixedRows Then
- Exit Sub
- End If
- End With
- SqlT = SqlCon
- With Class_FrmBank
- .Show 1
- If .OpeStatus = "cancel" Then
- Exit Sub
- End If
- '判断银行账号是否有重复的。
- With CzxsGrid
- If .Row <= .RowSel Then
- For i = .Row To .RowSel
- If BankA(i) = False Then
- Exit Sub
- End If
- Next
- Else
- For i = .RowSel To .Row
- If BankA(i) = False Then
- Exit Sub
- End If
- Next
- End If
- End With
- If ImgCbo_Sort.ComboItems.Count > 1 Then
- With Pub_FrmSortChoice
- .Show 1
- If .OpeStatus = "cancel" Then
- Exit Sub
- End If
- .SortId = SortId
- Sql = ""
- If LCase(Trim(Class_FrmBank.BankCode)) = "c" Then
- '清空银行
- BankCode = ""
- For i = 1 To .cSort.Count
- Sql = Sql & " update Pm_SortEmp set BankCode='" & _
- BankCode & "',Accounts='' where sortid='" & _
- .cSort.Item(i) & "' and EmpId in " & SqlT
- Next
- Else
- BankCode = Class_FrmBank.BankCode
- For i = 1 To .cSort.Count
- Sql = Sql & " update Pm_SortEmp set BankCode='" & _
- BankCode & "' where sortid='" & _
- .cSort.Item(i) & "' and EmpId in " & SqlT
- Next
- End If
- End With
- Else
- If LCase(Trim(Class_FrmBank.BankCode)) = "c" Then
- Sql = " update Pm_SortEmp set BankCode='' " & _
- ",Accounts='' where sortid='" & _
- SortId & "' and EmpId in " & SqlT
- Else
- Sql = " update Pm_SortEmp set BankCode='" & _
- Class_FrmBank.BankCode & "' where sortid='" & _
- SortId & "' and EmpId in " & SqlT
- End If
- End If
- End With
- On Error GoTo Err1
- With Cw_DataEnvi.DataConnect
- .BeginTrans
- .Execute Sql
- .CommitTrans
- End With
- With CzxsGrid
- If .Row <= .RowSel Then
- Call bankB(i, .Row, .RowSel)
- Else
- Call bankB(i, .RowSel, .Row)
- End If
- End With
- Exit Sub
- Err1:
- Cw_DataEnvi.DataConnect.RollbackTrans
- End Sub
- Private Sub bankB(i As Long, row1 As Long, row2 As Long)
- With CzxsGrid
- If LCase(Trim(Class_FrmBank.BankCode)) = "c" Then
- For i = row1 To row2
- .TextMatrix(i, 1) = ""
- .TextMatrix(i, Sydz("006", GridStr(), Szzls)) = ""
- .TextMatrix(i, Sydz("007", GridStr(), Szzls)) = ""
- Next
- Else
- For i = row1 To row2
- .TextMatrix(i, 1) = Class_FrmBank.BankCode
- .TextMatrix(i, Sydz("006", GridStr(), Szzls)) = Class_FrmBank.BankName
- Next
- End If
- End With
- End Sub
- Private Function BankA(i As Long) As Boolean
- With CzxsGrid
- If Trim(.TextMatrix(i, Sydz("007", GridStr(), Szzls))) <> "" Then
- If Rsc.State = 1 Then Rsc.Close
- Sql = " select p.*,EmpNO,EmpName,SortName from PM_SortEmp p inner join rs_BasicInfo r " & _
- " on p.EmpID=r.EmpID inner join PM_sort s on p.Sortid=S.sortid " & _
- "where BankCode='" & _
- Class_FrmBank.BankCode & "' and Accounts='" & _
- .TextMatrix(i, Sydz("007", GridStr(), Szzls)) & _
- "' and p.EmpID <>" & .TextMatrix(i, 0)
- Set Rsc = Cw_DataEnvi.DataConnect.Execute(Sql)
- If Not Rsc.EOF Then
- Call Xtxxts("将" & Trim(.TextMatrix(i, Sydz("006", GridStr(), Szzls))) & _
- "换成" & Trim(Class_FrmBank.BankName) & "时," & Chr(10) & _
- Chr(13) & Trim(.TextMatrix(i, Sydz("003", GridStr(), Szzls))) & _
- "号" & Trim(.TextMatrix(i, Sydz("004", GridStr(), Szzls))) & _
- "与" & Trim(Rsc!EmpNo) & "号" & _
- Trim(Rsc!EmpName) & "的银行账号重复," & Chr(10) & Chr(13) & _
- "请先将该行的银行名称清空,再改写银行!" & _
- "请在各个工资类别中查看。", 0, 1)
- BankA = False
- Exit Function
- End If
- End If
- End With
- BankA = True
- End Function
- Private Sub StopH(StopH As String)
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- '1 停发 0 恢复
- Dim Sqlstr As String
- With CzxsGrid
- If .Rows = .FixedRows Or .Row <= .FixedRows - 1 Then
- Exit Sub
- End If
- Sql = SqlCon
- Sqlstr = ""
- If ImgCbo_Sort.ComboItems.Count > 1 Then
- With Pub_FrmSortChoice
- .Show 1
- If .OpeStatus = "cancel" Then
- Exit Sub
- Else
- For i = 1 To .cSort.Count
- Sqlstr = Sqlstr & " update PM_SortEmp set haltFlag=" & StopH & " where sortid ='" & _
- .cSort.Item(i) & "' and EmpId in " & Sql
- Next
- End If
- End With
- Else
- Sqlstr = " update PM_SortEmp set haltFlag=" & StopH & " where sortid ='" & _
- SortId & "' and EmpId in " & Sql
- End If
- End With
- On Error GoTo Err1
- With Cw_DataEnvi.DataConnect
- .BeginTrans
- .Execute Sqlstr
- .CommitTrans
- With CzxsGrid
- If .Row <= .RowSel Then
- For i = .Row To .RowSel
- .TextMatrix(i, Sydz("005", GridStr(), Szzls)) = StopH
- Next
- Else
- For i = .Row To .RowSel Step -1
- .TextMatrix(i, Sydz("005", GridStr(), Szzls)) = StopH
- Next
- End If
- End With
- End With
- Exit Sub
- Err1:
- Cw_DataEnvi.DataConnect.RollbackTrans
- End Sub
- Private Function SqlCon() As String
- With CzxsGrid
- Sql = "("
- If .Row <= .RowSel Then
- For i = .Row To .RowSel
- Sql = Sql & Val(.TextMatrix(i, 0)) & ","
- Next
- Else
- For i = .RowSel To .Row
- Sql = Sql & Val(.TextMatrix(i, 0)) & ","
- Next
- End If
- If Trim(Sql) <> "(" Then
- Sql = Left(Trim(Sql), Len(Trim(Sql)) - 1) & ")"
- Else
- Sql = ""
- End If
- SqlCon = Sql
- End With
- End Function
- Private Sub DelEmp()
- '删除
- Dim Sqlstr As String
- Dim Yhanswer As Integer
- With CzxsGrid
- If .Rows = .FixedRows Then
- Exit Sub
- End If
- End With
- Sql = SqlCon
- Tsxx = "请确认是否删除所选记录?"
- Yhanswer = Xtxxts(Tsxx, 2, 2)
- If Yhanswer = 2 Then
- Exit Sub
- End If
- With CzxsGrid
- Sqlstr = ""
- If ImgCbo_Sort.ComboItems.Count > 1 Then
- With Pub_FrmSortChoice
- .Show 1
- If .OpeStatus = "cancel" Then
- Exit Sub
- Else
- For i = 1 To .cSort.Count
- Sqlstr = Sqlstr & " delete PM_SortEmp where sortid ='" & _
- .cSort.Item(i) & "' and EmpId in " & Sql
- Next
- End If
- End With
- Else
- Sqlstr = " delete PM_SortEmp where sortid ='" & _
- SortId & "' and EmpId in " & Sql
- End If
- End With
- On Error GoTo Err1
- With Cw_DataEnvi.DataConnect
- .BeginTrans
- .Execute Sqlstr
- .CommitTrans
- With CzxsGrid
- If .Row <= .RowSel Then
- For i = .Row To .RowSel
- .RemoveItem (.Row)
- Next
- Else
- For i = .RowSel To .Row
- .RemoveItem (.RowSel)
- Next
- End If
- Lbl_Count.Caption = "共" & .Rows - .FixedRows & "人"
- End With
- End With
- Exit Sub
- Err1:
- Cw_DataEnvi.DataConnect.RollbackTrans
- End Sub
- Private Sub AddEmp()
- Dim SqlT As String
- Dim coll As New Collection
- Dim Scount() As String '存放每个类别增加的人员数
- Dim sqlF As String
- Sql = ""
- '增加人员
- With Query_Frm
- Set .collTableName = coll
- .QueryTableSql = " ltrim(rtrim(TableName))= 'rs_basicInfo' or ltrim(rtrim(TableName))= 'rs_ExtendInfo'"
- .Show 1
- If .bChecked = True Then
- ICondition = .sSqlWhere
- Else
- Exit Sub
- End If
- If Trim(ICondition) = "" Then
- '没有选择查询条件
- SqlT = " from Rs_BasicInfo where ynstop=0 "
- Else
- SqlT = " from rs_basicInfo,rs_ExtendInfo where rs_basicInfo.EmpId=rs_ExtendInfo.EmpId and (" & _
- ICondition & ") and ynstop=0 "
- End If
- End With
- If ImgCbo_Sort.ComboItems.Count > 1 Then '当操作员可操作的类别大于一个时。
- With Pub_FrmSortChoice
- .Show 1
- If LCase(Trim(.OpeStatus)) = "cancel" Then
- Exit Sub
- Else
- For i = 1 To .cSort.Count
- Sql = Sql & " insert PM_SortEmp(SortId,EmpID,HaltFlag) select '" & .cSort.Item(i) & "'," & _
- " rs_basicInfo.EmpID,0 " & SqlT & " and rs_basicInfo.EmpId not in (select EmpId from " & _
- " pm_SortEmp where SortId='" & .cSort.Item(i) & "')" & _
- " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "')"
- Next
- End If
- End With
- Else '只有一个类别
- Sql = " insert PM_SortEmp(SortId,EmpID,HaltFlag) select '" & SortId & "'," & " rs_basicInfo.EmpID,0 " & SqlT & _
- " and rs_basicInfo.EmpId not in (select EmpId from pm_SortEmp where SortId='" & SortId & "')" & _
- " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "')"
- End If
- On Error GoTo Err1
- Cw_DataEnvi.DataConnect.BeginTrans
- If ImgCbo_Sort.ComboItems.Count > 1 Then
- With Pub_FrmSortChoice
- ReDim Scount(.cSort.Count - 1, 2)
- For i = 1 To .cSort.Count
- sqlF = "select '" & .cSort.Item(i) & "'," & _
- " rs_basicInfo.EmpID,0 " & SqlT & " and rs_basicInfo.EmpId not in (select EmpId from " & _
- " pm_SortEmp where SortId='" & .cSort.Item(i) & "')" & _
- " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "')"
- If Rsc.State = 1 Then Rsc.Close
- Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
- Scount(i - 1, 0) = Trim(.cSort.Item(i))
- Scount(i - 1, 1) = Rsc.RecordCount
- If Rsc.State = 1 Then Rsc.Close
- sqlF = "select * from pm_sort where sortid='" & .cSort.Item(i) & "'"
- Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
- Scount(i - 1, 2) = Trim(Rsc!SortName)
- Next
- End With
- Else
- sqlF = "select '" & SortId & "'," & " rs_basicInfo.EmpID,0 " & SqlT & _
- " and rs_basicInfo.EmpId not in (select EmpId from pm_SortEmp where SortId='" & SortId & "')" & _
- " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "')"
- If Rsc.State = 1 Then Rsc.Close
- Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
- ReDim Scount(0, 2)
- Scount(0, 0) = Trim(SortId)
- Scount(0, 1) = Rsc.RecordCount
- If Rsc.State = 1 Then Rsc.Close
- sqlF = "select * from pm_sort where sortid='" & SortId & "'"
- Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
- Scount(0, 2) = Trim(Rsc!SortName)
- End If
- Cw_DataEnvi.DataConnect.Execute Sql
- Cw_DataEnvi.DataConnect.CommitTrans
- For i = 0 To UBound(Scount)
- Call Xtxxts("工资类别“" & Scount(i, 2) & "”新增" & Scount(i, 1) & "人", 0, 4)
- Next
- Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
- " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
- " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on " & _
- " p.BankCode=b.BankCode " & _
- " where sortid='" & SortId & "' order by r.DeptCode,EmpNo"
- Call Cxnrtcwg(Sql)
- QCondition = ""
- Exit Sub
- Err1:
- Cw_DataEnvi.DataConnect.RollbackTrans
- Call Xtxxts("增加不成功!", 0, 1)
- End Sub
- Private Sub Squery()
- '查询
- Dim SqlT As String
- Dim coll As New Collection
- With CzxsGrid
- If .Rows = .FixedRows Then
- Exit Sub
- End If
- End With
- With Query_Frm
- Set .collTableName = coll
- .QueryTableSql = " ltrim(rtrim(TableName))= 'rs_basicInfo' or ltrim(rtrim(TableName))= 'rs_ExtendInfo'"
- .Show 1
- If .bChecked = True Then
- QCondition = .sSqlWhere
- Else
- Exit Sub
- End If
- If Trim(QCondition) = "" Then
- '没有选择查询条件
- SqlT = " from Pm_SortEmp where SortId='" & SortId & "'"
- Else
- If coll.Count = 1 Then
- SqlT = " from Pm_SortEmp p," & coll.Item(1) & _
- " where p.EmpID=" & coll.Item(1) & ".EmpID" & _
- " and (" & Trim(QCondition) & ")"
- Else
- SqlT = " from Pm_SortEmp p,rs_basicInfo,rs_ExtendInfo" & _
- " where rs_basicInfo.EmpId=rs_ExtendInfo.EmpID " & _
- " and p.EmpID=rs_basicInfo.EmpId and (" & QCondition & ") "
- End If
- End If
- SqlT = " select p.EmpID " & SqlT
- Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
- " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
- " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on " & _
- " p.BankCode=b.BankCode " & _
- " where sortid='" & SortId & "' and p.EmpID in (" & SqlT & _
- ") and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
- " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
- Call Cxnrtcwg(Sql)
- End With
- End Sub
- Private Sub toolEnable()
- With SzToolbar
- .Buttons("zj").Enabled = True
- .Buttons("cx").Enabled = True
- .Buttons("all").Enabled = True
- .Buttons("stop").Enabled = True
- .Buttons("resume").Enabled = True
- .Buttons("sc").Enabled = True
- End With
- End Sub
- Private Sub toolUnEnable()
- With SzToolbar
- .Buttons("zj").Enabled = False
- .Buttons("cx").Enabled = False
- .Buttons("all").Enabled = False
- .Buttons("stop").Enabled = False
- .Buttons("resume").Enabled = False
- .Buttons("sc").Enabled = False
- End With
- End Sub
- Private Sub Wbkcl() '文本框录入之前处理(根据实际情况)
- Dim xswbrr As String
- With CzxsGrid
- Zdlrqnr = Trim(.Text)
- xswbrr = Trim(.Text)
- If GridBoolean(.Col, 3) Then '列表框录入
- '填充列表框程序
- Call FillCombo(YdCombo, GridStr(.Col, 5), xswbrr, 0)
- Else
- Wbkbhlock = True
- '====以下为用户自定义
- Ydtext.Text = xswbrr
- '====以上为用户自定义
- Wbkbhlock = False
- Ydtext.SelStart = Len(Ydtext.Text)
- End If
- End With
- End Sub
- Private Function sjzdyxxpd(Dqpdwgh As Long, Dqpdwgl As Long) '录入数据字段有效性判断,同时进行字段录入事后处理
- Dim Str_JudgeText As String '临时有效性判断字段内容
- Dim Coljsq As Long '临时列计数器
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Dbl_Qcye As Double '临时期初余额
- With CzxsGrid
- '非录入状态有效性为合法
- If Yxxpdlock Or .Row < .FixedRows Then
- sjzdyxxpd = True
- Exit Function
- End If
- Str_JudgeText = Trim(.TextMatrix(Dqpdwgh, Dqpdwgl))
- Select Case GridStr(Dqpdwgl, 1)
- '以下为自定义部分[
- '1.放置字段有效性判断程序
- Case "006", "007"
- '账号不能重复
- If Rsc.State = 1 Then Rsc.Close
- Sql = " select p.*,EmpNO,EmpName,s.SortName from PM_SortEmp p,rs_BasicInfo r " & _
- ", Pm_Sort s where p.EmpID=r.EmpId and p.SortId=s.SortID and p.EmpId<>" & _
- .TextMatrix(Dqpdwgh, 0) & " and BankCode='" & _
- .TextMatrix(Dqpdwgh, 1) & "' and accounts='" & _
- .TextMatrix(Dqpdwgh, Dqpdwgl) & "' and ltrim(rtrim(accounts))<>''"
- Set Rsc = Cw_DataEnvi.DataConnect.Execute(Sql)
- If Not Rsc.EOF Then
- Tsxx = .TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) & "号" & _
- .TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) & _
- "的银行账号与" & Trim(Rsc!EmpNo) & "号" & _
- Trim(Rsc!EmpName) & "的银行账号重复!" & _
- Chr(10) & Chr(13) & "请在各个工资类别中查看。"
- GoTo Lrcwcl
- End If
- '2.放置字段事后处理程序
- '以上为自定义部分]
- End Select
- '字段录入正确后为零字段清空
- Call Qkwlzd(Dqpdwgh, Dqpdwgl)
- sjzdyxxpd = True
- Yxxpdlock = True
- Exit Function
- End With
- Lrcwcl: '录入错误处理
- With CzxsGrid
- Call Xtxxts(Tsxx, 0, 1)
- Changelock = True
- .Select Dqpdwgh, Dqpdwgl
- Changelock = False
- Call xswbk
- sjzdyxxpd = False
- Exit Function
- End With
- End Function
- Private Function Sjhzyxxpd(ByVal Yxxpdh As Long) As Boolean '录入数据行有效性判断,同时进行行处理
- Dim Lrywlz As Long '录入错误列值(Fixed)
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Sqlstr As String '临时查询字符串
- Dim Str_Ccode As String '临时索引编码
- Dim BankCode As String '修改账号人员对应的代发银行
- Dim EmpID As String '修改账号人员的ID号
- With CzxsGrid
- '行没有发生变化则不进行有效性判断
- If Hyxxpdlock Then
- Sjhzyxxpd = True
- Exit Function
- End If
- '以下为自定义部分[
- '1.1首先进行单个不能为空或不能为零判断(Fixed)
- For jsqte = Qslz To .Cols - 1
- '字段不能为空
- If GridInt(jsqte, 5) = 1 Then
- If Len(Trim(.TextMatrix(Yxxpdh, jsqte))) = 0 Then
- Tsxx = GridStr(jsqte, 2)
- Lrywlz = jsqte
- GoTo Lrcwcl
- Exit For
- End If
- End If
- '字段不能为零
- If GridInt(jsqte, 5) = 2 Then
- If Val(Trim(.TextMatrix(Yxxpdh, jsqte))) = 0 Then
- Tsxx = GridStr(jsqte, 2)
- Lrywlz = jsqte
- GoTo Lrcwcl
- Exit For
- End If
- End If
- Next jsqte
- '1.2进行其他有效性判断,编写格式同1.1
- '2.放置行处理程序(当数据行通过有效性判断)
- Str_Ccode = Trim(.TextMatrix(Yxxpdh, Sydz("007", GridStr(), Szzls)))
- EmpID = Trim(.TextMatrix(Yxxpdh, 0))
- BankCode = Trim(.TextMatrix(Yxxpdh, 1))
- On Error GoTo Swcwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- Sql = " update PM_SortEmp set Accounts='" & Str_Ccode & "'" & _
- " where Empid=" & EmpID & " and BankCode='" & BankCode & "'"
- Cw_DataEnvi.DataConnect.Execute Sql
- Cw_DataEnvi.DataConnect.CommitTrans
- End With
- '以上为自定义部分]
- Sjhzyxxpd = True
- Hyxxpdlock = True
- Exit Function
- Swcwcl:
- Cw_DataEnvi.DataConnect.RollbackTrans
- Tsxx = "存盘过程中出现未知错误,程序自动恢复保存前状态!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Function
- Lrcwcl: '录入错误处理
- With CzxsGrid
- Call Xtxxts(Tsxx, 0, 1)
- Changelock = True
- .Select Yxxpdh, Lrywlz
- Changelock = False
- Call xswbk
- Sjhzyxxpd = False
- Exit Function
- End With
- End Function
- '===================以 下 程 序 为 通 用 部 分 ,一 般 不 需 更 改(程序动作部分)======================='
- Private Sub Lrzdbz() '录入字段帮助
- If Not Ydcommand.Visible Then
- Exit Sub
- End If
- With CzxsGrid
- Valilock = True
- '处理通用部分
- Changelock = True '调入另外窗体必须加锁
- Call Drbmhelp(GridInt(.Col, 6), GridStr(.Col, 3), Trim(Ydtext.Text))
- Changelock = False
- If Len(Xtfhcs) <> 0 Then
- If GridInt(.Col, 7) = 0 Then
- Ydtext.Text = Xtfhcs
- Else
- Ydtext.Text = Xtfhcsfz
- End If
- End If
- Valilock = False
- If Ydtext.Visible Then
- Ydtext.SetFocus
- End If
- End With
- End Sub
- Private Function Fun_Drfrmyxxpd() As Boolean '调入其它窗体或功能产生的有效性判断(包括数据回写)
- Fun_Drfrmyxxpd = True
- With CzxsGrid
- '如果当前网格处于编辑状态,则先进行数据回写再进行有效性判断
- If Ydtext.Visible Or YdCombo.Visible Then
- Call Lrsjhx
- If Not sjzdyxxpd(Dqlrwgh, Dqlrwgl) Then
- Fun_Drfrmyxxpd = False
- Exit Function
- End If
- End If
- '进行行有效性判断
- If Not Sjhzyxxpd(.Row) Then
- Fun_Drfrmyxxpd = False
- Exit Function
- End If
- End With
- End Function
- Private Sub czxsgrid_EnterCell() '显示当前数据行相关信息
- With CzxsGrid
- If .Row >= .FixedRows Then
- '[>>
- '此处可以填写显示与此网格行相关信息
- '<<]
- End If
- End With
- End Sub
- Private Sub CzxsGrid_GotFocus() '网格得到焦点
- '网格得到焦点,如果当前选择行为非数据行
- '则调整当前焦点至有效数据行
- With CzxsGrid
- If .Row < .FixedRows And .Rows > .FixedRows Then
- Changelock = True
- .Select .FixedRows, .Col
- Changelock = False
- End If
- If .Col < Qslz Then
- Changelock = True
- .Select .Row, Qslz
- Changelock = False
- End If
- End With
- End Sub
- Private Sub czxsgrid_LostFocus() '录入网格失去焦点
- '用以屏蔽调用其它窗体时发生网格失去焦点事件
- If Changelock Then
- Exit Sub
- End If
- '引发网格RowcolChange事件
- With CzxsGrid
- If Not (Ydtext.Visible Or YdCombo.Visible) Then
- .Select 0, 0
- End If
- End With
- End Sub
- Private Sub czxsgrid_AfterScroll(ByVal OldTopRow As Long, ByVal OldLeftCol As Long, ByVal NewTopRow As Long, ByVal NewLeftCol As Long) '限制用户在录入过程中滚动鼠标
- If Gdtlock Then
- Exit Sub
- End If
- With CzxsGrid
- If Ydtext.Visible Or YdCombo.Visible Then
- Gdtlock = True
- .TopRow = Dqtoprow
- .LeftCol = Dqleftcol
- Gdtlock = False
- Exit Sub
- End If
- End With
- End Sub
- Private Sub czxsgrid_LeaveCell() '离开单元格
- If Changelock Then
- Exit Sub
- End If
- '记录刚刚离开网格单元的行列值
- Dqlkwgh = CzxsGrid.Row
- Dqlkwgl = CzxsGrid.Col
- '判断是否需要录入数据回写
- If Not (Ydtext.Visible Or YdCombo.Visible) Then
- Exit Sub
- End If
- Call Lrsjhx
- End Sub
- Private Sub czxsgrid_RowColChange() '网格录入行列发生变化时,进行有效性判断
- Valilock = True '屏蔽文本框失去焦点进行有效性判断
- With CzxsGrid
- If Changelock Then
- Exit Sub
- End If
- If Not sjzdyxxpd(Dqlrwgh, Dqlrwgl) Then
- Exit Sub
- End If
- If .Row <> Dqlkwgh Then
- If Not Sjhzyxxpd(Dqlkwgh) Then
- Exit Sub
- End If
- End If
- End With
- Call fhyxh
- Call Xldql
- End Sub
- Private Sub CzxsGrid_DblClick() '鼠标双击网格显示文本框
- With CzxsGrid
- If .Rows <> .FixedRows Then
- Call xswbk
- End If
- End With
- End Sub
- Private Sub Ycwbk() '隐藏文本框,帮助按钮,列表组合框
- Valilock = True
- Ydtext.Visible = False
- YdCombo.Visible = False
- Ydcommand.Visible = False
- End Sub
- Private Sub YdCombo_KeyDown(KeyCode As Integer, Shift As Integer) '列表框移动
- With CzxsGrid
- Select Case KeyCode
- Case vbKeyEscape 'ESC 键放弃录入
- Valilock = True
- .SetFocus
- Call Ycwbk
- Valilock = False
- Case vbKeyReturn '回 车 键 =13
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- Rowjsq = .Row
- Coljsq = .Col + 1
- If Coljsq > .Cols - 1 Then
- If Rowjsq < .Rows - 1 Then
- Rowjsq = Rowjsq + 1
- End If
- Coljsq = Qslz
- End If
- Do While Rowjsq <= .Rows - 1
- If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
- Coljsq = Coljsq + 1
- If Coljsq > .Cols - 1 Then
- Rowjsq = Rowjsq + 1
- Coljsq = Qslz
- End If
- Else
- Exit Do
- End If
- Loop
- .Select Rowjsq, Coljsq
- Case vbKeyLeft '左 箭 头 =37
- If .Col - 1 = Qslz Then
- If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
- GoTo jzzx
- End If
- End If
- If .Col > Qslz Then
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- Coljsq = .Col - 1
- Do While Coljsq > Qslz
- If Coljsq - 1 = Qslz Then
- If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
- GoTo jzzx
- End If
- End If
- If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
- Coljsq = Coljsq - 1
- Else
- Exit Do
- End If
- Loop
- .Select .Row, Coljsq
- End If
- Case vbKeyRight '右 箭 头 =39
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- Rowjsq = .Row
- Coljsq = .Col + 1
- If Coljsq > .Cols - 1 Then
- If Rowjsq < .Rows - 1 Then
- Rowjsq = Rowjsq + 1
- End If
- Coljsq = Qslz
- End If
- Do While Rowjsq <= .Rows - 1
- If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
- Coljsq = Coljsq + 1
- If Coljsq > .Cols - 1 Then
- Rowjsq = Rowjsq + 1
- Coljsq = Qslz
- End If
- Else
- Exit Do
- End If
- Loop
- .Select Rowjsq, Coljsq
- Case Else
- End Select
- jzzx:
- End With
- End Sub
- Private Sub YdCombo_LostFocus() '列表框失去焦点
- With CzxsGrid '因为选中网格会先发生Rowcolchange事件置Valiock
- If Not Valilock Then '为TRUE
- Call Lrsjhx
- If Not Sjhzyxxpd(Dqlrwgh) Then
- Exit Sub
- End If
- End If
- End With
- End Sub
- Private Sub Ydcommand_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- Call Lrzdbz
- End Sub
- Private Sub ydtext_KeyDown(KeyCode As Integer, Shift As Integer)
- Dim Rowjsq As Long, Coljsq As Long
- With CzxsGrid
- Select Case KeyCode
- Case vbKeyF2
- Call Lrzdbz
- Case vbKeyEscape 'ESC 键放弃录入
- Valilock = True
- Call Ycwbk
- .SetFocus
- Case vbKeyReturn '回 车 键 =13
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- Rowjsq = .Row
- Coljsq = .Col + 1
- If Coljsq > .Cols - 1 Then
- If Rowjsq < .Rows - 1 Then
- Rowjsq = Rowjsq + 1
- End If
- Coljsq = Qslz
- End If
- Do While Rowjsq <= .Rows - 1
- If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
- Coljsq = Coljsq + 1
- If Coljsq > .Cols - 1 Then
- Rowjsq = Rowjsq + 1
- Coljsq = Qslz
- End If
- Else
- Exit Do
- End If
- Loop
- If Rowjsq <= .Rows - 1 Then
- .Select Rowjsq, Coljsq
- End If
- Case vbKeyUp '上 箭 头 =38
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- If .Row > .FixedRows Then
- .Row = .Row - 1
- End If
- Case vbKeyDown '下 箭 头 =40
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- If .Row < .Rows - 1 Then
- .Row = .Row + 1
- End If
- Case vbKeyLeft '左 箭 头 =37
- If .Col - 1 = Qslz Then
- If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
- GoTo jzzx
- End If
- End If
- If Ydtext.SelStart = 0 And .Col > Qslz Then
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- Coljsq = .Col - 1
- Do While Coljsq > Qslz
- If Coljsq - 1 = Qslz Then
- If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
- GoTo jzzx
- End If
- End If
- If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
- Coljsq = Coljsq - 1
- Else
- Exit Do
- End If
- Loop
- .Select .Row, Coljsq
- End If
- jzzx:
- Case vbKeyRight '右 箭 头 =39
- wblong = Len(Ydtext.Text)
- If (Ydtext.SelStart = wblong Or Ydtext.SelLength = wblong) Then
- KeyCode = 0
- .SetFocus
- Call Lrsjhx
- Rowjsq = .Row
- Coljsq = .Col + 1
- If Coljsq > .Cols - 1 Then
- If Rowjsq < .Rows - 1 Then
- Rowjsq = Rowjsq + 1
- End If
- Coljsq = Qslz
- End If
- Do While Rowjsq <= .Rows - 1
- If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
- Coljsq = Coljsq + 1
- If Coljsq > .Cols - 1 Then
- Rowjsq = Rowjsq + 1
- Coljsq = Qslz
- End If
- Else
- Exit Do
- End If
- Loop
- .Select Rowjsq, Coljsq
- End If
- Case Else
- End Select
- End With
- End Sub
- Private Sub ydtext_KeyPress(KeyAscii As Integer) '录入字符事中控制
- Call InputFieldLimit(Ydtext, GridInt(CzxsGrid.Col, 1), KeyAscii)
- End Sub
- Private Sub ydtext_Change() '录入事中变化处理
- '防止程序改变但不进行处理
- If Wbkbhlock Then
- Exit Sub
- End If
- With CzxsGrid
- '限制字段录入长度
- Wbkbhlock = True
- Call TextChangeLimit(Ydtext, GridInt(.Col, 1)) '去掉无效字符
- Select Case GridInt(.Col, 1)
- Case 8, 11 '金额型
- Call Sjgskz(Ydtext, Xtjezws - Xtjexsws - 1, Xtjexsws)
- Case 9, 12 '数量型
- Call Sjgskz(Ydtext, Xtslzws - Xtslxsws - 1, Xtslxsws)
- Case 10 '单价型
- Call Sjgskz(Ydtext, Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
- Case Else '其他类型
- If GridInt(.Col, 3) <> 0 Or GridInt(.Col, 4) <> 0 Then
- Call Sjgskz(Ydtext, GridInt(.Col, 3), GridInt(.Col, 4))
- End If
- End Select
- Wbkbhlock = False
- End With
- End Sub
- Private Sub ydtext_LostFocus() '如果由于选中网格之外的控件而发生有效性判断(选中网格会先发生Rowcolchange事件置Valiock为TRUE)
- With CzxsGrid
- If Not Valilock Then
- Call Lrsjhx
- If Not sjzdyxxpd(Dqlrwgh, Dqlrwgl) Then
- Exit Sub
- End If
- If Not Sjhzyxxpd(Dqlrwgh) Then
- Exit Sub
- End If
- End If
- End With
- End Sub
- Private Sub xswbk() '在当前选中单元显示文本框,列表框,帮助按钮(通用)
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightBank, Xtczybm, 1, True) Then
- Exit Sub
- End If
- Dim Wbkpy As Integer, Wbkpy1 As Integer '文本框偏移量
- '当某种条件成立时禁止文本框激活使单据处于录入状态
- If Not Fun_AllowInput Then
- Exit Sub
- End If
- '显示文本框前返回有效行列(解决滚动条问题)
- Call Xldqh
- Call Xldql
- '隐藏文本框,帮助按钮,列表组合框
- Call Ycwbk
- With CzxsGrid
- Dqlrwgh = .Row
- Dqlrwgl = .Col
- If Not GridBoolean(.Col, 1) Or .Row < .FixedRows Then
- Exit Sub
- End If
- Wbkpy = 30
- Wbkpy1 = 15
- On Error Resume Next
- If GridBoolean(.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 GridBoolean(.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 Sfblbzkd 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 GridInt(.Col, 2) <> 0 Then
- Ydtext.MaxLength = GridInt(.Col, 2)
- Else
- Ydtext.MaxLength = 3000
- End If
- Call Wbkcl
- Ydtext.Visible = True
- Ydtext.SetFocus
- End If
- Dqtoprow = .TopRow
- Dqleftcol = .LeftCol
- '重置锁值
- Valilock = False
- Wbkbhlock = False
- End With
- End Sub
- Private Function Fun_AllowInput() As Boolean '当某种条件成立时禁止文本框激活使单据处于录入状态
- '如果单据操作状态为浏览状态则不能显示录入载体(通用)
- If Trim(Lab_OperStatus.Caption) = "1" Then
- Exit Function
- End If
- '[>>
- '此处可以填写禁止文本框激活使单据处于录入状态的理由
- With CzxsGrid
- If .TextMatrix(.Row, Sydz("006", GridStr(), Szzls)) = "" And .Col = Sydz("007", GridStr(), Szzls) Then
- Call Xtxxts("没有代发银行,不必录入银行账号!", 0, 1)
- Fun_AllowInput = False
- Exit Function
- End If
- End With
- '<<]
- Fun_AllowInput = True
- End Function
- Private Sub Cxxswbk() 'Formresize中重新显示文本框,列表框,帮助按钮(通用)
- Dim Wbkpy As Integer, Wbkpy1 As Integer
- Wbkpy = 30
- Wbkpy1 = 15
- With CzxsGrid
- If YdCombo.Visible Then
- YdCombo.Left = .CellLeft + .Left + Wbkpy
- YdCombo.Top = .CellTop + .Top + Wbkpy
- YdCombo.Width = .CellWidth - Wbkpy1
- End If
- If Ydcommand.Visible Then
- Ydcommand.Left = .Left + .CellLeft + .CellWidth - Ydcommand.Width + Wbkpy
- Ydcommand.Top = .Top + .CellTop + .CellHeight - Ydcommand.Height + Wbkpy
- End If
- If Ydtext.Visible Then
- If Ydcommand.Visible Then
- If Sfblbzkd Then
- Ydtext.Width = .CellWidth - Ydcommand.Width
- Else
- Ydtext.Width = .CellWidth - Wbkpy1
- End If
- Else
- Ydtext.Width = .CellWidth - Wbkpy1
- End If
- Ydtext.Left = .CellLeft + .Left + Wbkpy
- Ydtext.Top = .CellTop + .Top + Wbkpy
- Ydtext.Height = .CellHeight - Wbkpy1
- End If
- End With
- End Sub
- Private Sub Lrsjhx() '文本框录入数据回写
- With CzxsGrid
- If YdCombo.Visible Then
- .Text = Trim(YdCombo.Text)
- End If
- If Ydtext.Visible Then
- .Text = Trim(Ydtext.Text)
- End If
- '(如果字段录入内容发生变化,则打开有效性判断锁)
- If Zdlrqnr <> Trim(.Text) Then
- Yxxpdlock = False
- Hyxxpdlock = False
- End If
- '隐藏文本框,帮助按钮,列表组合框
- Call Ycwbk
- End With
- End Sub
- Private Sub czxsgrid_KeyDown(KeyCode As Integer, Shift As Integer) '网格快捷键
- '如果单据操作状态为浏览状态则不能显示录入载体
- If Trim(Lab_OperStatus.Caption) = "1" Then
- Exit Sub
- End If
- Select Case KeyCode
- Case vbKeyF2 '按F2键参照
- Call xswbk
- Call Lrzdbz
- End Select
- End Sub
- Private Sub czxsgrid_KeyPress(KeyAscii As Integer) '网格接受键盘录入
- '当某种条件成立时禁止文本框激活使单据处于录入状态
- If Not Fun_AllowInput Then
- Exit Sub
- End If
- With CzxsGrid
- '屏 蔽 回 车 键
- If KeyAscii = vbKeyReturn Then
- KeyAscii = 0
- Rowjsq = .Row
- Coljsq = .Col + 1
- If Coljsq > .Cols - 1 Then
- If Rowjsq < .Rows - 1 Then
- Rowjsq = Rowjsq + 1
- End If
- Coljsq = Qslz
- End If
- Do While Rowjsq <= .Rows - 1
- If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
- Coljsq = Coljsq + 1
- If Coljsq > .Cols - 1 Then
- Rowjsq = Rowjsq + 1
- Coljsq = Qslz
- End If
- Else
- Exit Do
- End If
- Loop
- If Rowjsq <= .Rows - 1 Then
- .Select Rowjsq, Coljsq
- End If
- Exit Sub
- End If
- '接受用户录入
- Select Case KeyAscii
- Case 0 To 32 '用户输入KeyAscii为0-32的键 如空格
- '显示录入载体
- Call xswbk
- Case Else
- '防止非编辑字段SendKeys()出现死循环
- If Not GridBoolean(.Col, 1) Or .Row < .FixedRows Then
- Exit Sub
- End If
- '如果此字段为列表框录入则调入相应列表框
- If GridBoolean(.Col, 3) Then
- '列表框录入
- Call xswbk
- Else
- Ydtext.Text = ""
- '录入限制
- Call InputFieldLimit(Ydtext, GridInt(CzxsGrid.Col, 1), KeyAscii)
- If KeyAscii = 0 Then
- Exit Sub
- End If
- Call xswbk
- Ydtext.Text = ""
- Valilock = True
- SendKeys Chr(KeyAscii), True
- DoEvents
- Valilock = False
- End If
- End Select
- End With
- End Sub
- Private Sub Qkwlzd(sjh As Long, Sjl As Long) '清空为零字段
- If Not GridBoolean(Sjl, 5) Then
- Exit Sub
- End If
- With CzxsGrid
- If Val(Trim(.TextMatrix(sjh, Sjl))) = 0 Then
- .TextMatrix(sjh, Sjl) = ""
- End If
- End With
- End Sub
- Private Sub fhyxh() '返回录入数据有效行,同时让得到焦点网格可见
- With CzxsGrid
- If .Row >= .FixedRows Then
- Call Xldqh
- End If
- End With
- End Sub
- Private Sub Xldqh() '显露当前行
- Dim Toprowte As Long
- With CzxsGrid
- Toprowte = 0
- Do While .CellTop + .RowHeight(.Row) + Fzxwghs * Sjhgd > .Height And .TopRow <> Toprowte
- Toprowte = .TopRow
- .TopRow = .TopRow + 1
- Loop
- Toprowte = 0
- Do While .CellTop < .FixedRows * .RowHeight(0) And .TopRow <> Toprowte
- Toprowte = .TopRow
- If .TopRow > 1 Then
- .TopRow = .TopRow - 1
- End If
- Loop
- End With
- End Sub
- Private Sub Xldql() '显露当前列
- Dim Leftcolte As Long
- With CzxsGrid
- If .Col >= Qslz And .Col >= .FixedCols Then
- If .LeftCol > .Col Then
- .LeftCol = .Col
- End If
- Leftcolte = 0
- Do While .CellLeft + .CellWidth > .Width And .LeftCol <> Leftcolte
- Leftcolte = .LeftCol
- .LeftCol = .LeftCol + 1
- Loop
- End If
- End With
- End Sub
- Private Sub bbyl(bbylte As Boolean) '报表打印预览
- Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
- Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
- Bbxbtgs = 1 '报 表 小 标 题 行 数
- Bbbwhgs = 0 '报 表 表 尾 行 数
- ReDim Bbxbt(1 To Bbxbtgs)
- ReDim bbxbtzzxs(1 To Bbxbtgs)
- If Bbbwhgs <> 0 Then
- ReDim Bbbwh(1 To Bbbwhgs)
- ReDim Bbbwhzzxs(1 To Bbbwhgs)
- End If
- Bbzbt = ReportTitle
- With CzxsGrid
- If .Rows > .FixedRows Then
- Bbxbt(1) = "工资类别:" & Trim(GetComboKey(ImgCbo_Sort, 1))
- End If
- End With
- bbxbtzzxs(1) = 0 '报表行组织形式(0-居左 1-居中 2-居右)
- Call Scyxsjb(CzxsGrid) '生成报表数据
- Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
- If Not bbylte Then
- Unload DY_Tybbyldy
- End If
- End Sub