资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:56k
源码类别:
企业管理
开发平台:
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"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form Formula_Create_Frm
- BorderStyle = 3 'Fixed Dialog
- Caption = "公式定义"
- ClientHeight = 8040
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 11010
- HelpContextID = 2212013
- Icon = "建立公式.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 8040
- ScaleWidth = 11010
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.Frame Frame2
- Height = 645
- Left = 90
- TabIndex = 45
- Top = 600
- Width = 5010
- Begin MSComctlLib.ImageCombo ImgCmb_Sort
- Height = 315
- Left = 1020
- TabIndex = 46
- Top = 210
- Width = 3825
- _ExtentX = 6747
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- Locked = -1 'True
- End
- Begin VB.Label Lab_Mark
- AutoSize = -1 'True
- Caption = "工资类别:"
- Height = 180
- Index = 5
- Left = 135
- TabIndex = 47
- Top = 270
- Width = 810
- End
- End
- Begin TabDlg.SSTab SSTab_Formula
- Height = 6630
- Left = 45
- TabIndex = 11
- Top = 1350
- Width = 10935
- _ExtentX = 19288
- _ExtentY = 11695
- _Version = 393216
- Style = 1
- Tabs = 2
- TabsPerRow = 2
- TabHeight = 520
- TabCaption(0) = "列表视图"
- TabPicture(0) = "建立公式.frx":1042
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "vsFG_Formula"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Cmd_Up"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "Cmd_Down"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).Control(3)= "Cmd_Save"
- Tab(0).Control(3).Enabled= 0 'False
- Tab(0).ControlCount= 4
- TabCaption(1) = "单张视图"
- TabPicture(1) = "建立公式.frx":105E
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Fm_Declare"
- Tab(1).ControlCount= 1
- Begin VB.CommandButton Cmd_Save
- Caption = "保存"
- Height = 1120
- Left = 150
- Picture = "建立公式.frx":107A
- Style = 1 'Graphical
- TabIndex = 34
- TabStop = 0 'False
- ToolTipText = "保存项目顺序,项目顺序与它在网格中的顺序一致"
- Top = 3660
- Width = 300
- End
- Begin VB.CommandButton Cmd_Down
- Height = 1120
- Left = 150
- Picture = "建立公式.frx":1404
- Style = 1 'Graphical
- TabIndex = 33
- TabStop = 0 'False
- Top = 2430
- Width = 300
- End
- Begin VB.CommandButton Cmd_Up
- Height = 1120
- Left = 150
- Picture = "建立公式.frx":1A48
- Style = 1 'Graphical
- TabIndex = 32
- TabStop = 0 'False
- Top = 1215
- Width = 300
- End
- Begin VB.Frame Fm_Declare
- Height = 6135
- Left = -74880
- TabIndex = 13
- Top = 345
- Width = 10680
- Begin VB.Frame Frame1
- Height = 2565
- Left = 150
- TabIndex = 38
- Top = 210
- Width = 10410
- Begin VB.Frame Fm_AddType
- Height = 795
- Left = 120
- TabIndex = 41
- Top = 510
- Width = 2040
- Begin VB.OptionButton Opt_AddType
- Caption = "加到公式内容"
- Height = 255
- Index = 0
- Left = 210
- TabIndex = 1
- Top = 150
- Value = -1 'True
- Width = 1399
- End
- Begin VB.OptionButton Opt_AddType
- Caption = "加到限定条件"
- Height = 255
- Index = 1
- Left = 210
- TabIndex = 2
- Top = 450
- Width = 1429
- End
- End
- Begin VB.TextBox Txt_FContent
- Height = 2025
- Left = 2265
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 3
- Top = 450
- Width = 3855
- End
- Begin VB.TextBox Txt_FLimit
- Height = 2025
- Left = 6255
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 4
- Top = 450
- Width = 3975
- End
- Begin VB.CheckBox Chk_Valid
- Caption = "有效"
- ForeColor = &H80000007&
- Height = 345
- Left = 135
- TabIndex = 40
- Top = 1380
- Value = 1 'Checked
- Width = 917
- End
- Begin VB.TextBox Txt_Field
- Height = 300
- Left = 480
- TabIndex = 0
- Top = 210
- Width = 1380
- End
- Begin VB.CommandButton Cmd_SelectField
- Height = 300
- Left = 1845
- Picture = "建立公式.frx":208C
- Style = 1 'Graphical
- TabIndex = 39
- Top = 210
- Width = 300
- End
- Begin VB.Label Lab_Mark
- AutoSize = -1 'True
- Caption = "公式内容:"
- Height = 180
- Index = 1
- Left = 2295
- TabIndex = 44
- Top = 210
- Width = 810
- End
- Begin VB.Label Lab_Mark
- AutoSize = -1 'True
- Caption = "限定条件:"
- Height = 180
- Index = 2
- Left = 6285
- TabIndex = 43
- Top = 210
- Width = 810
- End
- Begin VB.Label Lab_Mark
- AutoSize = -1 'True
- Caption = "项目:"
- Height = 180
- Index = 0
- Left = 90
- TabIndex = 42
- Top = 255
- Width = 450
- End
- End
- Begin MSComctlLib.ProgressBar PB_CheckStatus
- Height = 420
- Left = 2055
- TabIndex = 36
- Top = 930
- Visible = 0 'False
- Width = 7635
- _ExtentX = 13467
- _ExtentY = 741
- _Version = 393216
- BorderStyle = 1
- Appearance = 1
- Scrolling = 1
- End
- Begin VB.CommandButton Cmd_Cancel
- Cancel = -1 'True
- Caption = "取消(&C)"
- Height = 300
- Left = 9240
- TabIndex = 10
- Top = 5715
- Width = 1304
- End
- Begin VB.Frame Frame3
- Caption = "公式输入参照:"
- Height = 2790
- Left = 150
- TabIndex = 14
- Top = 2850
- Width = 10410
- Begin VB.Frame Fm_Number
- Caption = "数字符号:"
- Height = 2370
- Left = 135
- TabIndex = 15
- Top = 285
- Width = 2016
- Begin VB.CommandButton Cmd_Number
- Caption = " LIKE"
- Height = 300
- Index = 13
- Left = 1037
- TabIndex = 37
- TabStop = 0 'False
- Top = 1617
- Width = 872
- End
- Begin VB.CommandButton Cmd_Guide
- Caption = "函数向导"
- Height = 300
- Left = 90
- TabIndex = 35
- TabStop = 0 'False
- Top = 1965
- Width = 1821
- End
- Begin VB.CommandButton Cmd_Number
- Caption = " AND "
- Height = 300
- Index = 12
- Left = 75
- TabIndex = 29
- TabStop = 0 'False
- Top = 1626
- Width = 902
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "1"
- Height = 315
- Index = 0
- Left = 90
- TabIndex = 28
- TabStop = 0 'False
- Top = 564
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "2"
- Height = 315
- Index = 1
- Left = 557
- TabIndex = 27
- TabStop = 0 'False
- Top = 564
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "3"
- Height = 300
- Index = 2
- Left = 1037
- TabIndex = 26
- TabStop = 0 'False
- Top = 573
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "4"
- Height = 300
- Index = 3
- Left = 1504
- TabIndex = 25
- TabStop = 0 'False
- Top = 585
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "5"
- Height = 315
- Index = 4
- Left = 90
- TabIndex = 24
- TabStop = 0 'False
- Top = 918
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "6"
- Height = 315
- Index = 5
- Left = 557
- TabIndex = 23
- TabStop = 0 'False
- Top = 918
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "7"
- Height = 300
- Index = 6
- Left = 1037
- TabIndex = 22
- TabStop = 0 'False
- Top = 921
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "8"
- Height = 300
- Index = 7
- Left = 1504
- TabIndex = 21
- TabStop = 0 'False
- Top = 930
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "9"
- Height = 315
- Index = 8
- Left = 90
- TabIndex = 20
- TabStop = 0 'False
- Top = 1272
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "0"
- Height = 315
- Index = 9
- Left = 557
- TabIndex = 19
- TabStop = 0 'False
- Top = 1272
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "%"
- Height = 300
- Index = 10
- Left = 1037
- TabIndex = 18
- TabStop = 0 'False
- Top = 1269
- Width = 422
- End
- Begin VB.CommandButton Cmd_Number
- Caption = "."
- Height = 300
- Index = 11
- Left = 1504
- TabIndex = 17
- TabStop = 0 'False
- Top = 1275
- Width = 422
- End
- Begin VB.CommandButton Cmd_Change
- Caption = "切换"
- Height = 300
- Left = 90
- TabIndex = 16
- TabStop = 0 'False
- Top = 225
- Width = 1836
- End
- End
- Begin MSComctlLib.TreeView TV_PreField
- Height = 2250
- Left = 2280
- TabIndex = 6
- Top = 420
- Width = 3855
- _ExtentX = 6800
- _ExtentY = 3969
- _Version = 393217
- LabelEdit = 1
- LineStyle = 1
- Style = 7
- Appearance = 1
- End
- Begin MSComctlLib.TreeView TV_FieldValue
- Height = 2265
- Left = 6270
- TabIndex = 8
- Top = 405
- Width = 3990
- _ExtentX = 7038
- _ExtentY = 3995
- _Version = 393217
- LabelEdit = 1
- LineStyle = 1
- Style = 7
- Appearance = 1
- End
- Begin VB.Label Lab_Mark
- AutoSize = -1 'True
- Caption = "待选项目(&S):"
- Height = 180
- Index = 3
- Left = 2325
- TabIndex = 5
- Top = 195
- Width = 1080
- End
- Begin VB.Label Lab_Mark
- Caption = "关联项(&V):"
- Height = 195
- Index = 4
- Left = 6270
- TabIndex = 7
- Top = 210
- Width = 915
- End
- End
- Begin VB.CommandButton Cmd_OK
- Caption = "公式确认(&O)"
- Height = 300
- Left = 7860
- TabIndex = 9
- Top = 5715
- Width = 1304
- End
- End
- Begin VSFlex8Ctl.VSFlexGrid vsFG_Formula
- Height = 6105
- Left = 585
- TabIndex = 12
- Top = 405
- Width = 10245
- _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 = 8421504
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 3
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 1
- 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
- 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
- End
- Begin MSComctlLib.Toolbar TB_Function
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 30
- Top = 0
- Width = 11010
- _ExtentX = 19420
- _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 = 13
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- Object.ToolTipText = "设置打印格式"
- ImageIndex = 1
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- Object.ToolTipText = "打印网格数据(Ctrl+P)"
- ImageIndex = 2
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "预览"
- Key = "yl"
- Object.ToolTipText = "以打印模式显示网格数据"
- ImageIndex = 3
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "增加"
- Key = "Add"
- Object.ToolTipText = "建立新公式(Ctrl+A)"
- ImageKey = "Add"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "修改"
- Key = "Edit"
- Object.ToolTipText = "修改当前公式"
- ImageKey = "Edit"
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "删除"
- Key = "Del"
- Object.ToolTipText = "删除当前公式(Ctrl+D)"
- ImageKey = "Del"
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Enabled = 0 'False
- Object.Visible = 0 'False
- Caption = "保存"
- Key = "Save"
- ImageKey = "Save"
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "Refresh"
- Object.ToolTipText = "重新取得数据"
- ImageKey = "Refresh"
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "Help"
- Object.ToolTipText = "获得帮助"
- ImageKey = "Help"
- EndProperty
- BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "Quit"
- Object.ToolTipText = "退出公式定义"
- ImageKey = "Quit"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.ImageList ImageList1
- Left = 6000
- Top = -15
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 13
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":2416
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":27B0
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":2B4A
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":2EE4
- Key = "Add"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":327E
- Key = "Edit"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":3618
- Key = "Del"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":39B2
- Key = "Refresh"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":3D4C
- Key = "Help"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":40E6
- Key = "Quit"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":4480
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":481A
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":4BB4
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "建立公式.frx":4F4E
- Key = "Save"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 525
- Left = 8385
- TabIndex = 31
- Top = 0
- Width = 2610
- _ExtentX = 4604
- _ExtentY = 926
- ButtonWidth = 1455
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 3
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "保存格式"
- Key = "bcgs"
- ImageIndex = 10
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "默认列宽"
- Key = "hfmrgs"
- ImageIndex = 11
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "显示项目"
- Key = "szxsxm"
- ImageIndex = 12
- EndProperty
- EndProperty
- End
- End
- End
- Attribute VB_Name = "Formula_Create_Frm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '******************************************************************
- '* 模 块 名 称 :公式定义
- '* 功 能 描 述 :
- '* 程序员姓名 :苗鹏
- '* 最后修改人 :苗鹏
- '* 最后修改时间:2002/01/01
- '* 备 注:主要公式操作验证工作在CQuery类中完成
- '******************************************************************
- Const STATUS_VIEW As Integer = 0 '浏览状态
- Const STATUS_ADD As Integer = 1 '增加状态
- Const STATUS_EDIT As Integer = 2 '编辑状态
- Dim sFieldOld As String '前一个相关的字段名
- Dim iNowState As Integer '现在的状态
- Dim Str_RightEdit As String '编辑(新增、修改、删除)权限索引
- '以下为固定使用变量
- Dim ReportTitle As String
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim Tsxx As String '系统提示信息
- Dim Qslz As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd As Double '网格数据行高度
- Dim Sfxshjwg As Boolean '是否显示合计网格
- Dim GridBoolean() As Boolean '网格列信息(布尔型)
- Dim GridStr() As String '网格列信息(字符型)
- Dim GridInt() As Integer '网格列信息(整型)
- Dim Szzls As Integer '数组总列数(网格列数-1)
- Private Sub Cmd_Cancel_Click() '取消公式定义
- '改变状态
- ChangeStatus STATUS_VIEW
- End Sub
- Private Function RefreshGrid() '刷新网格
- On Error GoTo ErrCtrl
- Dim s As String
- Dim sSortID As String
- Dim rs As New ADODB.Recordset
- '清空数据
- Me.vsFG_Formula.Rows = Me.vsFG_Formula.FixedRows
- '读取工资类别
- sSortID = GetComboKey(Me.ImgCmb_Sort, 0)
- '填充数据
- s = "SELECT a.*,b.ChName as FieldNameC from PM_Formula a INNER JOIN Rs_Items b on a.FieldName=b.FieldName WHERE a.SortID='" & sSortID & "' ORDER BY a.FOrder "
- Set rs = Cw_DataEnvi.DataConnect.Execute(s)
- With Me.vsFG_Formula
- .Redraw = False
- Do While Not rs.EOF()
- .AddItem ""
- .RowHeight(.Rows - 1) = Sjhgd
- .TextMatrix(.Rows - 1, 0) = Trim(rs!FCode & "")
- .TextMatrix(.Rows - 1, Sydz("001", GridStr(), Szzls)) = .Rows - .FixedRows '编号
- .TextMatrix(.Rows - 1, Sydz("002", GridStr(), Szzls)) = Trim(rs!FieldNameC & "") '汉语名称
- .TextMatrix(.Rows - 1, Sydz("003", GridStr(), Szzls)) = Trim(rs!FContentUser & "") '用户公式条件
- .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = Trim(rs!FLimitUser & "") '用户限定条件
- .TextMatrix(.Rows - 1, Sydz("005", GridStr(), Szzls)) = rs!FIsUsed '是否可用
- rs.MoveNext
- Loop
- .Redraw = True
- .Refresh
- End With
- Set rs = Nothing
- Exit Function
- ErrCtrl:
- Set rs = Nothing
- Dim smsg As String
- Dim smsgSys As String
- smsg = GetError(Err.Number)
- smsgSys = Err.Number & Err.Description & "!"
- MsgBox IIf(smsg = "", smsgSys, smsg), vbOKOnly + vbCritical
- End Function
- Private Sub Cmd_Change_Click() '交换数字和操作符
- With Me.Fm_Number
- If Trim(.Caption) = "数字符号:" Then
- Cmd_Number(0).Caption = " +"
- Cmd_Number(1).Caption = " -"
- Cmd_Number(2).Caption = " *"
- Cmd_Number(3).Caption = " /"
- Cmd_Number(4).Caption = " ="
- Cmd_Number(5).Caption = " <>"
- Cmd_Number(6).Caption = " >"
- Cmd_Number(7).Caption = " >="
- Cmd_Number(8).Caption = " <"
- Cmd_Number(9).Caption = " <="
- Cmd_Number(10).Caption = " ("
- Cmd_Number(11).Caption = " )"
- Cmd_Number(12).Caption = " OR"
- .Caption = "运算符号:"
- Else
- Cmd_Number(0).Caption = "1"
- Cmd_Number(1).Caption = "2"
- Cmd_Number(2).Caption = "3"
- Cmd_Number(3).Caption = "4"
- Cmd_Number(4).Caption = "5"
- Cmd_Number(5).Caption = "6"
- Cmd_Number(6).Caption = "7"
- Cmd_Number(7).Caption = "8"
- Cmd_Number(8).Caption = "9"
- Cmd_Number(9).Caption = "0"
- Cmd_Number(10).Caption = "%"
- Cmd_Number(11).Caption = "."
- Cmd_Number(12).Caption = " AND"
- .Caption = "数字符号:"
- End If
- End With
- End Sub
- Private Sub Cmd_Down_Click() '当前公式顺序下移
- CmdDown Me.vsFG_Formula
- End Sub
- Private Sub Cmd_Guide_Click() '显示公式向导
- Dim s As String
- Dim frm As New Formula_Guide_Frm
- '显示公式向导
- With frm
- .Show 1
- s = .sFunction
- End With
- '向文本框中添加函数
- If s <> "" Then
- If Me.Opt_AddType(0).Value = True Then
- '添加公式
- With Me.Txt_FContent
- If .SelLength <> 0 Then
- .Text = ReplByPos(.Text, s, .SelStart + 1, .SelStart + .SelLength + 1)
- Else
- .Text = .Text & " " & s
- End If
- End With
- Else
- '添加限定条件
- With Me.Txt_FLimit
- If .SelLength <> 0 Then
- .Text = ReplByPos(.Text, s, .SelStart + 1, .SelStart + .SelLength + 1)
- Else
- .Text = .Text & " " & s
- End If
- End With
- End If
- End If
- Set frm = Nothing
- End Sub
- Private Sub Cmd_Number_Click(Index As Integer) '向本框中添加数字或操作符
- Dim s As String
- s = Me.Cmd_Number(Index).Caption
- If Me.Opt_AddType(0).Value = True Then
- ' 添加公式
- With Me.Txt_FContent
- If .SelLength <> 0 Then
- .Text = ReplByPos(.Text, s, .SelStart + 1, .SelStart + .SelLength + 1)
- Else
- .Text = .Text & s
- End If
- End With
- Else
- ' 添加限定条件
- With Me.Txt_FLimit
- If .SelLength <> 0 Then
- .Text = ReplByPos(.Text, s, .SelStart + 1, .SelStart + .SelLength + 1)
- Else
- .Text = .Text & s
- End If
- End With
- End If
- End Sub
- Private Sub Cmd_OK_Click() '验证并保存公式
- On Error GoTo ErrCtrl
- Dim sSortID As String
- Dim s As String
- Dim sSQLFormula As String
- Dim sSqlWhere As String
- Dim cQuerys As New CQuery
- Dim iCode As Integer
- Dim rs As New ADODB.Recordset
- '验证字段合法性
- With Me.Txt_Field
- If Trim(.Text) = "" Then
- MsgBox "请录入公式的项目!", vbOKOnly + vbCritical
- If .Enabled = True Then
- .SetFocus
- End If
- Exit Sub
- End If
- s = "SELECT b.FieldName as TCode,b.ChName as TName FROM PM_SortItem a " & Chr(10) _
- & " INNER JOIN Rs_Items b ON a.ItemID=b.ItemID " & Chr(10) _
- & " WHERE a.HaltFlag=0 and a.SortID='" & GetComboKey(Me.ImgCmb_Sort, 0) & "' and (b.FieldName='" & Trim(.Text) & "' or b.ChName='" & Trim(.Text) & "')"
- Set rs = Cw_DataEnvi.DataConnect.Execute(s)
- If rs.EOF() Then
- Set rs = Nothing
- MsgBox "公式项目错误!", vbOKOnly + vbCritical
- Exit Sub
- Else
- .Text = Trim(rs!TName)
- .Tag = Trim(rs!TCode)
- End If
- rs.Close
- End With
- '验证公式的正确性
- Set cQuerys.PB_CheckStatus = Me.PB_CheckStatus
- If cQuerys.CheckFormula(Trim(Me.Txt_FContent.Text), "PM_PayRoll." & Trim(Me.Txt_Field.Tag)) = True Then
- sSQLFormula = cQuerys.FormulaSQL
- Me.Txt_FContent.Text = cQuerys.FormulaOld
- Else
- Exit Sub
- End If
- '验证限定条件
- If cQuerys.CheckFormula(Trim(Me.Txt_FLimit.Text)) = True Then
- sSqlWhere = cQuerys.FormulaSQL
- Me.Txt_FLimit.Text = cQuerys.FormulaOld
- Else
- Exit Sub
- End If
- '更新数据库和列表
- sSortID = GetComboKey(Me.ImgCmb_Sort, 0)
- With Me.vsFG_Formula
- If .Row < .FixedRows Then
- iCode = .FixedRows
- Else
- iCode = .TextMatrix(.Row, 0)
- End If
- End With
- If iNowState = STATUS_ADD Then '增加
- s = "SELECT * FROM PM_Formula WHERE 1=2"
- rs.Open s, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockPessimistic
- '添加数据表
- With rs
- .AddNew
- !SortId = sSortID '工资类别
- !FieldName = Trim(Me.Txt_Field.Tag) '公式名称
- !FContent = sSQLFormula '公式内容
- !FLimit = sSqlWhere '公式限定条件
- !FContentUser = Trim(Me.Txt_FContent.Text) '公式用户内容
- !FLimitUser = Trim(Me.Txt_FLimit.Text) '用户限定条件
- !FOrder = 10000 '公式顺序
- !FIsUsed = Me.Chk_Valid.Value '是否可用
- .Update
- End With
- '添加网格
- With Me.vsFG_Formula
- .AddItem ""
- .TextMatrix(.Rows - 1, 0) = rs!FCode '编码
- .TextMatrix(.Rows - 1, Sydz("001", GridStr(), Szzls)) = .Rows - .FixedRows '编号
- .TextMatrix(.Rows - 1, Sydz("002", GridStr(), Szzls)) = Me.Txt_Field.Text '公式名称
- .TextMatrix(.Rows - 1, Sydz("003", GridStr(), Szzls)) = Me.Txt_FContent.Text '公式内容
- .TextMatrix(.Rows - 1, Sydz("004", GridStr(), Szzls)) = Me.Txt_FLimit.Text '公式限定条件
- .TextMatrix(.Rows - 1, Sydz("005", GridStr(), Szzls)) = Me.Chk_Valid.Value '是否可用
- End With
- Else '修改
- s = "SELECT * FROM PM_Formula WHERE FCode=" & iCode
- rs.Open s, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockPessimistic
- '修改数据表
- With rs
- !FContent = sSQLFormula '公式内容
- !FLimit = sSqlWhere '限定条件
- !FContentUser = Trim(Me.Txt_FContent.Text) '用户内容
- !FLimitUser = Trim(Me.Txt_FLimit.Text) '用户限定条件
- !FIsUsed = Me.Chk_Valid.Value '是否可用
- .Update
- End With
- '修改网格内容
- With Me.vsFG_Formula
- .TextMatrix(.Row, Sydz("002", GridStr(), Szzls)) = Me.Txt_Field.Text '名称
- .TextMatrix(.Row, Sydz("003", GridStr(), Szzls)) = Me.Txt_FContent.Text '公式内容
- .TextMatrix(.Row, Sydz("004", GridStr(), Szzls)) = Me.Txt_FLimit.Text '限定条件
- .TextMatrix(.Row, Sydz("005", GridStr(), Szzls)) = Me.Chk_Valid.Value '是否可用
- End With
- End If
- Set rs = Nothing
- Set cQuerys = Nothing
- MsgBox "公式验证通过,并保存成功!", vbOKOnly + vbInformation
- If iNowState = STATUS_ADD Then
- With Me
- .Txt_Field.Text = ""
- .TV_PreField.Tag = ""
- .Txt_FContent = ""
- .Txt_FLimit = ""
- End With
- End If
- Exit Sub
- ErrCtrl:
- Set rs = Nothing
- Set cQuerys = Nothing
- Dim smsg As String
- Dim smsgSys As String
- smsg = GetError(Err.Number)
- smsgSys = Err.Number & Err.Description
- MsgBox IIf(smsg = "", smsgSys, smsg), vbOKOnly + vbCritical
- End Sub
- Public Function CmdUP(CzxsGrid As VSFlexGrid) '将网格中选定的行向上移一行
- Dim Temp As String
- Dim j As Long
- With CzxsGrid
- If .Rows = .FixedRows Then
- Exit Function
- End If
- If .Row <> .FixedRows Then
- For j = 0 To .Cols - 1
- Temp = .TextMatrix(.Row - 1, j)
- .TextMatrix(.Row - 1, j) = .TextMatrix(.Row, j)
- .TextMatrix(.Row, j) = Temp
- Next
- .Row = .Row - 1
- End If
- End With
- End Function
- Public Function CmdDown(CzxsGrid As VSFlexGrid) '将网格中选定的行向下移一行
- Dim Temp As String
- Dim j As Long
- With CzxsGrid
- If .Rows = .FixedRows Then
- Exit Function
- End If
- If .Row <> .Rows - 1 Then
- For j = 0 To .Cols - 1
- Temp = .TextMatrix(.Row + 1, j)
- .TextMatrix(.Row + 1, j) = .TextMatrix(.Row, j)
- .TextMatrix(.Row, j) = Temp
- Next
- .Row = .Row + 1
- End If
- End With
- End Function
- Private Function Save() '根据当前网格公式顺序修改数据库公式顺序
- On Error GoTo ErrCtrl
- Dim bBeginTrans As Boolean
- Dim s As String
- Dim rs As New ADODB.Recordset
- Dim i As Integer
- '生成Sql语句
- With Me.vsFG_Formula
- For i = .FixedRows To .Rows - 1
- s = s & "UPDATE PM_Formula SET FOrder =" & i & " WHERE FCode= " & .TextMatrix(i, 0) & Chr(13)
- Next i
- End With
- Cw_DataEnvi.DataConnect.BeginTrans
- bBeginTrans = True
- Cw_DataEnvi.DataConnect.Execute s
- Cw_DataEnvi.DataConnect.CommitTrans
- MsgBox "公式顺序保存成功!", vbOKOnly + vbInformation
- Exit Function
- ErrCtrl:
- If bBeginTrans = True Then
- Cw_DataEnvi.DataConnect.RollbackTrans
- End If
- Dim smsg As String
- Dim smsgSys As String
- smsg = GetError(Err.Number)
- smsgSys = Err.Number & Err.Description & "!"
- MsgBox IIf(smsg = "", smsgSys, smsg), vbOKOnly + vbCritical
- End Function
- Private Function ChangeStatus(iStatus As Integer) '改变窗体状态 iStatus=0 浏览 1新增 2 修改
- Select Case iStatus
- Case STATUS_VIEW '浏览
- With Me.TB_Function
- .Buttons("Add").Enabled = True
- .Buttons("Edit").Enabled = True
- .Buttons("Del").Enabled = True
- .Buttons("Save").Enabled = True
- .Buttons("Refresh").Enabled = True
- .Buttons("Help").Enabled = True
- .Buttons("Quit").Enabled = True
- End With
- With Me.SSTab_Formula
- .Tab = 0
- .TabEnabled(0) = True
- .TabEnabled(1) = False
- End With
- Me.ImgCmb_Sort.Enabled = True
- Me.GsToolbar.Enabled = True
- Case STATUS_ADD '增加
- With Me.TB_Function
- .Buttons("Add").Enabled = False
- .Buttons("Edit").Enabled = False
- .Buttons("Del").Enabled = False
- .Buttons("Save").Enabled = False
- .Buttons("Refresh").Enabled = False
- .Buttons("Help").Enabled = True
- .Buttons("Quit").Enabled = True
- End With
- With Me.SSTab_Formula
- .Tab = 1
- .TabEnabled(1) = True
- .TabEnabled(0) = False
- Me.Txt_Field.Enabled = True
- Me.Cmd_SelectField.Enabled = True
- End With
- With Me
- .ImgCmb_Sort.Enabled = False
- .Txt_Field.Text = ""
- .Txt_Field.Tag = ""
- .Txt_FContent = ""
- .Txt_FLimit = ""
- End With
- Me.GsToolbar.Enabled = False
- Case STATUS_EDIT '修改
- With Me.TB_Function
- .Buttons("Add").Enabled = False
- .Buttons("Edit").Enabled = False
- .Buttons("Del").Enabled = False
- .Buttons("Save").Enabled = False
- .Buttons("Refresh").Enabled = False
- .Buttons("Help").Enabled = True
- .Buttons("Quit").Enabled = True
- End With
- With Me.SSTab_Formula
- .Tab = 1
- .TabEnabled(1) = True
- .TabEnabled(0) = False
- Me.Txt_Field.Enabled = False
- Me.Cmd_SelectField.Enabled = False
- End With
- Me.ImgCmb_Sort.Enabled = False
- Me.GsToolbar.Enabled = False
- End Select
- iNowState = iStatus
- End Function
- Private Sub Cmd_Save_Click() '保存
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- With Me.vsFG_Formula
- If .Rows > .FixedRows Then
- Save
- End If
- End With
- End Sub
- Private Sub Cmd_SelectField_Click() '显示字段帮助
- Dim frm As New XT_TybmczFrm
- Xtbmczdm = "Pm_FormulaField"
- frm.sParamater = GetComboKey(Me.ImgCmb_Sort, 0) '自己加入的变量,用来增加条件
- frm.Show 1
- Me.Txt_Field.Text = Xtfhcsfz
- Me.Txt_Field.Tag = Xtfhcs
- Set frm = Nothing
- End Sub
- Private Sub Cmd_Up_Click()
- CmdUP Me.vsFG_Formula
- 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 TB_Function.Buttons("dy").Visible And TB_Function.Buttons("dy").Enabled Then
- Call TB_Function_ButtonClick(Me.TB_Function.Buttons("dy"))
- End If
- Case "A" 'Ctrl+A 增加
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- If TB_Function.Buttons("Add").Visible And TB_Function.Buttons("Add").Enabled Then
- Call TB_Function_ButtonClick(Me.TB_Function.Buttons("Add"))
- End If
- Case "D" 'Ctrl+D 删除
- If TB_Function.Buttons("Del").Visible And TB_Function.Buttons("Del").Enabled Then
- Call TB_Function_ButtonClick(Me.TB_Function.Buttons("Del"))
- End If
- End Select
- End If
- End Sub
- Private Sub Form_Load()
- On Error GoTo ErrCtrl
- iNowState = 0
- Dim s As String
- Dim rs As New ADODB.Recordset
- Dim itm As ComboItem
- '调入打印页面设置窗体
- ReportTitle = "公式定义"
- XtReportCode = "PM_Formula"
- Load Dyymctbl
- '调 入 网 格(Fixed)
- GridCode = "PM_Formula"
- Call BzWgcsh(Me.vsFG_Formula, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Sfxshjwg = GridInf(7)
- Szzls = Me.vsFG_Formula.Cols - 1
- '填充工资类别
- s = "SELECT DISTINCT b.SortID,b.SortName FROM PM_OpeSort a INNER JOIN PM_Sort b on a.SortID=b.SortID WHERE a.Czybm='" & Xtczybm & "'"
- Set rs = Cw_DataEnvi.DataConnect.Execute(s)
- With rs
- Do While Not .EOF()
- Set itm = Me.ImgCmb_Sort.ComboItems.Add(, "@" & Trim(!SortId), Trim(!SortName))
- itm.Tag = !SortId
- .MoveNext
- Loop
- .Close
- End With
- Set rs = Nothing
- Set itm = Nothing
- With Me.ImgCmb_Sort
- If .ComboItems.Count > 0 Then
- .ComboItems(1).Selected = True
- End If
- End With
- InitView Me.TV_PreField, " FieldType<>0 " '填充字段树
- RefreshGrid '刷新网格内容
- ChangeStatus STATUS_VIEW '改变工具栏状态
- '编辑(新增、修改、删除)权限索引
- Str_RightEdit = "Pm_Formula_edit"
- Exit Sub
- ErrCtrl:
- If rs.State = 1 Then
- rs.Close
- End If
- Set rs = Nothing
- Set itm = Nothing
- Unload Me
- End Sub
- Private Function Add() '改变为新增状态
- ChangeStatus STATUS_ADD
- End Function
- Private Function Edit(iPos As Integer) '修改iPos行的记录
- On Error Resume Next
- Dim s As String
- Dim rs As New ADODB.Recordset
- s = "SELECT a.*,b.ChName as FieldNameC from PM_Formula a " & Chr(10) _
- & " INNER JOIN Rs_Items b on a.FieldName=b.FieldName " & Chr(10) _
- & " WHERE FCode=" & Me.vsFG_Formula.TextMatrix(iPos, 0)
- Set rs = Cw_DataEnvi.DataConnect.Execute(s)
- With rs
- If .EOF() Then
- MsgBox "此公式已经被删除,不能够修改!", vbOKOnly + vbCritical
- Exit Function
- End If
- Me.Txt_Field.Tag = Trim(!FieldName & "")
- Me.Txt_Field.Text = Trim(!FieldNameC & "")
- Me.Txt_FContent.Text = Trim(!FContentUser & "")
- Me.Txt_FLimit.Text = Trim(!FLimitUser & "")
- Me.Chk_Valid.Value = !FIsUsed
- End With
- ChangeStatus STATUS_EDIT
- End Function
- Private Function Del(iPos As Integer) '删除iPos行的记录
- On Error GoTo ErrCtrl
- Dim s As String
- If MsgBox("确定要删除当前公式吗?", vbOKCancel + vbQuestion) = vbOK Then
- s = "DELETE From PM_Formula WHERE FCode=" & Me.vsFG_Formula.TextMatrix(iPos, 0)
- Cw_DataEnvi.DataConnect.Execute (s)
- Me.vsFG_Formula.RemoveItem (iPos)
- End If
- Exit Function
- ErrCtrl:
- Dim smsg As String
- Dim smsgSys As String
- smsg = GetError(Err.Number)
- smsgSys = Err.Number & Err.Description & "!"
- MsgBox IIf(smsg = "", smsgSys, smsg), vbOKOnly + vbCritical
- End Function
- Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "bcgs" '保存表格格式
- Call Bcwggs(Me.vsFG_Formula, GridCode, GridStr())
- Case "hfmrgs" '恢复默认格式
- Call Hfmrgs(Me.vsFG_Formula, GridCode, GridStr())
- Case "szxsxm" '设置显示项目
- Call Szxsxm(Me.vsFG_Formula, GridCode)
- End Select
- End Sub
- Private Sub ImgCmb_Sort_Click()
- RefreshGrid
- End Sub
- Private Sub Opt_AddType_Click(Index As Integer) '根据不同状态填充不同字段
- If Me.Opt_AddType(0).Value = True Then
- InitView Me.TV_PreField, " FieldType<>0 "
- Else
- InitView Me.TV_PreField
- End If
- End Sub
- Private Sub TB_Function_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case UCase(Button.Key)
- Case UCase("ymsz") '页面设置
- Dyymctbl.Show 1
- Case UCase("yl") '预 览
- Call bbyl(True)
- Case UCase("dy") '打 印
- Call bbyl(False)
- Case UCase("Add") '增加
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- Add
- Case UCase("Edit") '修改
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
- Cmd_OK.Enabled = False
- End If
- With Me.vsFG_Formula
- If .Row >= .FixedRows Then
- Edit .Row
- End If
- End With
- Case UCase("Save") '保存
- With Me.vsFG_Formula
- If .Rows > .FixedRows Then
- Save
- End If
- End With
- Case UCase("Del") '删除
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- With Me.vsFG_Formula
- If .Row >= .FixedRows Then
- Del .Row
- End If
- End With
- Case UCase("Refresh") '刷新
- RefreshGrid
- Case UCase("Help") '帮助
- Call F1bz
- Case UCase("Quit") '退出
- Unload Me
- End Select
- End Sub
- Private Sub TV_FieldValue_BeforeLabelEdit(Cancel As Integer)
- '防止用户修改树的值
- Cancel = 1
- End Sub
- Private Sub TV_FieldValue_NodeClick(ByVal Node As MSComctlLib.Node) '添加字段到相应位置
- Dim nod As Node
- With Me.TV_FieldValue
- Set nod = .SelectedItem
- '如果没有选中节点
- If nod Is Nothing Then
- Exit Sub
- End If
- '如果节点是根结点
- If nod.Parent Is Nothing Then
- Set nod = Nothing
- Exit Sub
- End If
- Me.Txt_FLimit.Text = Me.Txt_FLimit.Text & " " & nod.Text
- End With
- Set nod = Nothing
- End Sub
- Private Sub TV_PreField_BeforeLabelEdit(Cancel As Integer)
- '防止用户修改树的值
- Cancel = 1
- End Sub
- Private Sub TV_PreField_DblClick() '添加此字段到相应位置
- Dim nod As Node
- With Me.TV_PreField
- '如果当前没有选中接点,退出
- Set nod = .SelectedItem
- If nod Is Nothing Then
- Exit Sub
- End If
- '如果不是字段.退出
- If nod.Children <> 0 Then
- Set nod = Nothing
- Exit Sub
- End If
- '如果是根结点,推出
- If nod.Parent Is Nothing Then
- Exit Sub
- End If
- '添加节点到相应位置
- If Me.Opt_AddType(0).Value = True Then
- Me.Txt_FContent.Text = Me.Txt_FContent.Text & " " & nod.Parent.Text & "." & nod.Text
- Else
- Me.Txt_FLimit.Text = Me.Txt_FLimit.Text & " " & nod.Parent.Text & "." & nod.Text
- End If
- End With
- '如果当前节点有相关帮助,并且不是上一次选中的节点,填充相关帮助
- If sFieldOld <> nod.Key Then
- FillValue2TV nod.Tag, Me.TV_FieldValue
- sFieldOld = nod.Key
- End If
- Set nod = Nothing
- End Sub
- Private Sub Txt_Field_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = 113 Then '帮助F2
- Call Cmd_SelectField_Click
- End If
- End Sub
- Private Sub vsFG_Formula_DblClick()
- '调用编辑公式过程
- Call TB_Function_ButtonClick(Me.TB_Function.Buttons("Edit"))
- 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 = 2 '报 表 小 标 题 行 数
- Bbbwhgs = 0 '报 表 表 尾 行 数
- 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) = " "
- Bbxbt(2) = "工资类别:" & Me.ImgCmb_Sort.Text
- bbxbtzzxs(1) = 0 '报表行组织形式(0-居左 1-居中 2-居右)
- Call Scyxsjb(Me.vsFG_Formula) '生成报表数据
- Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
- If Not bbylte Then
- Unload DY_Tybbyldy
- End If
- End Sub