ʰ
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:35k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
- Begin VB.Form YH_FrmDzdCx
- Caption = "银行对帐单查询"
- ClientHeight = 6915
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7350
- Icon = "银行_银行对帐单查询.frx":0000
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 6915
- ScaleWidth = 7350
- Begin VB.PictureBox Pic_Title
- BackColor = &H00FFFFFF&
- Height = 1065
- Left = 30
- Picture = "银行_银行对帐单查询.frx":1042
- ScaleHeight = 1005
- ScaleWidth = 11850
- TabIndex = 0
- Top = 570
- Width = 11910
- Begin VB.Label Lab_TitleText
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- ForeColor = &H00FF0000&
- Height = 180
- Index = 0
- Left = 3060
- TabIndex = 16
- Top = 240
- Width = 90
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- BackColor = &H80000018&
- BackStyle = 0 'Transparent
- Caption = "银行对帐单查询"
- BeginProperty Font
- Name = "宋体"
- Size = 14.25
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 285
- Index = 4
- Left = 495
- TabIndex = 15
- Top = 150
- Width = 2100
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "会计期间:"
- Height = 180
- Index = 9
- Left = 6090
- TabIndex = 14
- Top = 750
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Height = 180
- Left = 6900
- TabIndex = 13
- Top = 750
- Width = 90
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Height = 180
- Index = 0
- Left = 9900
- TabIndex = 12
- Top = 750
- Width = 90
- End
- Begin VB.Label Lab_kjkm
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "承前余额:"
- ForeColor = &H00000000&
- Height = 180
- Index = 1
- Left = 9000
- TabIndex = 11
- Top = 750
- Width = 810
- End
- Begin VB.Label Lab_Row
- Alignment = 2 'Center
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- ForeColor = &H00000000&
- Height = 180
- Left = 10155
- TabIndex = 10
- Top = 202
- Width = 90
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "(第"
- Height = 180
- Index = 11
- Left = 9750
- TabIndex = 9
- Top = 202
- Width = 270
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "行)"
- Height = 180
- Index = 12
- Left = 10365
- TabIndex = 8
- Top = 202
- Width = 270
- End
- Begin VB.Label TsLabel
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "当前记录"
- Height = 180
- Index = 13
- Left = 9000
- TabIndex = 7
- Top = 202
- Width = 720
- End
- Begin VB.Label Lab_kjkm
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "银行科目:"
- ForeColor = &H00000000&
- Height = 180
- Index = 0
- Left = 795
- TabIndex = 6
- Top = 750
- Width = 810
- End
- Begin VB.Label Lab_kjbm
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Height = 180
- Left = 1680
- TabIndex = 5
- Top = 750
- Width = 90
- End
- Begin VB.Label Lab_Bill
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "已勾对"
- ForeColor = &H00000000&
- Height = 180
- Index = 0
- Left = 6555
- TabIndex = 4
- Top = 202
- Width = 540
- End
- Begin VB.Label Label3
- Appearance = 0 'Flat
- BackColor = &H00E9FC61&
- BorderStyle = 1 'Fixed Single
- ForeColor = &H80000008&
- Height = 180
- Index = 0
- Left = 6090
- TabIndex = 3
- Top = 202
- Width = 390
- End
- Begin VB.Label Lab_Bill
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "未勾对"
- ForeColor = &H00000000&
- Height = 180
- Index = 1
- Left = 7695
- TabIndex = 2
- Top = 202
- Width = 540
- End
- Begin VB.Label Label3
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BorderStyle = 1 'Fixed Single
- ForeColor = &H80000008&
- Height = 180
- Index = 1
- Left = 7215
- TabIndex = 1
- Top = 202
- Width = 390
- End
- End
- Begin MSComctlLib.Toolbar Tlb_Action
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 17
- Top = 0
- Width = 7350
- _ExtentX = 12965
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Wrappable = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 9
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- Object.ToolTipText = "打印页面设置"
- ImageKey = "sz"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- Object.ToolTipText = "打印当前单据或Ctrl+P"
- ImageKey = "dy"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "预览"
- Key = "yl"
- ImageKey = "yl"
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "查询"
- Key = "cx"
- ImageKey = "cx"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "选择"
- Key = "Sel"
- ImageIndex = 19
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 540
- Left = 9390
- TabIndex = 22
- Top = 0
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 953
- ButtonWidth = 1455
- ButtonHeight = 953
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 3
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "保存格式"
- Key = "bcgs"
- ImageKey = "bcgs"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "默认列宽"
- Key = "hfmrgs"
- ImageKey = "mrlk"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "显示项目"
- Key = "szxsxm"
- ImageKey = "xsxm"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 6300
- Top = 0
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 32
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":35106
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":354A0
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3583A
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":35BD4
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":35F6E
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":36308
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":366A2
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":36A3C
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":36DD6
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":37170
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3750A
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":378A4
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":37C3E
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":37FD8
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":38372
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3870C
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":38AA6
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":38E40
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":391DA
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":39574
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3990E
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":39CA8
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3A042
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3A3DC
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3A776
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3AB10
- Key = "dz"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3AEAA
- Key = "ph"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3B244
- Key = "fz"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3B5DE
- Key = "dw"
- EndProperty
- BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3B978
- Key = "hf"
- EndProperty
- BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3BD12
- Key = "pz"
- EndProperty
- BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行对帐单查询.frx":3C0AC
- Key = "check"
- EndProperty
- EndProperty
- End
- End
- Begin VSFlex8Ctl.VSFlexGrid WglrGrid
- Height = 5910
- Left = 30
- TabIndex = 18
- Top = 1665
- Width = 11850
- _cx = 5080
- _cy = 5080
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = 12640511
- ForeColorFixed = -2147483630
- BackColorSel = -2147483643
- ForeColorSel = -2147483640
- BackColorBkg = -2147483636
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = 0 'False
- AllowBigSelection= 0 'False
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 5000
- Cols = 20
- FixedRows = 1
- FixedCols = 0
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- ShowComboButton = 1
- WordWrap = -1 'True
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- DataMember = ""
- ComboSearch = 3
- AutoSizeMouse = -1 'True
- FrozenRows = 0
- FrozenCols = 0
- AllowUserFreezing= 0
- BackColorFrozen = 0
- ForeColorFrozen = 0
- WallPaperAlignment= 9
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- Begin VB.Label Lab_Pzclzt
- BackColor = &H0000FFFF&
- Caption = "1"
- ForeColor = &H00808080&
- Height = 420
- Left = 9268
- TabIndex = 21
- Top = 660
- Visible = 0 'False
- Width = 367
- End
- Begin VB.Label Lab_OperStatus
- BackColor = &H000080FF&
- Caption = "1"
- Height = 180
- Left = 7106
- TabIndex = 20
- Top = 690
- Visible = 0 'False
- Width = 880
- End
- Begin VB.Label Lab_Book
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- ForeColor = &H000000FF&
- Height = 373
- Left = 3946
- TabIndex = 19
- Top = 11449
- Width = 888
- End
- End
- Attribute VB_Name = "YH_FrmDzdCx"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*********************************************************************************************************
- '* 模 块 名 称 :银行对帐单查询
- '* 功 能 描 述 :查询银行对帐单
- '* 程序员姓名 :xjl
- '* 最后修改人 :xjl
- '* 最后修改时间:2001/07/17
- '*********************************************************************************************************
- Dim RecTemp As New ADODB.Recordset '定义数据集
- Dim RecTemp1 As New ADODB.Recordset '定义数据集
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim ReportTitle As String '报表主标题
- Dim Pmbcsjhs As Long '屏幕网格保持数据行数(大于等于1)
- Dim Fzxwghs As Integer '辅助项网格行数(包括合计行)
- Dim Sfxshjwg As Boolean '是否显示合计网格
- Dim Qslz As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd As Double '网格数据行高度
- Dim GridBoolean() As Boolean '网格列信息(布尔型)
- Dim GridStr() As String '网格列信息(字符型)
- Dim GridInt() As Integer '网格列信息(整型)
- Dim Sfblbzkd As Boolean '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
- Dim Dqlrwgh As Long '当前录入数据网格行
- Dim Dqlrwgl As Long '当前录入数据网格列
- Dim Dqlkwgh As Long '刚刚离开网格行(不一定为录入行)
- Dim Dqtoprow As Long '当前录入状态时最上端可视行
- Dim Dqleftcol As Long '当前录入状态时最左端可视列
- Dim Wbkbhlock As Boolean '文本框改变值锁
- Dim changelock As Boolean '网格行列改变控制锁(用来区别用户改变.程序改变)
- Dim Gdtlock As Boolean '滚动条滚动控制(用来区别用户改变.程序改变)
- Dim Yxxpdlock As Boolean '字段有效性判断锁(内容不修改不需进行字段有效性判断)
- Dim Hyxxpdlock As Boolean '行有效性判断锁(字段内容不修改不需进行行有效性判断)
- Dim Valilock As Boolean '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
- Dim Shsfts As Boolean '删除记录行是否提示
- Dim Szzls As Integer '网格信息数组最大下标值(网格列数-1)
- '控制焦点转移
- Private Sub Form_KeyPress(KeyAscii As Integer)
- Select Case KeyAscii
- Case 39 '屏蔽字符"'"
- KeyAscii = 0
- End Select
- End Sub
- '窗体装入
- Sub Form_Load()
- changelock = False '网格行列改变控制锁
- Gdtlock = False '滚动条滚动控制
- Yxxpdlock = True '字段有效性判断锁
- Hyxxpdlock = True '行有效性判断锁
- Wbkbhlock = False '文本框内容改变锁
- '隐藏选择对话框
- YH_FrmXzkm.Hide
- '定义会计区间
- Label1.Caption = Mid(Trim(Str(10000 + Xtyear)), 2, 4) + "." + Mid(Trim(Str(100 + Xtmm)), 2, 2)
- '设置调整前余额
- Sqlstr = "SELECT * FROM CWZZ_BankBill Where RecType=0 And Ccode='" & Val(YH_FrmXzkm.Combo1.Text) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If RecTemp.EOF = False Then
- If Val(RecTemp.Fields("Dfje")) = 0 Then
- Label2(0).Caption = "0"
- Else
- Label2(0).Caption = Format(RecTemp.Fields("Dfje"), "#,###.00")
- End If
- Else
- Label2(0).Caption = 0
- End If
- '报表主标题及报表编码
- ReportTitle = "银行对帐单"
- XtReportCode = "Cwzz_yhdzd"
- Load Dyymctbl
- '调入网格
- GridCode = "Cwzz_yhdzdcx" '网格属性编码
- Call BzWgcsh(WglrGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Pmbcsjhs = GridInf(3)
- Fzxwghs = GridInf(4)
- Sfblbzkd = GridInf(5)
- Shsfts = GridInf(6)
- Sfxshjwg = GridInf(7)
- Szzls = WglrGrid.Cols - 1
- '设置网格宽度
- For Jsqte = WglrGrid.FixedRows To WglrGrid.Rows - 1
- WglrGrid.RowHeight(Jsqte) = Sjhgd
- Next Jsqte
- '单据变动置为False
- Bln_BillChange = False
- '设置会计科目
- Lab_kjbm.Caption = YH_FrmXzkm.Combo1.Text
- Call Sub_ShowBill
- '调整标题位置
- SetTitlePos tsLabel(4)
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- With WglrGrid
- .Width = Me.Width - 160
- .Height = Me.Height - .Top - 400
- End With
- With Pic_Title
- .Width = Me.Width - 160
- End With
- GsToolbar.Left = Me.Width - GsToolbar.Width - 140
- End Sub
- '窗体卸载
- Private Sub Form_Unload(Cancel As Integer)
- '卸载打印页面窗体
- Unload Dyymctbl
- '卸载过滤条件
- Unload YH_FrmGltj
- End Sub
- '显示网格内容
- Private Sub Sub_ShowBill()
- Dim rs As New ADODB.Recordset '定义数据集
- Dim RS1 As New ADODB.Recordset '定义数据集
- Dim Jsqte As Long '定义计数器
- '查询银行对帐单
- Sqlstr = "SELECT * FROM CWZZ_BankBill Where Ccode='" & Val(Lab_kjbm) & "' And " _
- & "RecType=2 Order By BillDate"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With RecTemp
- WglrGrid.Clear 1
- If .EOF Then
- Exit Sub
- Else
- WglrGrid.Rows = .RecordCount + WglrGrid.FixedRows
- End If
- Jsqte = WglrGrid.FixedRows
- Do While Not .EOF
- If Jsqte >= WglrGrid.Rows Then
- WglrGrid.AddItem ""
- End If
- WglrGrid.TextMatrix(Jsqte, 0) = "*" '行标识
- WglrGrid.TextMatrix(Jsqte, 1) = .Fields("BankBillID") 'ID号
- WglrGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Format(.Fields("billdate"), "yyyy-mm-dd") '票据日期限
- Sqlstr = "Select * From Gy_SetTleMent Where Sscode='" & .Fields!sscode & "'"
- Set RecTemp1 = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If RecTemp1.EOF = False Then
- WglrGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(RecTemp1.Fields("ssname") & "") '结算方式
- End If
- WglrGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("BillNo") & "") '票号
- If Val(Str(.Fields("Jfje"))) <> 0 Then
- WglrGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(Str(.Fields("Jfje"))) '借方金额
- End If
- If Val(Str(.Fields("Dfje"))) Then
- WglrGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(Str(.Fields("Dfje"))) '贷方金额
- End If
- WglrGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("Digest")) & "" '摘要
- If .Fields("bcheckflag") = True Then
- WglrGrid.Cell(flexcpBackColor, Jsqte, 0, Jsqte, WglrGrid.Cols - 1) = &HE9FC61 '如果已勾对设置网格颜色
- End If
- WglrGrid.RowHeight(Jsqte) = Sjhgd
- .MoveNext
- Jsqte = Jsqte + 1
- Loop
- End With
- '计算合计数据
- Call Sjhj
- End Sub
- Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "bcgs" '保存表格格式
- Call Bcwggs(WglrGrid, GridCode, GridStr())
- Case "hfmrgs" '恢复默认格式
- Call Hfmrgs(WglrGrid, GridCode, GridStr())
- Case "szxsxm" '设置显示项目
- Call Szxsxm(WglrGrid, GridCode)
- End Select
- End Sub
- '用户点击工具条
- Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)
- '屏蔽文本框,下拉组合框有效性判断
- Valilock = True
- '屏蔽网格失去焦点产生的有效性判断
- changelock = True
- Select Case Button.Key
- Case "ymsz" '页面设置
- Dyymctbl.Show 1
- Case "yl" '预 览
- Call bbyl(True)
- Case "dy" '打 印
- Call bbyl(False)
- Case "cx" '查 询
- YH_FrmGltj.Tag = "Y"
- YH_FrmGltj.HelpContextID = "0115003"
- YH_FrmGltj.Show 1
- Case "bz" '帮 助
- Call F1bz
- Case "fh" '退 出
- Glo_Variable.Unload_TF = True
- Unload YH_FrmXzkm
- Unload Me
- Case "Sel" '选择
- Glo_Variable.Unload_TF = False
- YH_FrmXzkm.HelpContextID = "0115003"
- YH_FrmXzkm.Show 1
- End Select
- '解 锁
- Valilock = False
- changelock = False
- End Sub
- '支持热键操作
- Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
- If Shift = 2 Then
- Select Case UCase(Chr(KeyCode))
- Case "P" 'Ctrl+P 打印
- If Tlb_Action.Buttons("dy").Enabled Then
- Call bbyl(False)
- End If
- End Select
- End If
- End Sub
- '===以下程序为通用部分 ,一般不需更改==='
- '显示当前数据行相关信息
- Private Sub WglrGrid_EnterCell()
- With WglrGrid
- If .Row >= .FixedRows Then
- Lab_Row = Trim(Str(.Row - .FixedRows + 1))
- End If
- End With
- End Sub
- '网格得到焦点
- Private Sub WglrGrid_GotFocus()
- '则调整当前焦点至有效数据行
- With WglrGrid
- If .Row < .FixedRows And .Rows > .FixedRows Then
- changelock = True
- .Select .FixedRows, .Col
- changelock = False
- End If
- If .Col < Qslz Then
- changelock = True
- .Select .Row, Qslz
- changelock = False
- End If
- End With
- End Sub
- '限制用户在录入过程中滚动鼠标
- Private Sub WglrGrid_AfterScroll(ByVal OldTopRow As Long, ByVal OldLeftCol As Long, ByVal NewTopRow As Long, ByVal NewLeftCol As Long)
- If Gdtlock Then
- Exit Sub
- End If
- End Sub
- '网格列数据合计
- Private Sub Sjhj()
- Dim Hjjg As Double
- Dim Rjsq As Integer
- With WglrGrid
- For Rjsq = 1 To .Rows - 1
- Hjjg = 0
- If Rjsq = 1 Then
- Hjjg = Hjjg + Val(Format(.TextMatrix(Rjsq, Sydz("005", GridStr(), Szzls)), "0.00")) - Val(Format(.TextMatrix(Rjsq, Sydz("004", GridStr(), Szzls)), "0.00")) + Val(Format(Label2(0).Caption, "0.00"))
- Else
- Hjjg = Hjjg + Val(Format(.TextMatrix(Rjsq, Sydz("005", GridStr(), Szzls)), "0.00")) - Val(Format(.TextMatrix(Rjsq, Sydz("004", GridStr(), Szzls)), "0.00")) + Val(Format(.TextMatrix(Rjsq - 1, Sydz("006", GridStr(), Szzls)), "0.00"))
- End If
- If Hjjg <> 0 Then
- .TextMatrix(Rjsq, Sydz("006", GridStr(), Szzls)) = Format(Hjjg, "#,###.00")
- Else
- .TextMatrix(Rjsq, Sydz("006", GridStr(), Szzls)) = ""
- End If
- If Val(.TextMatrix(Rjsq, Sydz("004", GridStr(), Szzls))) <> 0 Then
- .TextMatrix(Rjsq, Sydz("004", GridStr(), Szzls)) = Format(.TextMatrix(Rjsq, Sydz("004", GridStr(), Szzls)), "#,###.00")
- End If
- If Val(.TextMatrix(Rjsq, Sydz("005", GridStr(), Szzls))) <> 0 Then
- .TextMatrix(Rjsq, Sydz("005", GridStr(), Szzls)) = Format(.TextMatrix(Rjsq, Sydz("005", GridStr(), Szzls)), "#,###.00")
- End If
- Next Rjsq
- End With
- End Sub
- '打印预览(通用)
- Private Sub bbyl(bbylte As Boolean)
- Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
- Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
- '报表小标题行数
- Bbxbtgs = 1
- '报表表尾行数
- Bbbwhgs = 1
- ReDim Bbxbt(1 To Bbxbtgs)
- ReDim bbxbtzzxs(1 To Bbxbtgs)
- If Bbbwhgs <> 0 Then
- ReDim Bbbwh(1 To Bbbwhgs)
- ReDim Bbbwhzzxs(1 To Bbbwhgs)
- End If
- '报表总标题
- Bbzbt = ReportTitle
- '报表行组织形式(0-居左 1-居中 2-居右)
- Bbxbt(1) = Space(0) + Fun_FormatOutPut("会计期间:" + Trim(Label1.Caption), 30)
- Bbxbt(1) = Bbxbt(1) + Fun_FormatOutPut("科目编码:" + Trim(Lab_kjbm), 26)
- '报表小标题组织形式
- '报表行组织形式(0-居左 1-居中 2-居右)
- bbxbtzzxs(1) = 0
- Bbbwhzzxs(1) = 1
- '生成报表数据
- Call Scyxsjb(WglrGrid)
- '生成报表
- Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
- '卸载预览窗体
- If Not bbylte Then
- Unload DY_Tybbyldy
- End If
- End Sub