📄 form5.frm
字号:
Height = 300
ItemData = "Form5.frx":045C
Left = 960
List = "Form5.frx":045E
TabIndex = 2
Top = 480
Width = 1575
End
Begin VB.CommandButton Comend
BackColor = &H00C0C0C0&
Caption = "退出"
Height = 300
Left = 11730
Style = 1 'Graphical
TabIndex = 1
Top = 8790
Width = 1155
End
Begin VB.CommandButton Comprint
BackColor = &H00C0C0C0&
Caption = "打印"
Enabled = 0 'False
Height = 300
Left = 10440
Style = 1 'Graphical
TabIndex = 0
Top = 8790
Width = 1155
End
Begin VB.Line Line2
X1 = 0
X2 = 12480
Y1 = 5400
Y2 = 5400
End
Begin VB.Label Label27
BackColor = &H00FFFF80&
Caption = "其他费用明细表"
Height = 255
Left = 9120
TabIndex = 58
Top = 4200
Width = 1455
End
Begin VB.Label Label25
BackStyle = 0 'Transparent
Caption = "合计费用"
Height = 255
Left = 3360
TabIndex = 57
Top = 4800
Width = 735
End
Begin VB.Label Label26
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 1440
TabIndex = 54
Top = 2520
Width = 1095
End
Begin VB.Label Label24
BackStyle = 0 'Transparent
Caption = "※"
ForeColor = &H000000FF&
Height = 255
Left = 7920
TabIndex = 51
Top = 2640
Width = 255
End
Begin VB.Label Label23
BackStyle = 0 'Transparent
Caption = "其他费用"
Height = 255
Left = 480
TabIndex = 49
Top = 4800
Width = 735
End
Begin VB.Label Label22
BackStyle = 0 'Transparent
Caption = "长住地址"
Height = 375
Left = 480
TabIndex = 48
Top = 1920
Width = 735
End
Begin VB.Label Label21
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 7200
TabIndex = 47
Top = 4680
Width = 1335
End
Begin VB.Label Label14
BackStyle = 0 'Transparent
Caption = "返还金额"
Height = 255
Left = 6360
TabIndex = 46
Top = 4800
Width = 855
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "姓 名"
Height = 255
Left = 600
TabIndex = 45
Top = 1320
Width = 615
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "出差理由"
Height = 255
Left = 4680
TabIndex = 44
Top = 1920
Width = 735
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "联系电话"
Height = 255
Left = 7560
TabIndex = 43
Top = 1920
Width = 735
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "※"
ForeColor = &H000000FF&
Height = 255
Left = 360
TabIndex = 42
Top = 1320
Width = 255
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 255
Left = 480
TabIndex = 41
Top = 2640
Width = 735
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "※"
ForeColor = &H000000FF&
Height = 255
Left = 240
TabIndex = 40
Top = 2640
Width = 255
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "客房类型"
Height = 255
Left = 2880
TabIndex = 39
Top = 2640
Width = 855
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "价格"
Height = 255
Left = 5760
TabIndex = 38
Top = 2640
Width = 615
End
Begin VB.Label Label11
BackStyle = 0 'Transparent
Caption = "天数"
Height = 255
Left = 8160
TabIndex = 37
Top = 2640
Width = 495
End
Begin VB.Label Label12
BackStyle = 0 'Transparent
Caption = "宿 费"
Height = 255
Left = 480
TabIndex = 36
Top = 3240
Width = 855
End
Begin VB.Label Label13
BackStyle = 0 'Transparent
Caption = "应收宿费"
Height = 255
Left = 4440
TabIndex = 35
Top = 3240
Width = 855
End
Begin VB.Label Label15
BackStyle = 0 'Transparent
Caption = "预收押金"
Height = 255
Left = 6720
TabIndex = 34
Top = 3240
Width = 735
End
Begin VB.Label Label16
BackStyle = 0 'Transparent
Caption = "住宿日期"
Height = 255
Left = 480
TabIndex = 33
Top = 3840
Width = 855
End
Begin VB.Label Label17
BackStyle = 0 'Transparent
Caption = "住宿时间"
Height = 255
Left = 3000
TabIndex = 32
Top = 3840
Width = 855
End
Begin VB.Label Label18
BackStyle = 0 'Transparent
Caption = "退宿日期"
Height = 255
Left = 5400
TabIndex = 31
Top = 3840
Width = 855
End
Begin VB.Label Label19
BackStyle = 0 'Transparent
Caption = "退宿时间"
Height = 255
Left = 7800
TabIndex = 30
Top = 3840
Width = 855
End
Begin VB.Label Label20
BackStyle = 0 'Transparent
Caption = "备 注"
Height = 255
Left = 480
TabIndex = 29
Top = 4320
Width = 855
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "NO"
Height = 255
Left = 8760
TabIndex = 4
Top = 480
Width = 375
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 255
Left = 120
TabIndex = 3
Top = 480
Width = 735
End
Begin VB.Line Line1
X1 = 0
X2 = 12120
Y1 = 840
Y2 = 840
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量 FixIT90210ae-R383-H1984
Private Sub Combo1_Click() '选择房间号码,应该计算日期时间与金额
SeIt
bIt
End Sub
Private Sub Command1_Click()
'Caozuo = "退宿保存按钮 '" & Label26.caption & " '房间 "
'lu_time = Now
'RiZhil
Command5.Enabled = True
Command1.Enabled = False
PIt
Dim db As Database
Dim EF As Recordset
Dim efc As Recordset
Dim EFd As Recordset
Dim EFe As Recordset
Dim EFf As Recordset
Set db = OpenDatabase(ConData, False, False, Constr)
Set EF = db.OpenRecordset("select * from tfd", dbOpenDynaset)
Set efc = db.OpenRecordset("select * from djb where 房间号='" & Label26.caption & "' and 标志='1'", dbOpenDynaset)
Set EFd = db.OpenRecordset("select * from kf where 房间号='" & Label26.caption & "'", dbOpenDynaset)
Set EFe = db.OpenRecordset("select * from djb where 房间号='" & Combo5.Text & "' and 标志='1'", dbOpenDynaset)
Set EFf = db.OpenRecordset("select * from steelno where 单据名称='退宿登记'", dbOpenDynaset)
EF.AddNew
efc.Edit
EFd.Edit
'
EFf.Edit
'------------------------------------------------
If Check1.Value = Checked Then
EFe.Edit
EFe("bz") = Val(txtfield(18).Text) + EFe("bz")
EFe("预收金额") = EFe("预收金额") + Val(txtfield(11).Text)
EFe("备注") = "从'" & Label26.caption & "'房间转帐到本房间"
EFe.Update
End If
efc("标志") = "0"
EFd("房态") = "脏房"
EFf("单据号码") = Val(Text1.Text)
'----------------------------开始保存到tfd
EF("凭证号码") = Text1.Text
EF("姓名") = txtfield(0).Text
EF("证件名称") = Combo2
EF("证件号码") = txtfield(1).Text
EF("详细地址") = txtfield(2).Text
EF("工作单位") = "无"
EF("房间号") = Label26.caption
EF("客房类型") = txtfield(5).Text
EF("客房价格") = Val(txtfield(6).Text)
EF("住宿日期") = txtfield(12).Text
EF("住宿时间") = txtfield(13).Text
EF("住宿天数") = Val(txtfield(7).Text)
EF("宿费") = Val(txtfield(8).Text)
EF("折扣或招待") = Combo3.Text
EF("折扣") = Val(txtfield(9).Text)
EF("应收宿费") = Val(txtfield(10).Text)
EF("杂费") = Val(txtfield(17).Text)
EF("电话费") = 0
EF("会议费") = 0
EF("存车费") = 0
EF("赔偿费") = 0
EF("金额总计") = Val(txtfield(18).Text)
EF("预收宿费") = Val(txtfield(11).Text)
EF("退还宿费") = Val(Label21.caption)
EF("退房日期") = txtfield(14).Text
EF("退房时间") = txtfield(15).Text
EF("日期") = Date
EF("时间") = Time
EF("备注") = txtfield(3).Text
EF("凭证号码") = Text1.Text
EF("联系电话") = txtfield(4).Text
EF("bz") = 2006
EFf.Update
EFd.Update
efc.Update
EF.Update
EFf.Close
EFe.Close
EFd.Close
efc.Close
EF.Close
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -