资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:33k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Begin VB.Form XT_Control
- Caption = "桌面"
- ClientHeight = 5850
- ClientLeft = 675
- ClientTop = 1665
- ClientWidth = 9240
- Icon = "系统_主操作桌面.frx":0000
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 5850
- ScaleWidth = 9240
- WindowState = 2 'Maximized
- Begin VB.PictureBox picSplitter
- BackColor = &H00808080&
- BorderStyle = 0 'None
- FillColor = &H00808080&
- Height = 4800
- Left = 5880
- ScaleHeight = 2090.126
- ScaleMode = 0 'User
- ScaleWidth = 780
- TabIndex = 0
- Top = 705
- Visible = 0 'False
- Width = 72
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 4710
- Top = 1440
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 6
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":1042
- Key = "xttb"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":2094
- Key = "stb"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":30E6
- Key = "szk"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":3480
- Key = "kpgl"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":44D2
- Key = "gnqx"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":5524
- Key = "gnqx2"
- EndProperty
- EndProperty
- End
- Begin VB.PictureBox picTitles
- Align = 1 'Align Top
- Appearance = 0 'Flat
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 300
- Left = 0
- ScaleHeight = 300
- ScaleWidth = 9240
- TabIndex = 1
- TabStop = 0 'False
- Top = 420
- Width = 9240
- Begin VB.Label lblTitle
- BorderStyle = 1 'Fixed Single
- Caption = "百利/ERP"
- Height = 270
- Index = 0
- Left = 0
- TabIndex = 3
- Tag = " 树形视图:"
- Top = 12
- Width = 2016
- End
- Begin VB.Label lblTitle
- BorderStyle = 1 'Fixed Single
- Caption = " 列表视图:"
- Height = 270
- Index = 1
- Left = 2078
- TabIndex = 2
- Tag = " 列表视图:"
- Top = 12
- Width = 3216
- End
- End
- Begin MSComDlg.CommonDialog dlgCommonDialog
- Left = 5400
- Top = 870
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin MSComctlLib.TreeView tvTreeView
- Height = 4800
- Left = 0
- TabIndex = 4
- Top = 705
- Width = 2010
- _ExtentX = 3545
- _ExtentY = 8467
- _Version = 393217
- Indentation = 117
- Style = 7
- ImageList = "ImageList1"
- Appearance = 1
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin MSComctlLib.Toolbar tbToolBar
- Align = 1 'Align Top
- Height = 420
- Left = 0
- TabIndex = 5
- Top = 0
- Width = 9240
- _ExtentX = 16298
- _ExtentY = 741
- ButtonWidth = 609
- ButtonHeight = 582
- AllowCustomize = 0 'False
- Appearance = 1
- ImageList = "imlToolbarIcons"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 10
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "返回"
- Object.ToolTipText = "返回"
- ImageKey = "xq"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "向前"
- Object.ToolTipText = "向前"
- ImageKey = "xh"
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "大图标"
- Object.ToolTipText = "大图标"
- ImageKey = "dtb"
- Style = 2
- Value = 1
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "小图标"
- Object.ToolTipText = "小图标"
- ImageKey = "xtb"
- Style = 2
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "列表"
- Object.ToolTipText = "列表"
- ImageKey = "lb"
- Style = 2
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "详细资料"
- Object.ToolTipText = "详细资料"
- ImageKey = "xxzl"
- Style = 2
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ImageList imlToolbarIcons
- Left = 4710
- Top = 840
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 6
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":58BE
- Key = "xq"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":5C58
- Key = "xh"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":5FF2
- Key = "dtb"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":638C
- Key = "xtb"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":6726
- Key = "lb"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":6AC0
- Key = "xxzl"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ImageList ImageList2
- Left = 4710
- Top = 2040
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 32
- ImageHeight = 32
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 3
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":6E5A
- Key = "y"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":7B34
- Key = ""
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":7E54
- Key = "i"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ListView lvListView
- Height = 3375
- Left = 2160
- TabIndex = 6
- Top = 750
- Width = 2295
- _ExtentX = 4048
- _ExtentY = 5953
- Arrange = 2
- LabelWrap = -1 'True
- HideSelection = -1 'True
- OLEDragMode = 1
- OLEDropMode = 1
- PictureAlignment= 1
- _Version = 393217
- Icons = "ImageList2"
- SmallIcons = "ImageList1"
- ColHdrIcons = "ImageList1"
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- Appearance = 1
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- OLEDragMode = 1
- OLEDropMode = 1
- NumItems = 0
- End
- Begin VB.Image imgSplitter
- Height = 4788
- Left = 1965
- MousePointer = 9 'Size W E
- Top = 705
- Width = 150
- End
- End
- Attribute VB_Name = "XT_Control"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '***********************************************************
- '* 模 块 名 称 :系统主操作桌面
- '* 功 能 描 述 :
- '* 程序员姓名 :张建忠
- '* 最后修改人 :
- '* 最后修改时间:2001/06/23
- '* 备 注:封版
- '***********************************************************
- Const NAME_COLUMN = 0
- Const TYPE_COLUMN = 1
- Const SIZE_COLUMN = 2
- Const DATE_COLUMN = 3
- Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
- Dim mbMoving As Boolean
- Dim sjgnbmStr As String '上级编码
- Const sglSplitLimit = 1000
- Dim nodX As Node
- Dim mitem As ListItem
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- Dim Ztxxrec As New ADODB.Recordset '帐套信息动态集
- Dim Xtgnbrec As New ADODB.Recordset '系统功能表
- Dim Xtqxxzrec As New ADODB.Recordset '系统权限限制动态集
- Dim Tsxx As String '系统提示信息
- Dim gnsyte As String '系统功能项索引
- Dim Xtrlrec As New ADODB.Recordset '系统日历动态集
- Dim Ctsfscdr As Boolean '窗体是否首次读入
- Private Sub lvListView_DblClick() '点击ListView执行相应功能
- If lvListView.ListItems.count > 0 Then
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM xt_xtgnb where gnbm='" + Mid(Trim(lvListView.SelectedItem.Key), 2, Len(Trim(lvListView.SelectedItem.Key)) - 1) + "'")
- If Not Xtgnbrec.EOF Then
- If Xtgnbrec.Fields("mjbz") = True Then
- gnsyte = Trim(Xtgnbrec.Fields("gnsy"))
- Call Zxxymk(gnsyte)
- Else
- '---------------
- Dim Ssql As String
- sjgnbmStr = ""
- lvListView.ColumnHeaders.Clear
- lvListView.ListItems.Clear
- Ssql = "SELECT * FROM xt_xtgnb where sjgnbm='" + Xtgnbrec.Fields("gnbm") + "' and MenuList=1 order by gnbm"
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute(Ssql)
- lvListView.ColumnHeaders.Add 1, "rcsw", tvTreeView.SelectedItem.Text, 3000, , "stb"
- Do While Not Xtgnbrec.EOF
- Set mitem = lvListView.ListItems.Add()
- mitem.Text = Trim(Xtgnbrec!gnmc)
- If Xtgnbrec.Fields("mjbz") Then
- mitem.SmallIcon = "gnqx"
- mitem.Icon = "y"
- Else
- mitem.Icon = "i"
- mitem.SmallIcon = "stb"
- End If
- mitem.Key = "T" & Trim(Xtgnbrec!gnbm)
- Xtgnbrec.MoveNext
- Loop
- '---------------
- End If
- End If
- End If
- End Sub
- Private Sub lvListView_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- Call lvListView_DblClick
- End If
- End Sub
- Private Sub tvTreeView_NodeClick(ByVal Node As MSComctlLib.Node)
- Dim Ssql As String
- If Node.Tag <> "" Then
- If Node.Tag = False Then
- Ssql = "SELECT * FROM xt_xtgnb where sjgnbm='" + Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) + "' and MenuList=1 order by gnbm"
- If sjgnbmStr = Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) Then
- Exit Sub
- Else
- sjgnbmStr = Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1)
- End If
- Else
- Ssql = "SELECT * FROM xt_xtgnb a," _
- & "(SELECT sjgnbm FROM xt_xtgnb where gnbm='" + Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) + "')b" & " where a.sjgnbm=b.sjgnbm and MenuList=1 order by gnbm"
- End If
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute(Ssql)
- If Node.Tag = True Then
- If sjgnbmStr = Trim(Xtgnbrec!sjgnbm) Then
- Exit Sub
- Else
- sjgnbmStr = Trim(Xtgnbrec!sjgnbm)
- End If
- End If
- lvListView.ColumnHeaders.Clear
- lvListView.ListItems.Clear
- lvListView.ColumnHeaders.Add 1, "rcsw", "明细", 3000, , "stb"
- Do While Not Xtgnbrec.EOF
- Set mitem = lvListView.ListItems.Add()
- mitem.Text = Trim(Xtgnbrec!gnmc)
- If Xtgnbrec.Fields("mjbz") Then
- mitem.SmallIcon = "gnqx"
- mitem.Icon = "y"
- Else
- mitem.Icon = "i"
- mitem.SmallIcon = "stb"
- End If
- mitem.Key = "T" & Trim(Xtgnbrec!gnbm)
- Xtgnbrec.MoveNext
- Loop
- End If
- End Sub
- Public Sub TreeInit()
- 'bsj 10月10日
- '在换新的账套时树型目录没有更新
- '所以在此窗体内加入这个公共过程
- '以在Xt_Main中的Xtcsh模块中调用
- '用以刷新树菜单
- tvTreeView.Nodes.Clear
- Call Cshgns
- End Sub
- Public Sub Cshgns() '初始化系统功能树
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM xt_xtgnb where gnbm like '04%' and MenuList=1 order by gnbm")
- tvTreeView.Nodes.Add , 4, "T", "百利/ERP5.0", "xttb"
- With Xtgnbrec
- Do While Not .EOF
- If .Fields("mjbz") Then
- Set nodX = tvTreeView.Nodes.Add("T" + Trim(.Fields("sjgnbm")), 4, "T" + Trim(.Fields("gnbm")), Trim(.Fields("gnmc")), "gnqx")
- Else
- If Trim(.Fields("sjgnbm")) = "" Then
- Set nodX = tvTreeView.Nodes.Add("T" + Trim(.Fields("sjgnbm")), 4, "T" + Trim(.Fields("gnbm")), Trim(.Fields("gnmc")), "kpgl")
- Else
- Set nodX = tvTreeView.Nodes.Add("T" + Trim(.Fields("sjgnbm")), 4, "T" + Trim(.Fields("gnbm")), Trim(.Fields("gnmc")), "stb")
- End If
- End If
- nodX.Tag = Xtgnbrec!mjbz
- If Len(Trim(.Fields("sjgnbm"))) <= 2 Then
- nodX.EnsureVisible
- End If
- .MoveNext
- Loop
- End With
- End Sub
- '系统功能树操作
- Private Sub tvTreeView_BeforeLabelEdit(Cancel As Integer) '屏蔽编辑
- Cancel = 1
- End Sub
- Private Sub tvTreeView_Collapse(ByVal Node As MSComctlLib.Node) '功能树收缩
- If Node.Index <> 1 And Node.Key <> "T04" Then
- Node.Image = "stb"
- End If
- End Sub
- Private Sub tvTreeView_Expand(ByVal Node As MSComctlLib.Node) '功能树展开
- If Node.Index <> 1 And Node.Key <> "T04" Then
- Node.Image = "szk"
- End If
- End Sub
- Private Sub tvTreeView_DblClick() '选择功能
- If tvTreeView.SelectedItem.Children = 0 Then
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM xt_xtgnb where gnbm='" + Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) + "'")
- If Not Xtgnbrec.EOF Then
- gnsyte = Trim(Xtgnbrec.Fields("gnsy"))
- Call Zxxymk(gnsyte)
- End If
- End If
- End Sub
- Public Sub Zxxymk(gnsy As String) '根据用户选择执行相应程序
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim SqlStr As String '临时查询字符串
- If Len(Trim(gnsy)) = 0 Then
- Exit Sub
- End If
- Select Case gnsy
- Case "cwfx_BaseProjSet" '基本项目设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(gnsy, Xtczybm, 1, True) Then
- Exit Sub
- End If
- JC_FrmBaseProjSet.HelpContextID = "0411001"
- JC_FrmBaseProjSet.Show vbModal
- Case "cwfx_Balacen" '资产负债表设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(gnsy, Xtczybm, 1, True) Then
- Exit Sub
- End If
- JC_FrmBalSetup.HelpContextID = "0411003001"
- JC_FrmBalSetup.Show vbModal
- Case "cwfx_Income" '损益表设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(gnsy, Xtczybm, 1, True) Then
- Exit Sub
- End If
- JC_FrmIncSetup.HelpContextID = "0411003002"
- JC_FrmIncSetup.Show vbModal
- Case "cwfx_Tag" '指标设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(gnsy, Xtczybm, 1, True) Then
- Exit Sub
- End If
- JC_FrmTagSetup.HelpContextID = "0411002001"
- JC_FrmTagSetup.Show vbModal
- Case "cwfx_Pro" '产品毛利率设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(gnsy, Xtczybm, 1, True) Then
- Exit Sub
- End If
- JC_FrmProSetup.HelpContextID = "0411002002"
- JC_FrmProSetup.Show vbModal
- Case "cwfx_Ite" '项目毛利率设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(gnsy, Xtczybm, 1, True) Then
- Exit Sub
- End If
- JC_FrmIteSetup.HelpContextID = "0411002003"
- JC_FrmIteSetup.Show vbModal
- '*************预算设置表
- Case "cwfx_DeptBudget" '部门预算表
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("cwfx_DeptBudget_Edit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Unload_TF = True
- YS_FrmDeptBudgetC.Show 1
- Case "cwfx_ItemBudget" '项目预算表
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("cwfx_ItemBudget_Edit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Unload_TF = True
- YS_FrmItemBudgetC.Show 1
- Case "cwfx_AccntBudget" '科目预算表
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("cwfx_AccntBudget_Edit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Unload_TF = True
- YS_FrmAccntBudgetC.Show 1
- Case "cwfx_ProfitBudget" '利润预算表
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("cwfx_ProfitBudget_Edit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Unload_TF = True
- YS_FrmProfitBudgetC.Show 1
- '*************预算设置表
- Case "cwfx_CashIncomeCost" '现金收支设置表
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("cwfx_CashIncomeCost_Edit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Unload_TF = True
- JC_FrmCashIncomeCostC.HelpContextID = "0411005"
- JC_FrmCashIncomeCostC.Show 1
- Case "ZBFX_BaseGuideLine" '指标分析
- ZBFX_BaseGuideLine.HelpContextID = "0412001"
- ZBFX_BaseGuideLine.Show
- Zbfx_BaseGuideLineSeach.Show vbModal
- Case "cwfx_ProFx" '产品分析
- Zbfx_ProFx.HelpContextID = "0412002"
- Zbfx_ProFx.Show
- Case "cwfx_IteFx" '项目分析
- Zbfx_IteFx.HelpContextID = "0412003"
- Zbfx_IteFx.Show '
- Case "cwfx_BalJds" '资产负债表分析-绝对数分析
- Call BalFx(gnsy, "0413001001")
- Case "cwfx_BalDj" '资产负债表分析-定基分析
- Call BalFx(gnsy, "0413001002")
- Case "cwfx_BalHb" '资产负债表分析-环比分析
- Call BalFx(gnsy, "0413001003")
- Case "cwfx_BalDb" '资产负债表分析-对比分析
- Call BalFx2(gnsy, "0413001004")
- Case "cwfx_BalJg" '资产负债表分析-结构分析
- Call BalFx2(gnsy, "0413001005")
- '-----------------------------------------------------
- Case "cwfx_IncJds" '损益表分析-绝对数分析
- Call IncFx(gnsy, "0413002001")
- Case "cwfx_IncDj" '损益表分析-定基分析
- Call IncFx(gnsy, "0413002002")
- Case "cwfx_IncHb" '损益表分析-环比分析
- Call IncFx(gnsy, "0413002003")
- Case "cwfx_IncDb" '损益表分析-对比分析
- Call IncFx(gnsy, "0413002004")
- Case "cwfx_IncJg" '损益表分析-结构分析
- Call IncFx(gnsy, "0413002005")
- '===================================================
- '*************预算分析表
- Case "cwfx_DeptBudgetA" '部门预算分析
- If bln_FrmBudgetA = True Then
- Unload YF_FrmAnalysis
- End If
- bln_FrmBudgetA = True
- Str_Title = "部门"
- Str_ReportSubTitle = "部门"
- Set Frm_AnalysisC = YF_FrmDeptC
- YF_FrmAnalysis.HelpContextID = "0414001"
- YF_FrmAnalysis.Show
- YF_FrmDeptC.Show vbModal
- Case "cwfx_ItemBudgetA" '项目预算分析
- If bln_FrmBudgetA = True Then
- Unload YF_FrmAnalysis
- End If
- bln_FrmBudgetA = True
- Str_ReportSubTitle = "项目"
- Str_Title = "项目"
- Set Frm_AnalysisC = YF_FrmItemC
- YF_FrmAnalysis.HelpContextID = "0414002"
- YF_FrmAnalysis.Show
- YF_FrmItemC.Show vbModal
- Case "cwfx_AccountBudgetA" '科目预算分析
- If bln_FrmBudgetA = True Then
- Unload YF_FrmAnalysis
- End If
- bln_FrmBudgetA = True
- Str_ReportSubTitle = "科目"
- Str_Title = "科目"
- str_BudgetProc = "cwfx_Sp_AccountBudget "
- Set Frm_AnalysisC = YF_FrmAccountC
- YF_FrmAnalysis.HelpContextID = "0414003"
- YF_FrmAnalysis.Show
- YF_FrmAccountC.Show vbModal
- Case "cwfx_IncomeBudgetA" '收入预算分析
- If bln_FrmBudgetA = True Then
- Unload YF_FrmAnalysis
- End If
- bln_FrmBudgetA = True
- Str_Title = "收入"
- Str_ReportSubTitle = "收入"
- str_BudgetProc = "Cwfx_Sp_IncomeBudget "
- Set Frm_AnalysisC = YF_FrmAccountC
- YF_FrmAnalysis.HelpContextID = "0414004"
- YF_FrmAnalysis.Show
- YF_FrmAccountC.Show vbModal
- Case "cwfx_CostBudgetA" '成本费用预算分析
- If bln_FrmBudgetA = True Then
- Unload YF_FrmAnalysis
- End If
- bln_FrmBudgetA = True
- Str_Title = "成本"
- Str_ReportSubTitle = "成本"
- str_BudgetProc = "Cwfx_Sp_CostBudget "
- Set Frm_AnalysisC = YF_FrmAccountC
- YF_FrmAnalysis.HelpContextID = "0414005"
- YF_FrmAnalysis.Show
- YF_FrmAccountC.Show vbModal
- Case "cwfx_ProfitBudgetA" '利润预算分析
- YF_FrmProfitA.HelpContextID = "0414006"
- YF_FrmProfitA.Show
- YF_FrmProfitC.Show vbModal
- '*************预算分析表
- '*************收入和成本分析表
- Case "cwfx_InComeChangeA" '收入对比分析
- Set Frm_AnalysisA = SC_FrmIncomeCostChangeA
- str_AnalysisProc = "Cwfx_Sp_IncomeCompare "
- Str_Title = "收入对比分析"
- Frm_AnalysisA.HelpContextID = "0415001001"
- Frm_AnalysisA.Show
- SC_FrmIncomeCostC.Show vbModal
- Case "cwfx_InComeStruA" '收入结构分析
- Set Frm_AnalysisA = SC_FrmIncomeCostStruA
- str_AnalysisProc = "Cwfx_Sp_IncomeCompare "
- Str_Title = "收入结构分析"
- Frm_AnalysisA.HelpContextID = "0415001002"
- Frm_AnalysisA.Show
- SC_FrmIncomeCostC.Show vbModal
- Case "cwfx_CostChangeA" '成本费用对比分析
- Set Frm_AnalysisA = SC_FrmIncomeCostChangeA
- str_AnalysisProc = "Cwfx_Sp_CostCompare "
- Str_Title = "成本费用对比分析"
- Frm_AnalysisA.HelpContextID = "0415002001"
- Frm_AnalysisA.Show
- SC_FrmIncomeCostC.Show vbModal
- Case "cwfx_CostStruA" '成本费用结构分析
- Set Frm_AnalysisA = SC_FrmIncomeCostStruA
- str_AnalysisProc = "Cwfx_Sp_CostCompare "
- Str_Title = "成本费用结构分析"
- Frm_AnalysisA.HelpContextID = "0415002002"
- Frm_AnalysisA.Show
- SC_FrmIncomeCostC.Show vbModal
- '*************收入和成本分析表
- '*************现金收支表分析
- Case "cwfx_CashTableA" '现金收支表分析
- XJ_FrmCash.HelpContextID = "0416001"
- XJ_FrmCash.Show
- XJ_FrmCashC.Show vbModal
- Case "cwfx_CashStrucA" '现金收支结构表分析
- Set Frm_AnalysisC = XJ_FrmCashStruA
- Frm_AnalysisC.HelpContextID = "0416003"
- Frm_AnalysisC.Show
- XJ_FrmCashChangeC.Show vbModal
- Case "cwfx_CashChangeA" '现金收支增减表分析
- Set Frm_AnalysisC = XJ_FrmCashChangeA
- Frm_AnalysisC.HelpContextID = "0416002"
- Frm_AnalysisC.Show
- XJ_FrmCashChangeC.Show vbModal
- '*************现金收支表分析
- '*************因素分析
- Case "cwfx_QsFx" '因素趋势分析
- YX_FrmQsFx.HelpContextID = "0417001"
- YX_FrmQsFx.Show
- YX_FrmQsSeach.Show vbModal
- '----查询窗体显示-------
- Case "cwfx_AccountStruA" '科目结构分析
- YX_FrmAccountStruA.HelpContextID = "0417002"
- YX_FrmAccountStruA.Show
- YX_FrmAccountStruC.Show vbModal
- Case "cwfx_DeptInComeStruA" '部门收入分析
- str_AnalysisProc = "Cwfx_Sp_DeptIncomeA "
- Str_Title = "部门收入科目分析表"
- YX_FrmDeptAccountA.HelpContextID = "0417003011"
- YX_FrmDeptAccountA.Show
- YX_FrmDeptAccountC.Show vbModal
- Case "cwfx_DeptCostStruA" '部门支出分析
- str_AnalysisProc = "Cwfx_Sp_DeptCostA "
- Str_Title = "部门支出科目分析表"
- YX_FrmDeptAccountA.HelpContextID = "0417003012"
- YX_FrmDeptAccountA.Show
- YX_FrmDeptAccountC.Show vbModal
- Case "cwfx_AccountDeptA" '科目按部门分析
- YX_FrmAccountDeptA.HelpContextID = "041700302"
- YX_FrmAccountDeptA.Show
- YX_FrmAccountDeptC.Show vbModal
- '*************因素分析 end
- '文件
- Case "cwfx_register" '用户重新注册
- XT_login.HelpContextID = "0410001"
- XT_login.Show 1
- Case "c_quit"
- Unload XT_Main
- '工具
- Case "cwfx_gnbmkmrl" '会计日历
- XT_kjrlFrm.HelpContextID = "0418001"
- XT_kjrlFrm.Show 1
- Case "cwfx_gnbmjsq" '计算器
- Shell "calc.exe", vbNormalFocus
- '帮助
- Case "cwfx_xtbz" '系统帮助
- Call F1bz
- Case "cwfx_gy" '关于
- XT_frmAbout.Show
- End Select
- Exit Sub
- Cwcl:
- Tsxx = "此项系统功能有待完善!"
- Call Xtxxts(Tsxx, 0, 4)
- Exit Sub
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) '用户关闭窗体
- If Unload_TF = False Then
- Cancel = 1
- Me.WindowState = 1
- End If
- End Sub
- Private Sub Form_Load()
- bln_FrmBudgetA = False '公用变量代表窗体是否已经打开
- Me.Left = 0
- Me.Top = 0
- Me.Width = XT_Main.Width - 60
- Me.Height = XT_Main.Height - 760 - 690
- Call Cshgns
- '启动调入数据等待提示
- Load XT_Wait
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- On Error Resume Next
- Dim i As Integer
- For i = Forms.count - 1 To 1 Step -1
- Unload Forms(i)
- Next
- If Me.WindowState <> vbMinimized Then
- SaveSetting App.Title, "Settings", "MainLeft", Me.Left
- SaveSetting App.Title, "Settings", "MainTop", Me.Top
- SaveSetting App.Title, "Settings", "MainWidth", Me.Width
- SaveSetting App.Title, "Settings", "MainHeight", Me.Height
- End If
- SaveSetting App.Title, "Settings", "ViewMode", lvListView.View
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- If Me.Width < 3000 Then Me.Width = 3000
- SizeControls imgSplitter.Left
- End Sub
- Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- With imgSplitter
- picSplitter.Move .Left, .Top, .Width 2, .Height - 20
- End With
- picSplitter.Visible = True
- mbMoving = True
- End Sub
- Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim sglPos As Single
- If mbMoving Then
- sglPos = X + imgSplitter.Left
- If sglPos < sglSplitLimit Then
- picSplitter.Left = sglSplitLimit
- ElseIf sglPos > Me.Width - sglSplitLimit Then
- picSplitter.Left = Me.Width - sglSplitLimit
- Else
- picSplitter.Left = sglPos
- End If
- End If
- End Sub
- Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- SizeControls picSplitter.Left
- picSplitter.Visible = False
- mbMoving = False
- lvListView.Refresh
- End Sub
- Private Sub TreeView1_DragDrop(Source As Control, X As Single, Y As Single)
- If Source = imgSplitter Then
- SizeControls X
- End If
- End Sub
- Sub SizeControls(X As Single)
- On Error Resume Next
- '设置 Width 属性
- If X < 3500 Then X = 3500
- If X > (Me.Width - 1500) Then X = Me.Width - 1500
- tvTreeView.Width = X
- imgSplitter.Left = X
- lvListView.Left = X + 40
- lvListView.Width = Me.Width - (tvTreeView.Width + 140)
- lblTitle(0).Width = tvTreeView.Width
- lblTitle(1).Left = lvListView.Left + 20
- lblTitle(1).Width = lvListView.Width - 40
- '设置 Top 属性
- tvTreeView.Top = tbToolBar.Height + picTitles.Height
- lvListView.Top = tvTreeView.Top
- '设置 height 属性
- tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height)
- lvListView.Height = tvTreeView.Height
- imgSplitter.Top = tvTreeView.Top
- imgSplitter.Height = tvTreeView.Height
- End Sub
- Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
- On Error Resume Next
- Select Case Button.Key
- Case "返回"
- tvTreeView.SetFocus
- SendKeys "{up}", True
- Case "向前"
- tvTreeView.SetFocus
- SendKeys "{DOWN}", True
- Case "大图标"
- lvListView.View = lvwIcon
- Case "小图标"
- lvListView.View = lvwSmallIcon
- Case "列表"
- lvListView.View = lvwList
- Case "详细资料"
- lvListView.View = lvwReport
- End Select
- End Sub