📄 frmhousedrug.frm
字号:
VERSION 5.00
Object = "{AA0D501B-0C16-11D4-8531-00E098160F52}#4.0#0"; "ComnButtons.ocx"
Object = "{B02F3647-766B-11CE-AF28-C3A2FBE76A13}#2.5#0"; "SS32X25.OCX"
Object = "{D52F4AA5-2D61-11D3-8E3D-0080C879E48B}#54.0#0"; "UserSpread.ocx"
Begin VB.Form frmHouseDrug
BorderStyle = 1 'Fixed Single
Caption = "当前库存"
ClientHeight = 5040
ClientLeft = 330
ClientTop = 1170
ClientWidth = 9150
Icon = "frmHouseDrug.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5040
ScaleWidth = 9150
Begin FPSpread.vaSpread spd
Height = 4644
Left = 0
OleObjectBlob = "frmHouseDrug.frx":0442
TabIndex = 0
Top = 48
Width = 9120
End
Begin ComnButtons.ButtonGroup btg
Height = 372
Left = 3528
TabIndex = 3
Top = 4680
Width = 5592
_ExtentX = 9869
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColor = -2147483638
ButtonCount = 4
ButtonCaption = "&F.分类选择 &D.单一药品 &P.打 印 &C.关 闭"
KeyEnabled = "1#1#1#1#"
End
Begin SpreadEnhanced.UserSpread usp
Left = 3075
Top = 15
_ExtentX = 847
_ExtentY = 847
ID = "House_Drug"
SumRowStr = "<10><12><13>"
End
Begin VB.Label Title
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "库存"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Index = 0
Left = 3825
TabIndex = 1
Top = 45
Width = 660
End
Begin VB.Label Title
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "库存"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000C&
Height = 315
Index = 1
Left = 3855
TabIndex = 2
Top = 60
Width = 660
End
End
Attribute VB_Name = "frmHouseDrug"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private CurUnitObj As clsDrugUnit
Private WithEvents SelectObj As frmDrugSelect
Attribute SelectObj.VB_VarHelpID = -1
Private WithEvents QueryObj As FrmInput
Attribute QueryObj.VB_VarHelpID = -1
Private Sub InitForm()
Set usp.DBInter = gDbObj
Set usp.CurSpread = spd
usp.Load
FillData ""
End Sub
Private Sub btg_Click(ByVal WhichB As Integer)
Select Case WhichB
Case 0
Set SelectObj = New frmDrugSelect
SelectObj.Show
Case 1
Set QueryObj = New FrmInput
QueryObj.mSQL = "SELECT ItemCode,ItemName,Model " _
& " FROM m_Drug WHERE Brief Like '##%'" _
& " UNION SELECT m_DrugAlias.ItemCode,m_DrugAlias.AliasName,Model " _
& " FROM m_Drug INNER JOIN m_DrugAlias " _
& " ON m_Drug.ItemCode = m_DrugAlias.ItemCode " _
& " WHERE m_DrugAlias.Brief Like '##%'"
QueryObj.FormatHead = "编 码 |名 称 |规格 "
QueryObj.WidthRate = 1.5
QueryObj.Title = "请输入查询的项目"
QueryObj.DisplayItemNum = 2
QueryObj.NeedItemNum = 1
QueryObj.Show
Case 2
spd.PrintHeader = " /fz""14"" /fb1 " _
& "库存药品 " _
& " /n/n" _
& "/fz""11"" /fb0 打印操作员:" & gtydSysConfig.HdName & "" _
& "打印时间:" & gfnGetTime(gstrCOMN_DATE_LONG) & "/r/n"
spd.PrintRowHeaders = True
spd.PrintShadows = False
spd.PrintMarginLeft = 0
spd.PrintUseDataMax = False
spd.PrintOrientation = 1
spd.Action = SS_ACTION_PRINT
Case 3
Unload Me
End Select
End Sub
Private Sub Form_Load()
hisFormToCenter Me, frmMain
InitForm
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmHouseDrug = Nothing
End Sub
Private Sub FillData(ByVal Cdt As String)
Dim SQL As String
Screen.MousePointer = 11
SQL = "SELECT m_Drug.ItemCode,ItemName,Model,BaseUnit,House_Drug.Amount, " _
& "GenalUnit,Factor,House_Drug.Amount/Factor," _
& "GPrice,Gprice * House_Drug.Amount," _
& "CPrice,CPrice * House_Drug.Amount," _
& "CPrice * House_Drug.Amount- Gprice * House_Drug.Amount" _
& " FROM House_Drug INNER JOIN m_Drug ON House_Drug.ItemCode = m_Drug.ItemCode " _
& " AND DsCode = '" & gtydSysConfig.DepCode & "'"
usp.SQL = SQL & Cdt
usp.Refresh
Screen.MousePointer = 0
End Sub
Private Sub QueryObj_Cancel()
Set QueryObj = Nothing
End Sub
Private Sub QueryObj_GetData(ByVal Data As String)
Set QueryObj = Nothing
FillData " AND House_Drug.ItemCode = '" & Data & "'"
End Sub
Private Sub SelectObj_Cancel()
Set SelectObj = Nothing
End Sub
Private Sub SelectObj_SelectItem(ByVal ItemCode As String)
Set SelectObj = Nothing
FillData " AND House_Drug.ItemCode Like '" & ItemCode & "%'"
End Sub
Private Sub spd_DblClick(ByVal Col As Long, ByVal Row As Long)
SortSpread spd, Col, NoSortMaxNum:=1
End Sub
Private Sub spd_RightClick(ByVal ClickType As Integer, ByVal Col As Long, ByVal Row As Long, ByVal MouseX As Long, ByVal MouseY As Long)
Call usp.RightClick
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -