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

📄 frmcuiklr.frm

📁 u8
💻 FRM
字号:
VERSION 5.00
Object = "{A0C292A3-118E-11D2-AFDF-000021730160}#1.0#0"; "UFEDIT.OCX"
Begin VB.Form frmcuiklr 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   1605
   ClientLeft      =   45
   ClientTop       =   300
   ClientWidth     =   5475
   HelpContextID   =   88000050
   Icon            =   "frmcuiklr.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1605
   ScaleWidth      =   5475
   Begin VB.Frame Frame1 
      Height          =   1260
      Left            =   120
      TabIndex        =   5
      Top             =   150
      Width           =   4045
      Begin VB.ComboBox Combo2 
         Height          =   300
         ItemData        =   "frmcuiklr.frx":000C
         Left            =   2190
         List            =   "frmcuiklr.frx":000E
         Sorted          =   -1  'True
         Style           =   2  'Dropdown List
         TabIndex        =   11
         Top             =   780
         Width           =   1110
      End
      Begin VB.CommandButton cmdrq 
         Height          =   270
         Index           =   1
         Left            =   3655
         Style           =   1  'Graphical
         TabIndex        =   7
         TabStop         =   0   'False
         Top             =   285
         Width           =   270
      End
      Begin VB.CommandButton cmdrq 
         Height          =   270
         Index           =   0
         Left            =   2055
         Style           =   1  'Graphical
         TabIndex        =   6
         TabStop         =   0   'False
         Top             =   285
         Width           =   270
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "frmcuiklr.frx":0010
         Left            =   960
         List            =   "frmcuiklr.frx":0017
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   780
         Width           =   1110
      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          =   270
         Index           =   1
         Left            =   2565
         TabIndex        =   1
         Top             =   285
         Width           =   1035
         _Version        =   65536
         _ExtentX        =   1826
         _ExtentY        =   476
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Appearance      =   1
         Property        =   5
         MaxLength       =   10
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "-"
         Height          =   180
         Left            =   2100
         TabIndex        =   10
         Top             =   825
         Width           =   90
      End
      Begin VB.Line Line1 
         Index           =   0
         X1              =   2370
         X2              =   2515
         Y1              =   405
         Y2              =   405
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Height          =   180
         Index           =   1
         Left            =   120
         TabIndex        =   9
         Top             =   816
         Width           =   96
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Height          =   180
         Index           =   0
         Left            =   120
         TabIndex        =   8
         Top             =   315
         Width           =   90
      End
   End
   Begin VB.CommandButton cmdfind 
      Default         =   -1  'True
      Height          =   365
      Left            =   4285
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   255
      Width           =   1080
   End
   Begin VB.CommandButton cmdcancel 
      Cancel          =   -1  'True
      Height          =   365
      Left            =   4285
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   750
      Width           =   1080
   End
End
Attribute VB_Name = "frmcuiklr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'软件著作权: 北京用友软件集团有限公司
'系统名称: 资金管理8.0
'功能说明: 录入催款单条件
'作者: 魏小黎
Option Explicit
Private isEnt As Boolean, Frtin As Boolean
Private ywzl As String, Quitfs As Boolean

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
        tj1 = "select [" & IIf(ywzl = "07", "cUnwID", "cCreID") & "] 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
            ncs = False
        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 = Combo2.Text
        
        Quitfs = False
        
        Unload Me
        
        Dim frm As New frmcuikd
        frm.sDate = tj1
        frm.eDate = tj2
        frm.ywbh = tj3
        frm.ywzl = ywzl
        frm.Show 1
    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), "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("06")
    Combo1.AddItem Ywbhtoname("07")
    
    Frtin = True
    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(0)
            .MoveFirst
            Do While Not .EOF
                Combo2.AddItem right(![cCreID], 10)
                .MoveNext
            Loop
            Frtin = False
        End If
        .oClose
    End With
    
    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(1)
                .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
    Quitfs = 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
        Combo2.SetFocus
        Exit Function
    End If
    
    If Combo1.Text = Combo1.List(0) Then
        ywzl = "06"
    End If
    If Combo1.Text = Combo1.List(1) Then
        ywzl = "07"
    End If
    
End Function

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

⌨️ 快捷键说明

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