📄 +
字号:
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" '页面设置
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -