资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:47k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{65A39231-6133-11D1-BAA2-444553540000}#1.0#0"; "vslight6.OCX"
- Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.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 Qc_MidGraphZxt
- BorderStyle = 1 'Fixed Single
- Caption = "中控指标折线图"
- ClientHeight = 6690
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 9075
- Icon = "质量系统_中控检验指标折线图.frx":0000
- LinkTopic = "Form2"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6690
- ScaleWidth = 9075
- StartUpPosition = 2 '屏幕中心
- Begin TabDlg.SSTab StTab
- Height = 6015
- Left = 60
- TabIndex = 7
- Top = 660
- Width = 8970
- _ExtentX = 15822
- _ExtentY = 10610
- _Version = 393216
- Style = 1
- Tabs = 1
- TabHeight = 520
- TabCaption(0) = "中控指标折线图查询"
- TabPicture(0) = "质量系统_中控检验指标折线图.frx":1042
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame1"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Frame2"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).ControlCount= 2
- Begin VB.Frame Frame2
- Caption = "查询结果"
- Height = 5535
- Left = 3690
- TabIndex = 18
- Top = 360
- Width = 5145
- Begin VSFlex8Ctl.VSFlexGrid CxbbGrid
- Height = 5085
- Left = 150
- TabIndex = 19
- Top = 240
- Width = 4815
- _ExtentX = 8493
- _ExtentY = 8969
- 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= 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 = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- End
- End
- Begin VB.Frame Frame1
- Caption = "查询条件"
- Height = 5535
- Left = 120
- TabIndex = 8
- Top = 360
- Width = 3465
- Begin VB.CommandButton Cmd_Clear
- Caption = "全清"
- Height = 315
- Left = 210
- TabIndex = 26
- Top = 4320
- Width = 1155
- End
- Begin VB.ComboBox Cmb_ItemName
- Height = 300
- Left = 1065
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 1740
- Width = 2205
- End
- Begin VB.ComboBox Cmb_SiteName
- Height = 300
- Left = 1065
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 1320
- Width = 2205
- End
- Begin VB.ComboBox Cmb_MName
- Height = 300
- Left = 1065
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 930
- Width = 2205
- End
- Begin VB.ComboBox Cmb_SiteCode
- Height = 300
- Left = 1770
- Style = 2 'Dropdown List
- TabIndex = 24
- Top = 930
- Visible = 0 'False
- Width = 915
- End
- Begin VB.ComboBox Cmb_MNumber
- Height = 300
- Left = 1650
- Style = 2 'Dropdown List
- TabIndex = 23
- Top = 930
- Visible = 0 'False
- Width = 1455
- End
- Begin VB.ComboBox Cmb_LineName
- Height = 300
- Left = 1065
- Style = 2 'Dropdown List
- TabIndex = 0
- Top = 510
- Width = 2205
- End
- Begin VB.CommandButton QdCommand
- Caption = "确定(&O)"
- Height = 300
- Left = 2145
- TabIndex = 6
- Top = 4320
- Width = 1120
- End
- Begin VB.Frame Frame3
- Caption = "取样日期范围"
- Height = 1155
- Left = 210
- TabIndex = 9
- Top = 3030
- Width = 3060
- Begin VB.CommandButton Ydcommand1
- Height = 302
- Index = 1
- Left = 2520
- Picture = "质量系统_中控检验指标折线图.frx":105E
- Style = 1 'Graphical
- TabIndex = 11
- Top = 660
- Width = 315
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 0
- Left = 1200
- TabIndex = 4
- Text = "0"
- Top = 270
- Width = 1320
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 1
- Left = 1200
- TabIndex = 5
- Text = "1"
- Top = 660
- Width = 1320
- End
- Begin VB.CommandButton Ydcommand1
- Height = 302
- Index = 0
- Left = 2520
- Picture = "质量系统_中控检验指标折线图.frx":13E8
- Style = 1 'Graphical
- TabIndex = 10
- Top = 270
- Width = 315
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "截止日期:"
- Height = 180
- Index = 1
- Left = 225
- TabIndex = 13
- Top = 705
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "起始日期:"
- Height = 180
- Index = 0
- Left = 225
- TabIndex = 12
- Top = 315
- Width = 810
- End
- End
- Begin VB.ComboBox Cmb_ItemCode
- Height = 300
- Left = 1470
- Style = 2 'Dropdown List
- TabIndex = 25
- Top = 1740
- Visible = 0 'False
- Width = 1395
- End
- Begin VB.ComboBox Cmb_LineCode
- Height = 300
- Left = 1770
- Style = 2 'Dropdown List
- TabIndex = 22
- Top = 510
- Visible = 0 'False
- Width = 1275
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "生产线:"
- Height = 180
- Index = 1
- Left = 225
- TabIndex = 17
- Top = 540
- Width = 630
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "物料名称:"
- Height = 180
- Index = 0
- Left = 225
- TabIndex = 16
- Top = 990
- Width = 810
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "取样点:"
- Height = 180
- Index = 2
- Left = 225
- TabIndex = 15
- Top = 1425
- Width = 630
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "检验项目:"
- Height = 180
- Index = 3
- Left = 225
- TabIndex = 14
- Top = 1770
- Width = 810
- End
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 570
- Left = 0
- TabIndex = 20
- Top = 0
- Width = 9075
- _ExtentX = 16007
- _ExtentY = 1005
- ButtonWidth = 820
- ButtonHeight = 953
- Appearance = 1
- Style = 1
- ImageList = "Imagelist1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 6
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- ImageKey = "sz"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- 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 = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 540
- Left = 6480
- TabIndex = 21
- Top = 0
- Width = 2595
- _ExtentX = 4577
- _ExtentY = 953
- ButtonWidth = 1455
- ButtonHeight = 953
- 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"
- ImageKey = "bcgs"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "默认列宽"
- Key = "hfmrgs"
- ImageKey = "mrlk"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "图形分析"
- Key = "graph"
- ImageKey = "tb"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ImageList Imagelist1
- Left = 3150
- Top = 0
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 41
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":17A6
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":1B40
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":1EDA
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":2274
- Key = "xz"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":260E
- Key = "xg"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":29A8
- Key = "sc"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":2D42
- Key = "zh"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":30DC
- Key = "sh"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":3476
- Key = "bc"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":3810
- Key = "fq"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":3BAA
- Key = "check"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":3F44
- Key = "qs"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":42DE
- Key = "fullcheck"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":4678
- Key = "qq"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":4A12
- Key = "first"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":4DAC
- Key = "prev"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":5146
- Key = "next"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":54E0
- Key = "last"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":587A
- Key = "bz"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":5C14
- Key = "tc"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":5FAE
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":6348
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":66E2
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":6A7C
- Key = "hz"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":6E16
- Key = "dw"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":71B0
- Key = "zx"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":754A
- Key = "mx"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":78E4
- Key = "hf"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":7C7E
- Key = "cx"
- EndProperty
- BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":8018
- Key = "sx"
- EndProperty
- BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":83B2
- Key = "dj"
- EndProperty
- BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":874C
- Key = "tb"
- EndProperty
- BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":8AE6
- Key = "px"
- EndProperty
- BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":8E80
- Key = "zq"
- EndProperty
- BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":921A
- Key = "wc"
- EndProperty
- BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":95B4
- Key = "ye"
- EndProperty
- BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":994E
- Key = "zz"
- EndProperty
- BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":9CE8
- Key = "jz"
- EndProperty
- BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":A082
- Key = "xx"
- EndProperty
- BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":A41C
- Key = "ph"
- EndProperty
- BeginProperty ListImage41 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "质量系统_中控检验指标折线图.frx":A7B6
- Key = "dz"
- EndProperty
- EndProperty
- End
- End
- End
- Attribute VB_Name = "Qc_MidGraphZxt"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**************************************************************************
- '* 模 块 名 称 :中控指标折线图
- '* 功 能 描 述 :根据生产线、物料名称、取样点、检验项目、取样日期范围等
- '* 查询条件查询符合条件的成品质量分析单上记录的一段时间内
- '* 检验数据,根据这些数据绘制指标折线图。
- '* 程序员姓名 :李海祥
- '* 最后修改人 :张晶石
- '* 最后修改时间:2002/01/24
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '**************************************************************************
- Dim jdzygs As Integer
- Dim Tsxx As String
- 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 CurTextIndex As Integer '当前文本框索引值
- Dim TextChangeLock As Boolean '文本框内容变换控制锁
- '以下为固定使用变量(网格)
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim ReportTitle 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)
- Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移(Fixed)
- Dim jdzygs As Integer '控件焦点转移个数
- jdzygs = 30
- Select Case KeyAscii
- Case vbKeyReturn
- If Kjjdzy(jdzygs) Then
- KeyAscii = 0
- End If
- Case 39 '屏蔽"'"
- KeyAscii = 0
- End Select
- End Sub
- Private Sub Form_Load()
- '调入打印页面设置窗体
- ReportTitle = "中控指标折线图"
- XtReportCode = "Qc_MidAnaZxt"
- Load Dyymctbl
- '以下为文本框处理程序(Fixed)
- TextGroupCode = "Qc_MidAnaGraph"
- Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr()) '读入文本框录入信息
- Call Wbkcsh
- '调 入 网 格(Fixed)
- GridCode = "Qc_MidAnaZxt"
- Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Sfxshjwg = GridInf(7)
- Szzls = CxbbGrid.Cols - 1
- '[>>初始化查询条件默认值
- LrText(0).Text = Format(Xtrq, "yyyy-mm-dd")
- LrText(1).Text = Format(Xtrq, "yyyy-mm-dd")
- '读入生产线信息
- Call InitCmb
- '<<]
- End Sub
- Private Sub QdCommand_Click() '确 定
- '录入条件有效性判断(Fixed)
- If Not Lrtjyxxpd Then
- Exit Sub
- End If
- '[>>激活查询过程
- Call Sub_Query
- '<<]
- End Sub
- Private Function Lrtjyxxpd() As Boolean '用户录入条件有效性判断
- Dim Jsqte As Integer
- Lrtjyxxpd = False
- '对需要进行事后判断的文本框录入内容进行有效性判断 (Fixed)
- For Jsqte = 0 To Max_Text_Index
- If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
- If Not TextYxxpd(Jsqte) Then
- Exit Function
- End If
- End If
- Next Jsqte
- '[>>以下为依据实际情况自定义部分
- '生产线不能为空
- If Trim(Cmb_LineName.Text) = "" Then
- Tsxx = "生产线不能为空!"
- Call Xtxxts(Tsxx, 0, 1)
- Cmb_LineName.SetFocus
- Exit Function
- End If
- '物料名称不能为空
- If Trim(Cmb_MName.Text) = "" Then
- Tsxx = "物料名称不能为空!"
- Call Xtxxts(Tsxx, 0, 1)
- Cmb_MName.SetFocus
- Exit Function
- End If
- '取样点不能为空
- If Trim(Cmb_SiteName.Text) = "" Then
- Tsxx = "取样点不能为空!"
- Call Xtxxts(Tsxx, 0, 1)
- Cmb_SiteName.SetFocus
- Exit Function
- End If
- '检验项目不能为空
- If Trim(Cmb_ItemName.Text) = "" Then
- Tsxx = "检验项目不能为空!"
- Call Xtxxts(Tsxx, 0, 1)
- Cmb_ItemName.SetFocus
- Exit Function
- End If
- '文本框不能为空判断
- For Jsqte = 0 To Max_Text_Index
- If Textint(Jsqte, 8) = 1 Then '字段不能为空
- If Len(Trim(LrText(Jsqte).Text)) = 0 Then
- Tsxx = Textstr(Jsqte, 7) & "不能为空!"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(Jsqte).SetFocus
- Exit Function
- End If
- End If
- Next Jsqte
- '查询日期范围应由小到大
- If LrText(0).Text > LrText(1).Text And Trim(LrText(1).Text) <> "" Then
- Tsxx = "查询取样日期范围应由小到大!"
- Call Xtxxts(Tsxx, 0, 4)
- LrText(0).SetFocus
- Exit Function
- End If
- '<<]以上为依据实际情况自定义部分
- Lrtjyxxpd = True
- End Function
- Private Sub Cmd_Clear_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) '将用户输入条件全部清除(可选)
- '清除文本框(Fixed)
- For Jsqte = 0 To Max_Text_Index
- LrText(Jsqte).Tag = ""
- LrText(Jsqte).Text = ""
- Next Jsqte
- '[>>
- Cmb_LineName.Text = Cmb_LineName.List(0)
- Cmb_LineCode.Text = Cmb_LineCode.List(0)
- Cmb_SiteName.Clear
- Cmb_SiteCode.Clear
- Cmb_MName.Clear
- Cmb_MNumber.Clear
- Cmb_ItemCode.Clear
- Cmb_ItemName.Clear
- '此处可以写入其他清除条件程序
- '<<]
- End Sub
- '[<<以下为自定义部分
- Private Sub Cmb_ItemName_Click()
- If Cmb_ItemCode.ListIndex <> Cmb_ItemName.ListIndex Then
- Cmb_ItemCode.Text = Cmb_ItemCode.List(Cmb_ItemName.ListIndex)
- End If
- End Sub
- Private Sub Cmb_ItemName_DropDown()
- Cmb_ItemName.Clear
- Cmb_ItemCode.Clear
- Dim Rec_Item As ADODB.Recordset
- Set Rec_Item = Cw_DataEnvi.DataConnect.Execute("SELECT distinct itemcode,itemname FROM Qc_V_MidStandSub WHERE linecode='" & Trim(Cmb_LineCode.Text & "") & "' and MNumber='" & Trim(Cmb_MNumber.Text & "") & "' and sitecode='" & Trim(Cmb_SiteCode.Text & "") & "'")
- If Rec_Item.RecordCount < 1 Then
- Rec_Item.Close
- Exit Sub
- End If
- Do While Not Rec_Item.EOF
- Cmb_ItemName.AddItem Trim(Rec_Item!itemname & "") '检验项目名称
- Cmb_ItemCode.AddItem Trim(Rec_Item!itemcode & "") '检验项目代码
- Rec_Item.MoveNext
- Loop
- Rec_Item.Close
- Set Rec_Item = Nothing
- End Sub
- '[<<=============以下程序为控制焦点转移=================
- Private Sub Cmb_ItemName_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- LrText(0).SetFocus
- End If
- End Sub
- Private Sub Cmb_LineName_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- Cmb_MName.SetFocus
- End If
- End Sub
- Private Sub Cmb_MName_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- Cmb_SiteName.SetFocus
- End If
- End Sub
- Private Sub Cmb_SiteName_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- Cmb_ItemName.SetFocus
- End If
- End Sub
- '>>]=============以上程序为控制焦点转移==================
- Private Sub Cmb_LineName_Click()
- If Cmb_LineCode.ListIndex <> Cmb_LineName.ListIndex Then
- Cmb_LineCode.Text = Cmb_LineCode.List(Cmb_LineName.ListIndex)
- Cmb_MName_DropDown
- Cmb_SiteName_DropDown
- Cmb_ItemName_DropDown
- End If
- End Sub
- Private Sub Cmb_MName_Click()
- If Cmb_MNumber.ListIndex <> Cmb_MName.ListIndex Then
- Cmb_MNumber.Text = Cmb_MNumber.List(Cmb_MName.ListIndex)
- Cmb_SiteName_DropDown
- Cmb_ItemName_DropDown
- End If
- End Sub
- Private Sub Cmb_MName_DropDown()
- Cmb_MName.Clear
- Cmb_MNumber.Clear
- Dim Rs_MName As ADODB.Recordset
- Dim Str_MName As String
- Str_MName = "SELECT distinct MNumber,MName FROM Qc_v_MidStandMain WHERE LineCode='" & Trim(Cmb_LineCode.Text & "") & "'"
- Set Rs_MName = Cw_DataEnvi.DataConnect.Execute(Str_MName)
- If Rs_MName.RecordCount < 1 Then
- Rs_MName.Close
- Exit Sub
- End If
- Do While Not Rs_MName.EOF
- Cmb_MName.AddItem Trim(Rs_MName!MName & "") '物料名称
- Cmb_MNumber.AddItem Trim(Rs_MName!MNumber & "") '物料编码
- Rs_MName.MoveNext
- Loop
- Rs_MName.Close
- Set Rs_MName = Nothing
- End Sub
- Private Sub Cmb_SiteName_Click()
- If Cmb_SiteName.ListIndex <> -1 Then
- Cmb_SiteCode.Text = Cmb_SiteCode.List(Cmb_SiteName.ListIndex)
- Cmb_ItemName_DropDown
- End If
- End Sub
- Private Sub Cmb_SiteName_DropDown()
- Cmb_SiteName.Clear
- Cmb_SiteCode.Clear
- Dim Rec_Site As ADODB.Recordset
- Set Rec_Site = Cw_DataEnvi.DataConnect.Execute("SELECT distinct SiteCode,SiteName FROM Qc_v_MidStandMain WHERE LineCode='" & Trim(Cmb_LineCode.Text & "") & "' and MNumber='" & Trim(Cmb_MNumber.Text & "") & "'")
- If Rec_Site.RecordCount < 1 Then
- Rec_Site.Close
- Exit Sub
- End If
- Do While Not Rec_Site.EOF
- Cmb_SiteName.AddItem Trim(Rec_Site!sitename & "") '取样点名称
- Cmb_SiteCode.AddItem Trim(Rec_Site!sitecode & "") '取样点代码
- Rec_Site.MoveNext
- Loop
- Rec_Site.Close
- Set Rec_Site = Nothing
- End Sub
- Private Sub InitCmb()
- Dim Rec_Line As New ADODB.Recordset
- Cmb_LineCode.AddItem " "
- Cmb_LineName.AddItem " "
- Set Rec_Line = Cw_DataEnvi.DataConnect.Execute("Select distinct LineCode,LineName From Qc_v_MidStandMain Order By LineCode ")
- If Rec_Line.RecordCount < 1 Then
- Rec_Line.Close
- Exit Sub
- End If
- Do While Not Rec_Line.EOF
- Cmb_LineCode.AddItem Trim(Rec_Line.Fields("LineCode") & "")
- Cmb_LineName.AddItem Trim(Rec_Line.Fields("LineName") & "")
- Rec_Line.MoveNext
- Loop
- Cmb_LineCode.ListIndex = 0
- Cmb_LineName.ListIndex = 0
- End Sub
- Private Sub Sub_Query()
- Dim Jsqte As Long '临时动态计数器
- Dim Rec_Query As New ADODB.Recordset '查询结果动态集
- Dim Str_Query As String '查询字符串
- Str_Query = "Select SiteDate,SiteTime,Result from Qc_V_MidCheckBill where LineCode ='" & Trim(Cmb_LineCode.Text) & "'" & _
- " and MNumber='" & Trim(Cmb_MNumber.Text) & "'" & _
- " and SiteCode='" & Trim(Cmb_SiteCode.Text) & "'" & _
- " and ItemCode='" & Trim(Cmb_ItemCode.Text) & "'" & _
- " and SiteDate>='" & Trim(LrText(0).Text) & "'" & _
- " and SiteDate<='" & Trim(LrText(1).Text) & "'" & _
- " and checker<> '' Order By SiteDate,SiteTime"
- Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Str_Query)
- With Rec_Query
- CxbbGrid.Rows = CxbbGrid.FixedRows
- If .EOF And .BOF Then
- Exit Sub
- End If
- Jsqte = CxbbGrid.FixedRows
- Do While Not .EOF
- CxbbGrid.AddItem ""
- '[>>自定义填充内容
- CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Format(Trim(.Fields("SiteDate") & ""), "yyyy-mm-dd") & " " & Trim(.Fields("SiteTime") & "") '取样时间
- CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Format(Trim(.Fields("Result") & ""), "###0." + String(4, "0")) '检测结果
- '<<]
- '设置数据行高度(Fixed)
- CxbbGrid.RowHeight(Jsqte) = Sjhgd
- '动态集指针加1,同时将计数器加1(Fixed)
- .MoveNext
- Jsqte = Jsqte + 1
- Loop
- End With
- End Sub
- ']以上为自定义部分
- '*************以下为文本框录入处理程序(固定不变部分)*************'
- Private Sub Wbklrwbcl(Index As Integer) '文本框录入事后处理程序
- '以下为依据实际情况自定义部分[
- '在此填写文本框录入事后处理程序
- ']以上为依据实际情况自定义部分
- End Sub
- Private Sub LrText_Change(Index As Integer)
- '屏蔽程序改变控制
- If TextChangeLock Then
- Exit Sub
- End If
- TextValiJudgeLock(Index) = False '打开有效性判断锁
- '限制字段录入长度
- TextChangeLock = True '加锁(防止执行Lrtext_Change)
- Select Case Textint(Index, 1)
- Case 8, 11 '金额型
- Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
- Case 9, 12 '数量型
- Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
- Case 10 '单价型
- Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
- Case Else '其他小数类型控制
- If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
- Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
- End If
- End Select
- TextChangeLock = False '解锁
- End Sub
- Private Sub LrText_GotFocus(Index As Integer) '文本框得到焦点,显示相应信息
- Call TextShow(Index)
- CurTextIndex = Index
- LrText(Index).SelStart = Len(LrText(Index))
- End Sub
- Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) '字段按F2键提供帮助
- Select Case KeyCode
- Case vbKeyF2
- Call Text_Help(Index)
- End Select
- End Sub
- Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer) '文本框录入事中控制
- '控制焦点转移
- If KeyAscii = vbKeyReturn And Index = 0 Then
- LrText(1).SetFocus
- End If
- If KeyAscii = vbKeyReturn And Index = 1 Then
- QdCommand.SetFocus
- End If
- Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
- End Sub
- Private Sub LrText_LostFocus(Index As Integer) '文本框失去焦点
- '显示相应信息但不能进行有效性判断
- End Sub
- Private Sub Ydcommand1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) '按钮提供帮助
- Call Text_Help(Index)
- End Sub
- Private Sub Text_Help(Index As Integer) '录入字段帮助
- If Not Textboolean(Index, 1) Then
- Exit Sub
- End If
- '调用帮助
- Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
- '根据设置选择显示编码和名称,并进行存储
- If Len(Xtfhcs) <> 0 Then
- If Textint(Index, 3) = 1 Then
- LrText(Index).Text = Xtfhcsfz
- LrText(Index).Tag = Xtfhcs
- Else
- LrText(Index).Text = Xtfhcs
- LrText(Index).Tag = Xtfhcsfz
- End If
- End If
- LrText(Index).SetFocus
- End Sub
- Private Sub TextShow(Index As Integer) '文本框得到焦点,显示相应信息
- '填写文本框得到焦点,进行相应信息处理程序
- End Sub
- Private Sub Wbkcsh() '录入文本框初始化
- Dim Jsqte As Integer
- '最大录入文本框索引值
- Max_Text_Index = Textvar(1)
- ReDim TextValiJudgeLock(Max_Text_Index)
- For Jsqte = 0 To Max_Text_Index
- If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
- If Textboolean(Jsqte, 1) Then
- If Jsqte <> 0 And Not Textboolean(Jsqte, 3) Then
- Load Ydcommand1(Jsqte)
- End If
- Ydcommand1(Jsqte).Visible = True
- Ydcommand1(Jsqte).Move LrText(Jsqte).Left + LrText(Jsqte).Width, LrText(Jsqte).Top
- End If
- TextChangeLock = True
- LrText(Jsqte).Text = ""
- LrText(Jsqte).Tag = ""
- If Textint(Jsqte, 5) <> 0 Then
- LrText(Jsqte).MaxLength = Textint(Jsqte, 5)
- End If
- TextChangeLock = False
- End If
- TextValiJudgeLock(Jsqte) = True
- Next Jsqte
- End Sub
- Private Function TextYxxpd(Index As Integer) As Boolean '文本框有效性判断
- Dim Sqlstr As String
- Dim Findrec As ADODB.Recordset
- '文本框内容未曾改变不进行有效性判断
- If TextValiJudgeLock(Index) Then
- TextYxxpd = True
- Exit Function
- End If
- '文本框内容为空认为有效,并清空其Tag值
- If Trim(LrText(Index)) = "" Then
- LrText(Index).Tag = ""
- Call Wbklrwbcl(Index)
- TextValiJudgeLock(Index) = True
- TextYxxpd = True
- Exit Function
- End If
- '可在此加入不做有效性判断的理由
- Select Case Textint(Index, 4)
- Case 1 '编码型
- Sqlstr = Trim(Textstr(Index, 5))
- Sqlstr = Replace(Sqlstr, "@", "'" + Trim(LrText(Index).Text) + "'")
- Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Findrec.EOF Then
- Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
- LrText(Index).SetFocus
- Exit Function
- Else
- Select Case Textint(Index, 3)
- Case 0
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- Case 1
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- End Select
- End If
- Case 2 '日期型
- If IsDate(LrText(Index).Text) Then
- LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
- If Val(Mid(LrText(Index), 1, 4)) < 1900 Then
- LrText(Index).Text = "1900" + Mid(LrText(Index), 5, 6)
- End If
- Else
- Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(Index).SetFocus
- Exit Function
- End If
- Case 3 '其他类型
- End Select
- '如果有效则加锁,用户不改变内容则不再进行有效性判断
- TextValiJudgeLock(Index) = True
- '调用文本框事后处理程序
- Call Wbklrwbcl(Index)
- '有效性判断通过则返回True
- TextYxxpd = True
- End Function
- Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button) '网格格式调整
- Select Case Button.Key
- Case "bcgs" '保存表格格式
- Call Bcwggs(CxbbGrid, GridCode, GridStr())
- Case "hfmrgs" '恢复默认格式
- Call Hfmrgs(CxbbGrid, GridCode, GridStr())
- Case "graph"
- If CxbbGrid.Rows = 1 Then
- Exit Sub
- End If
- XT_TxfxFrm.HelpContextID = 150500301
- Call Txfxbb(CxbbGrid, "QC_MidGraphZxt")
- End Select
- End Sub
- Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "ymsz" '页面设置
- Dyymctbl.Show 1
- Case "yl" '预 览
- Call bbyl(True)
- Case "dy" '打 印
- Call bbyl(False)
- Case "bz" '帮 助
- Call F1bz
- Case "fh" '退 出
- Unload Me
- End Select
- 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 = 4 '报 表 小 标 题 行 数
- Bbbwhgs = 1 '报 表 表 尾 行 数
- 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 = "中控指标折线图"
- Bbxbt(2) = Space(4) + Fun_FormatOutPut("生产线: " + Trim(Cmb_LineName.Text & ""), 35) + Fun_FormatOutPut("物料名称: " + Trim(Cmb_MName.Text & ""), 30)
- Bbxbt(2) = Bbxbt(2) + Fun_FormatOutPut("取样点: " + Trim(Cmb_SiteName.Text & ""), 0)
- Bbxbt(3) = Space(4) + Fun_FormatOutPut("检验项目:" + Trim(Cmb_ItemName.Text & ""), 35) + Fun_FormatOutPut("起始日期: " + Trim(LrText(0).Text & ""), 30)
- Bbxbt(3) = Bbxbt(3) + Fun_FormatOutPut("截止日期:" + Trim(LrText(1).Text & ""), 0)
- bbxbtzzxs(1) = 0 '报表行组织形式(0-居左 1-居中 2-居右)
- Call Scyxsjb(CxbbGrid) '生成报表数据
- Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
- If Not bbylte Then
- Unload DY_Tybbyldy
- End If
- End Sub