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

📄 frmdklxtj.frm

📁 财务信息管理系统,适合做毕业论文的人使用
💻 FRM
字号:
VERSION 5.00
Object = "{A0C292A3-118E-11D2-AFDF-000021730160}#1.0#0"; "UFEDIT.OCX"
Begin VB.Form frmdklxtj 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   1605
   ClientLeft      =   1950
   ClientTop       =   3090
   ClientWidth     =   5475
   HelpContextID   =   88000071
   Icon            =   "frmdklxtj.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1605
   ScaleWidth      =   5475
   Begin VB.CommandButton cmdcancel 
      Cancel          =   -1  'True
      Height          =   365
      Left            =   4285
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   735
      Width           =   1080
   End
   Begin VB.CommandButton cmdfind 
      Default         =   -1  'True
      Height          =   365
      Left            =   4285
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   240
      Width           =   1080
   End
   Begin VB.Frame Frame1 
      Height          =   1260
      Left            =   120
      TabIndex        =   6
      Top             =   150
      Width           =   4045
      Begin VB.ComboBox Combo2 
         BackColor       =   &H00FFFFFF&
         Height          =   300
         ItemData        =   "frmdklxtj.frx":000C
         Left            =   2190
         List            =   "frmdklxtj.frx":000E
         Sorted          =   -1  'True
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   780
         Width           =   1110
      End
      Begin VB.ComboBox Combo1 
         BackColor       =   &H00FFFFFF&
         Height          =   300
         ItemData        =   "frmdklxtj.frx":0010
         Left            =   960
         List            =   "frmdklxtj.frx":0017
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   780
         Width           =   1110
      End
      Begin VB.CommandButton cmdrq 
         Height          =   270
         Index           =   0
         Left            =   2060
         Style           =   1  'Graphical
         TabIndex        =   8
         TabStop         =   0   'False
         Top             =   285
         Width           =   270
      End
      Begin VB.CommandButton cmdrq 
         Height          =   270
         Index           =   1
         Left            =   3675
         Style           =   1  'Graphical
         TabIndex        =   7
         TabStop         =   0   'False
         Top             =   285
         Width           =   270
      End
      Begin EDITLib.Edit Editrq 
         Height          =   264
         Index           =   0
         Left            =   960
         TabIndex        =   0
         Top             =   285
         Width           =   1035
         _Version        =   65536
         _ExtentX        =   1826
         _ExtentY        =   466
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Appearance      =   1
         Property        =   5
         MaxLength       =   10
      End
      Begin EDITLib.Edit Editrq 
         Height          =   264
         Index           =   1
         Left            =   2570
         TabIndex        =   1
         Top             =   285
         Width           =   1035
         _Version        =   65536
         _ExtentX        =   1826
         _ExtentY        =   466
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Appearance      =   1
         Property        =   5
         MaxLength       =   10
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "-"
         Height          =   180
         Left            =   2080
         TabIndex        =   11
         Top             =   820
         Width           =   96
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Height          =   180
         Index           =   0
         Left            =   120
         TabIndex        =   10
         Top             =   315
         Width           =   90
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Height          =   180
         Index           =   1
         Left            =   120
         TabIndex        =   9
         Top             =   816
         Width           =   96
      End
      Begin VB.Line Line1 
         X1              =   2370
         X2              =   2530
         Y1              =   405
         Y2              =   405
      End
   End
End
Attribute VB_Name = "frmdklxtj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'软件著作权: 北京用友软件集团有限公司
'系统名称: 资金管理8.0
'功能说明: 查询贷款利息条件
'作者: 魏小黎
Option Explicit
Public Quitfs As Boolean
Private isEnt As Boolean, Frtin As Boolean, ywzl As String

Private Sub cmdcancel_Click()
    Unload Me
End Sub

Private Sub cmdfind_Click()
    If Contquit Then
        Dim tmprst As New UfRecordset, ncs As Boolean, tj1 As String, tj2 As String, tj3 As String, tj4 As String
        tj1 = "select * from " & IIf(ywzl = "07", "FD_UnwDeb", "FD_Cred") & " where [" & IIf(ywzl = "07", "cUnwID", "cCreID") & "] ='" & ywzl & Combo2.Text & "' and (not ([cBookCode] is null))"
        Set tmprst = dbsZJ.OpenRecordset(tj1, dbOpenSnapshot)
        ncs = True
        If Not tmprst.EOF Then
            tmprst.oClose
            tj1 = "Select * from FD_CadAcr where (not ([cBookCode] is null)) and [cDanID]='" & ywzl & Combo2.Text & "'" & IIf(Editrq(0).Text = "", "", " and [dbill_date]>='" & Editrq(0).Text & "'") & IIf(Editrq(1).Text = "", "", " and [dbill_date]<='" & Editrq(1).Text & "'")
            Set tmprst = dbsZJ.OpenRecordset(tj1, dbOpenSnapshot)
            If tmprst.EOF Then
                tmprst.oClose
                tj1 = "select * from " & IIf(ywzl = "07", "FD_UnwAcrRcp", "FD_CreAcrRcp") & " where [" & IIf(ywzl = "07", "cUnwID", "cCreID") & "] ='" & ywzl & Combo2.Text & "' and (not ([cBookCode] is null))" & IIf(Editrq(0).Text = "", "", " and [dbill_date]>='" & Editrq(0).Text & "'") & IIf(Editrq(1).Text = "", "", " and [dbill_date]<='" & Editrq(1).Text & "'")
                Set tmprst = dbsZJ.OpenRecordset(tj1, dbOpenSnapshot)
                If Not tmprst.EOF Then
                    ncs = False
                End If
            Else
                ncs = False
            End If
        End If
        tmprst.oClose
        Set tmprst = Nothing
        
        If ncs Then
            Beep
            MsgBox "没有满足条件的贷款明细账!", vbCritical, zjGl_Name
            Combo2.SetFocus
            Exit Sub
        End If
        
        tj1 = Editrq(0).Text
        tj2 = Editrq(1).Text
        tj3 = Combo1.Text
        tj4 = Combo2.Text
        
        Quitfs = False
        
        Unload Me
        
        Dim frm As frmdklx, mfm As Form
        For Each mfm In Forms
            If mfm.Tag = "cxdklxb" Then
                BringWindowToTop mfm.hwnd
                mfm.sDate = tj1
                mfm.eDate = tj2
                mfm.ywmc = tj3
                mfm.ywbh = tj4
                mfm.ywzl = ywzl
                mfm.cmdExcute_Click
                mfm.cmdRefresh_Click
                Exit Sub
            End If
        Next mfm
        
        Set frm = New frmdklx
        frm.sDate = tj1
        frm.eDate = tj2
        frm.ywmc = tj3
        frm.ywbh = tj4
        frm.ywzl = ywzl
        frm.Tag = "cxdklxb"
        frm.Show
    End If
End Sub

Private Sub cmdrq_Click(Index As Integer)
    View_Calendar Me, Editrq(Index), 0
End Sub

Private Sub Combo1_Click()
    If Frtin Then
        Exit Sub
    End If
    Dim rsTemp As New UfRecordset, bh As String
    bh = IIf(Combo1.Text = Combo1.List(0), "05", IIf(Combo1.Text = Combo1.List(1), "06", "07"))
    If bh = "07" Then
        Set rsTemp = dbsZJ.OpenRecordset("Select * from FD_Unwdeb where not (cBookcode is null) And [cUnwID] like '" & bh & "%'order by [cUnwID]", dbOpenSnapshot)
    Else
        Set rsTemp = dbsZJ.OpenRecordset("Select * from FD_Cred where not (cBookcode is null) And [cCreID] like '" & bh & "%'order by [cCreID]", dbOpenSnapshot)
    End If
    Combo2.clear
    With rsTemp
        If Not .EOF Then
            .MoveFirst
            Do While Not .EOF
                If bh = "07" Then
                    Combo2.AddItem right(![cUnwID], 10)
                Else
                    Combo2.AddItem right(![cCreID], 10)
                End If
                .MoveNext
            Loop
            Combo2.Text = Combo2.List(0)
        End If
        .oClose
    End With
End Sub

Private Sub Form_Load()
    Dim rsTemp As New UfRecordset
    Screen.MousePointer = vbHourglass
    CenterForm Me
    Me.Icon = LoadResPicture(109, vbResIcon)
    Me.Caption = "贷款利息"
    cmdrq(0).Picture = LoadResPicture(1108, vbResBitmap)
    cmdrq(1).Picture = LoadResPicture(1108, vbResBitmap)
    Frame1.Caption = "请输入查询条件"
    cmdfind.Picture = LoadResPicture(103, vbResBitmap)
    cmdcancel.Picture = LoadResPicture(104, vbResBitmap)
    Label1(0).Caption = "起始时间"
    Label1(1).Caption = "业务编号"
    Combo1.clear
    Combo1.AddItem Ywbhtoname("05")
    Combo1.AddItem Ywbhtoname("06")
    Combo1.AddItem Ywbhtoname("07")
    
    Frtin = True
    Set rsTemp = dbsZJ.OpenRecordset("Select * from FD_Cred where not (cBookcode is null) And [cCreID] like '05%'order by [cCreID]", dbOpenSnapshot)
    With rsTemp
        If Not .EOF Then
            Combo1.Text = Combo1.List(0)
            .MoveFirst
            Do While Not .EOF
                Combo2.AddItem right(.Fields("cCreID"), 10)
                .MoveNext
            Loop
            Frtin = False
        End If
        .oClose
    End With
    
    If Frtin Then
        Set rsTemp = dbsZJ.OpenRecordset("Select * from FD_Cred where not (cBookcode is null) And [cCreID] like '06%'order by [cCreID]", dbOpenSnapshot)
        With rsTemp
            If Not .EOF Then
                Combo1.Text = Combo1.List(1)
                .MoveFirst
                Do While Not .EOF
                    Combo2.AddItem right(![cCreID], 10)
                    .MoveNext
                Loop
                Frtin = False
            End If
            .oClose
        End With
    End If
    
    If Frtin Then
'        Set rsTemp = dbsZJ.OpenRecordset("Select * from FD_Unwdeb where not (cBookcode is null) And [cUnwID] like '07' order by [cUnwID]", dbOpenSnapshot) 'cuidong % 2001.11.05
        Set rsTemp = dbsZJ.OpenRecordset("Select * from FD_Unwdeb where not (cBookcode is null) And [cUnwID] like '07%' order by [cUnwID]", dbOpenSnapshot) 'cuidong % 2001.11.05
        With rsTemp
            If Not .EOF Then
                Combo1.Text = Combo1.List(2)
                .MoveFirst
                Do While Not .EOF
                    Combo2.AddItem right(![cUnwID], 10)
                    .MoveNext
                Loop
                Frtin = False
            End If
            .oClose
        End With
    End If
    
    If Frtin Then
        Combo1.Text = Combo1.List(0)
    Else
        Combo2.Text = Combo2.List(0)
    End If
    
    Frtin = False
    isEnt = True
    Screen.MousePointer = vbDefault
End Sub
' 业务日期按键
Private Sub Editrq_Keyup(Index As Integer, KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 And isEnt Then
        SendKeys "{Tab}"
    End If
    If KeyCode = 113 Then    'F2
        View_Calendar Me, Editrq(Index), 0
    End If
    isEnt = True
End Sub

Private Sub Editrq_LostFocus(Index As Integer)
    If Editrq(Index).Text <> "" And isEnt Then
        Editrq(Index).Text = ForDate(Editrq(Index).Text)
        If IsDate(Editrq(Index).Text) Then
            Editrq(Index).Text = Format(Editrq(Index).Text, "yyyy-mm-dd")
        Else
            Beep
            MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
            SetTxtFocus Editrq(Index)
            isEnt = False
        End If
    End If
End Sub
' 条件合法性检查
Private Function Contquit() As Boolean
    Contquit = True
    
    If Editrq(0).Text <> "" Then
        Editrq(0).Text = ForDate(Editrq(0).Text)
        If Not IsDate(Editrq(0).Text) Then
            Beep
            MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
            Contquit = False
            SetTxtFocus Editrq(0)
            Exit Function
        End If
    End If
    
    If Editrq(1) <> "" Then
        Editrq(1).Text = ForDate(Editrq(1).Text)
        If IsDate(Editrq(1).Text) Then
            If Editrq(0).Text <> "" Then
                If CDate(Editrq(1).Text) < CDate(Editrq(0).Text) Then
                    Beep
                    MsgBox "日期范围错误,请检查!", vbCritical, zjGl_Name
                    Contquit = False
                    SetTxtFocus Editrq(1)
                    Exit Function
                End If
            End If
        Else
            Beep
            MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
            Contquit = False
            SetTxtFocus Editrq(1)
            Exit Function
        End If
    End If
    
    If Combo2.Text = "" Then
        Beep
        MsgBox "业务编号不能为空,请检查!", vbCritical, zjGl_Name
        Contquit = False
        Combo1.SetFocus
        Exit Function
    End If
    
    If Combo1.Text = Combo1.List(0) Then
        ywzl = "05"
    End If
    If Combo1.Text = Combo1.List(1) Then
        ywzl = "06"
    End If
    If Combo1.Text = Combo1.List(2) Then
        ywzl = "07"
    End If
    
End Function

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

⌨️ 快捷键说明

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