📄 frmtaxpersonlist.frm
字号:
frmPersonTaxListCard.ZOrder 0
End Select
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim intCount As Integer
For intCount = 0 To sstTypAct.Tabs - 1
If blnIsLoad(intCount) Then
mclsList(intCount).SaveListSet
End If
blnIsLoad(intCount) = False
Next
If mIsShowCard(0) Then Unload frmItemTaxListCard
If mIsShowCard(1) Then Unload frmPersonTaxListCard
' blnIsLoad(0) = False
gclsSys.MainControls.Remove Me
Set mclsMainControl = Nothing
End Sub
Private Sub Form_Resize()
On Error Resume Next
If Me.WindowState = 1 Then Exit Sub
If Me.Left + Me.Width < 0 Or Me.Left > Screen.Width Then
Me.Left = 300
End If
RedrawForm
End Sub
Private Sub Form_Activate()
mclsMainControl_ChildActive
gclsSys.CurrFormName = Me.hwnd
'mclsList(sstTypAct.Tab).FlexGrid.SetFocus
mclsList(sstTypAct.Tab).FlexGrid.Redraw = True
UpdateMenuStatus
'If (Me.Left + Me.Width < 0 Or Me.Left > Screen.Width) Then Me.Left = 300
If Me.WindowState = 1 Then Me.WindowState = 0
End Sub
'
'显示全部记录/未停用记录 CheckBox 控件
'
Private Sub chkShowAll_Click()
With sstTypAct
mclsList(.Tab).FlexGrid.Redraw = False
mclsList(.Tab).DoShowAll chkShowAll.Value
mclsList(.Tab).FlexGrid.Redraw = True
End With
'cboFindKind_Click
UpdateMenuStatus
End Sub
'
'查找条件类型 ComboBox 控件
'
Private Sub cboFindKind_Click()
Dim i As Integer
Dim intWidth As Integer
Dim strFind As String
Dim intSortCol As Integer
If mblnComboxNoClick Then Exit Sub
With mclsList(sstTypAct.Tab).FlexGrid
.Redraw = False
For i = 1 To .Cols - 1
If .TextMatrix(0, i) = cboFindKind.Text Then
strFind = .TextMatrix(.Row, i)
mclsList(sstTypAct.Tab).FixrowSortBold i
Exit For
End If
Next
End With
If mclsList(sstTypAct.Tab).FlexGrid.Rows > 1 Then
If txtFind.Text = strFind Then
txtFind_Change
Else
txtFind.Text = strFind
End If
End If
mclsList(sstTypAct.Tab).FlexGrid.Redraw = True
' mclsList(sstTypAct.Tab).FlexGrid.SetFocus
End Sub
Private Sub mclsMainControl_ChildActive()
Dim vntMessage As Variant
gclsSys.CurrFormName = Me.hwnd
'响应消息
For Each vntMessage In mclsMainControl.Messages
If vntMessage = Message.msgTax Then '接收到部门雇员改变消息
ToolRefresh 0
mclsMainControl.Messages.Remove CStr(vntMessage) '清除部门雇员改变消息
ElseIf vntMessage = Message.msgPersonTax Then
ToolRefresh 1
mclsMainControl.Messages.Remove CStr(vntMessage)
End If
Next
mclsMainControl.Messages.Clear
UpdateMenuStatus
End Sub
Private Sub mclsMainControl_EditColumn()
With sstTypAct
If mclsList(.Tab).ListSet.ShowListSet(intViewID(.Tab)) Then
blnIsLoad(.Tab) = False
sstTypAct_Click .Tab
End If
End With
End Sub
Private Sub mclsMainControl_EditFilter()
'筛选
Dim blnFlage(1) As Boolean
With sstTypAct
If Not mblnIsSaveListset(.Tab) Then
If Not FindlngViewID(intViewID(.Tab)) Then mclsList(.Tab).ListSet.SaveList
mblnIsSaveListset(.Tab) = True
End If
Filter.ShowFilter mclsList(.Tab).ListSet.ListID, 1, , , , , blnFlage(.Tab)
If Not blnFlage(.Tab) Then Exit Sub
mclsList(.Tab).SaveListSet
mclsList(.Tab).ListSet.ViewId = intViewID(.Tab)
mclsList(.Tab).FlexGrid.Cols = 0
Set datItem(.Tab).Resultset = GetList(.Tab)
If Not datItem(.Tab).Resultset.EOF Then datItem(.Tab).Resultset.MoveLast
' datItem(.Tab).Resultset.Close
'Set datItem(.Tab).Resultset = Nothing
mclsList(.Tab).SetFlexGrid
UpdateMenuStatus
'初始化查找复合列表框
mclsList(.Tab).InitcboFindKind
If chkShowAll.Value = 0 Then mclsList(.Tab).DoShowAll False
End With
End Sub
Private Sub mclsMainControl_FilePrintSetup()
Dim MyPrintSet As PrintClass
Set MyPrintSet = New PrintClass
With sstTypAct
Select Case .Tab
Case 0
MyPrintSet.PrintSetUp gclsBase.BaseDB, mclsList(.Tab).FlexGrid, , , , 54, " " & "," & gclsBase.BaseName & "," & gclsBase.OperatorName
Case 1
MyPrintSet.PrintSetUp gclsBase.BaseDB, mclsList(.Tab).FlexGrid, , , , 16, " " & "," & gclsBase.BaseName & "," & gclsBase.OperatorName
End Select
End With
End Sub
Private Sub mclsMainControl_ListReportMenu(ByVal intIndex As Integer)
Select Case intIndex
Case 0
' mclsMainControl_ReportQuick
' 'ItemTable
' Case 2
Report.ShowListReport 313, 333
#If conVersionType <> 8 Then
Case 1
Report.ShowListReport 314, 354
#End If
End Select
End Sub
'职员一览表
'商品税率一览表
Private Sub ItemTable()
Report.ShowListReport 313, 333
End Sub
'部门一览表
'个人所得税税率表
Private Sub PersonTaxTable()
Report.ShowListReport 314, 354
End Sub
'快捷报表
Private Sub mclsMainControl_ReportQuick()
End Sub
Private Sub mclsSubClass_WndProc(Msg As Long, wParam As Long, lParam As Long, Result As Long)
mclsList(sstTypAct.Tab).HookProc Msg, wParam, lParam, mclsSubClass
End Sub
Private Sub mclsSubClassForm_WndProc(Msg As Long, wParam As Long, lParam As Long, Result As Long)
Dim MinMax As MINMAXINFO
If Msg = WM_GETMINMAXINFO Then
CopyMemory MinMax, ByVal lParam, Len(MinMax)
MinMax.ptMinTrackSize.x = 430
MinMax.ptMinTrackSize.y = 250
CopyMemory ByVal lParam, MinMax, Len(MinMax)
Result = 0
End If
End Sub
Private Sub msgItemType_DblClick()
With msgItemType
If .MouseRow > 0 And .ColSel > 0 And .MouseCol > 1 Then
mclsMainControl_EditEdit
End If
End With
End Sub
'单击FLEXGRID停用列,停用或启用当前记录
Private Sub msgItemType_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim blnCancel As Boolean
With msgItemType
If Button = vbRightButton Then
Form_MouseDown Button, Shift, x, y
End If
End With
End Sub
Private Sub msgItem_DblClick()
With msgItem
If .MouseRow > 0 And .ColSel > 0 And .MouseCol > 1 Then
mclsMainControl_EditEdit
End If
End With
End Sub
Private Sub msgItem_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
With msgItem
If Button = vbRightButton Then
Form_MouseDown Button, Shift, x, y
End If
End With
End Sub
Private Sub msgItem_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
With msgItem
If Button = vbLeftButton Then
If chkShowAll.Value = 1 And .ColSel > 0 And .MouseRow > 0 And .Row > 0 Then
If x > .ColPos(1) And x < .ColPos(2) Then
.MousePointer = flexHourglass
mclsMainControl_EditInActive
.MousePointer = flexDefault
End If
End If
UpdateMenuStatus
End If
End With
End Sub
Private Sub sstTypAct_Click(PreviousTab As Integer)
With sstTypAct
Set mclsList(0).Again = Nothing
Set mclsList(1).Again = Nothing
Set mclsList(.Tab).Again = cmdAgain
If .Tab = 1 Then
chkShowAll.Enabled = False
Else
chkShowAll.Enabled = True
'Exit Sub
End If
mclsList(.Tab).FlexNoChange = True
mclsList(.Tab).FindNoChange = True
'改变钩子对象的作用窗体
mclsSubClass.hwnd = mclsList(.Tab).FlexGrid.hwnd
If Not blnIsLoad(.Tab) Then
'得到列表记录集
mclsList(.Tab).FlexGrid.Redraw = False
mclsList(.Tab).ListSet.ViewId = intViewID(.Tab)
mclsList(.Tab).InitFlexGrid
Set datItem(.Tab).Resultset = GetList(.Tab)
If Not datItem(.Tab).Resultset.EOF Then datItem(.Tab).Resultset.MoveLast
datItem(.Tab).Refresh
datItem(.Tab).Resultset.Close
'Set datItem(.Tab).Resultset = Nothing
mclsList(.Tab).SetFlexGrid
'初始化查找复合列表框
mclsList(.Tab).InitcboFindKind
mclsList(.Tab).FlexGrid.Redraw = False
'cboFindKind.List(1) = "税率(%)"
'重画窗体
'RedrawForm
'定位到第一行
With mclsList(.Tab).FlexGrid
If .Rows > 1 Then
mclsList(sstTypAct.Tab).FlexNoChange = False
.Row = 1
mclsList(sstTypAct.Tab).FlexNoChange = True
End If
.col = 0
.ColSel = .Cols - 1
End With
mclsList(.Tab).DoShowAll False
'重画列表线
'mclsList(.Tab).gridLineRefresh
UpdateMenuStatus
blnIsLoad(.Tab) = True
mclsList(.Tab).FlexGrid.Redraw = True
Else
'恢复查找复合列表项
mblnComboxNoClick = True
mclsList(.Tab).InitcboFindKind
mblnComboxNoClick = False
'恢复查找内容
If mclsList(.Tab).FlexGrid.Rows > 1 And mclsList(.Tab).FlexGrid.ColSel > 0 Then
txtFind.Text = mclsList(.Tab).FlexGrid.TextMatrix(mclsList(.Tab).FlexGrid.Row, mclsList(.Tab).SortCol)
Else
txtFind.Text = ""
End If
UpdateMenuStatus
End If
'恢复“全部显示”复选框
mblnCheckNoChange = True
chkShowAll.Value = IIf(mclsList(.Tab).ShowAll, 1, 0)
mblnCheckNoChange = False
'
RedrawForm
mclsList(.Tab).FlexNoChange = False
mclsList(.Tab).FindNoChange = False
End With
End Sub
'
'查找内容 TextBox 控件
'
Private Sub txtFind_Change()
mclsList(sstTypAct.Tab).TextFind txtFind.Text
End Sub
'
' FLEXGRID控件
'
'双击FLEXGRID调用卡片
Private Sub msgPaymentMethod_DblClick()
With mclsList(sstTypAct.Tab).FlexGrid
If .MouseRow > 0 And .ColSel > 0 And .MouseCol > 1 Then
mclsMainControl_EditEdit
End If
End With
End Sub
'恢复“停用”列光标
Private Sub msgItemType_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
With msgItemType
If Button = vbLeftButton Then
If chkShowAll.Value = 1 And .ColSel > 0 And .MouseRow > 0 And .Row > 0 Then
If x > .ColPos(1) And x < .ColPos(2) Then
.MousePointer = flexHourglass
mclsMainControl_EditInActive
.MousePointer = flexDefault
End If
End If
UpdateMenuStatus
End If
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -