ʰ
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:167k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{C5DE3F80-3376-11D2-BAA4-04F205C10000}#1.0#0"; "VSFLEX6D.OCX"
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Begin VB.Form yh_dzdqclrfrm
- Caption = "对帐单期初录入"
- ClientHeight = 5235
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 8820
- LinkTopic = "Form1"
- ScaleHeight = 5235
- ScaleWidth = 8820
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton YdCommand1
- Height = 289
- Left = 570
- Picture = "银行_对帐单期初录入.frx":0000
- Style = 1 'Graphical
- TabIndex = 40
- Top = 750
- Visible = 0 'False
- Width = 285
- End
- Begin VB.CommandButton Ydcommand
- Height = 289
- Left = 0
- Picture = "银行_对帐单期初录入.frx":03A2
- Style = 1 'Graphical
- TabIndex = 39
- Top = 0
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Frame Frame1
- BackColor = &H80000018&
- Height = 855
- Left = 240
- TabIndex = 14
- Top = 5910
- Width = 10215
- Begin VB.Label Lab_Memo
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000018&
- BorderStyle = 1 'Fixed Single
- Caption = "备 注"
- ForeColor = &H80000008&
- Height = 675
- Index = 1
- Left = 30
- TabIndex = 16
- Top = 120
- Width = 285
- WordWrap = -1 'True
- End
- Begin VB.Label Lab_Memo
- Appearance = 0 'Flat
- BackColor = &H80000018&
- BorderStyle = 1 'Fixed Single
- ForeColor = &H00FF0000&
- Height = 675
- Index = 0
- Left = 330
- TabIndex = 15
- Top = 120
- Width = 9825
- End
- End
- Begin VB.ComboBox YdCombo
- Height = 300
- Left = 7170
- Style = 2 'Dropdown List
- TabIndex = 9
- Top = 600
- Visible = 0 'False
- Width = 1155
- End
- Begin VB.TextBox LrText
- Appearance = 0 'Flat
- ForeColor = &H00FF0000&
- Height = 300
- Index = 1
- Left = 5280
- TabIndex = 8
- Text = "1"
- Top = 1410
- Width = 1155
- End
- Begin VB.TextBox LrText
- Appearance = 0 'Flat
- ForeColor = &H00FF0000&
- Height = 300
- Index = 0
- Left = 1530
- TabIndex = 7
- Text = "0"
- Top = 1440
- Width = 450
- End
- Begin VB.TextBox LrText
- Appearance = 0 'Flat
- ForeColor = &H00FF0000&
- Height = 300
- Index = 2
- Left = 8670
- TabIndex = 6
- Text = "2"
- Top = 1410
- Width = 1095
- End
- Begin VB.ComboBox Combo_Kjqj
- ForeColor = &H00FF0000&
- Height = 300
- Left = 1530
- Style = 2 'Dropdown List
- TabIndex = 5
- Top = 1080
- Width = 1545
- End
- Begin VB.TextBox LrText
- Appearance = 0 'Flat
- ForeColor = &H00FF0000&
- Height = 300
- Index = 3
- Left = 2250
- TabIndex = 4
- Text = "3"
- Top = 1440
- Width = 795
- End
- Begin VB.CheckBox Chk_Quantity
- BackColor = &H00C9ECFE&
- Caption = "科目数量核算则数量不能为零"
- Height = 285
- Left = 6330
- TabIndex = 3
- Top = 3330
- Value = 1 'Checked
- Visible = 0 'False
- Width = 2685
- End
- Begin VB.Timer Timer1
- Interval = 1
- Left = 9690
- Top = 150
- End
- Begin VB.CheckBox Chk_DeleteMess
- BackColor = &H00C9ECFE&
- Caption = "删除会计分录是否提示"
- Height = 285
- Left = 6330
- TabIndex = 2
- Top = 3030
- Value = 1 'Checked
- Visible = 0 'False
- Width = 2685
- End
- Begin MSComctlLib.Toolbar Tlb_Action
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 8820
- _ExtentX = 15558
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- Wrappable = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 33
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- Object.ToolTipText = "打印页面设置"
- ImageKey = "ymsz"
- 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 = "xz"
- Object.ToolTipText = "新增加一张单据或F5"
- ImageKey = "xz"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "修改"
- Key = "xg"
- Object.ToolTipText = "修改当前单据或F3"
- ImageKey = "xg"
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "删除"
- Key = "sc"
- Object.ToolTipText = "删除当前单据"
- ImageKey = "sc"
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh0"
- Style = 3
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "增行"
- Key = "zh"
- Object.ToolTipText = "插入一行或Insert"
- ImageKey = "zh"
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "删行"
- Key = "sh"
- Object.ToolTipText = "删除当前记录行或Delete"
- ImageKey = "sh"
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh1"
- Style = 3
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "保存"
- Key = "bc"
- Object.ToolTipText = "保存单据或F6"
- ImageKey = "bc"
- EndProperty
- BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "放弃"
- Key = "fq"
- Object.ToolTipText = "放弃此次操作"
- ImageKey = "fq"
- EndProperty
- BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh2"
- Style = 3
- EndProperty
- BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "查询"
- Key = "cx"
- ImageKey = "cx"
- EndProperty
- BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh3"
- Style = 3
- EndProperty
- BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "审核"
- Key = "shsh"
- ImageKey = "shsh"
- EndProperty
- BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "弃审"
- Key = "shqs"
- ImageKey = "fq"
- EndProperty
- BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "标错"
- Key = "shbc"
- ImageKey = "shbc"
- EndProperty
- BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh7"
- Style = 3
- EndProperty
- BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "余额"
- Key = "ye"
- Object.ToolTipText = "查询科目最新余额"
- ImageKey = "ye"
- EndProperty
- BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "选项"
- Key = "xx"
- Object.ToolTipText = "填制凭证选项"
- ImageKey = "xx"
- EndProperty
- BeginProperty Button23 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh4"
- Style = 3
- EndProperty
- BeginProperty Button24 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "全审"
- Key = "qbsh"
- ImageKey = "shqs"
- EndProperty
- BeginProperty Button25 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "全弃"
- Key = "qbfq"
- ImageKey = "qbfq"
- EndProperty
- BeginProperty Button26 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh6"
- Style = 3
- EndProperty
- BeginProperty Button27 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "首张"
- Key = "first"
- ImageKey = "first"
- EndProperty
- BeginProperty Button28 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "上张"
- Key = "prev"
- ImageKey = "prev"
- EndProperty
- BeginProperty Button29 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "下张"
- Key = "next"
- ImageKey = "next"
- EndProperty
- BeginProperty Button30 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "末张"
- Key = "last"
- ImageKey = "last"
- EndProperty
- BeginProperty Button31 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "fgh5"
- Style = 3
- EndProperty
- BeginProperty Button32 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button33 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "fh"
- EndProperty
- EndProperty
- BorderStyle = 1
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 9090
- Top = 150
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 24
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":0744
- Key = "yl"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":0C88
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":0D9C
- Key = "fq"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":0EB0
- Key = "ymsz"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":1604
- Key = "xg"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":1A58
- Key = "zh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":20C8
- Key = "fh"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":23E4
- Key = "xz"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":24F8
- Key = "sc"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":260C
- Key = "bc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":2720
- Key = "cx"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":2834
- Key = "bz"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":2948
- Key = "first"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":2A5C
- Key = "prev"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":2B70
- Key = "next"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":2C84
- Key = "last"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":2D98
- Key = "sh"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":32B4
- Key = "ye"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":3708
- Key = "xx"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":3B5C
- Key = "shsh"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":3FB0
- Key = "shbc"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":4404
- Key = "shqs"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":4758
- Key = ""
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "银行_对帐单期初录入.frx":4D4C
- Key = "qbfq"
- EndProperty
- EndProperty
- End
- Begin VSFlex6DAOCtl.vsFlexGrid WglrGrid
- Height = 4125
- Left = 240
- TabIndex = 10
- Top = 1860
- Width = 10215
- _ExtentX = 18018
- _ExtentY = 7276
- _ConvInfo = 1
- 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 = -2147483624
- 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 = 10
- 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
- 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 'False
- ShowComboButton = -1 'True
- WordWrap = -1 'True
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- Begin VB.CheckBox Chk_CodeOutput
- BackColor = &H00C9ECFE&
- Caption = "打印凭证是否输出科目编码"
- Height = 255
- Left = 6060
- TabIndex = 12
- Top = 1740
- Visible = 0 'False
- Width = 2685
- End
- Begin VB.CheckBox Chk_CheckNext
- Caption = "审核凭证时是否自动跳到下张"
- Height = 285
- Left = 6060
- TabIndex = 11
- Top = 2070
- Value = 1 'Checked
- Visible = 0 'False
- Width = 2745
- End
- Begin VSFlex6DAOCtl.vsFlexGrid HjGrid
- Height = 705
- Left = 0
- TabIndex = 13
- Top = 3270
- Width = 7545
- _ExtentX = 13309
- _ExtentY = 1244
- _ConvInfo = 1
- Appearance = 1
- BorderStyle = 0
- 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 = -2147483624
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483643
- ForeColorSel = -2147483640
- BackColorBkg = -2147483624
- BackColorAlternate= -2147483624
- 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 = 10
- 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
- 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 'False
- ShowComboButton = -1 'True
- WordWrap = -1 'True
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- End
- End
- Begin VB.TextBox Ydtext
- BackColor = &H00C0FFFF&
- BorderStyle = 0 'None
- Height = 330
- Left = 7110
- MultiLine = -1 'True
- TabIndex = 1
- Top = 120
- Visible = 0 'False
- Width = 1185
- End
- Begin VB.Shape Shape1
- BackColor = &H00C9ECFE&
- BackStyle = 1 'Opaque
- Height = 6585
- Index = 2
- Left = 180
- Top = 720
- Width = 10455
- End
- Begin VB.Shape Shape1
- BackColor = &H00C9ECFE&
- BackStyle = 1 'Opaque
- Height = 6585
- Index = 1
- Left = 150
- Top = 690
- Width = 10455
- End
- Begin VB.Shape Shape1
- BackColor = &H00C9ECFE&
- BackStyle = 1 'Opaque
- Height = 6585
- Index = 0
- Left = 120
- Top = 660
- Width = 10455
- End
- Begin VB.Label TsLabel
- BackColor = &H80000018&
- BackStyle = 0 'Transparent
- Caption = "记 帐 凭 证"
- BeginProperty Font
- Name = "隶书"
- Size = 18
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00E0E0E0&
- Height = 330
- Index = 6
- Left = 4440
- TabIndex = 38
- Top = 750
- Width = 2265
- End
- Begin VB.Label TsLabel
- BackColor = &H80000018&
- BackStyle = 0 'Transparent
- Caption = "记 帐 凭 证"
- BeginProperty Font
- Name = "隶书"
- Size = 18
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FF8080&
- Height = 330
- Index = 4
- Left = 4410
- TabIndex = 37
- Top = 720
- Width = 2115
- End
- Begin VB.Line Line1
- BorderColor = &H000000FF&
- Index = 1
- X1 = 4110
- X2 = 6690
- Y1 = 1215
- Y2 = 1215
- End
- Begin VB.Line Line1
- BorderColor = &H000000FF&
- Index = 0
- X1 = 4110
- X2 = 6690
- Y1 = 1170
- Y2 = 1170
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "制单日期"
- Height = 255
- Index = 1
- Left = 4470
- TabIndex = 36
- Top = 1470
- Width = 825
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "类别字号"
- Height = 225
- Index = 0
- Left = 750
- TabIndex = 35
- Top = 1500
- Width = 825
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "附单据数"
- Height = 255
- Index = 2
- Left = 7890
- TabIndex = 34
- Top = 1470
- Width = 825
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "制单:"
- Height = 225
- Index = 5
- Left = 8580
- TabIndex = 33
- Top = 6900
- Width = 525
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "审核:"
- Height = 225
- Index = 7
- Left = 6705
- TabIndex = 32
- Top = 6900
- Width = 495
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "记帐:"
- Height = 225
- Index = 8
- Left = 2655
- TabIndex = 31
- Top = 6900
- Width = 645
- End
- Begin VB.Label Lab_Book
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- ForeColor = &H000000FF&
- Height = 225
- Left = 3210
- TabIndex = 30
- Top = 6900
- Width = 735
- End
- Begin VB.Label Lab_Checker
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- ForeColor = &H000000FF&
- Height = 225
- Left = 7260
- TabIndex = 29
- Top = 6900
- Width = 735
- End
- Begin VB.Label Lab_Bill
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- ForeColor = &H000000FF&
- Height = 225
- Left = 9120
- TabIndex = 28
- Top = 6870
- Width = 735
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "会计期间"
- Height = 255
- Index = 9
- Left = 750
- TabIndex = 27
- Top = 1140
- Width = 825
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "字"
- Height = 195
- Index = 10
- Left = 2040
- TabIndex = 26
- Top = 1500
- Width = 255
- End
- Begin VB.Label Lab_OperStatus
- BackColor = &H000080FF&
- Caption = "1"
- Height = 345
- Left = 8730
- TabIndex = 25
- Top = 570
- Visible = 0 'False
- Width = 345
- End
- Begin VB.Label Lab_Row
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- ForeColor = &H00FF0000&
- Height = 225
- Left = 9030
- TabIndex = 24
- Top = 1140
- Width = 315
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "(第"
- Height = 255
- Index = 11
- Left = 8730
- TabIndex = 23
- Top = 1140
- Width = 315
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "行)"
- Height = 255
- Index = 12
- Left = 9360
- TabIndex = 22
- Top = 1140
- Width = 405
- End
- Begin VB.Label Lab_Pzclzt
- BackColor = &H0000FFFF&
- Caption = "1"
- ForeColor = &H00808080&
- Height = 255
- Left = 8400
- TabIndex = 21
- Top = 630
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "当前记录"
- Height = 255
- Index = 13
- Left = 7890
- TabIndex = 20
- Top = 1140
- Width = 825
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "会计主管:"
- Height = 225
- Index = 3
- Left = 420
- TabIndex = 19
- Top = 6900
- Width = 855
- End
- Begin VB.Label TsLabel
- BackStyle = 0 'Transparent
- Caption = "出纳:"
- Height = 225
- Index = 14
- Left = 4680
- TabIndex = 18
- Top = 6900
- Width = 645
- End
- Begin VB.Label Lab_Error
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Caption = "有错"
- BeginProperty Font
- Name = "隶书"
- Size = 15.75
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 360
- Left = 150
- TabIndex = 17
- Top = 690
- Visible = 0 'False
- Width = 735
- End
- End
- Attribute VB_Name = "yh_dzdqclrfrm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*********************************************************************************************************
- '* 模 块 名 称 :记帐凭证处理
- '* 功 能 描 述 :此功能模块主要完成凭证录入、修改、删除、预览打印等。
- '* 程序员姓名 : 张建忠
- '* 最后修改人 : 张建忠
- '* 最后修改时间:2000/09/23
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '*
- '* 1.每次调入外部功能窗体,均要加锁ChangeLock=True,窗体关闭后解锁ChangeLock=false
- '*
- '* 2.网格列存储内容注解
- '* 0-行有效标识 1-结算方式编码 2-结算方式名称 3-票号 4-发生日期 5-数量 6-用户录入单价(显示时自动计算)
- '* 7-计量单位 8-外币编码 9-外币名称 10-外币金额 11-汇率 12-部门编码 13-部门名称
- '* 14-单位编码 15-单位名称 16-职员编码 17-职员名称 18-项目大类编码 19-项目大类名称
- '* 20-项目编码 21-项目名称 22-项目数量 23-项目计量单位 24-经办人
- '*
- '* 索引对照:001-摘要 002-科目编码 003-科目名称 004-借方金额 005-贷方金额
- '*
- '* 3.Lab_OperStatus 用此标签来标识单据录入状态(默认值为1) "1"-浏览 "2"-新增 "3"-修改
- '*
- '* 4.Lab_Pzclzt 用此标签来标识凭证处理状态(默认值为1) "1"-填制凭证 "2"-查询凭证列表 "3"-审核凭证
- '*
- '* 5.原则:只要单据能够存盘(无论修改或新增)则其必须接受完整性及有效性规则检查
- '*
- '*********************************************************************************************************
- '[以下为根据实际情况设置变量
- Dim Rec_AccVouch As New ADODB.Recordset '凭证动态集
- Dim Int_AssCount As Integer '辅助核算项目总数
- Dim Bln_AssShow() As Boolean '辅助核算项目是否显示
- Dim Bln_AssHelp() As Boolean '辅助核算项目是否有帮助
- Dim Str_Digest As String '最后录入的一条凭证分录的摘要内容
- Dim Bln_BillChange As Boolean '标识单据是否发生改动
- ']
- '以下为固定使用变量(网格)
- Dim Cxnrrec As New ADODB.Recordset '显示查询内容动态集
- 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 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)
- '以下为固定使用变量(文本框)
- 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 TextValiLock As Boolean '文本框失去焦点是否进行有效性控制判断
- Dim TextValiJudgeLock() As Boolean '文本框录入有效性判断控制锁
- Dim TextChangeLock As Boolean '文本框内容变换控制锁
- Dim Bln_Cancel As Boolean '取消按钮信息传递
- Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
- Dim jdzygs As Integer
- jdzygs = 3
- Select Case KeyAscii
- Case vbKeyReturn
- If Kjjdzy(LrbmsFrm, jdzygs) Then
- KeyAscii = 0
- End If
- Case 39 '屏蔽字符"'"
- KeyAscii = 0
- End Select
- End Sub
- Private Sub Form_Load() '窗 体 装 入
- '初始化各种锁值
- changelock = False '网格行列改变控制锁
- Gdtlock = False '滚动条滚动控制
- Yxxpdlock = True '字段有效性判断锁
- Hyxxpdlock = True '行有效性判断锁
- Wbkbhlock = False '文本框内容改变锁
- '[>>开始 设置辅助核算项目属性
- Int_AssCount = 13
- ReDim Bln_AssShow(Int_AssCount - 1)
- ReDim Bln_AssHelp(Int_AssCount - 1)
- Bln_AssHelp(0) = True '结算方式
- Bln_AssHelp(2) = True '发生日期
- Bln_AssHelp(7) = True '部门
- Bln_AssHelp(8) = True '往来单位
- Bln_AssHelp(9) = True '个人
- Bln_AssHelp(10) = True '项目
- Bln_AssHelp(12) = True '经办人
- '填充会计期间列表框(年度默认为用户选择年度)
- Call Sub_FillPeriod(Combo_Kjqj, Xtyear, Xtmm)
- '完毕<<]
- '报表主标题及报表编码
- ReportTitle = "记 帐 凭 证"
- XtReportCode = "c_jzpzcl"
- Load Dyymctbl
- '以下为文本框处理程序
- TextGroupCode = "c_jzpzcl"
- Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr()) '读入文本框录入信息
- Call Wbkcsh
- '调 入 网 格
- GridCode = "c_jzpzcl" '网格属性编码
- 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
- '[>>置删行是否提示状态
- If Shsfts Then
- Chk_DeleteMess.Value = 1
- Else
- Chk_DeleteMess.Value = 0
- End If
- '<<]
- '初始化合计网格
- Call Cshhjwg
- '单据变动置为False
- Bln_BillChange = False
- '装入会计科目编码帮助窗体(为加快参照速度)PZ_FrmKjkmcz
- Load PZ_FrmKjkmcz
- End Sub
- Private Sub Form_Unload(Cancel As Integer) '窗体卸载
- '卸载打印页面窗体
- Unload Dyymctbl
- '卸载会计科目编码参照窗体
- PZ_FrmKjkmcz.UnloadCheck.Value = 1
- Unload PZ_FrmKjkmcz
- '判断凭证是否发生变化
- If Bln_BillChange Then
- Xtfhcs = "1"
- Else
- Xtfhcs = "0"
- End If
- End Sub
- Private Sub Timer1_Timer() '根据不同凭证或单据状态处理不同的数据初始化
- '关闭定时器
- Timer1.Enabled = False
- '调入数据初始化模块
- Call Sjcsh(Trim(Lab_Pzclzt.Caption))
- End Sub
- Private Sub Sjcsh(Str_Pzclzt As String) '数据初始化模块(根据实际情况)
- Dim SQLSTR As String '查询凭证列表条件
- '[>>根据实际情况初始化
- Select Case Str_Pzclzt
- Case "1" '填制凭证
- '设置工具条显示
- With Tlb_Action
- .Buttons("first").Visible = False '首张
- .Buttons("prev").Visible = False '上张
- .Buttons("next").Visible = False '下张
- .Buttons("last").Visible = False '末张
- .Buttons("fgh5").Visible = False '分隔行
- .Buttons("shsh").Visible = False '审核
- .Buttons("shqs").Visible = False '弃审
- .Buttons("shbc").Visible = False '标错
- .Buttons("qbsh").Visible = False '全审
- .Buttons("qbfq").Visible = False '全弃
- .Buttons("fgh6").Visible = False '分隔行
- .Buttons("fgh7").Visible = False '分隔行
- End With
- '日期默认值为用户选择日期
- LrText(1).Text = Xtrq
- '设置操作状态为浏览
- Lab_OperStatus = "1"
- Call Sub_OperStatus("10")
- Case "2" '查询凭证(凭证列表)
- '设置工具条显示
- With Tlb_Action
- .Buttons("cx").Visible = False '查询
- .Buttons("fgh3").Visible = False '分割行
- .Buttons("xz").Visible = False '新增
- .Buttons("sc").Visible = False '删除
- .Buttons("shsh").Visible = False '审核
- .Buttons("shqs").Visible = False '弃审
- .Buttons("shbc").Visible = False '标错
- .Buttons("qbsh").Visible = False '全审
- .Buttons("qbfq").Visible = False '全弃
- .Buttons("fgh6").Visible = False '分隔行
- .Buttons("fgh7").Visible = False '分隔行
- End With
- Call Sub_ShowBill
- '设置操作状态为浏览
- Lab_OperStatus.Caption = "1"
- '设置工具条状态
- Call Sub_OperStatus("11")
- Case "3" '审核凭证
- '设置工具条显示
- With Tlb_Action
- .Buttons("xz").Visible = False '新增
- .Buttons("xg").Visible = False '修改
- .Buttons("sc").Visible = False '删除
- .Buttons("fgh0").Visible = False '分隔行
- .Buttons("zh").Visible = False '增行
- .Buttons("sh").Visible = False '删行
- .Buttons("fgh1").Visible = False '分隔行
- .Buttons("bc").Visible = False '保存
- .Buttons("fq").Visible = False '放弃
- .Buttons("fgh2").Visible = False '分隔行
- .Buttons("cx").Visible = False '查询
- .Buttons("fgh3").Visible = False '分割行
- End With
- Call Sub_ShowBill
- '设置操作状态为浏览
- Lab_OperStatus.Caption = "1"
- '设置工具条状态
- Call Sub_OperStatus("11")
- End Select
- '<<]
- '重 置 网 格
- Call Sub_AdjustGrid
- End Sub
- Private Sub Sub_ShowBill() '根据当前单据号显示整张单据内容
- Dim SQLSTR As String
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Jsqte As Long '临时计数器
- '[>>计算会计期间
- Int_Year = Val(Mid(Combo_Kjqj.Text, 1, 4))
- Int_Period = Val(Mid(Combo_Kjqj.Text, 6, 2))
- '<<]
- SQLSTR = "SELECT Cwzz_AccVouch.*,Cwzz_AccCode.Cname,Cwzz_AccCode.Measure,Gy_ForeignCurrency.ForeignCurrName AS ForeignCurrName," & _
- " Gy_Person.PersonName AS PersonName, Cwzz_Item.ItemName AS ItemName,Cwzz_ItemClass.ItemClassName," & _
- " Cwzz_Settlement.SSName AS SSName, Gy_Customer.CusName AS CusName,Gy_Department.DeptName as DeptName" & _
- " FROM Cwzz_AccVouch LEFT OUTER JOIN" & _
- " Cwzz_AccCode ON" & _
- " Cwzz_AccVouch.Ccode = Cwzz_AccCode.Ccode LEFT OUTER JOIN" & _
- " Gy_ForeignCurrency ON" & _
- " Cwzz_AccVouch.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode LEFT OUTER Join " & _
- " Gy_Person ON" & _
- " Cwzz_AccVouch.PersonCode = Gy_Person.PersonCode LEFT OUTER JOIN" & _
- " Cwzz_Item ON Cwzz_AccVouch.ItemClassCode = Cwzz_Item.ItemClassCode AND" & _
- " Cwzz_AccVouch.ItemCode = Cwzz_Item.ItemCode LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccVouch.ItemClassCode = Cwzz_ItemClass.ItemClassCode LEFT OUTER JOIN" & _
- " Gy_Customer ON" & _
- " Cwzz_AccVouch.CusCode = Gy_Customer.CusCode LEFT OUTER JOIN" & _
- " Gy_Department ON" & _
- " Cwzz_AccVouch.DeptCode = Gy_Department.DeptCode LEFT OUTER JOIN" & _
- " Cwzz_Settlement ON Cwzz_AccVouch.SSCode = Cwzz_Settlement.SSCode" & _
- " Where Rectype=0 And Year=" & Int_Year & " and Period=" & Int_Period & " And VouchClassCode='" & Trim(LrText(0).Text) & "' And VouchNo=" & Val(LrText(3).Text) & _
- " ORDER BY I_id "
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
- With RecTemp
- WglrGrid.Clear 1
- If .EOF Then
- Exit Sub
- Else
- WglrGrid.Rows = .RecordCount + WglrGrid.FixedRows
- '[>>显示单据头
- TextChangeLock = True
- If IsDate(.Fields("DDate")) Then
- LrText(1).Text = Format(.Fields("Ddate"), "yyyy-mm-dd") '制单日期
- End If
- LrText(2).Text = Trim(Str(.Fields("Doc"))) '附单据数
- Lab_Bill.Caption = Trim(.Fields("Bill") & "") '制单人
- If .Fields("CheckFlag") Then
- Lab_Checker.Caption = Trim(.Fields("Checker") & "") '审核人
- Else
- Lab_Checker.Caption = ""
- End If
- If .Fields("BookFlag") Then
- Lab_Book.Caption = Trim(.Fields("Book") & "") '记帐人
- Else
- Lab_Book.Caption = ""
- End If
- If .Fields("ErrorFlag") Then '是否为有错凭证
- Lab_Error.Visible = True
- Else
- Lab_Error.Visible = False
- End If
- TextChangeLock = False
- '<<]
- 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) = Trim(.Fields("SScode") & "") '结算方式编码
- WglrGrid.TextMatrix(Jsqte, 2) = Trim(.Fields("SSname") & "") '结算方式名称
- WglrGrid.TextMatrix(Jsqte, 3) = Trim(.Fields("BillNo") & "") '票号
- If IsDate(.Fields("BillDate")) Then
- WglrGrid.TextMatrix(Jsqte, 4) = Format(.Fields("BillDate"), "yyyy-mm-dd") '发生日期
- End If
- If .Fields("Jfsl") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, 5) = Trim(Str(.Fields("Jfsl"))) '数量
- End If
- If .Fields("Dfsl") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, 5) = Trim(Str(.Fields("Dfsl"))) '数量
- End If
- WglrGrid.TextMatrix(Jsqte, 7) = Trim(.Fields("Measure") & "") '计量单位
- WglrGrid.TextMatrix(Jsqte, 8) = Trim(.Fields("ForeignCurrCode") & "") '外币编码
- WglrGrid.TextMatrix(Jsqte, 9) = Trim(.Fields("ForeignCurrName") & "") '外币名称
- If .Fields("Wbjfje") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, 10) = Trim(Str(.Fields("Wbjfje"))) '外币金额
- End If
- If .Fields("Wbdfje") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, 10) = Trim(Str(.Fields("Wbdfje"))) '外币金额
- End If
- If .Fields("AccRate") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, 11) = Trim(Str(.Fields("AccRate"))) '记帐汇率
- End If
- WglrGrid.TextMatrix(Jsqte, 12) = Trim(.Fields("DeptCode") & "") '部门编码
- WglrGrid.TextMatrix(Jsqte, 13) = Trim(.Fields("DeptName") & "") '部门名称
- WglrGrid.TextMatrix(Jsqte, 14) = Trim(.Fields("CusCode") & "") '单位编码
- WglrGrid.TextMatrix(Jsqte, 15) = Trim(.Fields("CusName") & "") '单位名称
- WglrGrid.TextMatrix(Jsqte, 16) = Trim(.Fields("PersonCode") & "") '职员编码
- WglrGrid.TextMatrix(Jsqte, 17) = Trim(.Fields("PersonName") & "") '职员名称
- WglrGrid.TextMatrix(Jsqte, 18) = Trim(.Fields("ItemClassCode") & "") '项目类别编码
- WglrGrid.TextMatrix(Jsqte, 19) = Trim(.Fields("ItemClassName") & "") '项目类别名称
- WglrGrid.TextMatrix(Jsqte, 20) = Trim(.Fields("ItemCode") & "") '项目编码
- WglrGrid.TextMatrix(Jsqte, 21) = Trim(.Fields("ItemName") & "") '项目名称
- If .Fields("ItemJfsl") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, 22) = Trim(Str(.Fields("ItemJfsl"))) '项目数量
- End If
- If .Fields("ItemDfsl") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, 22) = Trim(Str(.Fields("ItemDfsl"))) '项目数量
- End If
- WglrGrid.TextMatrix(Jsqte, 24) = Trim(.Fields("TranPerson") & "") '经办人
- WglrGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("Digest")) '摘 要
- WglrGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("Ccode")) '科目编码
- WglrGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Cname") & "") '科目名称
- If .Fields("Jfje") <> 0 Then
- WglrGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(Str(.Fields("Jfje"))) '借方金额
- Else
- WglrGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(Str(.Fields("Dfje"))) '贷方金额
- End If
- '<<]
- WglrGrid.RowHeight(Jsqte) = Sjhgd
- .MoveNext
- Jsqte = Jsqte + 1
- Loop
- End With
- '调整网格
- Call Sub_AdjustGrid
- '显示备注信息
- Call Sub_ShowMemo(WglrGrid.Row)
- '计算合计数据
- For Jsqte = Qslz To WglrGrid.Cols - 1
- Call Sjhj(Jsqte)
- Next Jsqte
- 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" '预 览
- If Fun_Drfrmyxxpd Then
- Call bbyl(True)
- End If
- Case "dy" '打 印
- If Fun_Drfrmyxxpd Then
- Call bbyl(False)
- End If
- Case "xz" '新 增
- Call Sub_AddBill
- Case "xg" '修 改
- Call Sub_EditBill
- Case "sc" '删 除
- Call Sub_DeleteBill
- Case "zh" '增 行
- Call zjlrfl
- Case "sh" '删 行
- Call Scdqfl
- Case "bc" '保 存
- If Fun_Drfrmyxxpd Then
- Call Sub_SaveBill
- End If
- Case "fq" '放 弃
- Call Sub_AbandonBill
- Case "cx" '查 询
- Call Sub_QueryBill
- Case "ye" '余 额
- PZ_FrmYecx.Show 1
- Case "xx" '选 项
- Call Sub_Option
- Case "shsh" '审 核
- Call Sub_CheckBill
- Case "shqs" '弃 审
- Call Sub_AbandonCheck
- Case "shbc" '标 错
- Call Sub_ErrorBill
- Case "qbsh" '全 审
- Call Sub_CheckAllBill
- Case "qbfq" '全 弃
- Call Sub_AbandonAllCheck
- Case "first" '首 张
- Call Sub_First
- Case "prev" '上 张
- Call Sub_Prev
- Case "next" '下 张
- Call Sub_next
- Case "last" '末 张
- Call Sub_Last
- Case "bz" '帮 助
- Call F1bz
- Case "fh" '退 出
- Unload Me
- End Select
- '解 锁
- Valilock = False
- changelock = False
- End Sub
- Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) '支持热键操作
- Select Case KeyCode
- Case vbKeyF5 '增加凭证
- If Tlb_Action.Buttons("xz").Enabled Then
- Call Sub_AddBill
- End If
- Case vbKeyF3 '修改凭证
- If Tlb_Action.Buttons("xg").Enabled Then
- Call Sub_EditBill
- End If
- Case vbKeyF6 '保存凭证
- If Tlb_Action.Buttons("bc").Enabled Then
- Call Sub_SaveBill
- End If
- End Select
- 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 Sub_OperStatus(Str_Status As String) '工具条依据不同状态所进行的变化
- With Tlb_Action
- Select Case Str_Status
- Case "10" '浏览(系统进入、放弃新增单据、填制凭证时删除单据,凭证审核)
- '工具条
- .Buttons("dy").Enabled = True '打印
- .Buttons("yl").Enabled = True '预览
- .Buttons("xz").Enabled = True '新增
- .Buttons("xg").Enabled = False '修改
- .Buttons("sc").Enabled = False '删除
- .Buttons("zh").Enabled = False '增行
- .Buttons("sh").Enabled = False '删行
- .Buttons("cx").Enabled = True '查询
- .Buttons("bc").Enabled = False '保存
- .Buttons("fq").Enabled = False '放弃
- '录入文本框
- For Jsqte = Max_Text_Index To 0 Step -1
- LrText(Jsqte).Enabled = False
- Next Jsqte
- Combo_Kjqj.Enabled = False
- '合计金额大写显示
- HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = Fun_Jezh(Val(HjGrid.TextMatrix(0, Sydz("004", GridStr(), Szzls))))
- Case "11" '浏览(放弃修改单据,查询单据)
- '工具条
- .Buttons("dy").Enabled = True '打印
- .Buttons("yl").Enabled = True '预览
- .Buttons("xz").Enabled = True '新增
- .Buttons("xg").Enabled = True '修改
- .Buttons("sc").Enabled = True '删除
- .Buttons("zh").Enabled = False '增行
- .Buttons("sh").Enabled = False '删行
- .Buttons("cx").Enabled = True '查询
- .Buttons("bc").Enabled = False '保存
- .Buttons("fq").Enabled = False '放弃
- .Buttons("first").Enabled = True '首张
- .Buttons("prev").Enabled = True '上张
- .Buttons("next").Enabled = True '下张
- .Buttons("last").Enabled = True '末张
- '录入文本框
- For Jsqte = Max_Text_Index To 0 Step -1
- LrText(Jsqte).Enabled = False
- Next Jsqte
- Combo_Kjqj.Enabled = False
- '合计金额大写显示
- HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = Fun_Jezh(Val(HjGrid.TextMatrix(0, Sydz("004", GridStr(), Szzls))))
- Case "2" '新增单据
- '工具条
- .Buttons("dy").Enabled = False '打印
- .Buttons("yl").Enabled = False '预览
- .Buttons("xz").Enabled = False '新增
- .Buttons("xg").Enabled = False '修改
- .Buttons("sc").Enabled = False '删除
- .Buttons("zh").Enabled = True '增行
- .Buttons("sh").Enabled = True '删行
- .Buttons("cx").Enabled = False '查询
- .Buttons("bc").Enabled = True '保存
- .Buttons("fq").Enabled = True '放弃
- '录入文本框
- For Jsqte = 0 To Max_Text_Index
- LrText(Jsqte).Enabled = True
- Next Jsqte
- Combo_Kjqj.Enabled = True
- '清空合计大写
- HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = ""
- Case "30" '修改
- '工具条
- .Buttons("dy").Enabled = False '打印
- .Buttons("yl").Enabled = False '预览
- .Buttons("xz").Enabled = False '新增
- .Buttons("xg").Enabled = False '修改
- .Buttons("sc").Enabled = False '删除
- .Buttons("zh").Enabled = True '增行
- .Buttons("sh").Enabled = True '删行
- .Buttons("cx").Enabled = False '查询
- .Buttons("bc").Enabled = True '保存
- .Buttons("fq").Enabled = True '放弃
- .Buttons("first").Enabled = False '首张
- .Buttons("prev").Enabled = False '上张
- .Buttons("next").Enabled = False '下张
- .Buttons("last").Enabled = False '末张
- '录入文本框
- For Jsqte = 0 To Max_Text_Index
- LrText(Jsqte).Enabled = True
- Next Jsqte
- LrText(0).Enabled = False
- LrText(3).Enabled = False
- Combo_Kjqj.Enabled = False
- '清空合计大写
- HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = ""
- End Select
- End With
- End Sub
- Private Sub Wbkcl() '文本框录入之前处理(根据实际情况)
- Dim xswbrr As String
- With WglrGrid
- Zdlrqnr = Trim(.Text)
- xswbrr = Trim(.Text)
- If GridBoolean(.Col, 3) Then '列表框录入
- '填充列表框程序
- Call FillCombo(YdCombo, GridStr(.Col, 5), xswbrr, 0)
- Else
- Wbkbhlock = True
- '====以下为用户自定义
- Ydtext.Text = xswbrr
- '====以上为用户自定义
- Wbkbhlock = False
- Ydtext.SelStart = Len(Ydtext.Text)
- End If
- End With
- End Sub
- Private Function sjzdyxxpd(Dqpdwgh As Long, Dqpdwgl As Long) '录入数据字段有效性判断,同时进行字段录入事后处理
- Dim Str_JudgeText As String '临时有效性判断字段内容
- Dim Coljsq As Long '临时列计数器
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- With WglrGrid
- '非录入状态有效性为合法
- If Yxxpdlock Or .Row < .FixedRows Then
- sjzdyxxpd = True
- Exit Function
- End If
- Str_JudgeText = Trim(.TextMatrix(Dqpdwgh, Dqpdwgl))
- Select Case GridStr(Dqpdwgl, 1)
- '以下为自定义部分[
- Case "001" '凭证摘要(如用户录入编码正确,则自动调入摘要内容)
- If Len(Str_JudgeText) <> 0 Then
- SQLSTR = "SELECT * FROM Cwzz_Digest Where DigestCode='" & Str_JudgeText & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
- If Not RecTemp.EOF Then
- .TextMatrix(Dqpdwgh, Sydz("001", GridStr(), Szzls)) = Trim(RecTemp.Fields("DigestText"))
- End If
- '保存最后录入的一条凭证分录的摘要内容
- Str_Digest = .TextMatrix(Dqpdwgh, Sydz("001", GridStr(), Szzls))
- End If
- Case "002" '会计科目(如有效则调入科目名称,如有辅助核算则调入辅助核算项录入窗体)
- If Len(Str_JudgeText) <> 0 Then
- SQLSTR = "Select Cwzz_AccCode.* ,ItemClassName,ForeignCurrName,AccRate FROM Cwzz_AccCode " & _
- " LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccCode.ItemClassCode = Cwzz_ItemClass.ItemClassCode " & _
- " LEFT OUTER JOIN Gy_ForeignCurrency ON Cwzz_AccCode.ForeignCurrCode= Gy_ForeignCurrency.ForeignCurrCode " & _
- " Where Ccode='" & Str_JudgeText & "' OR AssCode='" & Str_JudgeText & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
- With RecTemp
- If .EOF Then
- Tsxx = "此科目不存在!"
- GoTo Lrcwcl
- Else
- If Not .Fields("EndFlag") Then
- Tsxx = "此科目非末级科目!"
- GoTo Lrcwcl
- End If
- If .Fields("StopUse") Then
- Tsxx = "此科目已停用"
- GoTo Lrcwcl
- End If
- '如果此科目存在且改变过则执行下列操作
- '1.显示科目编码,改变科目名称
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("002", GridStr(), Szzls)) = Trim(RecTemp.Fields("Ccode"))
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) = Trim(RecTemp.Fields("Cname"))
- '2.判断科目进行哪些辅助核算
- '读入外币汇率
- If Not IsNull(RecTemp.Fields("AccRate")) Then
- WglrGrid.TextMatrix(Dqpdwgh, 11) = RecTemp.Fields("AccRate")
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 11) = ""
- End If
- Call Sub_Drfzhsx(Dqpdwgh, Str_JudgeText)
- End If
- End With
- Else
- '清除所有辅助核算内容
- For Jsqte = 1 To 23
- WglrGrid.TextMatrix(Dqpdwgh, Jsqte) = ""
- Next Jsqte
- .TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) = ""
- End If
- Case "004" '借方金额
- '用户如录入借方金额,系统则自动清除贷方金额
- If Val(WglrGrid.TextMatrix(Dqpdwgh, Dqpdwgl)) <> 0 Then
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = ""
- End If
- Case "005" '贷方金额
- '用户如录入贷方金额,系统则自动清除借方金额
- If Val(WglrGrid.TextMatrix(Dqpdwgh, Dqpdwgl)) <> 0 Then
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = ""
- End If
- '2.放置字段事后处理程序
- '以上为自定义部分]
- End Select
- '字段录入正确后为零字段清空
- Call Qkwlzd(Dqpdwgh, Dqpdwgl)
- '字段录入正确后进行数据合计
- For Coljsq = Qslz To .Cols - 1
- Call Sjhj(Coljsq)
- Next Coljsq
- sjzdyxxpd = True
- Yxxpdlock = True
- Exit Function
- End With
- Lrcwcl: '录入错误处理
- With WglrGrid
- Call Xtxxts(Tsxx, 0, 1)
- changelock = True
- .Select Dqpdwgh, Dqpdwgl
- changelock = False
- Call xswbk
- sjzdyxxpd = False
- Exit Function
- End With
- End Function
- Private Function Sjhzyxxpd(ByVal Yxxpdh As Long) As Boolean '录入数据行有效性判断,同时进行行处理
- Dim Lrywlz As Long
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Bln_AssVali As Boolean '辅助核算错误
- With WglrGrid
- '判断行为空和无效数据行则清除当前行
- If Yxxpdh > (.Rows - .FixedRows) Then Exit Function
- If .TextMatrix(Yxxpdh, 0) <> "*" Then
- Sjhzyxxpd = True
- Exit Function
- Else
- If pdhwk(Yxxpdh) And Yxxpdh + 1 <= .Rows - 1 Then
- If .TextMatrix(Yxxpdh + 1, 0) <> "*" Then
- changelock = True
- .RemoveItem Yxxpdh
- If .Rows < Pmbcsjhs + .FixedRows + Fzxwghs + 1 Then
- .AddItem ""
- .RowHeight(.Rows - 1) = Sjhgd
- End If
- changelock = False
- Sjhzyxxpd = True
- Exit Function
- End If
- End If
- End If
- '行没有发生变化则不进行有效性判断
- If Hyxxpdlock Then
- Sjhzyxxpd = True
- Exit Function
- End If
- '以下为自定义部分[
- '1.放置行有效性判断程序
- '首先进行为空判断(固定不变)
- For Jsqte = Qslz To .Cols - 1
- If (GridInt(Jsqte, 5) = 1 And Len(Trim(.TextMatrix(Yxxpdh, Jsqte))) = 0) Or (GridInt(Jsqte, 5) = 2 And Val(Trim(.TextMatrix(Yxxpdh, Jsqte))) = 0) Then
- Tsxx = GridStr(Jsqte, 2)
- Lrywlz = Jsqte
- GoTo Lrcwcl
- Exit For
- End If
- Next Jsqte
- '2.[自定义判断(补丁)
- If Val(Trim(.TextMatrix(Yxxpdh, Sydz("004", GridStr(), Szzls)))) = 0 And Val(Trim(.TextMatrix(Yxxpdh, Sydz("005", GridStr(), Szzls)))) = 0 Then
- Tsxx = "借方和贷方金额不能同时为零!"
- Lrywlz = Sydz("004", GridStr(), Szzls)
- GoTo Lrcwcl
- End If
- If Val(Trim(.TextMatrix(Yxxpdh, Sydz("004", GridStr(), Szzls)))) <> 0 And Val(Trim(.TextMatrix(Yxxpdh, Sydz("005", GridStr(), Szzls)))) <> 0 Then
- Tsxx = "借方和贷方金额不能同时不为零!"
- Lrywlz = Sydz("004", GridStr(), Szzls)
- GoTo Lrcwcl
- End If
- '判断辅助核算项目是否填写
- SQLSTR = "Select * FROM Cwzz_AccCode Where Ccode='" & Trim(.TextMatrix(Yxxpdh, Sydz("002", GridStr(), Szzls))) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
- With RecTemp
- If Not .EOF Then
- '如有数量核算且用户选择数量不能为零则数量项不能为零
- If RecTemp.Fields("QuantityFlag") And Chk_Quantity.Value = 1 And Val(WglrGrid.TextMatrix(Yxxpdh, 5)) = 0 Then
- Tsxx = "此科目需要数量核算,数量项不能为零"
- Lrywlz = Sydz("002", GridStr(), Szzls)
- Bln_AssVali = True
- GoTo Lrcwcl
- End If
- '部门核算则部门不能为空
- If RecTemp.Fields("DeptFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 12))) = 0 Then
- Tsxx = "此科目需要部门核算,部门项不能为空"
- Lrywlz = Sydz("002", GridStr(), Szzls)
- Bln_AssVali = True
- GoTo Lrcwcl
- End If
- '往来单位核算则往来单位不能为空
- If RecTemp.Fields("CusFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 14))) = 0 Then
- Tsxx = "此科目需要往来单位核算,往来单位项不能为空"
- Lrywlz = Sydz("002", GridStr(), Szzls)
- Bln_AssVali = True
- GoTo Lrcwcl
- End If
- '个人往来核算则个人项不能为空
- If RecTemp.Fields("PersonFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 16))) = 0 Then
- Tsxx = "此科目需要个人往来核算,个人项不能为空"
- Lrywlz = Sydz("002", GridStr(), Szzls)
- Bln_AssVali = True
- GoTo Lrcwcl
- End If
- '项目核算则项目不能为空
- If RecTemp.Fields("ItemFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 20))) = 0 Then
- Tsxx = "此科目需要项目核算,核算项目不能为空"
- Lrywlz = Sydz("002", GridStr(), Szzls)
- Bln_AssVali = True
- GoTo Lrcwcl
- End If
- End If
- End With
- '2.放置行处理程序
- '以上为自定义部分]
- End With
- Sjhzyxxpd = True
- Hyxxpdlock = True
- Exit Function
- Lrcwcl: '录入错误处理
- With WglrGrid
- Call Xtxxts(Tsxx, 0, 1)
- changelock = True
- .Select Yxxpdh, Lrywlz
- changelock = False
- '[>>如果辅助核算出现错误则调用辅助核算功能
- If Bln_AssVali Then
- Call Sub_Drfzhsx(Yxxpdh, Trim(.TextMatrix(Yxxpdh, Sydz("002", GridStr(), Szzls))))
- '解决鼠标点击取消造成的换行
- changelock = True
- .Select Yxxpdh, Lrywlz
- changelock = False
- '<<]
- Else
- Call xswbk
- End If
- Sjhzyxxpd = False
- Exit Function
- End With
- End Function
- Private Sub Lab_Memo_DblClick(Index As Integer) '点击辅助核算信息列
- '如果单据操作状态为浏览状态则不能显示录入载体
- If Trim(Lab_OperStatus.Caption) = "1" Then
- Exit Sub
- End If
- '当科目编码处于录入状态时不能调入辅助核算项目
- If Ydtext.Visible And GridStr(WglrGrid.Col, 1) = "002" Then
- Exit Sub
- End If
- '当焦点处于非录入区域时也不能调入辅助核算项目
- If WglrGrid.Row < WglrGrid.FixedRows Then
- Exit Sub
- End If
- '屏蔽文本框,下拉组合框有效性判断
- Valilock = True
- Call Sub_Drfzhsx(WglrGrid.Row, Trim(WglrGrid.TextMatrix(WglrGrid.Row, Sydz("002", GridStr(), Szzls))))
- Valilock = False
- End Sub
- Private Sub Sub_Drfzhsx(Dqpdwgh As Long, Str_JudgeText As String) '判断科目是否有辅助核算,如有则调入辅助核算窗体
- '函数参数:当前判断网格行,判断科目
- Dim Coljsq As Long '临时列计数器
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- If Len(Str_JudgeText) <> 0 Then
- SQLSTR = "Select Cwzz_AccCode.* ,ItemClassName,ForeignCurrName,ConVertFlag FROM Cwzz_AccCode " & _
- " LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccCode.ItemClassCode = Cwzz_ItemClass.ItemClassCode " & _
- " LEFT OUTER JOIN Gy_ForeignCurrency ON Cwzz_AccCode.ForeignCurrCode= Gy_ForeignCurrency.ForeignCurrCode " & _
- " Where Ccode='" + Str_JudgeText + "' and EndFlag=1 and StopUse=0"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
- With RecTemp
- If .EOF Then
- Exit Sub
- Else
- '判断科目进行哪些辅助核算
- '清空辅助核算标识
- For Jsqte = 0 To Int_AssCount - 1
- Bln_AssShow(Jsqte) = False
- Next Jsqte
- '银行科目--结算方式、票号、日期
- If Trim(RecTemp.Fields("Cproperty")) = "银行" Then
- Bln_AssShow(0) = True '结算方式
- Bln_AssShow(1) = True '票号
- Bln_AssShow(2) = True '日期
- Bln_AssShow(12) = True '经办人
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 1) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 2) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 3) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 4) = ""
- End If
- '数量核算--数量,单价
- If RecTemp.Fields("QuantityFlag") Then
- Bln_AssShow(3) = True '数量
- Bln_AssShow(4) = True '单价
- WglrGrid.TextMatrix(Dqpdwgh, 6) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 7) = Trim(.Fields("measure")) '单位
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 5) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 6) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 7) = ""
- End If
- '外币核算--外币,汇率
- If RecTemp.Fields("ForeignFlag") Then
- WglrGrid.TextMatrix(Dqpdwgh, 8) = Trim(.Fields("ForeignCurrCode"))
- WglrGrid.TextMatrix(Dqpdwgh, 9) = Trim(.Fields("ForeignCurrName"))
- Bln_AssShow(5) = True '外币金额
- Bln_AssShow(6) = True '汇率
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 8) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 9) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 10) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 11) = ""
- End If
- '部门核算
- If RecTemp.Fields("DeptFlag") Then
- Bln_AssShow(7) = True '部门
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 12) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 13) = ""
- End If
- '单位核算
- If RecTemp.Fields("CusFlag") Then
- Bln_AssShow(8) = True '单位
- Bln_AssShow(12) = True '经办人
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 14) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 15) = ""
- If Trim(RecTemp.Fields("Cproperty")) <> "银行" Then
- WglrGrid.TextMatrix(Dqpdwgh, 24) = ""
- End If
- End If
- '个人核算
- If RecTemp.Fields("PersonFlag") Then
- Bln_AssShow(9) = True '个人
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 16) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 17) = ""
- End If
- '项目核算
- If RecTemp.Fields("ItemFlag") Then
- If WglrGrid.TextMatrix(Dqpdwgh, 18) <> Trim(.Fields("ItemClassCode")) Then
- WglrGrid.TextMatrix(Dqpdwgh, 20) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 21) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 22) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 23) = ""
- End If
- WglrGrid.TextMatrix(Dqpdwgh, 18) = Trim(.Fields("ItemClassCode")) '项目类别编码
- WglrGrid.TextMatrix(Dqpdwgh, 19) = Trim(.Fields("ItemClassName")) '项目类别名称
- Bln_AssShow(10) = True '项目
- Bln_AssShow(11) = True '项目数量
- Else
- WglrGrid.TextMatrix(Dqpdwgh, 18) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 19) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 20) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 21) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 22) = ""
- WglrGrid.TextMatrix(Dqpdwgh, 23) = ""
- End If
- '调入科目辅助核算项目
- For Jsqte = 0 To Int_AssCount - 1
- If Bln_AssShow(Jsqte) Then
- PZ_FrmAss.lab_GridRow = Dqpdwgh
- Call Kmfzhsx(Dqpdwgh)
- '判断用户录入数量单价是否为零,如不为零则由数量*单价=金额
- '(考虑销售收入主要为贷方则借贷金额均为零时,金额自动填入贷方)
- If Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) <> 0 And Val(WglrGrid.TextMatrix(Dqpdwgh, 6)) <> 0 Then
- If Val(Trim(WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)))) <> 0 Then
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 6)), "##." + String(Xtjexsws, "0"))
- Else
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 6)), "##." + String(Xtjexsws, "0"))
- End If
- End If
- '判断用户录入外币汇率是否为零,如不为零则由外币*汇率=金额
- '(借贷金额均为零时,金额自动填入借方)
- If Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) <> 0 And Val(WglrGrid.TextMatrix(Dqpdwgh, 11)) <> 0 Then
- If Val(Trim(WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)))) <> 0 Then
- '判断外币折算方式
- If RecTemp.Fields("ConVertFlag") Then
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) / Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
- Else
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
- End If
- Else
- '判断外币折算方式
- If RecTemp.Fields("ConVertFlag") Then
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) / Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
- Else
- WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
- End If
- End If
- End If
- Exit For
- End If
- Next Jsqte
- End If
- End With
- '计算合计数据
- For Coljsq = Qslz To WglrGrid.Cols - 1
- Call Sjhj(Coljsq)
- Next Coljsq
- '重新显示辅助核算信息
- Call Sub_ShowMemo(WglrGrid.Row)
- End If
- End Sub
- Private Sub Kmfzhsx(Lng_GridRow As Long) '调用科目辅助核算项
- '过程函数;Lng_gridrow当前网格调入辅助核算行
- Dim Kjqstop#, Kjqsleft#, Kjjg#, Ctzxgd#, Kjxsgs%, Jsqte%
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Kjqstop = 300 '控件显示起始高度
- Kjqsleft = 300 '控件显示起始左边界
- Kjjg = 450 '控件显示间隔
- Kjxsgs = 0 '控件显示个数
- Ctzxgd = 1500 '窗体显示最小高度
- With PZ_FrmAss '辅助核算项目窗体
- .Caption = "辅助核算项目_" + Trim(WglrGrid.TextMatrix(Lng_GridRow, Sydz("003", GridStr(), Szzls)))
- For Jsqte = 0 To Int_AssCount - 1
- If Bln_AssShow(Jsqte) Then
- .TsLabel(Jsqte).Visible = True
- .TsLabel(Jsqte).Move Kjqsleft, Kjqstop + Kjxsgs * Kjjg
- .LrText(Jsqte).Visible = True
- .LrText(Jsqte).Move .TsLabel(Jsqte).Left + .TsLabel(Jsqte).Width + 50, .TsLabel(Jsqte).Top - 100
- If Bln_AssHelp(Jsqte) Then
- .Ydcommand1(Jsqte).Visible = True
- .Ydcommand1(Jsqte).Move .LrText(Jsqte).Left + .LrText(Jsqte).Width, .LrText(Jsqte).Top, .Ydcommand1(Jsqte).Width, .LrText(Jsqte).Height
- End If
- Kjxsgs = Kjxsgs + 1
- Select Case Jsqte
- Case 0 '结算方式
- .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 1))
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 2))
- Case 1 '票号
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 3))
- Case 2 '发生日期
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 4))
- Case 3 '数量
- .LrText(Jsqte).Text = WglrGrid.TextMatrix(Lng_GridRow, 5)
- .Lab_Measure = Trim(WglrGrid.TextMatrix(Lng_GridRow, 7))
- .Lab_Measure.Move .LrText(Jsqte).Left + .LrText(Jsqte).Width + 50, .LrText(Jsqte).Top + 100
- Case 4 '单价
- If Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) <> 0 And Val(WglrGrid.TextMatrix(Lng_GridRow, 5)) <> 0 Then
- .LrText(Jsqte).Text = Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) / Val(WglrGrid.TextMatrix(Lng_GridRow, 5))
- Else
- If Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) <> 0 And Val(WglrGrid.TextMatrix(Lng_GridRow, 5)) <> 0 Then
- .LrText(Jsqte).Text = Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) / Val(WglrGrid.TextMatrix(Lng_GridRow, 5))
- End If
- End If
- Case 5 '外币金额
- .LrText(Jsqte).Text = WglrGrid.TextMatrix(Lng_GridRow, 10)
- .Lab_ForeignName.Caption = "(" + Trim(WglrGrid.TextMatrix(Lng_GridRow, 9)) + ")"
- .Lab_ForeignName.Move .LrText(Jsqte).Left + .LrText(Jsqte).Width + 50, .LrText(Jsqte).Top + 100
- Case 6 '汇率
- .LrText(Jsqte).Text = WglrGrid.TextMatrix(Lng_GridRow, 11)
- Case 7 '部门
- .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 12))
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 13))
- Case 8 '单位
- .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 14))
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 15))
- Case 9 '个人
- .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 16))
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 17))
- Case 10 '项目
- .Lab_ItemClass.Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 18))
- .Lab_ItemClass.Caption = "(" + Trim(WglrGrid.TextMatrix(Lng_GridRow, 19)) + ")"
- .Lab_ItemClass.Move .LrText(Jsqte).Left + .LrText(Jsqte).Width + 400, .LrText(Jsqte).Top + 100
- .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 20))
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 21))
- SQLSTR = "select * from Cwzz_item where ItemClassCode='" & .Lab_ItemClass.Tag & "' and ItemCode='" & Trim(.LrText(10).Tag) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
- If Not RecTemp.EOF Then
- If RecTemp.Fields("QuantityFlag") Then
- .LrText(11).Text = WglrGrid.TextMatrix(Lng_GridRow, 22)
- .Lab_ItemMeasure = Trim(RecTemp.Fields("Measure"))
- End If
- End If
- Case 11
- .Lab_ItemMeasure.Move .LrText(11).Left + .LrText(11).Width + 50, .LrText(11).Top + 50
- Case 12 '经办人
- .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 24))
- End Select
- Else
- .TsLabel(Jsqte).Visible = False
- .LrText(Jsqte).Visible = False
- If Bln_AssHelp(Jsqte) Then
- .Ydcommand1(Jsqte).Visible = False
- End If
- End If
- Next Jsqte
- If Kjqstop * 3 + Kjxsgs * Kjjg > Ctzxgd Then
- .Height = Kjqstop * 3 + Kjxsgs * Kjjg
- Else
- .Height = Ctzxgd
- End If
- '加锁
- changelock = True
- .Show 1
- changelock = False
- End With
- End Sub
- Private Sub Sub_ShowMemo(Lng_GridRow) '显示网格备注项
- '函数参数:网格行
- Dim Str_Memo As String
- Str_Memo = ""
- With WglrGrid
- If Len(Trim(.TextMatrix(Lng_GridRow, 2))) <> 0 Then
- Str_Memo = Str_Memo + "结算方式:" + Trim(.TextMatrix(Lng_GridRow, 2)) + Space(2)
- End If
- If Len(Trim(.TextMatrix(Lng_GridRow, 3))) <> 0 Then
- Str_Memo = Str_Memo + "票号:" + Trim(.TextMatrix(Lng_GridRow, 3)) + Space(2)
- End If
- If Len(Trim(.TextMatrix(Lng_GridRow, 4))) <> 0 Then
- Str_Memo = Str_Memo + "发生日期:" + Trim(.TextMatrix(Lng_GridRow, 4)) + Space(2)
- End If
- If Val(.TextMatrix(Lng_GridRow, 5)) <> 0 Then
- Str_Memo = Str_Memo + "数量:" + Format(Trim(.TextMatrix(Lng_GridRow, 5)), "#,##0." + String(Xtslxsws, "0")) + Trim(.TextMatrix(Lng_GridRow, 7)) + Space(2)
- End If
- '显示单价
- If Val(.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) <> 0 And Val(.TextMatrix(Lng_GridRow, 5)) <> 0 Then
- Str_Memo = Str_Memo + "单价:" + Format(Val(.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) / Val(.TextMatrix(Lng_GridRow, 5)), "#,##0." + String(Xtdjxsws, "0"))
- Else
- If Val(.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) <> 0 And Val(.TextMatrix(Lng_GridRow, 5)) <> 0 Then
- Str_Memo = Str_Memo + "单价:" + Format(Val(.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) / Val(.TextMatrix(Lng_GridRow, 5)), "#,##0." + String(Xtdjxsws, "0"))
- End If
- End If
- If Val(.TextMatrix(Lng_GridRow, 10)) <> 0 Then
- Str_Memo = Str_Memo + "外币:" + Format(Trim(.TextMatrix(Lng_GridRow, 10)), "#,##0." + String(Xtjexsws, "0")) + Trim(WglrGrid.TextMatrix(Lng_GridRow, 9)) + Space(2)
- End If
- If Val(.TextMatrix(Lng_GridRow, 11)) <> 0 Then
- Str_Memo = Str_Memo + "汇率:" + Trim(.TextMatrix(Lng_GridRow, 11)) + Space(2)
- End If
- If Len(Trim(.TextMatrix(Lng_GridRow, 13))) <> 0 Then
- Str_Memo = Str_Memo + "部门:" + Trim(.TextMatrix(Lng_GridRow, 13)) + Space(2)
- End If
- If Len(Trim(.TextMatrix(Lng_GridRow, 15))) <> 0 Then
- Str_Memo = Str_Memo + "往来单位:" + Trim(.TextMatrix(Lng_GridRow, 15)) + Space(2)
- End If
- If Len(Trim(.TextMatrix(Lng_GridRow, 17))) <> 0 Then
- Str_Memo = Str_Memo + "个人:" + Trim(.TextMatrix(Lng_GridRow, 17)) + Space(2)
- End If
- If Len(Trim(.TextMatrix(Lng_GridRow, 21))) <> 0 Then
- Str_Memo = Str_Memo + "项目类别:" + Trim(.TextMatrix(Lng_GridRow, 19)) + Space(2) + "核算项目:" + Trim(.TextMatrix(Lng_GridRow, 21)) + Space(2)
- End If