📄 main_qtgl_mdgl.frm
字号:
Top = 75
Width = 7185
_ExtentX = 12674
_ExtentY = 9022
_Version = 393216
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 7
BeginProperty Column00
DataField = "编号"
Caption = "编号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "房台名称"
Caption = "房台名称"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "类型说明"
Caption = "类型说明"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "部门"
Caption = "部门"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "服务费"
Caption = "服务费"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "简要说明"
Caption = "简要说明"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "状态"
Caption = "状态"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 794.835
EndProperty
BeginProperty Column01
ColumnWidth = 1365.165
EndProperty
BeginProperty Column02
ColumnWidth = 1379.906
EndProperty
BeginProperty Column03
ColumnWidth = 14.74
EndProperty
BeginProperty Column04
ColumnWidth = 1110.047
EndProperty
BeginProperty Column05
ColumnWidth = 14.74
EndProperty
BeginProperty Column06
ColumnWidth = 1035.213
EndProperty
EndProperty
End
Begin VB.Frame Frame4
Height = 1755
Left = 7245
TabIndex = 3
Top = 3345
Width = 2505
Begin VB.CommandButton Comgz
Caption = "挂账"
Height = 330
Left = 1230
TabIndex = 30
Top = 1350
Width = 1110
End
Begin VB.CommandButton Comtq
Caption = "特权结账"
Height = 330
Left = 135
TabIndex = 9
Top = 1350
Width = 1110
End
Begin VB.CommandButton Comview
Caption = "消费金额"
Height = 330
Left = 1230
TabIndex = 8
Top = 990
Width = 1110
End
Begin VB.TextBox Text1
BackColor = &H80000014&
Height = 285
Left = 705
TabIndex = 7
Top = 450
Width = 1620
End
Begin VB.CommandButton Commd
Caption = "客人买单"
Height = 330
Left = 135
TabIndex = 6
Top = 990
Width = 1110
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请输入买单的房台号:"
ForeColor = &H00000000&
Height = 180
Left = 135
TabIndex = 10
Top = 225
Width = 1800
End
End
Begin VB.Frame Frame5
Height = 495
Left = 7245
TabIndex = 5
Top = 5025
Width = 2505
Begin VB.CommandButton Comend
Caption = "退出买单管理"
Height = 330
Left = 135
TabIndex = 11
Top = 120
Width = 2190
End
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Height = 225
Left = 45
TabIndex = 29
Top = 5235
Width = 5040
End
End
Attribute VB_Name = "main_qtgl_mdgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim itmX As ListItem '定义一个listitem对象
Dim rs1 As New ADODB.Recordset '定义数据集对象
Dim a As Integer '定义整型变量
Dim list, key, myval As String '定义字符串变量
Public Sub list_change() '定义房台列表函数
ListView1.ListItems.Clear
Sql = "select * from 房间台号信息表 where 状态='营业'order by 编号"
Call FunAdo(Adodc1, Sql)
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
key = "(" & Trim(Adodc1.Recordset.Fields("编号")) & ")" & Trim(Adodc1.Recordset.Fields("房台名称"))
Set itmX = ListView1.ListItems.Add(, , key, 1)
Adodc1.Recordset.MoveNext
Loop
End If
Label5.Caption = "营业总数: " & Adodc1.Recordset.RecordCount & "个"
End Sub
Private Sub Form_Activate()
For i = 0 To 7
'Label4(i).Caption = ""
Next i
End Sub
Private Sub Form_Load()
Call list_change '调用函数
If ListView1.ListItems.Count > 0 Then
Sql = "select * from 房间台号信息表 where 状态='营业'order by 编号"
Call FunAdo(Adodc1, Sql)
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
For a = 0 To 7
Label4(a).Caption = Trim(Adodc1.Recordset.Fields(a)) '赋值给label4(a).caption
Next a
Text1.text = Trim(Adodc1.Recordset.Fields("编号")) '赋值给text1.text
End If
End If
Me.Caption = Me.Caption & " " & frm_main.St1.Panels(3).text
End Sub
Private Sub Check1_Click() '选择数据显示模式
If Check1.Value = 1 Then
Sql = "select * from 房间台号信息表 where 状态='营业'order by 编号"
Call FunAdo(Adodc1, Sql)
Adodc1.Refresh
Frame1.Visible = False
Else
Frame1.Visible = True
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub ListView1_Click()
If ListView1.ListItems.Count > 0 Then
list = ListView1.SelectedItem
Sql = "select * from 房间台号信息表 where 编号='" + Right(Left(list, 4), 3) + "'order by 编号"
Call FunAdo(Adodc1, Sql)
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
For a = 0 To 7
Label4(a).Caption = Trim(Adodc1.Recordset.Fields(a)) '赋值给label4(a).caption
Next a
Text1.text = Trim(Adodc1.Recordset.Fields("编号")) '赋值给text1.text
End If
End If
End Sub
Private Sub Comgz_Click() '调入挂账
Load main_qtgl_mdgl_gz
main_qtgl_mdgl_gz.Show
main_qtgl_mdgl.Enabled = False
End Sub
Private Sub Commd_Click() '调入买单
Load main_qtgl_mdgl_md
main_qtgl_mdgl_md.Show
main_qtgl_mdgl.Enabled = False
End Sub
Private Sub ComView_Click() '显示点单金额
If Trim(Label4(0).Caption) = "" Then
MsgBox "请选择房台名称!", , "系统提示"
Exit Sub
End If
Sql = "select sum(数量)as 数量1,sum(金额)as 金额合计 from 点单临时表 where 点单临时表.状态='" + "点单" + "'and 点单临时表.房台编号='" + Trim(Label4(0).Caption) + "'"
Call FunAdo(Adodc2, Sql)
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 And Adodc2.Recordset.Fields(1) <> Null Then
myval = Format(Val(Adodc2.Recordset.Fields(1)) + Val(Label4(4).Caption), "0.00")
MsgBox Label4(0).Caption & "房间的合计消费金额为" & myval & "人民币."
End If
End Sub
Private Sub Comtq_Click() '调入特权结账
Load main_qtgl_mdgl_tq
main_qtgl_mdgl_tq.Show
main_qtgl_mdgl.Enabled = False
End Sub
Private Sub comend_Click()
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -