⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄

📁 VB开发的ERP系统
💻
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
Begin VB.Form XT_ItemHelp 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "核算项目编码参照表"
   ClientHeight    =   6015
   ClientLeft      =   2925
   ClientTop       =   2520
   ClientWidth     =   6435
   Icon            =   "系统_项目编码参照.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6015
   ScaleWidth      =   6435
   ShowInTaskbar   =   0   'False
   Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
      Height          =   5040
      Left            =   0
      TabIndex        =   4
      Top             =   525
      Width           =   6390
      _cx             =   11271
      _cy             =   8890
      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      =   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.TextBox CodeText 
      Height          =   300
      Left            =   1020
      TabIndex        =   0
      Top             =   150
      Width           =   5355
   End
   Begin VB.CommandButton QxCommand 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   300
      Left            =   5220
      TabIndex        =   2
      Top             =   5580
      Width           =   1120
   End
   Begin VB.CommandButton QdCommand 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   300
      Left            =   4050
      TabIndex        =   1
      Top             =   5580
      Width           =   1120
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0C0C0&
      BackStyle       =   0  'Transparent
      Caption         =   "编码或名称"
      Height          =   255
      Index           =   0
      Left            =   90
      TabIndex        =   3
      Top             =   210
      Width           =   975
   End
End
Attribute VB_Name = "XT_ItemHelp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************************************************
'*    模 块 名 称 :核算项目编码参照
'*    功 能 描 述 :
'*    程序员姓名  : 张建忠
'*    最后修改人  : 张建忠
'*    最后修改时间:2000/09/11
'*    备        注:
'*    使用说明: Xtcdcs 用来传递用户输入内容; xtbmczdm 用来传递所选编码参照
'                xtfhcs 用来返回用户所选编码; xtfhcsfz 用来返回用户所选名称
'**************************************************************************

Dim Cznr As String                       '网格首次进入查找内容
Dim Str_ClassCode As String              '项目分类编码

 '以下为固定使用变量
Dim Cxnrrec As New ADODB.Recordset       '显示查询内容动态集
Dim GridCode As String                   '显示网格网格代码
Dim GridInf() As Variant                 '整个网格设置信息
Dim Tsxx As String                       '系统提示信息
Dim Qslz As Long                         '网格隐藏(非操作显示)列数
Dim Sjhgd As Double                      '网格数据行高度
Dim GridBoolean() As Boolean             '网格列信息(布尔型)
Dim GridStr()  As String                 '网格列信息(字符型)
Dim GridInt() As Integer                 '网格列信息(整型)
Dim Szzls As Integer                     '数组总列数(网格列数-1)
Private Sub CodeText_Change()            '用户可模糊定位编码或名称信息
  Dim DwRow As Long
  Dim Lng_BmCol As Long
  Dim Lng_McCol As Long
  
  On Error Resume Next
  Lng_BmCol = Sydz("001", GridStr(), Szzls)
  Lng_McCol = Sydz("002", GridStr(), Szzls)
  Cznr = Trim(CodeText.Text)
  With CzxsGrid
    For DwRow = .FixedRows To .Rows - 1
        If Mid(.TextMatrix(DwRow, Lng_BmCol), 1, Len(Cznr)) = Cznr Then
           .Row = DwRow
           .Col = Lng_BmCol
           CzxsGrid.SetFocus
           SendKeys "{LEFT}", True
           CodeText.SetFocus
           .TopRow = DwRow
           Exit Sub
        End If
    Next DwRow
    For DwRow = .FixedRows To .Rows - 1
        If Mid(.TextMatrix(DwRow, Lng_McCol), 1, Len(Cznr)) = Cznr Then
           .Row = DwRow
           .Col = Lng_BmCol
           CzxsGrid.SetFocus
           SendKeys "{LEFT}", True
           CodeText.SetFocus
           .TopRow = DwRow
           Exit Sub
        End If
    Next DwRow
  End With
End Sub

Private Sub CzxsGrid_GotFocus()
   SendKeys "{LEFT}", True
End Sub

Private Sub Form_Load()                             '调 入 窗 体
    
  '传递项目类别代码
  
  Str_ClassCode = Xtcdcsfz
    
  '调 入 网 格
  GridCode = "cwzz_item"
  
  Call Sub_ShowGrid(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  
  Qslz = GridInf(1)
  Sjhgd = GridInf(2)
  Szzls = CzxsGrid.Cols - 1
  
  '填 充 网 格
   Call Cxnrtcwg
   
  CodeText.Text = Trim(Xtcdcs)
   
 End Sub
Private Sub Cxnrtcwg()                               '查 询 内 容 填 充 网 格
  Dim SqlStr As String
  Dim Jsqte As Long
  
  '查询连接串
  SqlStr = "SELECT * FROM Cwzz_Item Where ItemClassCode='" & Str_ClassCode & "'and EndFlag='1' order by ItemCode"
  Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  With Cxnrrec
     CzxsGrid.Rows = .RecordCount + CzxsGrid.FixedRows
     If .EOF And .BOF Then
        Exit Sub
     End If
     Jsqte = CzxsGrid.FixedRows
     Do While Not .EOF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -