📄 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 = 5475
ClientLeft = 1050
ClientTop = 1455
ClientWidth = 8880
Icon = "frmGetDrugByDepart.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5475
ScaleWidth = 8880
Begin FPSpread.vaSpread spd
Height = 4695
Left = -45
OleObjectBlob = "frmGetDrugByDepart.frx":0442
TabIndex = 0
Top = 360
Width = 8925
End
Begin VB.OptionButton optsex
Caption = "女"
Height = 195
Index = 2
Left = 1740
TabIndex = 6
Top = 90
Width = 555
End
Begin VB.OptionButton optsex
Caption = "男"
Height = 195
Index = 1
Left = 1140
TabIndex = 5
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 SpreadEnhanced.UserSpread usp
Left = 2400
Top = 0
_ExtentX = 847
_ExtentY = 847
End
Begin VB.CheckBox chkTotal
Caption = "按药品--汇总"
Height = 285
Left = 6900
TabIndex = 2
Top = 90
Width = 1815
End
Begin ComnButtons.ButtonGroup btg
Height = 435
Left = 1080
TabIndex = 3
Top = 5040
Width = 7785
_ExtentX = 13732
_ExtentY = 767
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 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 = 3195
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 Sub InitForm()
Me.Caption = DepName & "全科摆药单"
Set usp.DBInter = gDbObj
Set usp.CurSpread = spd
chkTotal_Click
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 = 4
If spd.Value = 0 Then
spd.Col = 3
If spd.Lock = False Then
spd.Value = 1
End If
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("你是否确认记帐!", vbInformation + vbYesNo) = vbNo Then
Exit Sub
End If
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
MsgBox gDbObj.ErrDes, vbCritical
Else
AllGetDrugObj.SetStatus
Me.MousePointer = 0
MsgBox "记帐完成!", vbInformation
If chkTotal.Value = 1 Then
chkTotal = 0
Else
FillData
End If
End If
Case 3
spd.Redraw = False
If Me.chkTotal.Value = 0 Then
For i = 1 To spd.MaxRows
spd.Row = i
spd.Col = 1
TmpStr = spd.Text
spd.Col = 3
If spd.Value = 0 Then
If (TmpStr = "" And PrevTmpStr = "") Or TmpStr <> "" Then
spd.RowHidden = True
End If
End If
If Not spd.RowHidden Then
PrevTmpStr = TmpStr
End If
Next
End If
spd.PrintHeader = " /fz""12"" /fb1 摆药单 /n" _
& "/fz""10"" /fb0 科别:" & DepName & Space(40) & "日期:" & gfnGetTime(gstrCHINA_DATE) & "/r/n"
spd.PrintRowHeaders = False
spd.PrintShadows = False
spd.PrintMarginLeft = 0
spd.PrintUseDataMax = False
spd.Action = SS_ACTION_PRINT
If Me.chkTotal.Value = 0 Then
For i = 1 To spd.MaxRows
spd.Row = i
If spd.RowHidden = True Then
spd.RowHidden = False
End If
Next
End If
spd.Redraw = True
Case 4
Unload Me
Case 5
If chkTotal.Value = 1 Then Exit Sub
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)
Set frmGetDrugByDepart = Nothing
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -