📄 danjuchaxun.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form danjuchaxun
Caption = "单据查询"
ClientHeight = 6300
ClientLeft = 60
ClientTop = 345
ClientWidth = 11880
LinkTopic = "Form1"
ScaleHeight = 6300
ScaleWidth = 11880
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
Caption = "查询"
Height = 375
Left = 240
TabIndex = 10
Top = 3000
Width = 855
End
Begin VB.CommandButton Command3
Caption = "查询"
Height = 375
Left = 240
TabIndex = 9
Top = 1920
Width = 855
End
Begin VB.ComboBox Combo3
Height = 300
Left = 0
TabIndex = 8
Top = 2640
Width = 1935
End
Begin VB.ComboBox Combo2
Height = 300
Left = 0
TabIndex = 7
Top = 1560
Width = 1935
End
Begin VB.CommandButton Command2
Caption = "查询"
Height = 375
Left = 240
TabIndex = 6
Top = 720
Width = 855
End
Begin VB.ComboBox Combo1
Height = 300
Left = 0
TabIndex = 1
Top = 360
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "退 出"
Height = 735
Left = 120
TabIndex = 0
Top = 4560
Width = 1215
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 6135
Left = 1920
TabIndex = 2
Top = 120
Width = 9975
_ExtentX = 17595
_ExtentY = 10821
_Version = 393216
AllowUserResizing= 3
End
Begin VB.Label Label3
Caption = "零售单据号:"
Height = 375
Left = 120
TabIndex = 5
Top = 2400
Width = 1095
End
Begin VB.Label Label2
Caption = "批发单据号:"
Height = 255
Left = 120
TabIndex = 4
Top = 1200
Width = 1095
End
Begin VB.Label Label1
Caption = "进货单据号:"
Height = 255
Left = 120
TabIndex = 3
Top = 120
Width = 1215
End
End
Attribute VB_Name = "danjuchaxun"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Trecordset As New ADODB.Recordset
Dim Trecordset1 As New ADODB.Recordset
Dim Trecordset2 As New ADODB.Recordset
Dim Trecordset3 As New ADODB.Recordset
Dim Trecordset4 As New ADODB.Recordset
Dim Trecordset5 As New ADODB.Recordset
Sub dayin1()
On Error GoTo HandlePrint
Printer.ScaleMode = 6
'Printer.FontName = "SYSTEM"
If Trecordset3.RecordCount > 0 Then Trecordset3.MoveFirst
Printer.FontSize = 16
Printer.Print Tab(22); "进货表单"
Printer.Print Tab(19); "============================"
Printer.FontSize = 12
Printer.Print " ------------------------------------------------------------------------------------------------"
Printer.Print "进货单据号:"; Trecordset3.Fields("jinhuohao"); " 操作员:"; Trecordset3.Fields("caozuoyuan")
For I1 = 1 To Trecordset3.RecordCount
Printer.Print "药品名称:"; Trecordset3.Fields("yaopinming"); " 规格:"; Trecordset3.Fields("guige"); " 剂型:"; Trecordset3.Fields("jixing"); " 类型:"; Trecordset3.Fields("leixing")
Printer.Print "生产日期:"; Trecordset3.Fields("shengchanriqi"); " 有效期:"; Trecordset3.Fields("youxiaoqi"); " 价格:"; Trecordset3.Fields("jiage"); " 数量:"; Trecordset3.Fields("shuliang"); " 金额:"; Trecordset3.Fields("jine")
Printer.Print "往来单位:"; Trecordset3.Fields("wanglaidanwei"); " 备注:"; Trecordset3.Fields("beizhu")
Trecordset3.MoveNext
Next
Printer.Print " --------------------------------------------------------------------------------------------------"
Printer.Print " "
Printer.EndDoc
Exit Sub
HandlePrint:
MsgBox "打印出错,请检查您的计算机是否已经正确的和打印机连接!", vbOKOnly
End Sub
Sub dayin2()
On Error GoTo HandlePrint
Printer.ScaleMode = 6
'Printer.FontName = "SYSTEM"
If Trecordset3.RecordCount > 0 Then Trecordset3.MoveFirst
Printer.FontSize = 16
Printer.Print Tab(22); "批发表单"
Printer.Print Tab(19); "============================"
Printer.FontSize = 12
Printer.Print " ------------------------------------------------------------------------------------------------"
Printer.Print "批发单据号:"; Trecordset3.Fields("pifahao"); " 操作员:"; Trecordset3.Fields("caozuoyuan")
For I1 = 1 To Trecordset3.RecordCount
Printer.Print "药品名称:"; Trecordset3.Fields("yaopinming"); " 规格:"; Trecordset3.Fields("guige"); " 剂型:"; Trecordset3.Fields("jixing"); " 类型:"; Trecordset3.Fields("leixing")
Printer.Print "生产日期:"; Trecordset3.Fields("shengchanriqi"); " 有效期:"; Trecordset3.Fields("youxiaoqi"); " 价格:"; Trecordset3.Fields("jiage"); " 数量:"; Trecordset3.Fields("shuliang"); " 金额:"; Trecordset3.Fields("jine")
Printer.Print "往来单位:"; Trecordset3.Fields("wanglaidanwei"); " 备注:"; Trecordset3.Fields("beizhu")
Trecordset3.MoveNext
Next
Printer.Print " --------------------------------------------------------------------------------------------------"
Printer.Print " "
Printer.EndDoc
Exit Sub
HandlePrint:
MsgBox "打印出错,请检查您的计算机是否已经正确的和打印机连接!", vbOKOnly
End Sub
Sub dayin3()
On Error GoTo HandlePrint
Printer.ScaleMode = 6
'Printer.FontName = "SYSTEM"
If Trecordset3.RecordCount > 0 Then Trecordset3.MoveFirst
Printer.FontSize = 16
Printer.Print Tab(22); "零售表单"
Printer.Print Tab(19); "============================"
Printer.FontSize = 12
Printer.Print " ------------------------------------------------------------------------------------------------"
Printer.Print "零售单据号:"; Trecordset3.Fields("lingshouhao"); " 操作员:"; Trecordset3.Fields("caozuoyuan")
For I1 = 1 To Trecordset3.RecordCount
Printer.Print "药品名称:"; Trecordset3.Fields("yaopinming"); " 规格:"; Trecordset3.Fields("guige"); " 剂型:"; Trecordset3.Fields("jixing"); " 类型:"; Trecordset3.Fields("leixing")
Printer.Print "生产日期:"; Trecordset3.Fields("shengchanriqi"); " 有效期:"; Trecordset3.Fields("youxiaoqi"); " 价格:"; Trecordset3.Fields("jiage"); " 数量:"; Trecordset3.Fields("shuliang"); " 金额:"; Trecordset3.Fields("jine")
Printer.Print "往来单位:"; Trecordset3.Fields("wanglaidanwei"); " 备注:"; Trecordset3.Fields("beizhu")
Trecordset3.MoveNext
Next
Printer.Print " --------------------------------------------------------------------------------------------------"
Printer.Print " "
Printer.EndDoc
Exit Sub
HandlePrint:
MsgBox "打印出错,请检查您的计算机是否已经正确的和打印机连接!", vbOKOnly
End Sub
Sub Initial()
'''''''''''''''''''''''''进货单据号
With Trecordset1
Set .ActiveConnection = SGWConnection
.CursorLocation = adUseServer
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Source = "Select distinct jinhuohao from jinhuo "
.Open
End With
Do While Not Trecordset1.EOF
Combo1.AddItem Trecordset1.Fields("jinhuohao")
Trecordset1.MoveNext
Loop
Trecordset1.Close
'''''''''''''''''''''''''批发单据号
With Trecordset1
Set .ActiveConnection = SGWConnection
.CursorLocation = adUseServer
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Source = "Select distinct pifahao from pifa "
.Open
End With
Do While Not Trecordset1.EOF
Combo2.AddItem Trecordset1.Fields("pifahao")
Trecordset1.MoveNext
Loop
Trecordset1.Close
'''''''''''''''''''''''''零售单据号
With Trecordset1
Set .ActiveConnection = SGWConnection
.CursorLocation = adUseServer
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Source = "Select distinct lingshouhao from lingshou"
.Open
End With
Do While Not Trecordset1.EOF
Combo3.AddItem Trecordset1.Fields("lingshouhao")
Trecordset1.MoveNext
Loop
Trecordset1.Close
End Sub
Sub Gridflex()
'init the headers of the msflexgrid1
MSFlexGrid1.Clear
MSFlexGrid1.Cols = 15
MSFlexGrid1.TextMatrix(0, 0) = "编号"
MSFlexGrid1.TextMatrix(0, 1) = "单据号"
MSFlexGrid1.TextMatrix(0, 2) = "操作员"
MSFlexGrid1.TextMatrix(0, 3) = "往来单位"
MSFlexGrid1.TextMatrix(0, 4) = "操作时间"
MSFlexGrid1.TextMatrix(0, 5) = "药品名称"
MSFlexGrid1.TextMatrix(0, 6) = "包装规格"
MSFlexGrid1.TextMatrix(0, 7) = "剂型"
MSFlexGrid1.TextMatrix(0, 8) = "药品类型"
MSFlexGrid1.TextMatrix(0, 9) = "生产日期"
MSFlexGrid1.TextMatrix(0, 10) = "有效日期"
MSFlexGrid1.TextMatrix(0, 11) = "价格"
MSFlexGrid1.TextMatrix(0, 12) = "数量"
MSFlexGrid1.TextMatrix(0, 13) = "金额"
MSFlexGrid1.TextMatrix(0, 14) = "备注"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -