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

📄 frmcustomerform.frm

📁 餐饮茶馆管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form frmCustomerForm 
   Caption         =   "客户上台"
   ClientHeight    =   6525
   ClientLeft      =   60
   ClientTop       =   630
   ClientWidth     =   10935
   Icon            =   "frmCustomerForm.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   ScaleHeight     =   6525
   ScaleWidth      =   10935
   WindowState     =   2  'Maximized
   Begin VB.Frame Frame3 
      Height          =   3540
      Left            =   5685
      TabIndex        =   11
      Top             =   2130
      Width           =   4770
      Begin MSFlexGridLib.MSFlexGrid Grid2 
         Height          =   4335
         Left            =   15
         TabIndex        =   12
         Top             =   105
         Width           =   5280
         _ExtentX        =   9313
         _ExtentY        =   7646
         _Version        =   393216
         Cols            =   3
         BackColorSel    =   14737632
         ForeColorSel    =   32768
         BackColorBkg    =   33023
         AllowBigSelection=   0   'False
         FocusRect       =   0
         SelectionMode   =   1
         BorderStyle     =   0
         Appearance      =   0
      End
   End
   Begin VB.Frame Frame2 
      ForeColor       =   &H00808000&
      Height          =   1590
      Left            =   5670
      TabIndex        =   4
      Top             =   480
      Width           =   5355
      Begin VB.CommandButton cmdAdd 
         Height          =   390
         Left            =   3030
         Picture         =   "frmCustomerForm.frx":030A
         Style           =   1  'Graphical
         TabIndex        =   16
         ToolTipText     =   "按 + 添加记录 "
         Top             =   270
         Width           =   1215
      End
      Begin VB.CommandButton cmdPast 
         BackColor       =   &H00C0C0C0&
         Height          =   390
         Left            =   4425
         Picture         =   "frmCustomerForm.frx":1A76
         Style           =   1  'Graphical
         TabIndex        =   15
         ToolTipText     =   "F12 结帐"
         Top             =   270
         Width           =   1215
      End
      Begin VB.CommandButton cmdCancel 
         Cancel          =   -1  'True
         Height          =   390
         Left            =   4425
         Picture         =   "frmCustomerForm.frx":31E2
         Style           =   1  'Graphical
         TabIndex        =   14
         ToolTipText     =   "Esc 退出"
         Top             =   750
         Width           =   1215
      End
      Begin VB.CommandButton cmdDel 
         Enabled         =   0   'False
         Height          =   390
         Left            =   3030
         Picture         =   "frmCustomerForm.frx":494E
         Style           =   1  'Graphical
         TabIndex        =   13
         Top             =   750
         Width           =   1215
      End
      Begin VB.TextBox txtSL 
         Height          =   300
         Left            =   1005
         MaxLength       =   5
         TabIndex        =   10
         Text            =   "1"
         Top             =   1080
         Width           =   1875
      End
      Begin VB.ComboBox cmbCode 
         Height          =   300
         Left            =   1005
         Sorted          =   -1  'True
         TabIndex        =   9
         Top             =   705
         Width           =   1875
      End
      Begin VB.ComboBox cmbSite 
         Height          =   300
         Left            =   1005
         Sorted          =   -1  'True
         TabIndex        =   8
         Top             =   285
         Width           =   1875
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "数量:"
         Height          =   180
         Index           =   2
         Left            =   360
         TabIndex        =   7
         Top             =   1155
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "座位:"
         Height          =   180
         Index           =   1
         Left            =   360
         TabIndex        =   6
         Top             =   330
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "代码:"
         Height          =   180
         Index           =   0
         Left            =   360
         TabIndex        =   5
         Top             =   735
         Width           =   540
      End
   End
   Begin ComctlLib.TabStrip Strip1 
      Height          =   360
      Left            =   -15
      TabIndex        =   3
      Top             =   75
      Width           =   7950
      _ExtentX        =   14023
      _ExtentY        =   635
      TabFixedHeight  =   1764
      _Version        =   327682
      BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7} 
         NumTabs         =   1
         BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7} 
            Caption         =   "所有物品"
            Key             =   ""
            Object.Tag             =   ""
            ImageVarType    =   2
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Frame Frame1 
      Height          =   5490
      Left            =   30
      TabIndex        =   0
      Top             =   480
      Width           =   5535
      Begin VB.PictureBox picEatList 
         BorderStyle     =   0  'None
         Height          =   4545
         Left            =   75
         ScaleHeight     =   4545
         ScaleWidth      =   5385
         TabIndex        =   1
         Top             =   165
         Width           =   5385
         Begin MSFlexGridLib.MSFlexGrid Grid1 
            Height          =   4440
            Left            =   0
            TabIndex        =   2
            Top             =   0
            Width           =   5280
            _ExtentX        =   9313
            _ExtentY        =   7832
            _Version        =   393216
            Cols            =   3
            BackColorSel    =   14737632
            ForeColorSel    =   32768
            BackColorBkg    =   33023
            AllowBigSelection=   0   'False
            FocusRect       =   0
            SelectionMode   =   1
            BorderStyle     =   0
            Appearance      =   0
         End
      End
   End
   Begin VB.Menu mnuControl 
      Caption         =   "控制台(&C)"
      Begin VB.Menu mnuDel 
         Caption         =   "删除物品(&D)"
         Shortcut        =   +{DEL}
      End
      Begin VB.Menu line101 
         Caption         =   "-"
      End
      Begin VB.Menu mnuCheck 
         Caption         =   "收银台结帐(&H)"
         Shortcut        =   {F8}
      End
      Begin VB.Menu Line02 
         Caption         =   "-"
      End
      Begin VB.Menu mnuExit 
         Caption         =   "关闭返回(X)"
         Shortcut        =   ^X
      End
   End
End
Attribute VB_Name = "frmCustomerForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim sGlobalType As String
Dim bDel As Boolean
Dim sName As String, lDJ As Currency, sDW As String, lSL As Long, sType As String, sCode As String

Private Sub cmbType_GotFocus()

  
End Sub

Private Sub cmbType_KeyPress(KeyAscii As Integer)

 If KeyAscii = 13 And Trim(cmbType) <> "" Then
    KeyAscii = 0
    If cmdAdd.Enabled = True Then cmdAdd.SetFocus
  Else
    KeyAscii = 0
    cmdSelectType.Value = True
 End If
 
End Sub

Private Sub cmbCode_Click()

   If Trim(cmbCode.Text) <> "" And Trim(cmbSite.Text) <> "" And Val(txtSL) > 0 Then
      cmdAdd.Enabled = True
    Else
      cmdAdd.Enabled = False
   End If
   
End Sub

Private Sub cmbSite_Click()

   If Trim(cmbCode.Text) <> "" And Trim(cmbSite.Text) <> "" And Val(txtSL) > 0 Then
      cmdAdd.Enabled = True
    Else
      cmdAdd.Enabled = False
   End If
   
   ConfigGrid2 Trim(cmbSite.Text)
      
End Sub

Private Sub cmdAdd_Click()

   On Error GoTo Err_Add
   
  '查询Code
   If GetCode(Trim(cmbCode), "代码", "EatList") = False Then
      MsgBox "对不起,该物品的代码不存在,请修改代码后再添加。", vbOKOnly + vbInformation, "代码不存在"
      cmbCode = ""
      cmbCode.SetFocus
      Exit Sub
   End If
   
   sCode = Trim(cmbCode)
   lSL = Val(txtSL)
   If lSL = 0 Then
      lSL = 1
   End If
   sSL = lSL        '全局数量
  '给出名称+单价+单位
   GetRecord sCode, "代码", "EatList"
   
  '添加记录
   AddRecord sName, "名称", lDJ, "单价", sDW, "单位", sCode, "代码", sType, "MenuType", lSL * lDJ, "金额", "tmpSell"

  '刷新
   ConfigGrid2 Trim(cmbSite.Text)
   
  '恢复
   cmbCode.SetFocus
   
     Exit Sub
Err_Add:
 MsgBox "添加记录错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub cmdAddLine_Click()

 ' 添加到列表框
 listLine.AddItem txtAddLine
 txtAddLine.Text = ""
 txtAddLine.SetFocus
 
End Sub

Private Sub cmdCancel_Click()

  Unload Me
  
End Sub

Private Sub cmdClose_Click()

   Unload Me
   
End Sub

Private Sub cmdDel_Click()

  On Error GoTo Err_del
  If Grid2.Text = "" Then
     MsgBox "请先选择一种物品后,再按删除按钮。    ", vbExclamation
     Exit Sub
  End If
  If Grid2.Text = "*****  合计 ****" Then
     Exit Sub
  End If
  
  ' 删除
    If MsgBox("真的删除 [ " & Grid2.Text & " ] 吗?    ", vbYesNo + vbCritical) = vbNo Then
       Exit Sub
    End If
    
    DelRecord Grid2.TextMatrix(Grid2.Row, 0), "MID", "tmpSell"
    
  ' 刷新数据
    Grid2.RemoveItem Grid2.Row
    cmbCode.SetFocus
    
  ' 刷新数据
    ConfigGrid2 Trim(cmbSite.Text)
    
      Exit Sub
Err_del:
 MsgBox "记录删除错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub cmdDelLine_Click()
  
   On Error GoTo Err_lineDel
   If listLine.ListIndex = -1 Then
      MsgBox "请先选择需要删除的语句,然后按删除按钮。    ", vbExclamation
      txtAddLine.SetFocus
      Exit Sub
   End If
   
   ' 删除
     listLine.RemoveItem listLine.ListIndex
     txtAddLine.SetFocus
       Exit Sub
Err_lineDel:
 MsgBox "行删除错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub cmdOK_Click()

   On Error GoTo Err_Save
  ' 保存选项======================================================
    
    Unload Me
      Exit Sub
Err_Save:
 MsgBox "保存选项错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub Command1_Click()

 Unload Me
 
End Sub

Private Sub Command2_Click()

 Unload Me
 
End Sub

Private Sub Command3_Click()

  If txtCompany = "" Then
     txtCompany = "东化科技"
  End If
  
  If Val(txtCompanyLen) < 2 Then
     txtCompanyLen = 8
  End If
  
  SaveSetting App.EXEName, "Option", "Company", txtCompany
  SaveSetting App.EXEName, "Option", "CompanyLen", txtCompanyLen
  
  sCompany = txtCompany

⌨️ 快捷键说明

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