资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:17k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
- Begin VB.Form YX_FrmQsSeach
- BorderStyle = 3 'Fixed Dialog
- Caption = "因素趋势分析查询条件"
- ClientHeight = 4065
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7560
- Icon = "因素分析_因素趋势分析条件.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4065
- ScaleWidth = 7560
- ShowInTaskbar = 0 'False
- StartUpPosition = 1 '所有者中心
- Begin VB.Frame Frame1
- Height = 555
- Left = 60
- TabIndex = 10
- Top = 3450
- Width = 4155
- Begin VB.ComboBox Combo_DateBegin
- Height = 300
- Left = 1065
- Style = 2 'Dropdown List
- TabIndex = 12
- Top = 180
- Width = 1275
- End
- Begin VB.ComboBox Combo_DateEnd
- Height = 300
- Left = 2700
- Style = 2 'Dropdown List
- TabIndex = 11
- Top = 180
- Width = 1275
- End
- Begin VB.Line Line1
- X1 = 2415
- X2 = 2595
- Y1 = 330
- Y2 = 330
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "查询期间:"
- Height = 180
- Left = 180
- TabIndex = 13
- Top = 240
- Width = 810
- End
- End
- Begin VB.CommandButton Command1
- Caption = ">"
- Height = 360
- Left = 2880
- TabIndex = 9
- Top = 150
- Width = 1245
- End
- Begin VB.CommandButton Command2
- Caption = "<"
- Height = 360
- Left = 2880
- TabIndex = 8
- Top = 720
- Width = 1245
- End
- Begin VB.CommandButton Command3
- Caption = ">>"
- Height = 360
- Left = 2880
- TabIndex = 7
- Top = 1290
- Width = 1245
- End
- Begin VB.CommandButton Command4
- Caption = "<<"
- Height = 360
- Left = 2880
- TabIndex = 6
- Top = 1860
- Width = 1245
- End
- Begin VB.CheckBox UnloadCheck
- Caption = "Check1"
- Height = 240
- Left = 585
- TabIndex = 5
- Top = 4305
- Visible = 0 'False
- Width = 1095
- End
- Begin VB.CommandButton QxCommand
- Cancel = -1 'True
- Caption = "取消(&C)"
- Height = 300
- Left = 6365
- TabIndex = 4
- Top = 3645
- Width = 1120
- End
- Begin VB.CommandButton QdCommand
- Caption = "确定(&O)"
- Height = 300
- Left = 5160
- TabIndex = 3
- Top = 3645
- Width = 1120
- End
- Begin VB.ComboBox Combo_fx
- Enabled = 0 'False
- Height = 300
- Left = 2880
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 3060
- Width = 1215
- End
- Begin VSFlex8Ctl.VSFlexGrid CxbbGridR
- Height = 3360
- Left = 4215
- TabIndex = 1
- Top = 45
- Width = 3270
- _ExtentX = 5768
- _ExtentY = 5927
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = -2147483636
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 50
- Cols = 10
- FixedRows = 1
- FixedCols = 1
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = -1 'True
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 1
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0 'False
- ShowComboButton = -1 'True
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- End
- Begin VSFlex8Ctl.VSFlexGrid CxbbGridL
- Height = 3360
- Left = 60
- TabIndex = 0
- Top = 45
- Width = 2730
- _ExtentX = 4815
- _ExtentY = 5927
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = -2147483636
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 3
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 50
- Cols = 10
- FixedRows = 1
- FixedCols = 1
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = -1 'True
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 1
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0 'False
- ShowComboButton = -1 'True
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- End
- End
- Attribute VB_Name = "YX_FrmQsSeach"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*********************************************************************
- '* 模 块 名 称 :因素趋势分析结果
- '* 功 能 描 述 :
- '* 程序员姓名 :魏永生
- '* 最后修改人 :
- '* 最后修改时间:2002/1/21
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '*********************************************************************
- Option Explicit
- Private Const strJ = "借方发生额"
- Private Const strD = "贷方发生额"
- Private Const strJe = "余额"
- Private Const strJF = "借"
- Private Const strDF = "贷"
- Public temRs As New ADODB.Recordset
- 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 Command1_Click()
- Call CxbbGridL_DblClick
- End Sub
- Private Sub Command2_Click()
- Call CxbbGridR_DblClick
- End Sub
- Private Sub Command3_Click()
- Do Until Me.CxbbGridL.Rows = Me.CxbbGridL.FixedRows
- Call CxbbGridL_DblClick
- Loop
- CxbbGridL.Sort = flexSortNumericAscending
- CxbbGridL.Refresh
- If CxbbGridL.Col = 1 Then
- CxbbGridL.Col = 2
- Else
- CxbbGridL.Col = 1
- End If
- End Sub
- Private Sub Command4_Click()
- Do Until Me.CxbbGridR.Rows = Me.CxbbGridR.FixedRows
- Call CxbbGridR_DblClick
- Loop
- CxbbGridR.Sort = flexSortNumericAscending
- If CxbbGridL.Col = 1 Then
- CxbbGridL.Col = 2
- Else
- CxbbGridL.Col = 1
- End If
- End Sub
- Private Sub CxbbGridL_DblClick()
- Dim str_specific As String
- If Me.CxbbGridL.Rows > Me.CxbbGridL.FixedRows Then
- Me.CxbbGridR.AddItem ""
- Me.CxbbGridR.Row = Me.CxbbGridR.Rows - 1
- Me.CxbbGridR.TextMatrix(Me.CxbbGridR.Row, Sydz("001", GridStr(), Szzls)) = Me.CxbbGridL.TextMatrix(Me.CxbbGridL.Row, Sydz("001", GridStr(), Szzls))
- Me.CxbbGridR.TextMatrix(Me.CxbbGridR.Row, Sydz("002", GridStr(), Szzls)) = Me.CxbbGridL.TextMatrix(Me.CxbbGridL.Row, Sydz("002", GridStr(), Szzls))
- Me.CxbbGridR.RowData(Me.CxbbGridR.Row) = Me.CxbbGridL.TextMatrix(Me.CxbbGridL.Row, 3)
- str_specific = Me.CxbbGridR.TextMatrix(Me.CxbbGridR.Row, Sydz("002", GridStr(), Szzls))
- If str_specific = "总资产" Or str_specific = "总负债" Then
- Combo_fx.Enabled = False
- Else
- Combo_fx.Enabled = True
- End If
- If Combo_fx.Enabled = True Then
- Me.CxbbGridR.TextMatrix(Me.CxbbGridR.Row, Sydz("003", GridStr(), Szzls)) = Combo_fx.Text
- End If
- Me.CxbbGridL.RemoveItem Me.CxbbGridL.Row
- Call CxbbGridL_RowColChange
- End If
- If Me.CxbbGridL.Rows > Me.CxbbGridL.FixedRows Then
- Me.CxbbGridL.Row = Me.CxbbGridL.FixedRows
- End If
- End Sub
- Private Sub CxbbGridL_RowColChange()
- Select Case CxbbGridL.TextMatrix(CxbbGridL.Row, 3)
- Case strJF '"借"
- Combo_fx.Enabled = True
- Case strDF ' "贷"
- Combo_fx.Enabled = True
- Case Else
- Combo_fx.Enabled = False
- End Select
- End Sub
- Private Sub CxbbGridR_DblClick()
- If Me.CxbbGridR.Rows > Me.CxbbGridR.FixedRows Then
- Me.CxbbGridL.AddItem ""
- Me.CxbbGridL.Row = Me.CxbbGridL.Rows - 1
- Me.CxbbGridL.TextMatrix(Me.CxbbGridL.Row, Sydz("001", GridStr(), Szzls)) = Me.CxbbGridR.TextMatrix(Me.CxbbGridR.Row, Sydz("001", GridStr(), Szzls))
- Me.CxbbGridL.TextMatrix(Me.CxbbGridL.Row, Sydz("002", GridStr(), Szzls)) = Me.CxbbGridR.TextMatrix(Me.CxbbGridR.Row, Sydz("002", GridStr(), Szzls))
- Me.CxbbGridL.TextMatrix(Me.CxbbGridL.Row, 3) = Me.CxbbGridR.RowData(Me.CxbbGridR.Row)
- Me.CxbbGridR.RemoveItem Me.CxbbGridR.Row
- End If
- If Me.CxbbGridR.Rows > Me.CxbbGridR.FixedRows Then
- Me.CxbbGridR.Row = Me.CxbbGridR.FixedRows
- End If
- Call CxbbGridL_RowColChange
- End Sub
- Private Sub Form_Load()
- '调 入 网 格
- GridCode = "cwfx_QsFxSL"
- Call BzWgcsh(CxbbGridL, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Sfxshjwg = GridInf(7)
- Szzls = CxbbGridL.Cols - 1
- Call Sub_Query
- GridCode = "cwfx_QsFxSR"
- Call BzWgcsh(CxbbGridR, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Sfxshjwg = GridInf(7)
- Szzls = CxbbGridR.Cols - 1
- '填充Combo 控件
- With Me.Combo_fx
- .AddItem strJ
- .AddItem strD
- .AddItem strJe
- .ListIndex = 0
- End With
- Call FillMonth(Combo_DateBegin)
- Call FillMonth(Combo_DateEnd)
- End Sub
- Private Sub FillMonth(PastCombo As ComboBox)
- Dim iMonth As Integer
- With PastCombo
- .Clear
- For iMonth = 1 To 12
- .AddItem Xtyear & "." & Format(iMonth, "00")
- Next
- .Text = Xtyear & "." & Format(Xtmm, "00")
- End With
- End Sub
- Private Sub Sub_Query() '生成查询结果
- Dim Rec_Query As New ADODB.Recordset '查询结果动态集
- Dim Jsqte As Integer
- CxbbGridL.Rows = CxbbGridL.FixedRows
- Jsqte = CxbbGridL.FixedRows
- CxbbGridL.AddItem ""
- CxbbGridL.TextMatrix(Jsqte, 1) = ""
- CxbbGridL.TextMatrix(Jsqte, 2) = "总资产"
- CxbbGridL.TextMatrix(Jsqte, 3) = ""
- Jsqte = Jsqte + 1
- CxbbGridL.AddItem ""
- CxbbGridL.TextMatrix(Jsqte, 1) = ""
- CxbbGridL.TextMatrix(Jsqte, 2) = "总负债"
- CxbbGridL.TextMatrix(Jsqte, 3) = ""
- Jsqte = Jsqte + 1
- Set Rec_Query = Cw_DataEnvi.DataConnect.Execute("SELECT cCode AS Code,cName AS Name,BalanceOri AS Fx FROM Cwzz_AccCode WHERE codelevel='1' order by ccode")
- With Rec_Query
- Jsqte = CxbbGridL.Rows
- Do While Not .EOF
- If Jsqte >= CxbbGridL.Rows Then
- CxbbGridL.AddItem ""
- End If
- CxbbGridL.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(!Code)
- CxbbGridL.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(!Name)
- CxbbGridL.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(!Fx)
- Jsqte = Jsqte + 1
- .MoveNext
- Loop
- End With
- End Sub
- Private Sub QdCommand_Click()
- If Me.CxbbGridR.Rows = Me.CxbbGridR.FixedRows Then
- Tsxx = "没有选择查询项目!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Sub
- End If
- If Me.Combo_DateEnd.ListIndex < Me.Combo_DateBegin.ListIndex Then
- Tsxx = "查询期应由小到大!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Sub
- End If
- UnloadCheck.Value = 1
- Me.Hide
- YX_FrmQsFx.Timer1.Enabled = True
- YX_FrmQsFx.SetFocus
- End Sub
- Private Sub QxCommand_Click()
- UnloadCheck.Value = 1
- Me.Hide
- End Sub