📄 main_qtgl_rjgl.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_qtgl_rjgl
BorderStyle = 1 'Fixed Single
Caption = "前台信息管理--【日结算管理】"
ClientHeight = 2610
ClientLeft = 45
ClientTop = 330
ClientWidth = 4710
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2610
ScaleWidth = 4710
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 345
Left = 75
Top = 1380
Visible = 0 'False
Width = 1905
_ExtentX = 3360
_ExtentY = 609
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 日消费信息表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton ComEnd
Caption = "退出日结算管理"
Height = 375
Left = 2640
TabIndex = 3
Top = 1470
Width = 1890
End
Begin VB.Frame Frame2
Height = 60
Left = 180
TabIndex = 2
Top = 2010
Width = 4485
End
Begin VB.CommandButton Comrj
Caption = "开始日结算"
Height = 375
Left = 2640
TabIndex = 1
Top = 855
Width = 1890
End
Begin VB.Frame Frame1
Height = 675
Left = 300
TabIndex = 0
Top = 45
Width = 4275
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "腾龙洗浴日结管理"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 330
Left = 480
TabIndex = 5
Top = 225
Width = 2865
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "腾龙洗浴日结管理"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 495
TabIndex = 4
Top = 240
Width = 2865
End
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "注意:日结算主要完成对当日数据的结算,系统只 允许每天结算一次。"
ForeColor = &H00FF0000&
Height = 450
Left = 300
TabIndex = 6
Top = 2160
Width = 4305
End
Begin VB.Image Image1
Height = 930
Left = 420
Picture = "main_qtgl_rjgl.frx":0000
Stretch = -1 'True
Top = 870
Width = 1920
End
End
Attribute VB_Name = "main_qtgl_rjgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset '定义数据集对象
Dim rs2 As New ADODB.Recordset
Dim rs3 As New ADODB.Recordset
Dim rs4 As New ADODB.Recordset
Dim txtSQL, myval As String '定义字符串变量
Dim StrCnn As New ADODB.Connection
Private Sub Form_Load()
txtSQL = "select * from 日消费信息表 order by 消费单据号" '查询日消费信息
Set rs1 = ESQL(txtSQL)
'假如记录大于零Comrj按钮可用,否则Comrj按钮不可用
If rs1.RecordCount > 0 Then Comrj.Enabled = True Else Comrj.Enabled = False
' Me.Caption = Me.Caption & " 操作员: " & frm_main.St1.Panels(3).Text '设置窗体标题栏的内容
End Sub
Private Sub Comrj_Click() '日结算
' Adodc1.RecordSource = "select * from 日消费信息表"
' Adodc1.Refresh
' If Adodc1.Recordset.RecordCount > 0 Then
' Comrj.Enabled = False
' Else
' Comrj.Enabled = True
' End If
myval = MsgBox("确认结算当日数据吗?", vbYesNo)
If myval = vbYes Then '假如确定日结算
'插入箱号、所在大厅等信息到月消费信息表中
' Set rs1 = ESQL(txtSQL)
StrCnn.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
txtSQL = "insert 月消费信息表(箱号,所在大厅,项目编号,名称,单位,单价,数量,简称,消费状态,隐藏状态,登记时间,折扣,金额小计,消费单据号) select 箱号,所在大厅,项目编号,名称,单位,单价,数量,简称,消费状态,隐藏状态,登记时间,折扣,金额小计,消费单据号 from 日消费信息表 order by 消费单据号"
StrCnn.Execute (txtSQL) '执行SQL语句
StrCnn.Close
'
' '插入消费单据号、主客箱号等信息到月消费单据表中
txtSQL = "insert 月消费单据表(消费单据号,主客箱号,主客姓名,主客性别,登记时间,结帐日期,结帐方式,主客消费金额,总计消费,打折,消费应收,实交金额,找零,消费实收,减免金额,减免原因,单据描述,人数) select 消费单据号,主客箱号,主客姓名,主客性别,登记时间,结帐日期,结帐方式,主客消费金额,总计消费,打折,消费应收,实交金额,找零,消费实收,减免金额,减免原因,单据描述,人数 from 日消费单据表 order by 消费单据号"
Set rs2 = ESQL(txtSQL)
'删除日消费信息
txtSQL = "delete 日消费信息表 select * from 日消费信息表"
Set rs3 = ESQL(txtSQL)
'删除日消费单据信息
txtSQL = "delete 日消费单据表 select * from 日消费单据表"
Set rs4 = ESQL(txtSQL)
Comrj.Enabled = False 'comrj按钮不可用
MsgBox "日结算完毕!"
frm_main.Enabled = True
Unload Me
End If
End Sub
Private Sub comend_Click()
frm_main.Enabled = True
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -