资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:14k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
- Begin VB.Form Balance_KF_InOut
- Caption = "结算入库单"
- ClientHeight = 5805
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 8355
- Icon = "结算_入库单.frx":0000
- LinkTopic = "Form1"
- ScaleHeight = 5805
- ScaleWidth = 8355
- StartUpPosition = 2 '屏幕中心
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 1
- Left = 3600
- Top = 60
- End
- Begin VB.CommandButton Gridsz
- Caption = "保存表格格式"
- Height = 300
- Left = 4500
- TabIndex = 7
- Top = 5310
- Width = 1305
- End
- Begin VB.CheckBox Check1
- Caption = "全消"
- Height = 255
- Index = 1
- Left = 1320
- TabIndex = 6
- Top = 5310
- Width = 855
- End
- Begin VB.CheckBox UnloadCheck
- Caption = "卸载窗体"
- Height = 615
- Left = 2400
- TabIndex = 5
- Top = 6000
- Width = 825
- End
- Begin VB.CheckBox Check1
- Caption = "全选"
- Height = 255
- Index = 0
- Left = 360
- TabIndex = 2
- Top = 5310
- Width = 855
- End
- Begin VB.CommandButton Command1
- Caption = "确定(&O)"
- Height = 300
- Left = 5910
- TabIndex = 1
- Top = 5310
- Width = 1120
- End
- Begin VB.CommandButton Command2
- Caption = "取消(C)"
- Height = 300
- Left = 7140
- TabIndex = 0
- Top = 5310
- Width = 1120
- End
- Begin VSFlex8Ctl.VSFlexGrid CXBBGrid
- Height = 4725
- Left = 90
- TabIndex = 3
- Top = 420
- Width = 8175
- _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 = 8388608
- ForeColorSel = -2147483639
- 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= 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
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- ShowComboButton = 1
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- DataMember = ""
- ComboSearch = 3
- AutoSizeMouse = -1 'True
- FrozenRows = 0
- FrozenCols = 0
- AllowUserFreezing= 0
- BackColorFrozen = 0
- ForeColorFrozen = 0
- WallPaperAlignment= 9
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- Begin VB.Label Label1
- Caption = "用鼠标单击所要选择的单据记录,出现选中标志,可以单选,也可以多选"
- ForeColor = &H000000FF&
- Height = 255
- Left = 150
- TabIndex = 4
- Top = 120
- Width = 6975
- End
- End
- Attribute VB_Name = "Balance_KF_InOut"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**************************************************************************
- '* 模 块 名 称 :入库单列表
- '* 功 能 描 述 :
- '* 程序员姓名 :周化江
- '* 最后修改人 :周化江
- '* 最后修改时间:2001/10/06
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '**************************************************************************
- '以下为固定使用变量
- 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)
- '''''''''''''自定义
- Dim str_OldFilterCondition As String
- Dim str_NowFilterCondition As String
- Private Sub Check1_Click(Index As Integer)
- Dim count As Integer
- Select Case Index
- Case 0
- If Check1(Index).Value Then
- Check1(1).Value = 0
- For count = CxbbGrid.FixedRows To CxbbGrid.Rows - CxbbGrid.FixedRows
- CxbbGrid.TextMatrix(count, Sydz("001", GridStr(), Szzls)) = "√"
- Next
- Else
- For count = CxbbGrid.FixedRows To CxbbGrid.Rows - CxbbGrid.FixedRows
- CxbbGrid.TextMatrix(count, Sydz("001", GridStr(), Szzls)) = ""
- Next
- End If
- Case 1
- If Check1(Index).Value Then
- Check1(0).Value = 0
- For count = CxbbGrid.FixedRows To CxbbGrid.Rows - CxbbGrid.FixedRows
- CxbbGrid.TextMatrix(count, Sydz("001", GridStr(), Szzls)) = ""
- Next
- Else
- For count = CxbbGrid.FixedRows To CxbbGrid.Rows - CxbbGrid.FixedRows
- CxbbGrid.TextMatrix(count, Sydz("001", GridStr(), Szzls)) = "√"
- Next
- End If
- End Select
- End Sub
- Private Sub Command1_Click()
- Dim str_InoutFilter As String
- Dim str_InoutFilter1 As String
- Dim int_temp As Long
- str_InoutFilter = " ltrim(rtrim(convert(char(20),InoutMainID))) +'#' + ltrim(rtrim(convert(char(10),InoutSubId))) in ( '' "
- str_InoutFilter1 = " ltrim(rtrim(convert(char(20),InoutMainID))) +''#'' + ltrim(rtrim(convert(char(10),InoutSubId))) in ( '''' "
- With CxbbGrid
- For int_temp = .FixedRows To .Rows - 1
- If Trim(.TextMatrix(int_temp, Sydz("001", GridStr(), Szzls))) = "√" Then
- str_InoutFilter = str_InoutFilter & ",'" & Trim(str(.ValueMatrix(int_temp, 0))) & "#" & Trim(str(.ValueMatrix(int_temp, 1))) & "'"
- str_InoutFilter1 = str_InoutFilter1 & ",''" & Trim(str(.ValueMatrix(int_temp, 0))) & "#" & Trim(str(.ValueMatrix(int_temp, 1))) & "''"
- End If
- Next int_temp
- str_InoutFilter = str_InoutFilter & ")"
- str_InoutFilter1 = str_InoutFilter1 & ")"
- End With
- Balance_KF_HandBalance.InOut_FilterCondition = str_InoutFilter
- Balance_KF_HandBalance.InOut_FilterConditionO = str_InoutFilter1
- Balance_KF_HandBalance.Timer2.Enabled = True
- Me.Hide
- End Sub
- Private Sub Command2_Click()
- Me.Hide
- End Sub
- Private Sub CxbbGrid_DblClick()
- With CxbbGrid
- If .Row > .FixedRows - 1 Then
- If Trim(.TextMatrix(.Row, Sydz("001", GridStr(), Szzls))) = "" Then
- .TextMatrix(.Row, Sydz("001", GridStr(), Szzls)) = "√"
- Else
- .TextMatrix(.Row, Sydz("001", GridStr(), Szzls)) = ""
- End If
- End If
- End With
- End Sub
- Private Sub Form_Activate()
- If Trim(Me.Old_FilterCondition) <> Trim(Me.Now_FilterCondition) Then
- Timer1.Enabled = True
- End If
- End Sub
- Private Sub Form_Load() '窗体装入
- '调 入 网 格(Fixed)
- GridCode = "Kf_InOutBalance"
- Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Sfxshjwg = GridInf(7)
- Szzls = CxbbGrid.Cols - 1
- End Sub
- Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long) '网格列发生移动时自动交换网格索引信息
- Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- If UnloadCheck.Value <> 1 Then
- Cancel = 1
- Me.Hide
- End If
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Me.Old_FilterCondition = ""
- End Sub
- Private Sub Gridsz_Click()
- Call Bcwggs(CxbbGrid, GridCode, GridStr()) '保存表格格式
- End Sub
- Private Sub grid_select(str_InoutNum As String, flag As String)
- Dim count As Integer
- If flag = "1" Then
- With CxbbGrid
- For count = 0 To .Rows - .FixedRows - 1
- If Trim(.TextMatrix(.FixedRows + count, Sydz("008", GridStr(), Szzls))) = Trim(str_InoutNum) Then
- .TextMatrix(.FixedRows + count, Sydz("001", GridStr(), Szzls)) = "√"
- End If
- Next
- End With
- Else
- With CxbbGrid
- For count = 0 To .Rows - .FixedRows - 1
- If Trim(.TextMatrix(.FixedRows + count, Sydz("008", GridStr(), Szzls))) = Trim(str_InoutNum) Then
- .TextMatrix(.FixedRows + count, Sydz("001", GridStr(), Szzls)) = ""
- End If
- Next
- End With
- End If
- End Sub
- Public Property Get Old_FilterCondition() As String
- Old_FilterCondition = str_OldFilterCondition
- End Property
- Public Property Let Old_FilterCondition(ByVal vNewValue As String)
- str_OldFilterCondition = vNewValue
- End Property
- Public Property Get Now_FilterCondition() As String
- Now_FilterCondition = str_NowFilterCondition
- End Property
- Public Property Let Now_FilterCondition(ByVal vNewValue As String)
- str_NowFilterCondition = vNewValue
- End Property
- Private Sub Timer1_Timer()
- Timer1.Enabled = False
- If Me.Old_FilterCondition = Me.Now_FilterCondition Then
- Exit Sub
- End If
- Dim int_temp As Long
- Dim rst_temp As New ADODB.Recordset
- Dim str_sqlTemp As String
- Dim jsqte As Long
- CxbbGrid.Rows = CxbbGrid.FixedRows
- Set rst_temp = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM KF_V_BalanceInOut " & Me.Now_FilterCondition)
- jsqte = CxbbGrid.FixedRows
- If rst_temp.RecordCount <> 0 Then
- rst_temp.MoveFirst
- With CxbbGrid
- For int_temp = 1 To rst_temp.RecordCount
- If jsqte >= .Rows Then
- .AddItem ""
- End If
- .TextMatrix(jsqte, 0) = rst_temp.Fields("InoutMainID") '主表ID
- .TextMatrix(jsqte, 1) = rst_temp.Fields("InoutSubID") '子表ID
- .TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim("" & rst_temp.Fields("MNumber"))
- .TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim("" & rst_temp.Fields("MName"))
- .TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(rst_temp.Fields("Model") & "")
- .TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(rst_temp.Fields("PrimaryUnitName") & "")
- .TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Trim(rst_temp.Fields("WhName") & "")
- .TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Trim(rst_temp.Fields("SupplierName") & "")
- .TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Trim("" & rst_temp.Fields("BillNum"))
- .TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Format(rst_temp.Fields("BillDate"), "yyyy-mm-dd")
- .TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = IIf(IsNull(rst_temp.Fields("FactReceiptQuan")) Or rst_temp.Fields("FactReceiptQuan") = 0, "", rst_temp.Fields("FactReceiptQuan"))
- .TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = IIf(IsNull(rst_temp.Fields("Price")) Or rst_temp.Fields("Price") = 0, "", rst_temp.Fields("Price"))
- .TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = IIf(IsNull(rst_temp.Fields("EMoney")) Or rst_temp.Fields("EMoney") = 0, "", rst_temp.Fields("EMoney"))
- .RowHeight(jsqte) = Sjhgd
- jsqte = jsqte + 1
- rst_temp.MoveNext
- Next int_temp
- End With
- End If
- rst_temp.Close
- Set rst_temp = Nothing
- Me.Old_FilterCondition = Me.Now_FilterCondition
- End Sub