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

📄 frm选择物资编号.frm

📁 适合于中小型企业管理
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{D959C709-8613-11D1-9840-002078110E7D}#1.0#0"; "as97Popup.ocx"
Begin VB.Form Frm选择物资编号 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "选择物资编号"
   ClientHeight    =   7140
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   7650
   Icon            =   "Frm选择物资编号.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7140
   ScaleWidth      =   7650
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text6 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      MaxLength       =   10
      TabIndex        =   4
      Top             =   120
      Width           =   2055
   End
   Begin VB.TextBox Text7 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      MaxLength       =   15
      TabIndex        =   3
      Top             =   600
      Width           =   2055
   End
   Begin VB.CommandButton Command6 
      Caption         =   "查询"
      Height          =   375
      Left            =   4800
      TabIndex        =   2
      Top             =   360
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   495
      Left            =   6000
      TabIndex        =   1
      Top             =   300
      Width           =   975
   End
   Begin MSComctlLib.ListView lstContracts 
      Height          =   5895
      Left            =   120
      TabIndex        =   0
      Top             =   1200
      Width           =   7335
      _ExtentX        =   12938
      _ExtentY        =   10398
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin as97Popup.asPopup asPopup1 
      Height          =   735
      Left            =   240
      Top             =   240
      Width           =   855
      _ExtentX        =   1508
      _ExtentY        =   1296
      CustomPicture   =   "Frm选择物资编号.frx":0CCA
      Caption         =   "选中"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Layout          =   3
      ScaleWidth      =   57
      ScaleMode       =   0
      ScaleHeight     =   49
      BackStyle       =   0
   End
   Begin as97Popup.asPopup asPopup 
      DragIcon        =   "Frm选择物资编号.frx":15A4
      Height          =   735
      Left            =   1320
      Top             =   240
      Width           =   735
      _ExtentX        =   1296
      _ExtentY        =   1296
      CustomPicture   =   "Frm选择物资编号.frx":1E6E
      Caption         =   "添加"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Layout          =   3
      ScaleWidth      =   49
      ScaleMode       =   0
      ScaleHeight     =   49
      BackStyle       =   0
   End
   Begin VB.Line Line1 
      X1              =   120
      X2              =   7440
      Y1              =   1080
      Y2              =   1080
   End
End
Attribute VB_Name = "Frm选择物资编号"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim LConRs As ADODB.Recordset
Dim TxtSql As String
Dim SqlSctmp As String

Private Sub DoList()
    If Trim(Text6.Text) <> "" And Trim(Text7.Text) = "" Then
        SqlSctmp = "select * from Fl_物资信息表 where 物资名称 LIKE '%" & Trim(Text6.Text) & "%' order by 类别编码,物资名称,物资型号"
    End If
    If Trim(Text6.Text) = "" And Trim(Text7.Text) <> "" Then
        SqlSctmp = "select * from Fl_物资信息表 where 物资型号 LIKE '%" & Trim(Text7.Text) & "%' order by 类别编码,物资名称,物资型号"
    End If
    SqlSctmp = "select * from Fl_物资信息表 where 物资名称 LIKE '%" & Trim(Text6.Text) & "%' and 物资型号 LIKE '%" & Trim(Text7.Text) & "%' order by 类别编码,物资名称,物资型号"

Dim ItmX As ListItem
lstContracts.ColumnHeaders.Clear
lstContracts.ColumnHeaders.Add , , "物资编号", Len("物资编号") * 100 + 600
lstContracts.ColumnHeaders.Add , , "类别编码", Len("类别编码") * 100 + 600
lstContracts.ColumnHeaders.Add , , "物资名称", Len("物资名称") * 100 + 900
lstContracts.ColumnHeaders.Add , , "物资型号", Len("物资型号") * 300 + 300
lstContracts.ColumnHeaders.Add , , "计量单位", Len("计量单位") * 100 + 300
lstContracts.ColumnHeaders.Add , , "备注信息", Len("备注信息") * 100 + 1900
    Set LConRs = New ADODB.Recordset
    LConRs.Open SqlSctmp, Cw_DataEnvi.DataConnect, adOpenStatic, adLockReadOnly, adCmdText
    If Not LConRs.BOF Then LConRs.MoveFirst
    lstContracts.ListItems.Clear
    Do While Not LConRs.EOF
        Set ItmX = lstContracts.ListItems.Add(, , LConRs!物资编号)
         ItmX.SubItems(1) = LConRs!类别编码
         ItmX.SubItems(2) = LConRs!物资名称
         ItmX.SubItems(3) = LConRs!物资型号
         ItmX.SubItems(4) = LConRs!计量单位
         ItmX.SubItems(5) = " " & LConRs!备注信息
        LConRs.MoveNext
    Loop
    If Not LConRs.EOF Then LConRs.MoveFirst
    lstContracts.Refresh
End Sub

Private Sub asPopup_Click(Cancel As Boolean)
            If Not Security_Log("Rc_Flgl_JBXX_WZXX", Xtczybm, 1, True) Then
                MsgBox "您没有相应的权限!", vbCritical, "请咨询管理员:"
                Exit Sub
            End If
            WhFrmCpxx.Show 1
             DoList
End Sub

Private Sub asPopup1_Click(Cancel As Boolean)
On Error Resume Next

    If Not lstContracts.ListItems.Count < 1 Then
        Dim BH As String
        BH = Trim(lstContracts.SelectedItem.Text)
    If SecWz = 1 Then
        Frm计划申请.WZlist (BH)
    ElseIf SecWz = 2 Then
        Frm出库登记.WZlist (BH)
    End If
    
    End If
       
    Command1_Click
End Sub

Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Command6_Click()
    DoList
End Sub

Private Sub Form_Load()
    
    DoList
End Sub

Private Sub lstContracts_DblClick()
    asPopup1_Click (True)
End Sub


⌨️ 快捷键说明

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