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

📄 ct_szqk.frm

📁 vb不酒店管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form ct_szqk 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   3510
   ClientLeft      =   -15
   ClientTop       =   -15
   ClientWidth     =   6735
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3510
   ScaleWidth      =   6735
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.Frame Frame1 
      Height          =   2385
      Left            =   90
      TabIndex        =   3
      Top             =   300
      Width           =   6450
      Begin VB.Frame Frame2 
         Height          =   855
         Left            =   330
         TabIndex        =   6
         Top             =   1170
         Width           =   5565
         Begin VB.Label lb_zws 
            Alignment       =   1  'Right Justify
            BackColor       =   &H8000000E&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "就餐人数"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   3990
            TabIndex        =   10
            Top             =   300
            Width           =   1155
         End
         Begin VB.Label Label4 
            Caption         =   "座 位 数"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   225
            Left            =   3060
            TabIndex        =   9
            Top             =   330
            Width           =   855
         End
         Begin VB.Label lb_rs 
            Alignment       =   1  'Right Justify
            BackColor       =   &H8000000E&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "就餐人数"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   1350
            TabIndex        =   8
            Top             =   300
            Width           =   1155
         End
         Begin VB.Label Label1 
            Caption         =   "就餐人数"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   225
            Left            =   450
            TabIndex        =   7
            Top             =   330
            Width           =   855
         End
      End
      Begin MSMask.MaskEdBox tx_rq 
         Height          =   315
         Left            =   1680
         TabIndex        =   0
         Top             =   810
         Width           =   1155
         _ExtentX        =   2037
         _ExtentY        =   556
         _Version        =   327680
         MaxLength       =   10
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mask            =   "####-##-##"
         PromptChar      =   "_"
      End
      Begin VB.Label Label2 
         Caption         =   "统计日期"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   750
         TabIndex        =   5
         Top             =   840
         Width           =   855
      End
      Begin VB.Label lb_title 
         Alignment       =   2  'Center
         Caption         =   "上座情况统计"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   240
         TabIndex        =   4
         Top             =   210
         Width           =   5685
      End
   End
   Begin VB.Timer XT_Timer 
      Interval        =   1000
      Left            =   120
      Top             =   2850
   End
   Begin VB.CommandButton CMD_EXIT 
      Caption         =   "退 出(Esc)"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   510
      Left            =   4770
      TabIndex        =   1
      Top             =   2880
      Width           =   1575
   End
   Begin VB.Label frm_msg 
      Alignment       =   1  'Right Justify
      ForeColor       =   &H00C00000&
      Height          =   240
      Left            =   2400
      TabIndex        =   2
      Top             =   60
      Visible         =   0   'False
      Width           =   4125
   End
End
Attribute VB_Name = "ct_szqk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


'**************************************************************************************************
'*  功    能 : 明细列表的显示
'*  作    者 : 梁卫
'*  作成日期 : 1999.03.18
'*  修改日期 : 1999.03.18
'**************************************************************************************************
Private Sub tPxs_SZCX()

    Dim temp_sz As Recordset
    
    '统计已结算的客人
    Set temp_sz = PUB_data.OpenRecordset("SELECT SUM(RS) AS SM_RS FROM YY" & year(tx_rq.Text) & " WHERE GWDM='" & Trim(SYS_GWDM) & "' AND FSRQ=#" & tx_rq.Text & "#", 4, 0, 2)
    If Not temp_sz.BOF Then
        temp_sz.MoveLast
        lb_rs.Caption = IIf(IsNull(temp_sz.Fields("SM_RS")), 0, temp_sz.Fields("SM_RS"))
    Else
        lb_rs.Caption = IIf(IsNull(temp_sz.Fields("SM_RS")), 0, temp_sz.Fields("SM_RS"))
    End If
    temp_sz.Close
    
    '若日期为今日, 则还要统计正在就餐的客人人数
    If CDate(tx_rq.Text) = Date Then
        Set temp_sz = LOCAL_data.OpenRecordset("SELECT SUM(RS) AS SM_RS FROM CT_TZLB", 4, 0, 2)
        If Not temp_sz.BOF Then
            temp_sz.MoveLast
            lb_rs.Caption = CInt(lb_rs.Caption) + IIf(IsNull(temp_sz.Fields("SM_RS")), 0, temp_sz.Fields("SM_RS"))
        End If
        temp_sz.Close
    End If

End Sub


'**************************************************************************************************
'*  功    能 :
'*  作    者 : 梁卫
'*  作成日期 : 1999.03.18
'*  修改日期 : 1999.03.18
'**************************************************************************************************
Private Sub CMD_EXIT_Click()
    Unload Me
End Sub

Private Sub Form_Activate()
    tx_rq.SetFocus
End Sub

'**************************************************************************************************
'*  功    能 :
'*  作    者 : 梁卫
'*  作成日期 : 1999.03.18
'*  修改日期 : 1999.03.18
'**************************************************************************************************
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    frm_msg.Caption = ""
    frm_msg.Visible = False
    If KeyCode = vbKeyEscape Then
        Call CMD_EXIT_Click
    End If
End Sub

'**************************************************************************************************
'*  功    能 :
'*  作    者 : 梁卫
'*  作成日期 : 1999.03.18
'*  修改日期 : 1999.03.18
'**************************************************************************************************
Private Sub Form_Load()
    Dim ctrl_rec As Recordset
    
    ct_szqk.KeyPreview = True

    frm_msg.Visible = True
    frm_msg.Caption = ""
    
    tx_rq.Text = Format(Date, "yyyy-mm-dd")
    
    '获得座位数
    Set ctrl_rec = PUB_data.OpenRecordset("SELECT ZWS FROM SYS_CTRL WHERE TRIM(GWDM)='" & Trim(SYS_GWDM) & "'", 4, 0, 2)
    If Not ctrl_rec.BOF Then
        ctrl_rec.MoveLast
        lb_zws.Caption = ctrl_rec.Fields("ZWS")
    Else
        lb_zws.Caption = 0
    End If
    ctrl_rec.Close
    
    Call tPxs_SZCX
    
End Sub



Private Sub tx_rq_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then
        CMD_EXIT.SetFocus
    End If
End Sub

Private Sub tx_rq_LostFocus()
    Dim temp_ft As Boolean
    
    frm_msg.Visible = False
    frm_msg.Caption = ""
    
    If PUB_RQJY(tx_rq, frm_msg) Then
        temp_ft = True
        If Trim(tx_rq.Text) = "____-__-__" Then
            temp_ft = False
        Else
            If CDate(tx_rq.Text) > Date Then
                temp_ft = False
            Else
                temp_ft = True
            End If
        End If
        If temp_ft Then
            Call tPxs_SZCX
        Else
            frm_msg.Visible = True
            frm_msg.Caption = "请输入正确的日期"
            tx_rq.SetFocus
        End If
    End If
End Sub

⌨️ 快捷键说明

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