📄 单位利息汇总表.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{BA5441C3-11E6-11D2-89E1-000021886118}#8.0#0"; "UFRTPRN.OCX"
Object = "{3733D281-9649-11D2-B757-0080C8883C6B}#1.0#0"; "UFGRIDDB.OCX"
Begin VB.Form frmInterSumRep
Caption = "单位利息汇总表"
ClientHeight = 5355
ClientLeft = 60
ClientTop = 345
ClientWidth = 8595
HelpContextID = 88000075
Icon = "单位利息汇总表.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MDIChild = -1 'True
ScaleHeight = 5355
ScaleWidth = 8595
WindowState = 2 'Maximized
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 615
Left = 0
TabIndex = 0
Top = 0
Width = 8595
_ExtentX = 15161
_ExtentY = 1085
ButtonWidth = 783
ButtonHeight = 804
AllowCustomize = 0 'False
Appearance = 1
ImageList = "ImageList1"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 8
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "打印"
Key = "Print"
Object.Tag = ""
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "预览"
Key = "Preview"
Object.Tag = ""
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "输出"
Key = "Dataout"
Object.Tag = ""
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "查询"
Key = "Seek"
Object.Tag = ""
EndProperty
BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 3
EndProperty
BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "帮助"
Key = "Help"
Object.Tag = ""
EndProperty
BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "退出"
Key = "Exit"
Object.Tag = ""
EndProperty
EndProperty
End
Begin UFGRIDADOLib.UfGridADO UfGridADO1
Height = 2292
Left = 0
TabIndex = 4
Top = 1650
Width = 3372
_Version = 65536
_ExtentX = 5948
_ExtentY = 4043
_StockProps = 253
End
Begin RTPrnLib.RTPrn RTPrn1
Left = 6285
Top = 4800
_Version = 524288
_ExtentX = 1296
_ExtentY = 926
_StockProps = 4
m_lngrtpFitRows = 30
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
Enabled = 0 'False
ForeColor = &H80000008&
Height = 996
Left = 0
ScaleHeight = 960
ScaleWidth = 8565
TabIndex = 1
Top = 615
Width = 8595
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label2"
ForeColor = &H8000000D&
Height = 180
Left = 75
TabIndex = 3
Top = 690
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "单位利息汇总表"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 240
Left = 2970
TabIndex = 2
Top = 375
Width = 1800
End
End
Begin ComctlLib.ImageList ImageList1
Left = 3180
Top = 4740
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
MaskColor = 12632256
_Version = 327682
End
End
Attribute VB_Name = "frmInterSumRep"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'*********************************************
'* 软件著作权: 北京用友软件(集团)有限公司
'* 系统名称: 资金计息8.0
'* 功能说明: 单位利息汇总表
'* 作者: 江 宁
'*********************************************
Private sDate1 As String
Private sDate2 As String
'Public iType As Byte
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Me.WindowState = vbMaximized
Me.Icon = LoadResPicture(109, vbResIcon)
Label1.Left = (Me.Width - Label1.Width) / 2
Label1.Top = (Picture1.Height - Label1.Height) / 2
Label2.Move Picture1.Width - Me.Width + 50
Picture1.Width = ZjAccInfo.zjPictWidth
Picture1.Picture = LoadPicture(ZjAccInfo.zjRepPath & "BookBack.BMP")
REPTlb Toolbar1, ImageList1
With UfGridado1:
.Top = Toolbar1.Height + Picture1.Height
.Height = Me.Height - Toolbar1.Height - Picture1.Height
.Redraw = True
.Rows = 2
.LeftCol = 0
.FixedRows = 2
End With
' Select Case Me.iType
'
' End Select
UnitInterSum
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
On Error Resume Next
If Me.WindowState <> 1 Then
If Me.Width < frmMinWidth Then Me.Width = frmMinWidth
If Me.Height < frmMinWidth Then Me.Height = frmMinWidth
Picture1.Left = Me.Width - ZjAccInfo.zjPictWidth
Label1.Left = (Me.Width - Label1.Width) / 2 - Picture1.Left
Label2.Move Picture1.Width - Me.Width + 50
UfGridado1.Height = Me.Height - Toolbar1.Height - Picture1.Height - 400
UfGridado1.Width = Me.Width - 100
UfGridado1.Redraw = True
UfGridado1.LeftCol = 0
End If
On Error GoTo 0
End Sub
'*********************************************************************
'*函数说明: 初始化报表的 Toolbar *
'*参 数: tlb Toolbar *
'* Imag1 ImageList *
'*返回值 : *
'*********************************************************************
Public Sub REPTlb(tlb As ToolBar, Img1 As ImageList)
Dim imgt As ListImage
Dim id As Integer
Set imgt = Img1.ListImages.Add(, "Print", LoadResPicture(314, vbResBitmap))
Set imgt = Img1.ListImages.Add(, "Preview", LoadResPicture(312, vbResBitmap))
Set imgt = Img1.ListImages.Add(, "Dataout", LoadResPicture(263, vbResBitmap))
Set imgt = Img1.ListImages.Add(, "Seek", LoadResPicture(331, vbResBitmap))
Set imgt = Img1.ListImages.Add(, "Help", LoadResPicture(396, vbResBitmap))
Set imgt = Img1.ListImages.Add(, "Exit", LoadResPicture(1118, vbResBitmap))
With tlb
.Buttons("Print").Image = "Print"
.Buttons("Print").ToolTipText = "Ctrl+P"
.Buttons("Preview").Image = "Preview"
' .Buttons("Preview").ToolTipText = "Ctrl+S" 'cuidong 2001.01.15
.Buttons("Preview").ToolTipText = "" 'cuidong 2001.01.15
.Buttons("Dataout").Image = "Dataout"
.Buttons("Dataout").ToolTipText = "Ctrl+W"
.Buttons("Seek").Image = "Seek"
.Buttons("Seek").ToolTipText = "Ctrl+C"
.Buttons("Help").Image = "Help"
.Buttons("Help").ToolTipText = "F1"
.Buttons("Exit").Image = "Exit"
.Buttons("Exit").ToolTipText = "Ctrl+F4"
End With
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
Gen_Key Button.key
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF4
If Shift = 2 Then
Gen_Key "Exit"
End If
Case vbKeyP
If Shift = 2 Then
Gen_Key "Print"
End If
Case vbKeyS
'cuidong 2001.01.15
'If Shift = 2 Then
' Gen_Key "Preview"
'End If
Case vbKeyW
If Shift = 2 Then
Gen_Key "Dataout"
End If
Case vbKeyC
If Shift = 2 Then
Gen_Key "Seek"
End If
End Select
End Sub
Private Sub Gen_Key(TLB_Key As String)
Select Case TLB_Key
Case Is = "Print", "Preview", "Dataout"
zjbPrnViewOut Me, "yhckb", TLB_Key, False, Label1.Caption
Case Is = "Seek"
frmInterSum.Show vbModal
Case Is = "Help"
SendKeys "{F1}"
Case Is = "Exit"
Unload Me
End Select
End Sub
'===============================
' -----单位利息汇总表-----
'===============================
Public Sub UnitInterSum()
Dim rstInter As New UfRecordset
Dim rstTmp As New UfRecordset
Dim rstCDe As New UfRecordset
Dim bEqual As Boolean
Dim sJxrq As String
Dim sSqlde1 As String
Dim sSqlde2 As String
Dim sSQL As String
Dim sSql1 As String
Dim sSqltmp As String
Dim sql As String
Dim Sql1 As String
Dim sUnitN As String '单位名称
Dim sAccID As String '单位账号
Dim iNum As Integer
Dim iRow As Integer '合计显示控制
Dim iSumRec As Integer
Dim dLxhj As Double
Dim sLxhj As String '利息合计
Dim dCdelx As Double '超定额利息
Dim sCdelx As String
Dim dDenlx As Double '定额内利息
Dim sDenlx As String
Dim sumJxye As Double
Dim sumJs As Double
Dim sumDenlx As Double
Dim sumCdelx As Double
Dim dCjxye As Double '数据缓存。
Dim dCjs As Double '........
Dim dCdenlx As Double
Dim dCcdelx As Double
Dim dClxhj As Double
Dim dDlxhj As Double '利息合计显示
Dim dLxhz As Double
Dim bShow As Boolean 'Cuidong 2000.12.26
Me.UfGridado1.Cols = 9
Me.UfGridado1.FixedCols = 0
Me.UfGridado1.ColWidth(0) = 2300
Me.UfGridado1.ColWidth(1) = 2000
Me.UfGridado1.ColWidth(2) = 1200
Me.UfGridado1.ColWidth(3) = 600
Me.UfGridado1.ColWidth(4) = 1600
Me.UfGridado1.ColWidth(5) = 2000
Me.UfGridado1.ColWidth(6) = 1600
Me.UfGridado1.ColWidth(7) = 1600
Me.UfGridado1.ColWidth(8) = 1600
Me.UfGridado1.Rows = 2
Me.UfGridado1.FixedRows = 2
sDate1 = ForDate(frmInterSum.edtDateStart)
sDate2 = ForDate(frmInterSum.edtDateEnd)
Label2.Caption = "起止时间 " & Year(CDate(ForDate(sDate1))) & "." & Month(CDate(ForDate(sDate1))) & "." & Day(CDate(ForDate(sDate1))) & _
"--" & Year(CDate(ForDate(sDate2))) & "." & Month(CDate(ForDate(sDate2))) & "." & Day(CDate(ForDate(sDate2)))
'生成查询语句
' sSqltmp = "SELECT DISTINCT FD_AccDef.cAccID, code.bproperty FROM FD_AccDef INNER JOIN " & _
"(FD_AccSet INNER JOIN code ON FD_AccSet.cCode=code.cCode) ON " & _
"FD_AccDef.cAccID=FD_AccSet.cAccID WHERE FD_AccDef.cAccID='" 'Cuidong 2001.01.02
sSqltmp = "SELECT DISTINCT FD_AccDef.cAccID, code.bproperty FROM FD_AccDef INNER JOIN " & _
"(FD_AccSet INNER JOIN code ON FD_AccSet.cCode=code.cCode) ON " & _
"FD_AccDef.cAccID=FD_AccSet.cAccID WHERE FD_AccDef.cAccID='" 'Cuidong 2001.01.02
sSqlde1 = "SELECT DISTINCT FD_AccDef.cAccID, FD_Intras.ncdell, FD_CadAcr.cCarID, " & _
"FD_CadAcr.dbill_date, FD_Intras.dbdate, FD_Intras.bde FROM FD_Intras INNER " & _
"JOIN (FD_CadAcr INNER JOIN (FD_AccSum INNER JOIN (FD_AccDef INNER JOIN " & _
"FD_AccUnit ON FD_AccDef.cUnitCode=FD_AccUnit.cUnitCode) ON FD_AccSum.cAccID=" & _
"FD_AccDef.cAccID) ON FD_CadAcr.dbill_date=FD_AccSum.dbill_date) ON " & _
"FD_Intras.cIntrID=FD_CadAcr.cIntrID WHERE (FD_CadAcr.cPAccID=FD_AccDef.cAccID OR " & _
"FD_CadAcr.cGAccID=FD_AccDef.cAccID) AND FD_CadAcr.cDanID IS NULL AND " & _
"FD_CadAcr.iDanType=0 AND FD_Intras.bde<>0 AND FD_CadAcr.dbill_date>FD_Intras.dbdate " & _
"AND FD_CadAcr.cCarID='"
sSqlde2 = " GROUP BY FD_AccDef.cAccID, FD_Intras.ncdell, FD_CadAcr.dbill_date, " & _
"FD_Intras.dbdate, FD_Intras.bde, FD_CadAcr.cCarID ORDER BY FD_Intras.dbdate DESC"
' sSQL = "SELECT DISTINCT FD_AccUnit.cUnitName,FD_AccDef.cAccID,FD_CadAcr.dbill_date AS JXRQ,FD_CadAcr.cCarID, " & _
"FD_AccDef.cexch_name, FD_AccDef.iDataSrc, FD_AccSum.mb AS ZYE, " & _
"FD_AccSum.mh_Cad AS ZJS,FD_CadAcr.mmoney AS LXHJ,FD_CadAcr.cdeLx " & _
"FROM FD_Intras INNER JOIN (FD_CadAcr INNER JOIN (FD_AccSum INNER JOIN " & _
"(FD_AccDef INNER JOIN FD_AccUnit ON FD_AccDef.cUnitCode=FD_AccUnit.cUnitCode) ON " & _
"FD_AccSum.cAccID=FD_AccDef.cAccID) ON FD_CadAcr.dbill_date=FD_AccSum.dbill_date+1) " & _
"ON FD_Intras.cIntrID=FD_CadAcr.cIntrID, FD_AccSet INNER JOIN code ON " & _
"FD_AccSet.cCode=code.cCode Where (FD_CadAcr.cPAccID = FD_AccDef.cAccID Or " & _
"FD_CadAcr.cGAccID = FD_AccDef.cAccID) And FD_CadAcr.cDanID Is Null And " & _
"FD_CadAcr.iDanType = 0" & " AND FD_CadAcr.dbill_date BETWEEN '" & sDate1 & _
"' AND '" & sDate2 & "'" 'Cuidong 2001.01.02
sSQL = "SELECT DISTINCT FD_AccUnit.cUnitName,FD_AccDef.cAccID,FD_CadAcr.dbill_date AS JXRQ,FD_CadAcr.cCarID, " & _
"FD_AccDef.cexch_name, FD_AccDef.iDataSrc, FD_AccSum.mb AS ZYE, " & _
"FD_AccSum.mh_Cad AS ZJS,FD_CadAcr.mmoney AS LXHJ,FD_CadAcr.cdeLx " & _
"FROM FD_Intras INNER JOIN (FD_CadAcr INNER JOIN (FD_AccSum INNER JOIN " & _
"(FD_AccDef INNER JOIN FD_AccUnit ON FD_AccDef.cUnitCode=FD_AccUnit.cUnitCode) ON " & _
"FD_AccSum.cAccID=FD_AccDef.cAccID) ON FD_CadAcr.dbill_date=FD_AccSum.dbill_date+1) " & _
"ON FD_Intras.cIntrID=FD_CadAcr.cIntrID " & _
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -