ʰ
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:44k
源码类别:
企业管理
开发平台:
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_FrmQcsj
- BorderStyle = 3 'Fixed Dialog
- Caption = "银行期初数据"
- ClientHeight = 4845
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7890
- HelpContextID = 5101
- Icon = "银行_期初数据录入.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4845
- ScaleWidth = 7890
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton Command3
- Height = 300
- Left = 7560
- Picture = "银行_期初数据录入.frx":1042
- Style = 1 'Graphical
- TabIndex = 26
- Top = 690
- Width = 315
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 27
- Top = 0
- Width = 7890
- _ExtentX = 13917
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 8
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- ImageKey = "sz"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- 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 = "Select"
- ImageIndex = 19
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.ImageList ImageList1
- Left = 4440
- 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":13CC
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":1766
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":1B00
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":1E9A
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":2234
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":25CE
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":2968
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":2D02
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":309C
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":3436
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":37D0
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":3B6A
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":3F04
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":429E
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":4638
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":49D2
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":4D6C
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":5106
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":54A0
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":583A
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":5BD4
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":5F6E
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":6308
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":66A2
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":6A3C
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":6DD6
- Key = "dz"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":7170
- Key = "ph"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":750A
- Key = "fz"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":78A4
- Key = "dw"
- EndProperty
- BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":7C3E
- Key = "hf"
- EndProperty
- BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":7FD8
- Key = "pz"
- EndProperty
- BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_期初数据录入.frx":8372
- Key = "check"
- EndProperty
- EndProperty
- End
- End
- Begin VB.Frame Frame1
- Height = 3795
- Left = 0
- TabIndex = 3
- Top = 1050
- Width = 7875
- Begin VB.CommandButton Command2
- Caption = "日记帐未达项"
- Height = 300
- Left = 5700
- TabIndex = 13
- Top = 2610
- Width = 1485
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 300
- Index = 7
- Left = 5460
- Locked = -1 'True
- TabIndex = 12
- Text = "7"
- Top = 3300
- Width = 2055
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 330
- Index = 6
- Left = 5745
- Locked = -1 'True
- TabIndex = 11
- Text = "6"
- Top = 2070
- Width = 1770
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 330
- Index = 5
- Left = 5745
- Locked = -1 'True
- TabIndex = 10
- Text = "5"
- Top = 1485
- Width = 1770
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- Height = 300
- Index = 4
- Left = 5460
- TabIndex = 9
- Text = "4"
- Top = 840
- Width = 2055
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000000&
- Enabled = 0 'False
- Height = 300
- Index = 3
- Left = 1500
- Locked = -1 'True
- TabIndex = 8
- Text = "3"
- Top = 3300
- Width = 2055
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 300
- Index = 2
- Left = 1680
- Locked = -1 'True
- TabIndex = 7
- Text = "2"
- Top = 2085
- Width = 1875
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Enabled = 0 'False
- Height = 300
- Index = 1
- Left = 1680
- Locked = -1 'True
- TabIndex = 6
- Text = "1"
- Top = 1500
- Width = 1875
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- Height = 300
- Index = 0
- Left = 1500
- TabIndex = 5
- Text = "0"
- Top = 840
- Width = 2055
- End
- Begin VB.CommandButton Command1
- Caption = "对帐单未达项"
- Height = 300
- Left = 1890
- TabIndex = 4
- Top = 2610
- Width = 1485
- End
- Begin VB.Line Line8
- BorderColor = &H80000005&
- X1 = 30
- X2 = 7890
- Y1 = 3090
- Y2 = 3090
- End
- Begin VB.Line Line7
- BorderColor = &H00808080&
- X1 = 30
- X2 = 7920
- Y1 = 3060
- Y2 = 3060
- End
- Begin VB.Line Line6
- BorderColor = &H80000005&
- X1 = 30
- X2 = 7920
- Y1 = 1320
- Y2 = 1320
- End
- Begin VB.Line Line5
- BorderColor = &H00808080&
- X1 = 60
- X2 = 7920
- Y1 = 1290
- Y2 = 1290
- End
- Begin VB.Line Line4
- BorderColor = &H80000005&
- X1 = 30
- X2 = 7920
- Y1 = 660
- Y2 = 660
- End
- Begin VB.Line Line3
- BorderColor = &H00808080&
- X1 = 30
- X2 = 7920
- Y1 = 630
- Y2 = 630
- End
- Begin VB.Line Line2
- BorderColor = &H00FFFFFF&
- BorderStyle = 6 'Inside Solid
- DrawMode = 16 'Merge Pen
- X1 = 3930
- X2 = 3930
- Y1 = 4050
- Y2 = 120
- End
- Begin VB.Line Line1
- BorderColor = &H80000003&
- X1 = 3900
- X2 = 3900
- Y1 = 90
- Y2 = 4050
- End
- Begin VB.Label Label4
- Caption = "调整后余额:"
- Height = 225
- Index = 9
- Left = 4260
- TabIndex = 23
- Top = 3345
- Width = 1095
- End
- Begin VB.Label Label4
- Caption = "减:企业已付 银行未付"
- Height = 465
- Index = 8
- Left = 4530
- TabIndex = 22
- Top = 2100
- Width = 1155
- End
- Begin VB.Label Label4
- Caption = "加:企业已收 银行未收"
- Height = 360
- Index = 7
- Left = 4530
- TabIndex = 21
- Top = 1500
- Width = 1140
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "调整前余额:"
- Height = 180
- Index = 6
- Left = 4320
- TabIndex = 20
- Top = 930
- Width = 990
- End
- Begin VB.Label Label4
- Caption = "调整后余额:"
- Height = 225
- Index = 5
- Left = 300
- TabIndex = 19
- Top = 3345
- Width = 1155
- End
- Begin VB.Label Label4
- Caption = "减:银行已付 企业未付"
- Height = 405
- Index = 4
- Left = 480
- TabIndex = 18
- Top = 2100
- Width = 1125
- End
- Begin VB.Label Label4
- Caption = "加:银行已收 企业未收"
- Height = 360
- Index = 3
- Left = 480
- TabIndex = 17
- Top = 1500
- Width = 1110
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "调整前余额:"
- Height = 180
- Index = 2
- Left = 300
- TabIndex = 16
- Top = 900
- Width = 990
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "银行对帐单"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Index = 1
- Left = 5220
- TabIndex = 15
- Top = 240
- Width = 1275
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "单位日记帐"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Index = 0
- Left = 1440
- TabIndex = 14
- Top = 240
- Width = 1275
- End
- End
- Begin VSFlex8Ctl.VSFlexGrid cxbbgrid
- Height = 3045
- Left = 510
- TabIndex = 28
- Top = 1740
- Width = 7125
- _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 = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = -2147483636
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 50
- Cols = 10
- FixedRows = 1
- FixedCols = 1
- 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 = 0 'False
- 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 Label2
- AutoSize = -1 'True
- Height = 180
- Index = 2
- Left = 6150
- TabIndex = 25
- Top = 750
- Width = 90
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Height = 180
- Index = 1
- Left = 1380
- TabIndex = 24
- Top = 735
- Width = 90
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "启用日期:"
- Height = 180
- Left = 5250
- TabIndex = 2
- Top = 750
- Width = 810
- End
- Begin VB.Label Label3
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "Label3"
- Height = 15
- Index = 5
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 7545
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "银行科目:"
- Height = 180
- Index = 0
- Left = 510
- TabIndex = 0
- Top = 735
- Width = 810
- End
- End
- Attribute VB_Name = "YH_FrmQcsj"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*********************************************************************************************************
- '* 模 块 名 称 :期初数据录入
- '* 功 能 描 述 :此功能模块主要完成银行对帐功能的期初数据录入
- '* 程序员姓名 :xjl
- '* 最后修改人 :xjl
- '* 最后修改时间:2001/07/13
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '*
- '*********************************************************************************************************
- '自定义部分
- Dim RecTemp As New ADODB.Recordset '临时记录集
- Public Str_RightEdit As String '编辑权限索引
- '以下为固定使用变量(网格)
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim ReportTitle As String '报表主标题
- Dim Tsxx 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 Dqlkwgl As Long '刚刚离开网格列
- Dim Dqtoprow As Long '当前录入状态时最上端可视行
- Dim Dqleftcol As Long '当前录入状态时最左端可视列
- Dim Zdlrqnr As String '字段录入修改前内容(用来判断内容是否修改)
- Dim Wbkbhlock As Boolean '文本框改变值锁
- Dim changelock As Boolean '网格行列改变控制锁(用来区别用户改变.程序改变)
- Dim Shsfts As Boolean '删除记录行是否提示
- Dim Szzls As Integer '网格信息数组最大下标值(网格列数-1)
- '以下为固定使用变量(文本框)
- Dim Textvar() As Variant '存储变体型文本框信息
- Dim Textboolean() As Boolean '存储布尔型文本框信息
- Dim Textint() As Integer '存储整型文本框信息
- Dim Textstr() As String '存储字符型文本框信息
- Dim Max_Text_Index As Integer '最大录入文本框索引值
- Dim TextGroupCode As String '文本框录入分组编码
- Dim TextValiJudgeLock() As Boolean '文本框录入有效性判断控制锁
- Dim TextChangeLock As Boolean '文本框内容变换控制锁
- '对帐单未达帐项
- Private Sub Command1_Click()
- YH_FrmYhqc.HelpContextID = "0115001"
- YH_FrmYhqc.Show 1
- Call bcsj
- Call XSSJ
- Call Sub_ShowBill
- End Sub
- '日记帐未达帐项
- Private Sub Command2_Click()
- YH_FrmDwqc.HelpContextID = "0115001"
- YH_FrmDwqc.Show 1
- Call bcsj
- Call XSSJ
- Call Sub_ShowBill
- End Sub
- '设置启用日期
- Private Sub Command3_Click()
- XT_calendar.Show 1
- '求帐套日期
- Sqlstr = " Select qsrq From Gy_kjrlb where beginflag='1'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Not RecTemp.EOF Then
- If Xtfhcs < Format(RecTemp(0), "yyyy-mm-dd") Then
- MsgBox "启用日期不能小于帐套日期", 16, "提示:"
- Call Command3_Click
- Else
- Label2(2).Caption = Format(Xtfhcs, "yyyy年mm月dd日")
- Label2(2).Tag = Xtfhcsfz
- End If
- Else
- Label2(2).Caption = Format(Xtfhcs, "yyyy年mm月dd日")
- Label2(2).Tag = Xtfhcsfz
- End If
- End Sub
- '调入窗体
- Sub Form_Load()
- '显示银行科目
- Label2(1).Caption = YH_FrmXzkm.Combo1.Text
- '隐藏选择对话框
- YH_FrmXzkm.Hide
- '定义可变部分变量
- ReportTitle = "银行期初余额调节表"
- '调入打印页面设置窗体
- XtReportCode = "cwzz_yhqcdy"
- Load Dyymctbl
- '以下为文本框处理程序
- TextGroupCode = "cwzz_yhdzqc"
- Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr()) '读入文本框录入信息
- Call Wbkcsh
- '调 入 网 格
- GridCode = "cwzz_yhqcdy" '网格属性编码
- Call BzWgcsh(CxbbGrid, 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 = CxbbGrid.Cols - 1
- If RecTemp.State = 1 Then RecTemp.Close
- Sqlstr = " Select qsrq From Gy_kjrlb where beginflag='1'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Not RecTemp.EOF Then
- Label2(2).Caption = Format(Xtfhcs, "yyyy年mm月dd日")
- Else
- Label2(2).Caption = Format(Now, "yyyy年mm月dd日")
- End If
- '显示文本框所有数据和启用日期
- Call XSSJ
- '显示网格数据
- Call Sub_ShowBill
- Str_RightEdit = "Cwzz_yhdzqc_Edit"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
- LrText(0).Enabled = False
- LrText(4).Enabled = False
- End If
- End Sub
- '退出
- Private Sub Form_Unload(Cancel As Integer)
- Unload YH_FrmXzkm
- Call bcsj
- Glo_Variable.Unload_TF = True
- End Sub
- '单击功能工具栏
- Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "ymsz" '页面设置
- Dyymctbl.Show 1
- Case "yl" '预 览
- Call bbyl(True)
- Case "dy" '打 印
- Call bbyl(False)
- Case "fh" '退出
- Call bcsj
- Unload Me
- Case "bz"
- Call F1bz
- Case "Select" '选择
- Call bcsj
- Glo_Variable.Unload_TF = False
- YH_FrmXzkm.HelpContextID = "0115001"
- YH_FrmXzkm.Show 1
- End Select
- End Sub
- '************以下为文本框录入处理程序(固定不变部分)*************'
- Private Sub Wbklrwbcl(Index As Integer) '文本框录入事后处理程序
- '以下为依据实际情况自定义部分[
- '在此填写文本框录入事后处理程序
- TextChangeLock = True
- LrText(3) = Val(Format(LrText(0), "0.00")) + Val(Format(LrText(1), "0.00")) - Val(Format(LrText(2), "0.00"))
- LrText(7) = Val(Format(LrText(4), "0.00")) + Val(Format(LrText(5), "0.00")) - Val(Format(LrText(6), "0.00"))
- LrText(Index) = Format(LrText(Index), "#,###.00")
- LrText(3) = Format(LrText(3), "#,###.00")
- LrText(7) = Format(LrText(7), "#,###.00")
- TextChangeLock = False
- ']以上为依据实际情况自定义部分
- End Sub
- '文本框发生改变
- Private Sub LrText_Change(Index As Integer)
- '屏蔽程序改变控制
- If TextChangeLock Then
- Exit Sub
- End If
- TextValiJudgeLock(Index) = False '打开有效性判断锁
- '限制字段录入长度
- TextChangeLock = True '加锁(防止执行Lrtext_Change)
- Select Case Textint(Index, 1)
- Case 8 '金额型
- Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
- Case 9 '数量型
- Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
- Case 10 '单价型
- Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
- Case Else '其他小数类型控制
- If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
- Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
- End If
- End Select
- TextChangeLock = False '解锁
- End Sub
- '文本框得到焦点,显示相应信息
- Private Sub LrText_GotFocus(Index As Integer)
- Call TextShow(Index)
- CurTextIndex = Index
- LrText(Index).SelStart = Len(LrText(Index))
- End Sub
- '字段按F2键提供帮助
- Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
- Select Case KeyCode
- Case vbKeyF2
- Call Text_Help(Index)
- End Select
- End Sub
- '文本框录入事中控制(限制录入某些数据)
- Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer)
- Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
- End Sub
- '文本框失去焦点进行有效性判断及相应处理
- Private Sub LrText_LostFocus(Index As Integer)
- If Textint(Index, 9) = 0 Or Textint(Index, 9) = 1 Then '事中判断
- Call TextYxxpd(Index)
- End If
- Call Wbklrwbcl(Index)
- Call Sub_ShowBill
- End Sub
- '录入字段帮助
- Private Sub Text_Help(Index As Integer)
- If Not Textboolean(Index, 1) Then
- '无字段帮助
- Exit Sub
- End If
- TextValiJudgeLock(Index) = True
- '调出通用窗体
- Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
- '数据写回文本框
- If Len(Xtfhcs) <> 0 Then
- If Textint(Index, 3) = 1 Then
- LrText(Index).Text = Xtfhcsfz
- LrText(Index).Tag = Xtfhcs
- Else
- LrText(Index).Text = Xtfhcs
- LrText(Index).Tag = Xtfhcsfz
- End If
- End If
- TextValiJudgeLock(Index) = False
- LrText(Index).SetFocus
- End Sub
- '文本框得到焦点,显示相应信息
- Private Sub TextShow(Index As Integer)
- '填写文本框得到焦点,进行相应信息处理程序
- TextChangeLock = True
- If Val(LrText(Index).Text) = 0 Then
- LrText(Index) = ""
- Else
- LrText(Index) = Format(LrText(Index), "0.00")
- End If
- TextChangeLock = False
- End Sub
- '录入文本框初始化
- Private Sub Wbkcsh()
- Dim Jsqte As Integer
- '最大录入文本框索引值
- Max_Text_Index = Textvar(1)
- ReDim TextValiJudgeLock(Max_Text_Index)
- For Jsqte = 0 To Max_Text_Index
- If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
- '清空文本框
- TextChangeLock = True
- LrText(Jsqte).Text = ""
- LrText(Jsqte).Tag = ""
- If Textint(Jsqte, 5) <> 0 Then
- LrText(Jsqte).MaxLength = Textint(Jsqte, 5)
- End If
- TextChangeLock = False
- End If
- TextValiJudgeLock(Jsqte) = True
- Next Jsqte
- End Sub
- '文本框有效性判断
- Private Function TextYxxpd(Index As Integer) As Boolean
- Dim Sqlstr As String
- Dim Findrec As ADODB.Recordset
- '文本框内容未曾改变不进行有效性判断
- If TextValiJudgeLock(Index) Then
- TextYxxpd = True
- Exit Function
- End If
- '文本框数据为空不进行有效性判断
- If Trim(LrText(Index)) = "" Then
- LrText(Index).Tag = ""
- Call Wbklrwbcl(Index)
- TextValiJudgeLock(Index) = True
- TextYxxpd = True
- Exit Function
- End If
- Select Case Textint(Index, 4)
- Case 1 '编码型
- Sqlstr = Trim(Textstr(Index, 5))
- Sqlstr = Replace(Sqlstr, "@", "'" + Trim(LrText(Index).Text) + "'")
- Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Findrec.EOF Then
- Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
- LrText(Index).SetFocus
- Exit Function
- Else
- Select Case Textint(Index, 3)
- Case 0
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- Case 1
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- End Select
- End If
- Case 2 '日期型
- If IsDate(LrText(Index).Text) Then
- LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
- Else
- Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
- LrText(Index).SetFocus
- Exit Function
- End If
- Case 3 '其他类型
- End Select
- TextValiJudgeLock(Index) = True
- TextYxxpd = True
- End Function
- '显示文本框所有数据和启用日期
- Private Sub XSSJ()
- '查询启用日期和银行对帐单调整前余额。
- Sqlstr = "Select * From CWZZ_BankBill Where rectype=0 And Ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If RecTemp.EOF = False Then
- LrText(4).Text = RecTemp.Fields!dfje
- Label2(2).Caption = Format(RecTemp.Fields("billdate"), "yyyy年mm月dd日")
- Else
- LrText(4) = "0"
- End If
- '写银行已达帐项
- Sqlstr = "Select Sum(JFJE) AS JFJE, Sum(DFJE) AS DFJE From CWZZ_BankBill Where RecType=1 " _
- & "And Ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If RecTemp.EOF = False Then
- If IsNull(RecTemp.Fields!dfje) = False Then
- LrText(1) = RecTemp.Fields!jfje
- Else
- LrText(1) = 0
- End If
- If IsNull(RecTemp.Fields!jfje) = False Then
- LrText(2) = RecTemp.Fields!dfje
- Else
- LrText(2) = 0
- End If
- Else
- LrText(2) = 0
- LrText(1) = 0
- End If
- '写单位日记帐调整前余额及启用日期
- Sqlstr = "Select * From CWZZ_RJZNOTCHECK Where RecType=0 And Ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If RecTemp.EOF = False Then
- LrText(0) = RecTemp.Fields!jfje
- Label2(2).Caption = Format(RecTemp.Fields("ddate"), "yyyy年mm月dd日")
- Else
- LrText(0) = "0"
- End If
- '写企业已达帐项
- Sqlstr = "Select Sum(JFJE) as JFJE, Sum(DFJE) as DFJE From CWZZ_RJZNOTCHECK Where RecType=1 And Ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If RecTemp.EOF = False Then
- If IsNull(RecTemp.Fields!dfje) = False Then
- LrText(6) = RecTemp.Fields!dfje
- Else
- LrText(6) = 0
- End If
- If IsNull(RecTemp.Fields!jfje) = False Then
- LrText(5) = RecTemp.Fields!jfje
- Else
- LrText(5) = 0
- End If
- Else
- LrText(5) = 0
- LrText(6) = 0
- End If
- '窗体调入时,计算调整前余额,调整后余额,转换各金额
- TextChangeLock = True
- LrText(3) = Val(LrText(0).Text) + Val(LrText(1)) - Val(LrText(2))
- LrText(7) = Val(LrText(4)) + Val(LrText(5)) - Val(LrText(6))
- LrText(0) = Format(LrText(0), "#,###.00")
- LrText(1) = Format(LrText(1), "#,###.00")
- LrText(2) = Format(LrText(2), "#,###.00")
- LrText(3) = Format(LrText(3), "#,###.00")
- LrText(4) = Format(LrText(4), "#,###.00")
- LrText(5) = Format(LrText(5), "#,###.00")
- LrText(6) = Format(LrText(6), "#,###.00")
- LrText(7) = Format(LrText(7), "#,###.00")
- TextChangeLock = False
- If Trim(Label2(2)) = "" Then
- Label2(2).Caption = Format(Now, "yyyy年mm月dd日")
- End If
- '启用日期控制
- Sqlstr = " Select Count(*) From CWZZ_Bankbill Where RecType=2 And Ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Not IsNull(RecTemp(0)) Then
- If RecTemp(0) > 0 Then
- Command3.Enabled = False
- Else
- Command3.Enabled = True
- End If
- End If
- End Sub
- '保存期初数据
- Private Sub bcsj()
- '查询银行期初余额
- Sqlstr = "Select * From CWZZ_BankBill Where Ccode='" & Val(Label2(1).Caption) & "'And RecType=0"
- If RecTemp.State = 1 Then RecTemp.Close
- RecTemp.Open Sqlstr, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If RecTemp.EOF = False Then
- '删除银行对帐期初余额
- RecTemp.Delete
- End If
- '添加银行对帐期初数据新纪录
- RecTemp.AddNew
- RecTemp.Fields!Ccode = Val(Label2(1).Caption) '科目编码
- RecTemp.Fields!billdate = Format(IIf(Trim(Label2(2)) = "", Date, Trim(Label2(2))), "yyyy-mm-dd") '票据日期
- RecTemp.Fields!dfje = Val(Format(LrText(4).Text, "0.00")) '借方金额
- RecTemp.Fields!rectype = 0 '记录类型
- RecTemp.Update
- '查询单位日记帐期初余额
- Sqlstr = "select * from cwzz_rjznotcheck where ccode='" & Val(Label2(1).Caption) & "' and rectype=0"
- If RecTemp.State = 1 Then RecTemp.Close
- RecTemp.Open Sqlstr, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If RecTemp.EOF = False Then
- '删除企业日记帐期初余额
- RecTemp.Delete
- End If
- '添加企业日记帐期初余额
- Label2(2) = IIf(Trim(Label2(2)) = "", Date, Trim(Label2(2)))
- RecTemp.AddNew
- RecTemp.Fields!Ccode = Val(Label2(1).Caption) '科目编码
- RecTemp.Fields!billdate = Format(Label2(2), "YYYY-MM-DD") '票据日期
- RecTemp.Fields!jfje = Val(Format(LrText(0).Text, "0.00")) '借方金额
- RecTemp.Fields!rectype = 0 '
- RecTemp.Fields!vouchno = 0 '凭证号
- 'RecTemp.Fields!VouchClassCode = "银初" '凭证类别
- RecTemp.Fields!Year = Format(Label2(2), "yyyy") '会计年度
- RecTemp.Fields!Period = Format(Label2(2), "mm") '会计区间
- RecTemp.Fields!ddate = Format(Label2(2), "yyyy-mm-dd") '制单日期
- RecTemp.Update
- End Sub
- '显示隐藏网格的数据
- Private Sub Sub_ShowBill()
- Dim Rowjsq As Integer
- With CxbbGrid
- .Rows = 5
- .TextMatrix(1, 0) = "调整前余额": .TextMatrix(1, 1) = LrText(0)
- .TextMatrix(2, 0) = "加:银行已收 企业未收": .TextMatrix(2, 1) = LrText(1)
- .TextMatrix(3, 0) = "减:银行已付 企业未付": .TextMatrix(3, 1) = LrText(2)
- .TextMatrix(4, 0) = "调整后余额": .TextMatrix(4, 1) = LrText(3)
- .TextMatrix(1, 2) = "调整前余额": .TextMatrix(1, 3) = LrText(4)
- .TextMatrix(2, 2) = "加:企业已收 银行未收": .TextMatrix(2, 3) = LrText(5)
- .TextMatrix(3, 2) = "减:企业已付 银行未付": .TextMatrix(3, 3) = LrText(6)
- .TextMatrix(4, 2) = "调整后余额": .TextMatrix(4, 3) = LrText(7)
- For Rowjsq = 0 To .Rows - 1
- .RowHeight(Rowjsq) = 350
- Next Rowjsq
- 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
- Bbxbt(1) = Space(0) + Fun_FormatOutPut("启用日期:" + Trim(Label2(2).Caption), 30)
- Bbxbt(1) = Bbxbt(1) + Fun_FormatOutPut("科目编码:" + Trim(Label2(1).Caption), 26)
- '报表小标题组织形式
- '报表行组织形式(0-居左 1-居中 2-居右)
- bbxbtzzxs(1) = 0
- Bbbwhzzxs(1) = 1
- '生成报表数据
- Call Scyxsjb(CxbbGrid)
- '生成报表
- Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
- If Not bbylte Then
- '如果为预览则卸载预览窗体
- Unload DY_Tybbyldy
- End If
- End Sub