⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmoutdate.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 4 页
字号:
    Set mclsHook = Nothing
    Set mListset = Nothing
    Set mclsOutFilter = Nothing
    
    '释放资源
    FreePictureRes
End Sub

Private Sub sstWizard_Click(PreviousTab As Integer)
    '处理最前和最后一步问题
    Select Case PreviousTab
        Case 0
            
            If Not cmdPrevious.Enabled Then cmdPrevious.Enabled = True
        Case 1
            If Not sstWizard.TabVisible(2) Then
                If Not cmdnext.Enabled Then cmdnext.Enabled = True
            End If
        Case 2
            If Not cmdnext.Enabled Then cmdnext.Enabled = True
    End Select
    With sstWizard
        
        '处理筛选问题
        If .Tab = 2 And mintItem <> cboOutItem.ItemData(cboOutItem.ListIndex) Then
            Dim intCount As Integer
            
            If cboOutItem.ItemData(cboOutItem.ListIndex) = 31 Then
                picWizard.Visible = True
                Frame1.Visible = False
                Frame2.Visible = False
                Frame6.Visible = False
                tvwFilter.Visible = False
                Lblsel.Visible = False
                MsgFilter.Visible = False
                ReferText1.Visible = False
                For intCount = 0 To 2
                    lblBalFilter(intCount).Visible = True
                    cboBalFilter(intCount).Visible = True
                Next
                Frame4(1).Visible = True
                CmdReset.Visible = False
                InitYear
            Else
                picWizard.Visible = False
                Frame1.Visible = True
                Frame2.Visible = True
                Frame6.Visible = True
                tvwFilter.Visible = True
                Lblsel.Visible = True
                MsgFilter.Visible = True
                ReferText1.Visible = True
                For intCount = 0 To 2
                    lblBalFilter(intCount).Visible = False
                    cboBalFilter(intCount).Visible = False
                Next
                Frame4(1).Visible = False
                CmdReset.Visible = True
                mListset.ViewId = mintViewId(cboOutItem.ItemData(cboOutItem.ListIndex))
                If mListset.ListID < 1 Then mListset.SaveList
                mclsOutFilter.ShowFilter Me, mListset.ListID, 1
            End If
            mintItem = cboOutItem.ItemData(cboOutItem.ListIndex)
        Else
            picWizard.Visible = True
            If .Tab <> 2 Then
                CmdReset.Visible = False
            ElseIf .Tab = 2 And mintItem = cboOutItem.ItemData(cboOutItem.ListIndex) Then
                CmdReset.Visible = True
            End If
        End If
        Select Case .Tab
            Case 0
                cmdPrevious.Enabled = False
            Case 1
                If Not .TabVisible(2) Then cmdnext.Enabled = False
                'If cboOutItem.ListIndex <> 15 Then picWizard.Visible = False
            Case 2
                cmdnext.Enabled = False
                If cboOutItem.ItemData(cboOutItem.ListIndex) <> 15 Then picWizard.Visible = False
        End Select
    End With
End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
'筛选条件设置
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'响应钩子消息
Private Sub mclsHook_OnMessage(ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long, bCancel As Long)
  If Msg = WM_KEYUP Then
      If wParam = vbKeyUp Or wParam = vbKeyDown Then
          mclsOutFilter.MsgFilter_click Me
      End If
  End If
End Sub

'以下对应为条件控件过程


Private Sub CmdReset_Click()
      mclsOutFilter.CmdReset_Click Me
End Sub

Private Sub dateone_lostfocus()
    If sstWizard.Tab <> 2 Then Exit Sub
    If mblnIsInited(2) Then mclsOutFilter.dateone_lostfocus Me
End Sub

Private Sub ReferText1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
     mclsOutFilter.ReferText1_MouseDown Me, Button, Shift, x, y
End Sub

Private Sub ReferText2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    mclsOutFilter.ReferText2_MouseDown Me, Button, Shift, x, y
End Sub
Private Sub ReferText2_ItemNotExist()
    mclsOutFilter.blnNotExist = True
End Sub
Private Sub tvwFilter_Expand(ByVal Node As msComctlLib.Node)
    mclsOutFilter.tvwFilter_Expand Me, Node
End Sub

'单击树或者,MsgFilter.Row 改变或者单击
Private Sub tvwFilter_nodeClick(ByVal Node As msComctlLib.Node)
    mclsOutFilter.tvwFilter_nodeClick Me, Node
End Sub
 
Private Sub MsgFilter_click()
    mclsOutFilter.MsgFilter_click Me
End Sub

Private Sub refertext1_Choose()
    mclsOutFilter.refertext1_Choose Me
End Sub

Private Sub TxtFrom_KeyDown(KeyCode As Integer, Shift As Integer)
    If sstWizard.Tab <> 2 Then Exit Sub
    mclsOutFilter.TxtFrom_KeyDown Me, KeyCode, Shift
End Sub

Private Sub txtfrom_LostFocus()
    If sstWizard.Tab <> 2 Then Exit Sub
    mclsOutFilter.txtfrom_LostFocus Me
End Sub
         
Private Sub refertext2_Choose()
    mclsOutFilter.refertext2_Choose Me
End Sub

Private Sub dateto_lostfocus()
    If sstWizard.Tab <> 2 Then Exit Sub
    mclsOutFilter.dateto_lostfocus Me
End Sub

Private Sub datefrom_lostfocus()
    If sstWizard.Tab <> 2 Then Exit Sub
   mclsOutFilter.datefrom_lostfocus Me
End Sub

Private Sub TxtTo_KeyDown(KeyCode As Integer, Shift As Integer)
    mclsOutFilter.TxtTo_KeyDown Me, KeyCode, Shift
End Sub

Private Sub TxtTo_lostfocus()
    If sstWizard.Tab <> 2 Then Exit Sub
   mclsOutFilter.TxtTo_lostfocus Me
End Sub

'调用接口
Public Function OutItem()
    Me.Show vbModal
End Function

'加载资源
Private Function LoadPictureRes()
    Me.Icon = Utility.GetFormResPicture(139, vbResIcon)
    cmdCancel.Picture = Utility.GetFormResPicture(1002, vbResBitmap)
    cmdPrevious.Picture = Utility.GetFormResPicture(1005, vbResBitmap)
    cmdnext.Picture = Utility.GetFormResPicture(1006, vbResBitmap)
    cmdComplete.Picture = Utility.GetFormResPicture(1016, vbResBitmap)
    CmdReset.Picture = Utility.GetFormResPicture(1021, vbResBitmap)
    'cmdSendOut.Picture = Utility.GetFormResPicture(108, vbResBitmap)
    picWizard.Picture = Utility.GetFormResPicture(140, vbResBitmap)
    Set cmdOutDate.Picture = GetFormResPicture(1017, vbResBitmap)
End Function

'释放资源
Private Function FreePictureRes()
    Utility.RemoveFormResPicture 139
    Utility.RemoveFormResPicture 1002
    Utility.RemoveFormResPicture 1005
    Utility.RemoveFormResPicture 1006
    Utility.RemoveFormResPicture 1016
    Utility.RemoveFormResPicture 1021
    Utility.RemoveFormResPicture 140
    Utility.RemoveFormResPicture 1017
   ' Utility.RemoveFormResPicture 108
End Function

Private Sub InitYear()
    Dim recTemp As rdoResultset
    Dim intCnt  As Integer
    Dim intCount As Integer
    
    cboBalFilter(0).Clear
    Set recTemp = gclsBase.BaseDB.OpenResultset("SELECT intYear FROM AccountYear", rdOpenStatic)
    With recTemp
        Do While Not .EOF
            cboBalFilter(0).AddItem !intYear
            .MoveNext
        Loop
    End With
    cboBalFilter(0).ListIndex = 0
    Set recTemp = gclsBase.BaseDB.OpenResultset("SELECT bytPeriodNO FROM AccountYear WHERE intYear=" & cboBalFilter(0).Text, rdOpenStatic)
    For intCnt = 1 To 2
        With cboBalFilter(intCnt)
            .Clear
            For intCount = 1 To recTemp!bytPeriodNO
                .AddItem intCount
            Next
        End With
    Next
    cboBalFilter(1).ListIndex = 0
    cboBalFilter(2).ListIndex = cboBalFilter(2).ListCount - 1
    recTemp.Close
End Sub
'初始化单据列表筛选
Private Function InitFilterViewID(ByVal lngReceiptTypeID As Long, ByVal intNo As Integer) As Boolean
    '34-72
    Select Case lngReceiptTypeID
        Case 1
            mintViewId(intNo) = 74 '采购订单
        Case 2
            mintViewId(intNo) = 75 '商品采购
        Case 3
            mintViewId(intNo) = 334 '直运采购
        Case 4
            mintViewId(intNo) = 335 '受托入库
        Case 5
            mintViewId(intNo) = 336 '受托结算
        Case 6
            mintViewId(intNo) = 337 '加工入库
        Case 7
            mintViewId(intNo) = 338 '加工费用
        Case 8
            mintViewId(intNo) = 339 '采购发票
        Case 9
            mintViewId(intNo) = 340 '自制入库
        Case 10
            mintViewId(intNo) = 341 '盘盈入库
        Case 11
            mintViewId(intNo) = 342 '其它入库
        Case 12
            mintViewId(intNo) = 77 '销售订单
        Case 13
            mintViewId(intNo) = 78 '商品销售
        Case 14
            mintViewId(intNo) = 343 '直运销售
        Case 15
            mintViewId(intNo) = 344 '委托出库
        Case 16
            mintViewId(intNo) = 345 '委托结算
        Case 17
            mintViewId(intNo) = 346 '加工出库
        Case 18
            mintViewId(intNo) = 347 '分期出库
        Case 19
            mintViewId(intNo) = 348 '分期结算
        Case 20
            mintViewId(intNo) = 349 '销售发票
        Case 21
            mintViewId(intNo) = 350 '领用出库
        Case 22
            mintViewId(intNo) = 351 '成本调整
        Case 23
            mintViewId(intNo) = 352 '盘亏出库
        Case 24
            mintViewId(intNo) = 353 '其它出库
'        Case 25
'            mintViewId(42) = -1
        Case 26
            mintViewId(intNo) = 80 '代销调拨
'        Case 27
'            mintViewId(44) = -1
        Case 28
            mintViewId(intNo) = 82 '商品调拨
        Case 29
            mintViewId(intNo) = 83 '商品调价
        Case 30
            mintViewId(intNo) = 142 '商品组装
        Case 31
            mintViewId(intNo) = 142 '商品拆卸
        Case 32
            mintViewId(intNo) = 124 '入库成本
        Case 33
            mintViewId(intNo) = 141 '商品盘点
        Case 34
            mintViewId(intNo) = 21 '应付贷项
        Case 35
            mintViewId(intNo) = 21 '应付借项
        Case 36
            mintViewId(intNo) = 20 '应收借项
        Case 37
            mintViewId(intNo) = 20 '应收贷项
        Case 38
            mintViewId(intNo) = 117 '应收计息
        Case 39
            mintViewId(intNo) = 23 '付款单
        Case 40
            mintViewId(intNo) = 22 '收款单
        Case 41
            mintViewId(intNo) = 19 '记帐凭证
        Case 42
            mintViewId(intNo) = 529 '库存期初
        Case 43
            mintViewId(intNo) = 530 '受托期初
        Case 44
            mintViewId(intNo) = 532 '委托期初
        Case 45
            mintViewId(intNo) = 533 '分期期初
        Case 46
            mintViewId(intNo) = 535 '直运期初
        Case 47
            mintViewId(intNo) = 531 '加工期初
        Case 48
            mintViewId(intNo) = -1 '固资增加
        Case 49
            mintViewId(intNo) = -1 '固资减少
        Case 50
            mintViewId(intNo) = -1 '其它变动
        Case 51
            mintViewId(intNo) = -1 '固资卡片
        Case 52
            mintViewId(intNo) = 534 '采购期初
        Case 53
            mintViewId(intNo) = 1014 '固资期初
    End Select
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -