📄 frmcomnquery1.frm
字号:
Top = 150
Width = 840
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "病 案 号"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 210
TabIndex = 10
Top = 165
Width = 840
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "发生日期"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 210
TabIndex = 9
Top = 1155
Width = 840
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "--"
Height = 180
Left = 3420
TabIndex = 8
Top = 1125
Width = 180
End
Begin VB.Line Line1
BorderColor = &H80000010&
Index = 1
X1 = 30
X2 = 6330
Y1 = 1665
Y2 = 1665
End
End
End
Attribute VB_Name = "frmComnQuery1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public QueryType As Integer
Public Event Ack(ByVal Cdt As String)
Public Event Cancel()
Private OldDepart As String
Private OldName As String
Private WithEvents CmnHlp As frmInputHelp
Attribute CmnHlp.VB_VarHelpID = -1
Private Sub InitForm()
Select Case QueryType
Case 0 '交退款
Case 1 '住院记帐
Me.Caption = "记帐查询条件"
Case 2
Me.Caption = "出院结算查询条件"
Case 3
Me.Caption = "中途结算查询条件"
Case 4
Me.Caption = "病人状态改变查询条件"
Case 6
Me.Caption = "住院病人取药查询条件"
End Select
init
End Sub
Private Sub init()
hisFormClear Me
txtHandler = gtydSysConfig.HdCode
mskDate(0).Text = Format(gfnGetTime, gstrCOMN_DATE)
mskDate(1).Text = Format(gfnGetTime, gstrCOMN_DATE)
End Sub
Private Function MakeCdt() As String
Set gDBFldsObj = New clsDBFields
Select Case QueryType
Case 0, 2, 3
gDBFldsObj.Add "SickInfo.SkID", txtSkID, ""
gDBFldsObj.Add "PayDate", mskDate(0) & " 00:00:00", gstrMASK_INIT & " 00:00:00", lmGreatAndEquel
gDBFldsObj.Add "PayDate", mskDate(1) & " 23:59:59", gstrMASK_INIT & " 23:59:59", lmLessAndEquel
gDBFldsObj.Add "sickPay.HdCode", txtHandler, ""
gDBFldsObj.Add "DepCode", txtDepart.Tag, "", lmlike
Case 1
gDBFldsObj.Add "SickInfo.SkID", txtSkID, ""
gDBFldsObj.Add "MarkDate", mskDate(0) & " 00:00:00", gstrMASK_INIT & " 00:00:00", lmGreatAndEquel
gDBFldsObj.Add "MarkDate", mskDate(1) & " 23:59:59", gstrMASK_INIT & " 23:59:59", lmLessAndEquel
gDBFldsObj.Add "FairMarkMain.HdCode", txtHandler, ""
gDBFldsObj.Add "FairMarkMain.DepCode", txtDepart.Tag, "", lmlike
Case 4
gDBFldsObj.Add "SickInfo.SkID", txtSkID, ""
gDBFldsObj.Add "ChangeDate", mskDate(0) & " 00:00:00", gstrMASK_INIT & " 00:00:00", lmGreatAndEquel
gDBFldsObj.Add "ChangeDate", mskDate(1) & " 23:59:59", gstrMASK_INIT & " 23:59:59", lmLessAndEquel
gDBFldsObj.Add "sickStatusHistory.HdCode", txtHandler, ""
gDBFldsObj.Add "SickInfo.DepCode", txtDepart.Tag, "", lmlike
Case 5
gDBFldsObj.Add "SickInfo.SkID", txtSkID, ""
gDBFldsObj.Add "Op_Main.InputDate", mskDate(0) & " 00:00:00", gstrMASK_INIT & " 00:00:00", lmGreatAndEquel
gDBFldsObj.Add "Op_Main.InputDate", mskDate(1) & " 23:59:59", gstrMASK_INIT & " 23:59:59", lmLessAndEquel
gDBFldsObj.Add "Op_Main.HdCode", txtHandler, ""
gDBFldsObj.Add "Op_Main.DepCode", txtDepart.Tag, "", lmlike
Case 6
' gDBFldsObj.Add "SickInfo.SkID", txtSkID, ""
gDBFldsObj.Add "FetchDate", mskDate(0) & " 00:00:00", gstrMASK_INIT & " 00:00:00", lmGreatAndEquel
gDBFldsObj.Add "fetchDate", mskDate(1) & " 23:59:59", gstrMASK_INIT & " 23:59:59", lmLessAndEquel
gDBFldsObj.Add "FairMarkMain.fetchHdCode", txtHandler, ""
gDBFldsObj.Add "FairMarkMain.DepCode", txtDepart.Tag, "", lmlike
End Select
MakeCdt = gDBFldsObj.MakeSelectSQL("")
End Function
Private Sub btg_Click(ByVal WhichB As Integer)
Select Case WhichB
Case 0
RaiseEvent Ack(MakeCdt())
Unload Me
Case 1
init
Case 2
RaiseEvent Cancel
Unload Me
End Select
End Sub
Private Sub CmnHlp_Escape(ByVal STag As String)
Me.SetFocus
End Sub
Private Sub CmnHlp_ResSelect(ByVal SelData As Variant, ByVal STag As String)
Me.SetFocus
If TypeName(SelData) <> "Nothing" Then
Select Case STag
Case "Dep"
txtDepart.Tag = SelData(0)
txtDepart = SelData(1)
Case "Name"
txtName = SelData(1)
txtSkID = SelData(0)
End Select
Else
Select Case STag
Case "Dep"
txtDepart.Tag = ""
End Select
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
hisToActiveCtl(Me).SetFocus
KeyAscii = 0
End If
End Sub
Private Sub Form_Load()
hisFormToCenter Me, frmMain
Set CmnHlp = New frmInputHelp
Set CmnHlp.CN = gdbobj.CN
InitForm
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmComnQuery1 = Nothing
End Sub
Private Sub mskDate_LostFocus(Index As Integer)
If mskDate(Index) <> gstrMASK_INIT And Not IsDate(mskDate(Index)) Then
MsgBox gstrDATE_ERROR_MSG, vbCritical
mskDate(Index).SetFocus
End If
End Sub
Private Sub txtDepart_GotFocus()
OldDepart = txtDepart
End Sub
Private Sub txtDepart_LostFocus()
If txtDepart <> "" And txtDepart <> OldDepart Then
CmnHlp.sql = "SELECT depcode,depname FROM m_depart " _
& "WHERE brief LIKE '##%' AND Flag & 3 =0 AND Flag & 12 =4"
CmnHlp.InitPut = txtDepart.Text
CmnHlp.FormatHead = "科 别 编 码|科 别 名 称 "
CmnHlp.WidthRate = 0.8
CmnHlp.ParmTag = "Dep"
CmnHlp.ShowHelp vbModal
End If
End Sub
Private Sub txtName_GotFocus()
OldName = txtName
End Sub
Private Sub txtName_LostFocus()
If txtName <> "" And txtName <> OldName Then
CmnHlp.sql = "SELECT SkID,Name FROM m_SickRegInfo WHERE brief LIKE '##%'"
CmnHlp.InitPut = txtName
CmnHlp.FormatHead = "病 案 号|姓 名 "
CmnHlp.ParmTag = "Name"
CmnHlp.WidthRate = 0.7
CmnHlp.ShowHelp vbModal
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -