📄 gnshffrm.frm
字号:
Left = 120
TabIndex = 3
Top = 240
Width = 8055
Begin VB.ListBox List1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5100
ItemData = "gnshffrm.frx":0000
Left = 120
List = "gnshffrm.frx":0002
TabIndex = 7
Top = 240
Width = 4695
End
Begin VB.ListBox List2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5100
Left = 4920
TabIndex = 6
Top = 240
Width = 615
End
Begin VB.ListBox List3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5100
Left = 5640
TabIndex = 5
Top = 240
Width = 615
End
Begin VB.ListBox List4
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5100
Left = 6360
TabIndex = 4
Top = 240
Width = 1575
End
End
Begin VB.TextBox Text7
Height = 270
Left = 720
Locked = -1 'True
TabIndex = 2
Text = "Text7"
Top = 5880
Width = 1220
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "Label11"
BeginProperty DataFormat
Type = 0
Format = "gg yyyy""斥"" MM""岿"" dd""老"""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 6820
TabIndex = 12
Top = 5925
Width = 840
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "医师:"
Height = 180
Left = 240
TabIndex = 11
Top = 5950
Width = 540
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "调剂:"
Height = 180
Left = 2280
TabIndex = 10
Top = 5950
Width = 540
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "检药:"
Height = 180
Left = 4320
TabIndex = 9
Top = 5955
Width = 540
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "日期:"
Height = 180
Left = 6300
TabIndex = 8
Top = 5955
Width = 540
End
End
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卓资县人民医院病房处方收费"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 435
Index = 0
Left = 2475
TabIndex = 22
Top = 15
Width = 6045
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卓资县人民医院病房处方收费"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008080&
Height = 435
Index = 1
Left = 2520
TabIndex = 21
Top = 45
Width = 6045
End
End
Attribute VB_Name = "gnshffrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mdbstr2 As String
Private Sub Command1_Click()
On Error GoTo er
sf = MsgBox("患者是否已经交费", vbYesNo + 32)
If sf = 6 Then
Data1.DatabaseName = dbstr
Data1.RecordSource = Adodc1.RecordSource
Data1.Refresh
Data1.Recordset.AbsolutePosition = Adodc1.Recordset.AbsolutePosition
Data1.Recordset.Edit
Data1.Recordset.Fields(111) = "收"
Data1.Recordset.Fields(112) = Str(Date)
Data1.Recordset.Update
MsgBox "收费操作成功,请盖章后付单!!"
Call Command3_Click
Text1.SetFocus
End If
Exit Sub
er:
MsgBox "系统出现错误,可能是网络连接错误或者是数据更新错误!"
End Sub
Private Sub Command2_Click()
On Error GoTo er
Adodc1.RecordSource = "select * from 病房处方 where trim(收费日期)=" + "'" + Str(Date) + "'"
Adodc1.Refresh
hj1 = 0
While Adodc1.Recordset.EOF = False
hj1 = hj1 + Val(Adodc1.Recordset.Fields(106))
Adodc1.Recordset.MoveNext
Wend
MsgBox "今日收费总和为:" & hj1 & "元,请核对数字后单击确定!!", vbOKOnly + 64
Exit Sub
er:
MsgBox "数据连接故障或其他错误! 不能计算数据。"
End Sub
Private Sub Command3_Click()
Command1.Enabled = False
Command3.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
List1.Clear
List2.Clear
List3.Clear
List4.Clear
For k = 0 To 19
Label17(k).Caption = ""
Next k
Label20.Caption = ""
Text1.SetFocus
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Activate()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Label11.Caption = ""
Label20.Caption = ""
Label20.AutoSize = True
Label20.Top = Label10.Top - 35
Label20.Left = Label10.Left + Label10.Width + 20
For k = 0 To 19
Label17(k).Visible = False
Label17(k).Caption = ""
Next k
For h = 6 To 25
Label16(h - 6).Visible = True
Label16(h - 6).Caption = Adodc1.Recordset.Fields(h).Name
Next h
Text1.SetFocus
End Sub
Private Sub Form_Load()
mdbstr2 = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + dbstr
Adodc1.ConnectionString = mdbstr2
Adodc1.RecordSource = "病房处方"
Adodc1.Refresh
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
On Error GoTo er
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Or KeyAscii = 13 Then
Else
KeyAscii = 0
Exit Sub
End If
If KeyAscii = 13 Then
If Text1.Text = "" Then
Exit Sub
End If
List1.Clear
List2.Clear
List3.Clear
List4.Clear
For k = 0 To 19
Label17(k).Caption = ""
Next k
Adodc1.Refresh
Adodc1.RecordSource = "select * from 病房处方 where 处方代码=" + "'" + Trim(Text1.Text) + "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF = True Then
MsgBox "处方记录不存在,请输入一张已经划价的处方代码!"
Text1.Text = ""
Text1.SetFocus
Exit Sub
End If
Text2.Text = Adodc1.Recordset.Fields(1)
Text3.Text = Adodc1.Recordset.Fields(2)
Text4.Text = Adodc1.Recordset.Fields(3)
Text5.Text = Adodc1.Recordset.Fields(4)
Text6.Text = Adodc1.Recordset.Fields(5)
For k = 6 To 25
If Adodc1.Recordset.Fields(k) <> "" Then
Label17(k - 6).Caption = Adodc1.Recordset.Fields(k)
Label17(k - 6).Visible = True
End If
Next k
h = 0
For k = 26 To 105 Step 4
If Adodc1.Recordset.Fields(k) <> "" Then
List1.AddItem Adodc1.Recordset.Fields(k)
List2.AddItem Adodc1.Recordset.Fields(k + 1)
List3.AddItem Adodc1.Recordset.Fields(k + 2) & Trim(List2.List(h))
List4.AddItem Adodc1.Recordset.Fields(k + 3) & "元/每" & Trim(List2.List(h))
h = h + 1
End If
Next k
Label20.Caption = Adodc1.Recordset.Fields(106) & "元"
If IsNull(Adodc1.Recordset.Fields(107)) = False Then
Text7.Text = Adodc1.Recordset.Fields(107)
Else
Text7.Text = ""
End If
If IsNull(Adodc1.Recordset.Fields(108)) = False Then
Text8.Text = Adodc1.Recordset.Fields(108)
Else
Text8.Text = ""
End If
If IsNull(Adodc1.Recordset.Fields(109)) = False Then
Text9.Text = Adodc1.Recordset.Fields(109)
Else
Text9.Text = ""
End If
If IsNull(Adodc1.Recordset.Fields(110)) = False Then
Label11.Caption = Adodc1.Recordset.Fields(110)
Else
Label11.Caption = "未知"
End If
If Adodc1.Recordset.Fields(111) = "收" Then
MsgBox "处方已经收费,不能重复收费!!"
Call Command3_Click
Command1.Enabled = False
Command3.Enabled = False
Exit Sub
Else
Command1.Enabled = True
Command3.Enabled = True
Command1.SetFocus
End If
End If
Exit Sub
er:
MsgBox "系统出现异常错误"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -