📄 frmlxhztj.frm
字号:
VERSION 5.00
Object = "{A0C292A3-118E-11D2-AFDF-000021730160}#1.0#0"; "UFEDIT.OCX"
Begin VB.Form frmlxhztj
BorderStyle = 1 'Fixed Single
ClientHeight = 2865
ClientLeft = 45
ClientTop = 300
ClientWidth = 5340
HelpContextID = 88000070
Icon = "frmlxhztj.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2865
ScaleWidth = 5340
Begin VB.Frame Frame1
Height = 2505
Left = 90
TabIndex = 5
Top = 210
Width = 3945
Begin VB.CommandButton cmdrq
Height = 270
Index = 1
Left = 3555
Style = 1 'Graphical
TabIndex = 7
TabStop = 0 'False
Top = 270
Width = 270
End
Begin VB.CommandButton cmdrq
Height = 270
Index = 0
Left = 1950
Style = 1 'Graphical
TabIndex = 6
TabStop = 0 'False
Top = 270
Width = 270
End
Begin VB.ListBox List1
Height = 1680
ItemData = "frmlxhztj.frx":000C
Left = 120
List = "frmlxhztj.frx":000E
MultiSelect = 2 'Extended
Sorted = -1 'True
TabIndex = 2
Top = 645
Width = 3690
End
Begin EDITLib.Edit Editrq
Height = 264
Index = 0
Left = 855
TabIndex = 0
Top = 270
Width = 1035
_Version = 65536
_ExtentX = 1826
_ExtentY = 466
_StockProps = 253
ForeColor = 0
BackColor = 16777215
Appearance = 1
Property = 5
MaxLength = 10
End
Begin EDITLib.Edit Editrq
Height = 264
Index = 1
Left = 2445
TabIndex = 1
Top = 270
Width = 1035
_Version = 65536
_ExtentX = 1826
_ExtentY = 466
_StockProps = 253
ForeColor = 0
BackColor = 16777215
Appearance = 1
Property = 5
MaxLength = 10
End
Begin VB.Line Line1
X1 = 2280
X2 = 2400
Y1 = 375
Y2 = 375
End
Begin VB.Label Label1
AutoSize = -1 'True
Height = 180
Left = 75
TabIndex = 8
Top = 300
Width = 90
End
End
Begin VB.CommandButton cmdcancel
Cancel = -1 'True
Height = 365
Left = 4140
Style = 1 'Graphical
TabIndex = 4
Top = 855
Width = 1080
End
Begin VB.CommandButton cmdfind
Default = -1 'True
Height = 365
Left = 4140
Style = 1 'Graphical
TabIndex = 3
Top = 300
Width = 1080
End
End
Attribute VB_Name = "frmlxhztj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'软件著作权: 北京用友软件集团有限公司
'系统名称: 资金管理8.0
'功能说明: 账户利息汇总表条件
'作者: 魏小黎
Option Explicit
Public Quitfs As Boolean
Private isEnt As Boolean, rq11 As String, rq22 As String
Private Sub cmdrq_Click(Index As Integer)
View_Calendar Me, Editrq(Index), 0
End Sub
Private Sub Form_Load()
Dim rsTemp As New UfRecordset
Screen.MousePointer = vbHourglass
CenterForm Me
Me.Icon = LoadResPicture(109, vbResIcon)
Me.Caption = "账户利息汇总"
cmdrq(0).Picture = LoadResPicture(1108, vbResBitmap)
cmdrq(1).Picture = LoadResPicture(1108, vbResBitmap)
Frame1.Caption = "请输入查询条件"
cmdfind.Picture = LoadResPicture(103, vbResBitmap)
cmdcancel.Picture = LoadResPicture(104, vbResBitmap)
Label1.Caption = "起始时间"
Set rsTemp = dbsZJ.OpenRecordset("select [cAccID], [cAccname],[itype] from FD_Accdef order by [cAccID]", dbOpenSnapshot)
List1.clear
With rsTemp
If Not rsTemp.EOF Then
.MoveFirst
Do While Not .EOF
If ![iType] = 1 Then
List1.AddItem ![cAccID] & " " & ![cAccName]
End If
.MoveNext
Loop
End If
.oClose
End With
isEnt = True
Screen.MousePointer = vbDefault
End Sub
Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub cmdfind_Click()
If Contquit Then
Dim rq1 As String, rq2 As String, tmprst As dao.Recordset, i As Integer, sZH As Boolean
rq1 = Editrq(0).Text
rq2 = Editrq(1).Text
dbsZjTemp.Execute "delete from wcaccid"
Set tmprst = dbsZjTemp.OpenRecordset("select * from wcaccid", dbOpenDynaset)
sZH = True
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
With tmprst
.AddNew
![cAccID] = Left(List1.List(i), InStr(List1.List(i), " ") - 1)
.Update
End With
sZH = False
End If
Next
tmprst.Close
Set tmprst = Nothing
If sZH Then
Beep
MsgBox "没有账户被选择,请检查!", vbCritical, zjGl_Name
Editrq(0).SetFocus
Exit Sub
End If
Quitfs = False
Unload Me
Dim frm As frmlxhz, mfm As Form
For Each mfm In Forms
If mfm.Tag = "cxlxhzb" Then
BringWindowToTop mfm.hWnd
mfm.sDate = rq11
mfm.eDate = rq22
mfm.sRq1 = rq1
mfm.eRq2 = rq2
mfm.cmdExcute_Click
mfm.cmdRefresh_Click
Exit Sub
End If
Next mfm
Set frm = New frmlxhz
frm.sDate = rq11
frm.eDate = rq22
frm.sRq1 = rq1
frm.eRq2 = rq2
frm.Tag = "cxlxhzb"
frm.Show
End If
End Sub
Private Sub cmdrq_Click1(Index As Integer)
View_Calendar Me, Editrq(Index), Frame1.Top
End Sub
' 业务日期按键
Private Sub Editrq_Keyup(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = 113 Then 'F2
View_Calendar Me, Editrq(Index), Frame1.Top
End If
isEnt = True
End Sub
Private Sub Editrq_LostFocus(Index As Integer)
If Editrq(Index).Text <> "" And isEnt Then
Editrq(Index).Text = ForDate(Editrq(Index).Text)
If IsDate(Editrq(Index).Text) Then
Editrq(Index).Text = Format(Editrq(Index).Text, "yyyy-mm-dd")
Else
Beep
MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
SetTxtFocus Editrq(Index)
isEnt = False
End If
End If
End Sub
Private Function Contquit() As Boolean
Dim i As Integer, tmprst As New UfRecordset
Contquit = True
If Editrq(0).Text <> "" Then
Editrq(0).Text = ForDate(Editrq(0).Text)
If Not IsDate(Editrq(0).Text) Then
Beep
MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
Contquit = False
SetTxtFocus Editrq(0)
Exit Function
End If
If Not Pd_CurNddate(Editrq(0).Text) Then
Contquit = False
SetTxtFocus Editrq(0)
Exit Function
End If
End If
If Editrq(1).Text <> "" Then
Editrq(1).Text = ForDate(Editrq(1).Text)
If IsDate(Editrq(1).Text) Then
If Editrq(0).Text <> "" Then
If CDate(Editrq(1).Text) < CDate(Editrq(0).Text) Then
Beep
MsgBox "日期范围错误,请检查!", vbCritical, zjGl_Name
Contquit = False
SetTxtFocus Editrq(1)
Exit Function
End If
End If
Else
Beep
MsgBox "日期非法,请检查!", vbCritical, zjGl_Name
Contquit = False
SetTxtFocus Editrq(1)
Exit Function
End If
If Not Pd_CurNddate(Editrq(1).Text) Then
Contquit = False
SetTxtFocus Editrq(1)
Exit Function
End If
End If
For i = 0 To 1
If Editrq(i).Text <> "" Then
If Editrq(i) >= ZjAccInfo.zjStartdate Then
Set tmprst = dbsZJ.OpenRecordset("Select * from FD_AccSum where [dbill_date] = '" & Editrq(i).Text & "'", dbOpenSnapshot)
If tmprst.EOF Then
Beep
MsgBox "本日未记账,请检查!", vbCritical, zjGl_Name
SetTxtFocus Editrq(i)
Contquit = False
Exit Function
End If
Else
Beep
MsgBox "查询时间不能小于帐户的启用日期" & Format(ZjAccInfo.zjStartdate, "Long Date") & " ", vbCritical, zjGl_Name
SetTxtFocus Editrq(i)
Contquit = False
Exit Function
End If
End If
Next i
rq11 = Editrq(0).Text
If Editrq(0).Text = "" Then
Set tmprst = dbsZJ.OpenRecordset("Select * from FD_AccSum order by [dbill_date]", dbOpenSnapshot)
With tmprst
If .EOF Then
.oClose
Beep
MsgBox "还未记账,请检查!", vbCritical, zjGl_Name
SetTxtFocus Editrq(0)
Contquit = False
Exit Function
End If
.MoveFirst
rq11 = Format(![dbill_date], "yyyy-mm-dd")
.oClose
End With
End If
rq22 = Editrq(1).Text
If Editrq(1).Text = "" Then
Set tmprst = dbsZJ.OpenRecordset("Select * from FD_AccSum order by [dbill_date]", dbOpenSnapshot)
With tmprst
.MoveLast
rq22 = Format(![dbill_date], "yyyy-mm-dd")
.oClose
End With
End If
End Function
Private Sub Form_Unload(Cancel As Integer)
If Quitfs Then
zjLogInfo.TaskExec "FD0710", 0, zjLogInfo.cIYear
zjLogInfo.ClearError
zjGen_arr.FD0710 = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -