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

📄 电话订餐.frm

📁 电话订餐系统,可以通过手输入菜单对应编号,自动选取相应的菜单,价格等.软件包含自动打印,结算等内容.
💻 FRM
字号:
VERSION 5.00
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   7620
   ClientLeft      =   45
   ClientTop       =   360
   ClientWidth     =   9465
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7620
   ScaleWidth      =   9465
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton tc 
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   8040
      TabIndex        =   23
      TabStop         =   0   'False
      Top             =   6840
      Width           =   1215
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   5280
      Top             =   7200
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   5640
      Top             =   7200
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton jsdy 
      Caption         =   "结算打印"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   26.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   3480
      TabIndex        =   21
      TabStop         =   0   'False
      Top             =   6360
      Width           =   1215
   End
   Begin VB.TextBox cdtxt 
      BackColor       =   &H00C0FFC0&
      Height          =   6495
      Left            =   5040
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   20
      TabStop         =   0   'False
      Top             =   240
      Width           =   4215
   End
   Begin VB.TextBox zjtxt 
      BackColor       =   &H00C0FFFF&
      Height          =   495
      Left            =   6120
      Locked          =   -1  'True
      TabIndex        =   19
      TabStop         =   0   'False
      Top             =   6840
      Width           =   1695
   End
   Begin VB.Frame Frame2 
      Caption         =   "输入菜单"
      Height          =   2895
      Left            =   240
      TabIndex        =   11
      Top             =   2040
      Width           =   4575
      Begin VB.CommandButton tj 
         Caption         =   "添加"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   42
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1815
         Left            =   3240
         TabIndex        =   7
         Top             =   960
         Width           =   1215
      End
      Begin VB.TextBox djtxt 
         BackColor       =   &H00C0FFFF&
         Height          =   495
         Left            =   960
         Locked          =   -1  'True
         TabIndex        =   17
         TabStop         =   0   'False
         Top             =   2280
         Width           =   2055
      End
      Begin VB.TextBox ywmtxt 
         BackColor       =   &H00C0FFFF&
         Height          =   495
         Left            =   120
         Locked          =   -1  'True
         TabIndex        =   16
         TabStop         =   0   'False
         Top             =   1560
         Width           =   3015
      End
      Begin VB.TextBox zwmtxt 
         BackColor       =   &H00C0FFFF&
         Height          =   495
         Left            =   120
         Locked          =   -1  'True
         TabIndex        =   15
         TabStop         =   0   'False
         Top             =   960
         Width           =   3015
      End
      Begin VB.TextBox bhtxt 
         BackColor       =   &H00C0FFFF&
         Enabled         =   0   'False
         Height          =   495
         Left            =   600
         MaxLength       =   3
         TabIndex        =   5
         Top             =   240
         Width           =   1455
      End
      Begin MSComCtl2.UpDown UpDown1 
         Height          =   495
         Left            =   4246
         TabIndex        =   12
         Top             =   240
         Width           =   225
         _ExtentX        =   397
         _ExtentY        =   873
         _Version        =   393216
         Value           =   1
         AutoBuddy       =   -1  'True
         BuddyControl    =   "fstxt"
         BuddyDispid     =   196620
         OrigLeft        =   1920
         OrigTop         =   240
         OrigRight       =   2145
         OrigBottom      =   735
         Max             =   2000
         Min             =   1
         SyncBuddy       =   -1  'True
         BuddyProperty   =   0
         Enabled         =   -1  'True
      End
      Begin VB.TextBox fstxt 
         Alignment       =   2  'Center
         BackColor       =   &H00C0C0FF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   3120
         TabIndex        =   6
         Text            =   "1"
         Top             =   240
         Width           =   1125
      End
      Begin VB.Label Label7 
         Caption         =   "单价:"
         Height          =   255
         Left            =   240
         TabIndex        =   22
         Top             =   2400
         Width           =   615
      End
      Begin MSForms.Label Label5 
         Height          =   255
         Left            =   2520
         TabIndex        =   14
         Top             =   360
         Width           =   615
         Caption         =   "份数"
         Size            =   "1085;450"
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
      End
      Begin MSForms.Label Label4 
         Height          =   255
         Left            =   120
         TabIndex        =   13
         Top             =   360
         Width           =   615
         Caption         =   "编号"
         Size            =   "1085;450"
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "客户信息"
      Height          =   1815
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   4575
      Begin VB.CommandButton ksdd 
         BackColor       =   &H8000000A&
         Caption         =   "开始订单"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1335
         Left            =   3840
         TabIndex        =   4
         Top             =   240
         Width           =   615
      End
      Begin VB.TextBox dztxt 
         BackColor       =   &H00FFFFC0&
         Height          =   375
         Left            =   600
         TabIndex        =   3
         Top             =   1200
         Width           =   3135
      End
      Begin VB.TextBox dhtxt 
         BackColor       =   &H00FFFFC0&
         Height          =   375
         Left            =   600
         TabIndex        =   2
         Top             =   720
         Width           =   3135
      End
      Begin VB.TextBox xmtxt 
         BackColor       =   &H00FFFFC0&
         Height          =   375
         Left            =   600
         TabIndex        =   1
         Top             =   240
         Width           =   3135
      End
      Begin VB.Label Label3 
         Caption         =   "地址"
         Height          =   255
         Left            =   120
         TabIndex        =   10
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "电话"
         Height          =   255
         Left            =   120
         TabIndex        =   9
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "姓名"
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   360
         Width           =   855
      End
   End
   Begin VB.Label Label6 
      Caption         =   "总价钱"
      Height          =   375
      Left            =   5280
      TabIndex        =   18
      Top             =   6960
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub bhtxt_Change()
'---------------尝试----------
Dim textline
Dim curline As String
Dim Num As String
Dim name As String
Dim xyh(1)
'Open App.Path & "\" & "菜单.txt" For Input As #3
Open "f:\郭挺圳\vb\菜单.txt" For Input As #3

'*************************************************
While Not EOF(3)
On Error Resume Next
Line Input #3, curline
If Left(curline, 3) = bhtxt.Text - 1 Then
    Input #3, Num, name, xyh(0), xyh(1)
    zwmtxt.Text = name
    ywmtxt.Text = xyh(0)
    djtxt.Text = xyh(1)
End If
Wend
Close #3   ' 关闭文件。
'***************************************************


End Sub

Private Sub jsdy_Click()

'在下面添加打印内容   订餐姓名等  加上 cd.txt内容  加上  总价
CommonDialog1.Flags = DefaultFlags
CommonDialog1.ShowPrinter
Printer.Copies = CommonDialog1.Copies
If cdtxt.SelText = "" Then
    Printer.Print cdtxt.Text & vbCrLf & "  --------------------------------------" & vbCrLf & "     总价(Total) " & zjtxt.Text
Else
  
End If
'**************************************************************

xmtxt.Text = ""
dhtxt.Text = ""
dztxt.Text = ""
cdtxt.Text = ""
zjtxt.Text = ""

xmtxt.Enabled = True
dhtxt.Enabled = True
dztxt.Enabled = True



End Sub

Private Sub ksdd_Click()
'*****************订单号增加*****************
Dim n
n = n + 1
cdtxt.Text = "  订单号:" & Date & "00" & n & vbCrLf


'*****************添加客户信息到发票*********
cdtxt.Text = cdtxt.Text & "  " & "姓名(Name) " & xmtxt.Text & vbCrLf & "  " & "电话(Phone) " & dhtxt.Text & vbCrLf & "  " & "地址(Address) " & dztxt.Text & vbCrLf & "  --------------------------------------" & vbCrLf

'****************把客户信息变为不可编辑*************
xmtxt.Enabled = False
dhtxt.Enabled = False
dztxt.Enabled = False
bhtxt.Enabled = True
ksdd.Enabled = False

xmtxt.TabStop = False   '不能停留
dhtxt.TabStop = False
dztxt.TabStop = False
ksdd.TabStop = False



End Sub

Private Sub tc_Click()
 
 Dim Msg, Style, Title, Help, Ctxt, Response, MyString
         Msg = "确定要退出订餐系统?" ' 定义信息。
         Style = vbYesNo + vbQuestion + vbDefaultButton2 ' 定义按钮。
         Title = "注意" ' 定义标题。
         Response = MsgBox(Msg, Style, Title)
         If Response = vbYes Then ' 用户按下“是”。
            End
         Else ' 用户按下“否”。
         End If

End Sub

Private Sub Timer1_Timer()
Form1.Caption = "电话订餐系统" & "  " & Time
End Sub

Private Sub tj_Click()

cdtxt.Text = cdtxt.Text & "  " & ywmtxt.Text & vbCrLf & "  " & zwmtxt.Text & " " & djtxt.Text & " × " & fstxt.Text & vbCrLf & "  ----------------------------" & vbCrLf
zjtxt.Text = Val(zjtxt.Text) + Val(djtxt.Text) * Val(fstxt.Text)

'******输入防错设计********
bhtxt.Text = ""
zwmtxt.Text = ""
ywmtxt.Text = ""
djtxt.Text = ""
fstxt.Text = 1
tj.Enabled = False
'**************************


End Sub

Private Sub xmtxt_Change()

If xmtxt.Text <> "" Then
    ksdd.Enabled = True
End If

End Sub

Private Sub zwmtxt_Change()

If (zwmtxt.Text <> "") Then
    tj.Enabled = True
End If

End Sub

⌨️ 快捷键说明

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