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

📄 frmcuikd.frm

📁 财务信息管理系统,适合做毕业论文的人使用
💻 FRM
📖 第 1 页 / 共 4 页
字号:
Private Sub Editr1_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii = 45 Then
        KeyAscii = 0
    End If
End Sub

Private Sub Edity1_Change(Index As Integer)
    Editr1(Index).Text = ""
    If Edity1(Index).Text = "" Then
        Editr1(Index).Enabled = False
        UpDown2(Index).Enabled = False
    Else
        If val(Edity1(Index).Text) > 0 And val(Edity1(Index).Text) < 13 Then
            Editr1(Index).Enabled = True
            UpDown2(Index).Enabled = True
        Else
            Beep
            MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
            Editr1(Index).Enabled = False
            UpDown2(Index).Enabled = False
        End If
    End If
    Tbr_Change
End Sub

Private Sub Edity1_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii = 45 Then
        KeyAscii = 0
    End If
End Sub

Private Sub Form_Load()
    On Error Resume Next
    Screen.MousePointer = vbHourglass
    UfGridADO1.Redraw = False
    UfGridADO1.FixedCols = 0
    
    UfGridADO1.Cols = 5
    UfGridADO1.ColWidth(0) = 1135
    UfGridADO1.ColWidth(1) = 1135
    UfGridADO1.ColWidth(2) = 830
    UfGridADO1.ColWidth(3) = 810
    UfGridADO1.ColWidth(4) = 2200
    
    UfGridADO1.Rows = 2
    UfGridADO1.FixedRows = 2
    
    With Me.UfGridADO1
        .TextMatrix(0, 0) = "开始日期"
        .JoinCells 0, 0, 1, 0, True
        .ColAlignment(0) = UG_ALIGNCENTER
        
        .TextMatrix(0, 1) = "结束日期"
        .JoinCells 0, 1, 1, 1, True
        .ColAlignment(1) = UG_ALIGNCENTER
        
        .TextMatrix(0, 2) = "利率"
        .TextMatrix(1, 2) = "(%)"
        .ColAlignment(2) = UG_ALIGNRIGHT
        
        .TextMatrix(0, 3) = "天数"
        .ColAlignment(3) = UG_ALIGNRIGHT
        .JoinCells 0, 3, 1, 3, True
        
        .TextMatrix(0, 4) = "结欠利息"
        .JoinCells 0, 4, 1, 4, True
        .ColAlignment(4) = UG_ALIGNRIGHT
                
        .HeadFont.Name = "宋体"
        .HeadForeColor = &H404040
        .HeadBackColor = &H8000000E
        .HeadFont.Size = 9
        .HeadFont.Bold = True
    End With
    
    InitForm
    'Me.Show
      UfGridADO1.left = Editbh.left
      UfGridADO1.top = Frame1.top
      UfGridADO1.Height = Frame1.Height
'''      UfGridADO1.Width = 12000

    Screen.MousePointer = vbDefault
End Sub

Private Sub InitForm()
    Dim rsTemp As New UfRecordset, rstlx As New UfRecordset, bjye As Double, sqlst As String, yhlx As Double, lldm As String, jqlx As Double
    CenterForm Me
    Frtin = True
    Informtlbckdck
    Me.Icon = LoadResPicture(109, vbResIcon)
    Me.Caption = "催款单"
    Picture2.width = ZjAccInfo.zjPictWidth
    Picture2.Picture = LoadPicture(ZjAccInfo.zjRepPath & "BookBack.bmp")
    Picture2.left = 7850 - ZjAccInfo.zjPictWidth
    Label0.Caption = "催 款 单"
    Label0.left = 3350 + ZjAccInfo.zjPictWidth - 7850
    Label1(0).Caption = "致:"
    Label1(1).Caption = "业务编号"
    Label1(2).Caption = "合同号"
    Label1(3).Caption = "币别"
    Label1(4).Caption = "本金余额"
    Label1(5).Caption = "分段    计息    记录"
    Label1(6).Caption = "单位: "
    Label1(7).Caption = "" & Year(zjLogInfo.curDate) & "年" & Month(zjLogInfo.curDate) & "月" & Day(zjLogInfo.curDate) & "日"
    Label1(8).Caption = "利息合计(大写)"
    Label1(9).Caption = "本息合计(大写)"
    Label1(10).Caption = "请将上述利息于"
    Label1(11).Caption = "请将上述本息于"
    Label1(12).Caption = "月"
    Label1(13).Caption = Label1(12).Caption
    Label1(14).Caption = "日之前加急电汇汇入我单位(或通过结算中心转入)"
    Label1(15).Caption = Label1(14).Caption
    Label1(16).Caption = "备注"
    Label2(4).Caption = ZjAccInfo.zjZtUnitName
    Label2(4).left = Label1(6).left + Label1(6).width
    Label1(7).left = 7520 - Label1(7).width
    Label2(1).Caption = Getmaxbh()
    Edity1(0).Text = Month(zjLogInfo.curDate)
    Editr1(0).Text = Day(zjLogInfo.curDate)
    Set rsTemp = dbsZJ.OpenRecordset("select * from " & IIf(ywzl = "07", "FD_UnwDeb", "FD_Cred") & " where [" & IIf(ywzl = "07", "cUnwID", "cCreID") & "] ='" & ywzl & ywbh & "' and (not ([cBookCode] is null))", dbOpenSnapshot)
    With rsTemp
        If ywzl = "07" Then
            Editdw.Text = Zhbhtodwmc(![cGAccID])
            Label2(2).Caption = Wgetwbb(![cGAccID])
        Else
            Editdw.Text = Zhbhtodwmc(![cAccId])
            Label2(2).Caption = Wgetwbb(![cAccId])
        End If
        bjye = ![mMoney]
        lldm = ![cintrid]
        .oClose
    End With
    
    
    Set rsTemp = dbsZJ.OpenRecordset("select sum([mmoney]) as yhbjhj from " & IIf(ywzl = "07", "FD_UnwRet", "FD_Return") & " where [" & IIf(ywzl = "07", "cUnwID", "cCreID") & "] ='" & ywzl & ywbh & "' and (not ([cBookCode] is null))" & IIf(eDate = "", "", " and [dbill_date]<='" & eDate & "'"), dbOpenSnapshot)
    With rsTemp
        If Not .EOF Then
            If Not IsNull(![yhbjhj]) Then
                bjye = bjye - ![yhbjhj]
            End If
        End If
        .oClose
    End With
    Label2(3).Caption = Format(bjye, "##,##0.00")
        
    yhlx = 0
    jqlx = 0
    
    If sDate <> "" Then
        sqlst = "Select sum([mmoney]) as yslxhj from FD_CadAcr where (not ([cBookCode] is null)) and [dbill_date]<'" & sDate & "' and [cDanID]='" & ywzl & ywbh & "'"
        Set rsTemp = dbsZJ.OpenRecordset(sqlst, dbOpenSnapshot)
        With rsTemp
            If Not .EOF Then
                If Not IsNull(![yslxhj]) Then
                    jqlx = jqlx + ![yslxhj]
                End If
            End If
            .oClose
        End With
    End If
    
    sqlst = "Select sum([mmoney]) as yhlxhj from " & IIf(ywzl = "07", "FD_UnwAcrRcp", "FD_CreAcrRcp") & " where (not ([cBookCode] is null)) and " & IIf(ywzl = "07", "[cUnwID]", "[cCreID]") & "='" & ywzl & ywbh & "'" & IIf(eDate = "", "", " and [dbill_date]<='" & eDate & "'")
    Set rsTemp = dbsZJ.OpenRecordset(sqlst, dbOpenSnapshot)
    With rsTemp
        If Not .EOF Then
            If Not IsNull(![yhlxhj]) Then
                yhlx = ![yhlxhj]
            End If
        End If
        .oClose
    End With
        
    sqlst = "Select [dbill_date],[mmoney],[Dfrom],[Dto] from FD_CadAcr where (not ([cBookCode] is null))" & IIf(eDate = "", "", " and [dbill_date]<='" & eDate & "'") & IIf(sDate = "", "", " and [dbill_date]>='" & sDate & "'") & " and [cDanID]='" & ywzl & ywbh & "' order by [dbill_date]"
    Set rsTemp = dbsZJ.OpenRecordset(sqlst, dbOpenSnapshot)
    jqlx = jqlx - yhlx
    With rsTemp
        If Not .EOF Then
            .MoveFirst
            Do While Not .EOF
                If ![mMoney] > yhlx Then
                     UfGridADO1.AddItem "" & Format(![dFrom], "yyyy-mm-dd") & Chr(9) & _
                           Format(![dTo], "yyyy-mm-dd") & Chr(9) & _
                           Format$(Getdqll(lldm, ![dFrom]), "#0.#####") & Chr(9) & _
                           Format$(![dTo] - ![dFrom] + 1, "##,##0") & Chr(9) & _
                           Format$(![mMoney] - yhlx, "##,##0.00")
                End If
                If yhlx > 0 And ![mMoney] > 0 Then
                    yhlx = yhlx - ![mMoney]
                End If
                If yhlx < 0 Then yhlx = 0
                jqlx = jqlx + ![mMoney]
                rsTemp.MoveNext
            Loop
        End If
        .oClose
    End With
  
    UfGridADO1.AddItem "合计" & Chr(9) & _
                    "" & Chr(9) & _
                    "" & Chr(9) & _
                    "" & Chr(9) & _
                    Format$(jqlx, "##,##0.00")
    Set rsTemp = Nothing
    
    Label2(5).Caption = Rmbdx(jqlx)
    Label2(6).Caption = Rmbdx(bjye + jqlx)
    
    With UfGridADO1
        .row = 2
        .col = 0
        .Redraw = True
    End With
    IsNew = True
    isSave = False
    Frtin = False
    Tlbckd.Buttons("Preview").Enabled = isSave
    Tlbckd.Buttons("Print").Enabled = isSave
    Tlbckd.Buttons("Dataout").Enabled = isSave
    
    Set rsTckd = dbsZJ.OpenRecordset("select * from FD_Hasten", dbOpenDynaset)
    
End Sub

Private Function Getmaxbh()
    Dim rsTemp As New UfRecordset
    Set rsTemp = dbsZJ.OpenRecordset("select * from FD_Hasten where Left([cHid],3)='000' order by [cHid]", dbOpenSnapshot)
    With rsTemp
        If .EOF Then
            Getmaxbh = "00000001"
        Else
            .MoveLast
            Getmaxbh = right(str(100000001 + ![cHid]), 8)
        End If
        .oClose
    End With
End Function

Private Sub Informtlbckdck()
    Dim imgt As ListImage
    Set imgt = ImageList1.ListImages.Add(, "Print", LoadResPicture(314, vbResBitmap))
    Set imgt = ImageList1.ListImages.Add(, "Preview", LoadResPicture(312, vbResBitmap))
    Set imgt = ImageList1.ListImages.Add(, "Dataout", LoadResPicture(307, vbResBitmap))
    Set imgt = ImageList1.ListImages.Add(, "SaveRecord", LoadResPicture(1145, vbResBitmap))
    Set imgt = ImageList1.ListImages.Add(, "DeleteRecord", LoadResPicture(326, vbResBitmap))
    Set imgt = ImageList1.ListImages.Add(, "RestoreRecord", LoadResPicture(315, vbResBitmap))
    Set imgt = ImageList1.ListImages.Add(, "Help", LoadResPicture(396, vbResBitmap))
    Set imgt = ImageList1.ListImages.Add(, "Exit", LoadResPicture(1118, vbResBitmap))
    With Tlbckd
        .Buttons("Print").Image = "Print"
        .Buttons("Print").Caption = "打印"
        .Buttons("Print").ToolTipText = "Ctrl+P"
        .Buttons("Preview").Image = "Preview"
        .Buttons("Preview").Caption = "预览"
'        .Buttons("Preview").ToolTipText = "Ctrl+S" 'cuidong 2001.01.15
        .Buttons("Preview").ToolTipText = ""        'cuidong 2001.01.15
        .Buttons("Dataout").Image = "Dataout"
        .Buttons("Dataout").Caption = "设置"
        .Buttons("Dataout").ToolTipText = "Ctrl+W"
        .Buttons("SaveRecord").Image = "SaveRecord"
        .Buttons("SaveRecord").Caption = "保存"
        .Buttons("SaveRecord").ToolTipText = "F6"
        .Buttons("DeleteRecord").Image = "DeleteRecord"
        .Buttons("DeleteRecord").Caption = "删除"
        .Buttons("DeleteRecord").ToolTipText = "Ctrl+Y"
        .Buttons("Help").Image = "Help"
        .Buttons("Help").Caption = "帮助"
        .Buttons("Help").ToolTipText = "F1"
        .Buttons("Exit").Image = "Exit"
        .Buttons("Exit").Caption = "退出"
        .Buttons("Exit").ToolTipText = "Alt+F4"
    End With
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    On Error Resume Next
    If Not isSave Then
        Select Case PromptSav
            Case vbYes:
                If Contquit() Then
                    CuikdSave
                    If isSave Then
                        rsTckd.oClose
                    Else
                        Cancel = True
                    End If
                Else
                    Cancel = True
                End If
            Case vbNo:
                rsTckd.oClose
            Case vbCancel
                Cancel = True
        End Select
    Else
        rsTckd.oClose
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    zjLogInfo.TaskExec "FD050227", 0, zjLogInfo.cIYear
    zjLogInfo.ClearError
    zjGen_arr.FD050227 = False
End Sub

Private Sub Option1_Click(Index As Integer)
    If Option1(0).Value Then
        Edity1(0).Enabled = True
        Editr1(0).Enabled = True
        UpDown1(0).Enabled = True
        UpDown2(0).Enabled = True
        Edity1(0).Text = Month(zjLogInfo.curDate)
        Editr1(0).Text = Day(zjLogInfo.curDate)
        Edity1(1).Text = ""
        Edity1(1).Enabled = False
        Editr1(1).Text = ""
        Editr1(1).Enabled = False
        UpDown1(1).Enabled = False
        UpDown2(1).Enabled = False
    Else
        Edity1(1).Enabled = True
        Editr1(1).Enabled = True
        UpDown1(1).Enabled = True
        UpDown2(1).Enabled = True
        Edity1(1).Text = Month(zjLogInfo.curDate)
        Editr1(1).Text = Day(zjLogInfo.curDate)
        Edity1(0).Text = ""
        Edity1(0).Enabled = False
        Editr1(0).Text = ""
        Editr1(0).Enabled = False
        UpDown1(0).Enabled = False
        UpDown2(0).Enabled = False
    End If
    Tbr_Change
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 vbKeyF4

⌨️ 快捷键说明

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