ʰ
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:39k
源码类别:
企业管理
开发平台:
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_FrmYeCx
- BorderStyle = 3 'Fixed Dialog
- Caption = "银行余额调节表"
- ClientHeight = 4200
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7785
- HelpContextID = 5104
- Icon = "银行_银行余额表.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4200
- ScaleWidth = 7785
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.Frame Frame1
- Height = 3195
- Left = 0
- TabIndex = 0
- Top = 990
- Width = 7785
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H8000000A&
- Enabled = 0 'False
- Height = 300
- Index = 0
- Left = 1830
- TabIndex = 8
- Text = "0"
- Top = 840
- Width = 1718
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Enabled = 0 'False
- Height = 300
- Index = 1
- Left = 1830
- Locked = -1 'True
- TabIndex = 7
- Text = "1"
- Top = 1470
- Width = 1718
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 300
- Index = 2
- Left = 1830
- Locked = -1 'True
- TabIndex = 6
- Text = "2"
- Top = 1980
- Width = 1718
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000000&
- Enabled = 0 'False
- Height = 300
- Index = 3
- Left = 1830
- Locked = -1 'True
- TabIndex = 5
- Text = "3"
- Top = 2670
- Width = 1718
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H8000000A&
- Enabled = 0 'False
- Height = 300
- Index = 4
- Left = 5820
- TabIndex = 4
- Text = "4"
- Top = 840
- Width = 1618
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 300
- Index = 5
- Left = 5820
- Locked = -1 'True
- TabIndex = 3
- Text = "5"
- Top = 1470
- Width = 1618
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 300
- Index = 6
- Left = 5820
- Locked = -1 'True
- TabIndex = 2
- Text = "6"
- Top = 1980
- Width = 1618
- End
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H80000004&
- Enabled = 0 'False
- Height = 300
- Index = 7
- Left = 5820
- Locked = -1 'True
- TabIndex = 1
- Text = "7"
- Top = 2670
- Width = 1618
- 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 = 1290
- TabIndex = 18
- 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 = 1
- Left = 5220
- TabIndex = 17
- Top = 240
- Width = 1275
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "调整前余额:"
- Height = 180
- Index = 2
- Left = 480
- TabIndex = 16
- Top = 900
- Width = 990
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "加:银行已收 企业未收"
- Height = 180
- Index = 3
- Left = 480
- TabIndex = 15
- Top = 1530
- Width = 2250
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "减:银行已付 企业未付"
- Height = 180
- Index = 4
- Left = 480
- TabIndex = 14
- Top = 2040
- Width = 2160
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "调整后余额:"
- Height = 180
- Index = 5
- Left = 480
- TabIndex = 13
- Top = 2730
- Width = 990
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "调整前余额:"
- Height = 180
- Index = 6
- Left = 4440
- TabIndex = 12
- Top = 900
- Width = 990
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "加:企业已收 银行未收"
- Height = 180
- Index = 7
- Left = 4440
- TabIndex = 11
- Top = 1530
- Width = 2160
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "减:企业已付 银行未付"
- Height = 180
- Index = 8
- Left = 4440
- TabIndex = 10
- Top = 2040
- Width = 2160
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "调整后余额:"
- Height = 180
- Index = 9
- Left = 4440
- TabIndex = 9
- Top = 2730
- Width = 990
- End
- Begin VB.Line Line1
- BorderColor = &H80000003&
- X1 = 3900
- X2 = 3900
- Y1 = 90
- Y2 = 3360
- End
- Begin VB.Line Line2
- BorderColor = &H00FFFFFF&
- BorderStyle = 6 'Inside Solid
- DrawMode = 16 'Merge Pen
- X1 = 3930
- X2 = 3930
- Y1 = 3360
- Y2 = 120
- End
- Begin VB.Line Line3
- BorderColor = &H00808080&
- X1 = 30
- X2 = 7920
- Y1 = 630
- Y2 = 630
- End
- Begin VB.Line Line4
- BorderColor = &H80000005&
- X1 = 30
- X2 = 7920
- Y1 = 660
- Y2 = 660
- End
- Begin VB.Line Line5
- BorderColor = &H00808080&
- X1 = 60
- X2 = 7920
- Y1 = 1290
- Y2 = 1290
- End
- Begin VB.Line Line6
- BorderColor = &H80000005&
- X1 = 30
- X2 = 7920
- Y1 = 1320
- Y2 = 1320
- End
- Begin VB.Line Line7
- BorderColor = &H00808080&
- X1 = 90
- X2 = 7980
- Y1 = 2460
- Y2 = 2460
- End
- Begin VB.Line Line8
- BorderColor = &H80000005&
- X1 = 90
- X2 = 7950
- Y1 = 2490
- Y2 = 2490
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 19
- Top = 0
- Width = 7785
- _ExtentX = 13732
- _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 = 6
- 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 = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- End
- Begin VSFlex8Ctl.VSFlexGrid cxbbgrid
- Height = 1215
- Left = 510
- TabIndex = 20
- Top = 1890
- 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 MSComctlLib.ImageList ImageList1
- Left = 7140
- Top = 1200
- _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":1042
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":13DC
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":1776
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":1B10
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":1EAA
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":2244
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":25DE
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":2978
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":2D12
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":30AC
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":3446
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":37E0
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":3B7A
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":3F14
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":42AE
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":4648
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":49E2
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":4D7C
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":5116
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":54B0
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":584A
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":5BE4
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":5F7E
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":6318
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":66B2
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":6A4C
- Key = "dz"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":6DE6
- Key = "ph"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":7180
- Key = "fz"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":751A
- Key = "dw"
- EndProperty
- BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":78B4
- Key = "hf"
- EndProperty
- BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":7C4E
- Key = "pz"
- EndProperty
- BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_银行余额表.frx":7FE8
- Key = "check"
- EndProperty
- EndProperty
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Height = 180
- Index = 1
- Left = 1440
- TabIndex = 22
- Top = 720
- Width = 90
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Height = 180
- Index = 2
- Left = 5700
- TabIndex = 21
- Top = 720
- Width = 90
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "银行科目:"
- Height = 180
- Index = 0
- Left = 600
- TabIndex = 25
- Top = 720
- Width = 810
- End
- Begin VB.Label Label3
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "Label3"
- Height = 15
- Index = 5
- Left = 0
- TabIndex = 24
- Top = 0
- Width = 7545
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "启用日期:"
- Height = 180
- Left = 4740
- TabIndex = 23
- Top = 720
- Width = 810
- End
- End
- Attribute VB_Name = "YH_FrmYeCx"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*********************************************************************************************************
- '* 模 块 名 称 :银行余额表查询
- '* 功 能 描 述 :此功能模块主要完成银行余额调节表的显示.打印等。
- '* 程序员姓名 :xjl
- '* 最后修改人 :xjl
- '* 最后修改时间:2001/07/13
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '*********************************************************************************************************
- '以下为固定使用变量(网格)
- 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 changelock 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 Form_Load()
- Dim rs As New ADODB.Recordset
- '定义可变部分变量
- 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
- Label2(1).Caption = YH_FrmYeb.CxbbGrid.TextMatrix(YH_FrmYeb.CxbbGrid.Row, 0)
- '查询启用日期
- SQL_Str = "Select * From CWZZ_BankBill Where rectype=0 And Ccode='" & Val(Label2(1).Caption) & "'"
- Set rs = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
- If rs.EOF = False Then
- Label2(2).Caption = Format(rs.Fields("billdate"), "yyyy年mm月dd日")
- Else
- Label2(2).Caption = Format(Now, "yyyy-mm-dd")
- End If
- Call XSSJ
- Call Sub_ShowBill
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- With CxbbGrid
- .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 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" '退出
- Unload Me
- Case "bz"
- Call F1bz
- 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
- Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) '字段按F2键提供帮助
- 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)
- 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
- LrText(Index) = Format(LrText(Index), "0.00")
- 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
- If Textboolean(Jsqte, 1) Then
- 'If Jsqte <> 0 And Not Textboolean(Jsqte, 3) Then
- ' Load Ydcommand1(Jsqte)
- 'End If
- 'Ydcommand1(Jsqte).Visible = True
- 'Ydcommand1(Jsqte).Move LrText(Jsqte).Left + LrText(Jsqte).Width, LrText(Jsqte).Top
- End If
- 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()
- Dim RecTemp As New ADODB.Recordset
- TextChangeLock = True
- If Trim(YH_FrmYeb.CxbbGrid.TextMatrix(YH_FrmYeb.CxbbGrid.Row, 4)) = "" Then
- LrText(4).Text = "0.00"
- Else
- LrText(4).Text = YH_FrmYeb.CxbbGrid.TextMatrix(YH_FrmYeb.CxbbGrid.Row, 4)
- End If
- If Trim(YH_FrmYeb.CxbbGrid.TextMatrix(YH_FrmYeb.CxbbGrid.Row, 3)) = "" Then
- LrText(0).Text = "0.00"
- Else
- LrText(0).Text = YH_FrmYeb.CxbbGrid.TextMatrix(YH_FrmYeb.CxbbGrid.Row, 3)
- End If
- '从银行对帐期初数据
- SQL_Str = "select sum(jfje) as jfje, sum(dfje) as dfje from cwzz_bankbill where rectype=1 and bdelete=0 and ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
- If RecTemp.EOF = False Then
- If IsNull(RecTemp.Fields!jfje) = False Then
- LrText(1) = RecTemp.Fields!jfje
- End If
- If IsNull(RecTemp.Fields!dfje) = False Then
- LrText(2) = RecTemp.Fields!dfje
- End If
- Else
- LrText(1) = 0
- LrText(2) = 0
- End If
- '银行本期数据
- SQL_Str = "select sum(jfje) as jfje, sum(dfje) as dfje from cwzz_bankbill where rectype=2 and bdelete=0 and ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
- If RecTemp.EOF = False Then
- If IsNull(RecTemp.Fields!jfje) = False Then
- LrText(2) = Val(LrText(2)) + RecTemp.Fields!jfje
- End If
- If IsNull(RecTemp.Fields!dfje) = False Then
- LrText(1) = Val(LrText(1)) + RecTemp.Fields!dfje
- End If
- End If
- '单位期初数据
- SQL_Str = "select sum(jfje) as jfje,sum(dfje) as dfje from cwzz_rjznotcheck where rectype=1 and bdelete=0 and ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
- If RecTemp.EOF = False Then
- If IsNull(RecTemp.Fields!jfje) = False Then
- LrText(5) = Val(LrText(5)) + RecTemp.Fields!jfje
- End If
- If IsNull(RecTemp.Fields!dfje) = False Then
- LrText(6) = Val(LrText(6)) + RecTemp.Fields!dfje
- End If
- Else
- LrText(5) = 0
- LrText(6) = 0
- End If
- '本期发生数据
- SQL_Str = "Select SUM(JFJE) As Jfje,SUM(DFJE) As Dfje From Cwzz_V_AccVouch where Ccode='" & Val(Label2(1).Caption) & "' " _
- & "And Convert(Char(8),Ddate,112)>=(Select Convert(Char(8),Ddate,112) From " _
- & "Cwzz_RjzNotCheck Where RecType=0 And Ccode='" & Val(Label2(1).Caption) & "') And BDelete=0 " _
- & "And Convert(Char(6),Ddate,112)<=(select Convert(Char(6),max(qsrq),112) from gy_kjrlb where cwzzjzbz='1')"
- 'SQL_Str = "select sum(jfje) as jfje, sum(dfje) as dfje from cwzz_accvouchsub where bdelete=0 and ccode='" & Val(Label2(1).Caption) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
- If RecTemp.EOF = False Then
- If IsNull(RecTemp.Fields!jfje) = False Then
- LrText(5) = Val(LrText(5)) + RecTemp.Fields!jfje
- End If
- If IsNull(RecTemp.Fields!dfje) = False Then
- LrText(6) = Val(LrText(6)) + RecTemp.Fields!dfje
- End If
- End If
- '窗体调入时,计算调整前余额,调整后余额,转换各金额
- LrText(3) = Val(Format(LrText(0).Text, "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(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
- 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