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

📄 ct_jscx.frm

📁 该系统为酒店日常管理提供了很大的方便
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form ct_jscx 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   7170
   ClientLeft      =   -15
   ClientTop       =   -15
   ClientWidth     =   8010
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7170
   ScaleWidth      =   8010
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.Frame Frame1 
      Height          =   6015
      Left            =   90
      TabIndex        =   4
      Top             =   300
      Width           =   7770
      Begin MSMask.MaskEdBox tx_rq 
         Height          =   285
         Left            =   1320
         TabIndex        =   0
         Top             =   840
         Width           =   1155
         _ExtentX        =   2037
         _ExtentY        =   503
         _Version        =   327680
         MaxLength       =   10
         Mask            =   "####-##-##"
         PromptChar      =   "_"
      End
      Begin MSFlexGridLib.MSFlexGrid gd1 
         Height          =   4650
         Left            =   210
         TabIndex        =   1
         Top             =   1200
         Width           =   7350
         _ExtentX        =   12965
         _ExtentY        =   8202
         _Version        =   327680
         Rows            =   20
         Cols            =   6
         FixedCols       =   0
         BackColor       =   12648447
         ScrollBars      =   2
         SelectionMode   =   1
      End
      Begin VB.Label Label2 
         Caption         =   "查询日期"
         Height          =   165
         Left            =   510
         TabIndex        =   8
         Top             =   870
         Width           =   735
      End
      Begin VB.Label lb_jls 
         Alignment       =   1  'Right Justify
         Caption         =   "0"
         Height          =   165
         Left            =   6900
         TabIndex        =   7
         Top             =   960
         Width           =   555
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         Caption         =   "记录数 :"
         Height          =   165
         Left            =   6120
         TabIndex        =   6
         Top             =   960
         Width           =   795
      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        =   5
         Top             =   210
         Width           =   6555
      End
   End
   Begin VB.Timer XT_Timer 
      Interval        =   1000
      Left            =   270
      Top             =   6480
   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            =   6090
      TabIndex        =   2
      Top             =   6510
      Width           =   1575
   End
   Begin VB.Label frm_msg 
      Alignment       =   1  'Right Justify
      ForeColor       =   &H00C00000&
      Height          =   240
      Left            =   2400
      TabIndex        =   3
      Top             =   60
      Visible         =   0   'False
      Width           =   5445
   End
End
Attribute VB_Name = "ct_jscx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim t_tbname As String
Dim t_bt As String          '存储列表显示的表头
Dim t_fields As Variant     '存储列表显示的字段名
Dim t_fdxs As Variant       '表示显示列是否由代码转换成文字
Dim t_fdcounts As Integer   '表示列表所显示的字段的个数
 

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

    Dim temp_js As Recordset
    
    Set temp_js = PUB_data.OpenRecordset("SELECT * FROM CT_JSTJ WHERE GWDM='" & Trim(SYS_GWDM) & "' AND FSRQ=#" & tx_rq.Text & "# ORDER BY BHA", 4, 0, 2)
    If Not temp_js.BOF Then
        temp_js.MoveLast
    End If
    
    Call Flex_full(gd1, t_bt, temp_js, t_fields, t_fdcounts - 1, t_fdxs)
    
    lb_jls.Caption = gd1.Rows - 1
    If gd1.Rows - 1 = 0 Then
        frm_msg.Visible = True
        frm_msg.Caption = "该日没有发生酒水销售, 或者是没有做酒水统计!!"
    Else
        frm_msg.Visible = False
        frm_msg.Caption = ""
    End If
    temp_js.Close

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()

    ct_jscx.KeyPreview = True

    frm_msg.Visible = True
    frm_msg.Caption = ""
    
    tx_rq.Text = Format(Date, "yyyy-mm-dd")
    
    t_fields = Array("BHA", "ZWMC", "YWMC", "DJ", "SL", "SJJE")  '设置显示字段
    t_fdxs = Array(0, 0, 0, 2, 2, 2)  '设置显示字段
    t_bt = "<编  号  |<中文名称      |<英文名称      |>单价        |>数量        |>金额        "   '设置显示表头格式
    t_fdcounts = 6
    
    Call tPxs_JSCX
    
End Sub



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

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

Private Sub tx_rq_LostFocus()
    frm_msg.Visible = False
    frm_msg.Caption = ""
    
    If PUB_RQJY(tx_rq, frm_msg) Then
        If Trim(tx_rq.Text) = "____-__-__" Then
            frm_msg.Visible = True
            frm_msg.Caption = "请输入正确的日期"
            tx_rq.SetFocus
        Else
            Call tPxs_JSCX
        End If
    End If
End Sub

⌨️ 快捷键说明

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