📄 frmdrugamountalert.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 frmDrugAmountAlert
BorderStyle = 1 'Fixed Single
Caption = "库存药品数量报警"
ClientHeight = 5040
ClientLeft = 912
ClientTop = 1440
ClientWidth = 8088
Icon = "frmDrugAmountAlert.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5040
ScaleWidth = 8088
Begin FPSpread.vaSpread spd
Height = 4308
Left = 12
OleObjectBlob = "frmDrugAmountAlert.frx":0442
TabIndex = 0
Top = 372
Width = 8040
End
Begin ComnButtons.ButtonGroup btg
Height = 372
Left = 5400
TabIndex = 3
Top = 4680
Width = 2640
_ExtentX = 4657
_ExtentY = 656
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColor = -2147483638
ButtonCount = 2
ButtonCaption = "&P.打 印 &E.退 出"
KeyEnabled = "1#1#"
End
Begin SpreadEnhanced.UserSpread usp
Left = 2112
Top = 0
_ExtentX = 677
_ExtentY = 677
ID = "House_AmountAlert"
End
Begin VB.Label Title
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "库存数量报警"
BeginProperty Font
Name = "宋体"
Size = 15.6
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 312
Index = 0
Left = 2712
TabIndex = 1
Top = 48
Width = 1980
End
Begin VB.Label Title
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "库存数量报警"
BeginProperty Font
Name = "宋体"
Size = 15.6
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000C&
Height = 312
Index = 1
Left = 2736
TabIndex = 2
Top = 60
Width = 1980
End
End
Attribute VB_Name = "frmDrugAmountAlert"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
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
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 1
Unload Me
End Select
End Sub
Private Sub Form_Load()
hisFormToCenter Me, frmMain
InitForm
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmDrugAmountAlert = Nothing
End Sub
Private Sub FillData()
Dim SQL As String
Screen.MousePointer = 11
usp.SQL = "SELECT m_Drug.ItemName,Model," _
& "m_Drug.BaseUnit,House_DrugProperty.LowLimit," _
& "(CASE WHEN S.Amount IS NULL THEN 0 ELSE S.Amount END)," _
& "m_Drug.Gprice,m_Drug.CPrice " _
& "FROM (House_DrugProperty INNER JOIN m_Drug " _
& "ON House_Drugproperty.ItemCode = m_Drug.ItemCode " _
& "AND DsCode = '" & gtydSysConfig.DepCode & "') LEFT JOIN " _
& "(SELECT ItemCode,Sum(Amount) as 'Amount' FROM House_Drug " _
& " WHERE DsCode = '" & gtydSysConfig.DepCode & "' GROUP BY ItemCode) S " _
& " ON m_Drug.ItemCode = S.ItemCode " _
& " WHERE House_DrugProperty.LowLimit >=0 AND " _
& "(S.Amount IS NULL OR House_DrugProperty.LowLimit >S.Amount)"
usp.Refresh
Screen.MousePointer = 0
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 + -