📄 frmgetdrugbydepart.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 frmGetDrugByDepart
BorderStyle = 1 'Fixed Single
ClientHeight = 6555
ClientLeft = 1035
ClientTop = 1425
ClientWidth = 11505
Icon = "frmGetDrugByDepart.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6555
ScaleWidth = 11505
Begin FPSpread.vaSpread spd
Height = 5535
Left = 0
OleObjectBlob = "frmGetDrugByDepart.frx":0442
TabIndex = 5
Top = 360
Width = 11355
End
Begin VB.OptionButton optsex
Caption = "女"
Height = 195
Index = 2
Left = 1740
TabIndex = 0
Top = 90
Width = 555
End
Begin VB.OptionButton optsex
Caption = "男"
Height = 195
Index = 1
Left = 1140
TabIndex = 3
Top = 90
Width = 765
End
Begin VB.OptionButton optsex
Caption = "全部"
Height = 195
Index = 0
Left = 360
TabIndex = 4
Top = 90
Value = -1 'True
Width = 765
End
Begin VB.CheckBox chkTotal
Caption = "按药品--汇总"
Height = 285
Left = 7950
TabIndex = 2
Top = 90
Width = 1815
End
Begin SpreadEnhanced.UserSpread usp
Left = 2445
Top = 0
_ExtentX = 847
_ExtentY = 847
End
Begin ComnButtons.ButtonGroup btg
Height = 465
Left = 3480
TabIndex = 6
Top = 6000
Width = 7815
_ExtentX = 13785
_ExtentY = 820
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 = 6
ButtonCaption = "&S.全部选中 &C.全部取消 &K.记 帐 &P.打 印 &E.关 闭 &T.条件限制"
KeyEnabled = "1#1#1#1#1#1#"
End
Begin VB.Label Label13
Caption = "*注:红字药品库存不够不能记张"
ForeColor = &H000000FF&
Height = 225
Left = 330
TabIndex = 7
Top = 5370
Width = 2925
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "全 科 摆 药 单"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 4245
TabIndex = 1
Top = 45
Width = 2835
End
End
Attribute VB_Name = "frmGetDrugByDepart"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public DepName As String
Public AllGetDrugObj As clsAllGetDrug
Public mItemCodeLimit As String
Public mADvType As Integer
Public WithEvents QueryObj As frmGetDrugSelect
Attribute QueryObj.VB_VarHelpID = -1
Private WithEvents NoStorefrm As frmNoStore
Attribute NoStorefrm.VB_VarHelpID = -1
Private mMarkFlag As Boolean
Private Sub InitForm()
Me.Caption = DepName & "全科摆药单"
Set usp.DBInter = gdbobj
Set usp.CurSpread = spd
chkTotal_Click
If gtydSysConfig.RegPrint Then
btg.KeyEnabled(3) = False
End If
End Sub
Private Sub btg_Click(ByVal WhichB As Integer)
Dim i As Integer, prevtmpstr As String
Dim Obj As Object, ErrDes As String, Row As Long, Col As Long, TmpStr As String
Select Case WhichB
Case 0
If chkTotal.value = 1 Then Exit Sub
For i = 1 To spd.MaxRows
spd.Row = i
spd.Col = 3
If Not spd.Lock Then
spd.value = 1
End If
Next i
Case 1
If chkTotal.value = 1 Then Exit Sub
For i = 1 To spd.MaxRows
spd.Row = i
spd.Col = 3
spd.value = 0
Next i
Case 2
If MsgBox("现在是否记帐?", vbYesNo + 32) <> vbYes Then
Exit Sub
End If
chkTotal = 0
Set Obj = ValidInput(ErrDes, Row, Col)
If Not (Obj Is Nothing) Then
MsgBox ErrDes, vbCritical
hisActiveSpreadCell spd, Row, Col
Exit Sub
End If
If chkTotal.value = 0 Then
loaddata
End If
Me.MousePointer = 11
If Not AllGetDrugObj.Save Then
Me.MousePointer = 0
If AllGetDrugObj.allFlag Then
Set NoStorefrm = New frmNoStore
Set NoStorefrm.DrugAmountsObj = AllGetDrugObj.DrugAmountsObj
NoStorefrm.Show
Else
MsgBox gdbobj.ErrDes, vbCritical
End If
Else
AllGetDrugObj.SetStatus
Me.MousePointer = 0
mMarkFlag = True
If chkTotal.value = 1 Then
chkTotal.value = 0
FillData
Else
FillData
End If
chkTotal.value = 1
' btg.KeyEnabled(2) = False
btg.KeyEnabled(3) = True
MsgBox "记帐完成! 请打开打印机后按打印按钮", vbInformation
End If
Case 3
printspd
Case 4
Unload Me
Case 5
If chkTotal.value = 1 Then
chkTotal.value = 0
End If
Set QueryObj = New frmGetDrugSelect
QueryObj.Show vbModal
End Select
End Sub
Private Sub chkTotal_Click()
Dim i As Integer
spd.Redraw = False
If chkTotal.value = 1 Then
loaddata
usp.Id = "C_GetDrugTotal"
usp.Load
Total
Else
usp.Id = "C_GetDrug"
usp.Load
FillData
End If
spd.Redraw = True
End Sub
Private Sub Form_Load()
Dim i As Integer
hisFormToCenter Me, frmMain
InitForm
End Sub
Private Sub Form_Unload(Cancel As Integer)
If mMarkFlag And Not gtydSysConfig.ifGetMarkPrint Then
If MsgBox("已记账!是否已经打印,退出后将不能打印!退出吗?", vbYesNo + 32) <> vbYes Then
Cancel = 1
Exit Sub
End If
End If
Set frmGetDrugByDepart = Nothing
End Sub
Public Sub FillData()
Dim TmpItem As clsGetDrug
Dim tmpObj As clsSickGetDrug
Dim Flag As Integer
spd.Redraw = False
spd.MaxRows = 0
For Each tmpObj In AllGetDrugObj
If tmpObj.CanKeep Then
Flag = 1
If Not optsex(0).value Then
If optsex(1).value Then
If tmpObj.Sex = "女" Then Flag = 0
Else
If tmpObj.Sex = "男" Then Flag = 0
End If
End If
If Flag = 1 Then
For Each TmpItem In tmpObj
spd.MaxRows = spd.MaxRows + 1
spd.Row = spd.MaxRows
spd.Col = 1
spd.Text = TmpItem.ADVSerial
spd.Col = 2
spd.Text = TmpItem.Num
If (TmpItem.Status And 1) <> 1 Then
spd.Col = 3
spd.value = 0
spd.Lock = False
Else
spd.Col = 3
spd.value = 1
spd.Lock = False
End If
If TmpItem.NotStoreAmount Then
spd.Col = 3
spd.Lock = True
End If
If (TmpItem.Status And 2) = 2 Then
spd.Lock = True
spd.Col = 4
spd.value = 1
End If
spd.Col = 5
spd.Text = tmpObj.SkID & "/" & tmpObj.Name & "/" & tmpObj.Sex
spd.Col = 6
spd.Text = IIf(tmpObj.IsBaby, "是", " ")
spd.Col = 7
spd.Text = tmpObj.BedNum
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -