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

📄 frmyhckb.frm

📁 用友u8财务源码,用visual basic开发
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            
            .TextMatrix(0, 14) = IIf(djnwb = 1, "往来银行", "复核")
            .ColAlignment(14) = UG_ALIGNLEFT
            .JoinCells 0, 14, 1, 14, True
    
            .TextMatrix(0, 15) = IIf(djnwb = 1, "往来账号", "记账")
            .ColAlignment(15) = UG_ALIGNLEFT
            .JoinCells 0, 15, 1, 15, True
                    
            .TextMatrix(0, 16) = IIf(djnwb = 1, "内部经办", "制单")
            .ColAlignment(16) = UG_ALIGNLEFT
            .JoinCells 0, 16, 1, 16, True
            
            If djnwb = 1 Then
            
                .TextMatrix(0, 17) = "中心经办"
                .ColAlignment(17) = UG_ALIGNLEFT
                .JoinCells 0, 17, 1, 17, True
                    
                .TextMatrix(0, 18) = "复核"
                .ColAlignment(18) = UG_ALIGNLEFT
                .JoinCells 0, 18, 1, 18, True
        
                .TextMatrix(0, 19) = "记账"
                .ColAlignment(19) = UG_ALIGNLEFT
                .JoinCells 0, 19, 1, 19, True
    
                .TextMatrix(0, 20) = "制单"
                .ColAlignment(20) = UG_ALIGNLEFT
                .JoinCells 0, 20, 1, 20, True
            End If
        End With
    Else
        With Me.UfGridado1
            .TextMatrix(0, 0) = "定期"
            .TextMatrix(1, 0) = "活期"
'            .ColAlignment(0) = UG_ALIGNLEFT  'cuidong S.A 2001.09.11
            .ColAlignment(0) = UG_ALIGNCENTER 'cuidong S.A 2001.09.11
        
            .TextMatrix(0, 1) = "业务日期"
            .ColAlignment(1) = UG_ALIGNLEFT
            .JoinCells 0, 1, 1, 1, True
             
            .TextMatrix(0, 2) = "业务编号"
            .ColAlignment(2) = UG_ALIGNLEFT
            .JoinCells 0, 2, 1, 2, True
               
            .TextMatrix(0, 3) = IIf(djnwb = 1, "银行名称", "内部单位")
            .ColAlignment(3) = UG_ALIGNLEFT
            .JoinCells 0, 3, 1, 3, True
            
            .TextMatrix(0, 4) = IIf(djnwb = 1, "银行账户", "账户号")
            .ColAlignment(4) = UG_ALIGNLEFT
            .JoinCells 0, 4, 1, 4, True
            
            .TextMatrix(0, 5) = IIf(djcqk = 1, "存款金额", "取款金额")
            .ColAlignment(5) = UG_ALIGNRIGHT
            .JoinCells 0, 5, 1, 5, True
            
            .TextMatrix(0, 6) = "币别"
            .ColAlignment(6) = UG_ALIGNLEFT
            .JoinCells 0, 6, 1, 6, True
            
            .TextMatrix(0, 7) = "汇率"
            .ColAlignment(7) = UG_ALIGNRIGHT
            .JoinCells 0, 7, 1, 7, True
            
            .TextMatrix(0, 8) = "本位币金额"
            .ColAlignment(8) = UG_ALIGNRIGHT
            .JoinCells 0, 8, 1, 8, True
            
            .TextMatrix(0, 9) = "利率代码"
            .ColAlignment(9) = UG_ALIGNLEFT
            .JoinCells 0, 9, 1, 9, True
            
            .TextMatrix(0, 10) = "存期"
            .TextMatrix(1, 10) = "(月)"
            .ColAlignment(10) = UG_ALIGNLEFT
            
            .TextMatrix(0, 11) = "经办人"
            .ColAlignment(11) = UG_ALIGNLEFT
            .JoinCells 0, 11, 1, 11, True
            
            .TextMatrix(0, 12) = "摘要"
            .ColAlignment(12) = UG_ALIGNLEFT
            .JoinCells 0, 12, 1, 12, True
            
            .TextMatrix(0, 13) = "复核"
            .ColAlignment(13) = UG_ALIGNLEFT
            .JoinCells 0, 13, 1, 13, True
    
            .TextMatrix(0, 14) = "记账"
            .ColAlignment(14) = UG_ALIGNLEFT
            .JoinCells 0, 14, 1, 14, True
                    
            .TextMatrix(0, 15) = "制单"
            .ColAlignment(15) = UG_ALIGNLEFT
            .JoinCells 0, 15, 1, 15, True
        End With
    End If
    
    With Me.UfGridado1
        .Left = 0
        .Top = Tlbckd.Height + Picture1.Height
        .HeadForeColor = &H404040
        .HeadBackColor = &H8000000E
        .HeadFont.Name = "宋体"
        .HeadFont.Size = 9
        .HeadFont.Bold = True
        If rstBind.EOF Then
            .Rows = 2
            .FixedRows = 2
        End If
    End With
    Screen.MousePointer = vbDefault
End Sub

Private Sub Form_Resize()
    If Me.WindowState = 1 Then
        Exit Sub
    End If
    If Me.WindowState = 0 Then
        If Me.Width < 3700 Then Me.Width = 3700
        If Me.Height < 3300 Then Me.Height = 3300
    End If
    UfGridado1.Width = Me.Width - 100
    UfGridado1.Height = Me.Height - (5820 - 3890)
    Picture1.Left = Me.Width - ZjAccInfo.zjPictWidth
    If Picture1.Left > 0 Then Picture1.Left = 0
    Label0.Left = (Me.Width - Label0.Width) / 2 - Picture1.Left
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Select Case djcqk * 2 + djnwb
        Case 3
            zjLogInfo.TaskExec "FD020102", 0, zjLogInfo.cIYear
            'zjGen_arr.FD020102 = False
        Case 1
            zjLogInfo.TaskExec "FD020202", 0, zjLogInfo.cIYear
            'zjGen_arr.FD020202 = False
        Case 2
            zjLogInfo.TaskExec "FD020302", 0, zjLogInfo.cIYear
            'zjGen_arr.FD020302 = False
        Case 0
            zjLogInfo.TaskExec "FD020402", 0, zjLogInfo.cIYear
            'zjGen_arr.FD020402 = False
        Case 5
            zjLogInfo.TaskExec "FD021502", 0, zjLogInfo.cIYear
            'zjGen_arr.FD021502 = False
        Case 4
            zjLogInfo.TaskExec "FD021402", 0, zjLogInfo.cIYear
            'zjGen_arr.FD021402 = False
    End Select
    zjLogInfo.ClearError
End Sub

Private Sub tlbckd_ButtonClick(ByVal Button As ComctlLib.Button)
    Gen_Key Button.key
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
        Case vbKeyF3
            If Shift = 0 Then
                Gen_Key "Lanmuxz"
            End If
        Case vbKeyF4
            If Shift = 2 Then
                Gen_Key "Exit"
            ElseIf Shift = 0 Then
                Gen_Key "Lcdj"
            End If
        Case vbKeyP
            If Shift = 2 Then
                Gen_Key "Print"
                KeyCode = 0
            End If
        Case vbKeyS
            'cuidong 2001.01.15
            'If Shift = 2 Then
            '    Gen_Key "Preview"
            '    KeyCode = 0
            'End If
        Case vbKeyW
            If Shift = 2 Then
                Gen_Key "Dataout"
                KeyCode = 0
            End If
        Case vbKeyF
            If Shift = 2 Then
                Gen_Key "Recx"
                KeyCode = 0
            End If
    End Select
End Sub

Private Sub Gen_Key(TLB_Key As String)
    On Error Resume Next
    Select Case TLB_Key
        Case Is = "Print", "Preview", "Dataout"
            zjbPrnViewOut Me, IIf(djcqk = 2, "cxjsb", "yhckb"), TLB_Key, False, Label0.Caption
        Case Is = "Lanmuxz"
            Set frmblmxz.ufg1 = Me.UfGridado1
            frmblmxz.lms = IIf(djcqk = 2, IIf(djnwb = 1, 12, 10), 10)
            frmblmxz.fsk = IIf(djcqk = 2, False, True)
            frmblmxz.Show 1
        Case Is = "Lcdj"
            If UfGridado1.Row > 1 Then
''''''                If djcqk = 2 Then
''''''                    Lcjsdj djnwb, Right(UfGridADO1.TextMatrix(UfGridADO1.Row, IIf(djnwb = 1, 3, 1)), 8), sqlst1
''''''                Else
''''''                    Lccqkdj djnwb, djcqk, Right(UfGridADO1.TextMatrix(UfGridADO1.Row, 2), 8), sqlst1
'''''''                End If
                  Dim sCell As String
                  If djcqk = 2 Then
                        sCell = UfGridado1.TextMatrix(UfGridado1.Row, IIf(djnwb = 1, 3, 1))
                  Else
                        sCell = UfGridado1.TextMatrix(UfGridado1.Row, 2)
                  End If
                  If Not IsNumeric(Right(sCell, 8)) Then Exit Sub
                  oUniFind.ShowBill "FD", oV.Name2Code(Left(sCell, InStr(sCell, "-") - 1)) + Right(sCell, 8)

            End If
        Case Is = "Recx"
            If djcqk = 2 Then
                frmyjstj.Quitfs = False
                frmyjstj.cxnwb = djnwb
                frmyjstj.Show 1
            Else
                frmcktj.Quitfs = False
                frmcktj.djnwb = djnwb
                frmcktj.djcqk = djcqk
                frmcktj.Show 1
            End If
        Case Is = "Help"
            SendKeys "{F1}"
        Case Is = "Exit"
            Unload Me
    End Select
End Sub

Private Sub UfGridado1_DBClick(ByVal nRow As Long, ByVal nCol As Long)
    If nRow > 1 And Not Trim(UfGridado1.TextMatrix(nRow, IIf(djnwb = 1, 0, 1))) = Trim(CX_SumTEXT) Then
'''''        If djcqk = 2 Then
'''''            Lcjsdj djnwb, Right(UfGridado1.TextMatrix(UfGridado1.Row, IIf(djnwb = 1, 3, 1)), 8), sqlst1
'''''        Else
'''''            Lccqkdj djnwb, djcqk, Right(UfGridado1.TextMatrix(nRow, 2), 8), sqlst1
'''''        End If
'      If UfGridADO1.TextMatrix(UfGridADO1.Row, IIf(djnwb = 1, 1, 0)) = CX_SumTEXT Then Exit Sub 'cuidong S.A 2001.09.17
      
      Dim sCell As String
      If djcqk = 2 Then
            sCell = UfGridado1.TextMatrix(UfGridado1.Row, IIf(djnwb = 1, 3, 1))
      Else
            sCell = UfGridado1.TextMatrix(nRow, 2)
      End If
      If Not IsNumeric(Right(sCell, 8)) Then Exit Sub
      oUniFind.ShowBill "FD", oV.Name2Code(Left(sCell, InStr(sCell, "-") - 1)) + Right(sCell, 8)
    End If
End Sub

'数据准备线程函数
'警告:如果启动数据准备线程,则程序不能在VB环境里调试
'实际解决办法是:
'   1.不启动数据准备线程(即不调用Me.UfGridado1.StartThread)
'   2.通过TIMER或直接调用线程函数完成数据准备函数的调试
'   3.一切无误后调用Me.UfGridado1.StartThread启动线程
'   4.生成EXE文件后运行查看多线程效果
'数据绑定方式下格式化单元内容
Private Sub UfGridado1_FormatCellValue(ByVal Row As Long, ByVal Col As Long, cVal As String, ByVal vType As UFGRIDspLib.enumValueType)
    If Row < 2 Then Exit Sub
'    ''''''''''''''''''''''''''''''''''''''''''
    Dim cValTmp As String
    
    On Error Resume Next
    cValTmp = cVal
'    Dim hFile As Long
'    hFile = FreeFile
'    Open "c:\log.txt" For Append Access Write As #hFile
'    Print #hFile, Row & "," & Col & "," & cVal & "," & CInt(vType)
'    Close #hFile
'    ''''''''''''''''''''''''''''''''''''''''''
    Select Case Col
        Case Is = 0
            If djcqk = 2 Then
                If djnwb = 0 Then
                    cValTmp = Format(cValTmp, "yyyy-mm-dd")
                End If
            End If
        Case Is = 1
            If djcqk = 2 Then
                If djnwb = 1 Then
                    cValTmp = Jsfscton(cValTmp, True)
                End If
            Else
                cValTmp = Format(cValTmp, "yyyy-mm-dd")
            End If
        Case Is = 2
            If djcqk = 2 Then
                If djnwb = 0 Then
                    cValTmp = Zhbhtodwmc(cValTmp)
                Else
                    cValTmp = Format(cValTmp, "yyyy-mm-dd")
                End If
            End If
        Case Is = 3
            If djcqk < 2 Then
                cValTmp = Zhbhtodwmc(cValTmp)
            End If
        Case Is = 4
            If djcqk = 2 Then
                cValTmp = Zhbhtodwmc(cValTmp)
            End If
'        Case Is = 5
'            Stop
        Case Is = 6
            If djcqk = 2 Then
                If djnwb = 1 Then
                    cValTmp = Zhbhtodwmc(cValTmp)
                Else
                    cValTmp = Format(Val(cValTmp), "##,##0.00")
                End If
            End If
        Case Is = 7
            If djcqk < 2 Then
                cValTmp = Format(Val(cValTmp), "#0.######")
                If Right(cValTmp, 1) = "." Then
                    cValTmp = Left(cValTmp, Len(cValTmp) - 1)
                End If
            End If
        Case Is = 8
            If djcqk = 2 Then
                If djnwb = 1 Then
                    cValTmp = Format(Val(cValTmp), "##,##0.00")
                Else
                    cValTmp = Format(Val(cValTmp), "#0.######")
                    If Right(cValTmp, 1) = "." Then
                        cValTmp = Left(cValTmp, Len(cValTmp) - 1)
                    End If
                End If
            Else
                cValTmp = Format(Val(cValTmp), "##,##0.00")
            End If
        Case Is = 9
            If djcqk = 2 Then
                If djnwb = 0 Then
                    cValTmp = Format(Val(cValTmp), "##,##0.00")
                End If
            End If
        Case Is = 10
            If djcqk = 2 Then
                If djnwb = 1 Then
                    cValTmp = Format(Val(cValTmp), "#0.######")
                    If Right(cValTmp, 1) = "." Then
                        cValTmp = Left(cValTmp, Len(cValTmp) - 1)
                    End If
                End If
            End If
        Case Else
            If vType = dbCurrency _
            Or vType = dbSingle _
            Or vType = dbDouble _
            Or vType = dbLong _
            Or vType = dbInteger _
            Or vType = dbNumeric _
            Or vType = dbDecimal Then cValTmp = Format(Val(cValTmp), "##,##0.00")
            
    End Select
    
    cVal = cValTmp
    On Error GoTo 0
    
''    ''''''''''''''''''''''''''''''''''''''''''
''    Dim hFile As Long
''    hFile = FreeFile
''    Open "c:\zjgl813log.txt" For Output Access Write As #hFile
''    Print #hFile, "Row = " & Row & ", Col = " & Col & ", Orignal cVal = " & cValTmp & ", Current cVal = " & cVal & ", Type = " & CInt(vType)
''    Close #hFile
''    ''''''''''''''''''''''''''''''''''''''''''
End Sub

⌨️ 快捷键说明

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