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

📄 frmjh.frm

📁 一个进存销管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{4406B9AC-521E-476B-AF25-3D2C36110576}#3.0#0"; "CommandSCE.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmjh 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "采购进货"
   ClientHeight    =   4560
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8175
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4560
   ScaleWidth      =   8175
   StartUpPosition =   2  '屏幕中心
   Begin CSCommandSCE.CommandSCE CommandSCE2 
      Height          =   375
      Left            =   6600
      TabIndex        =   18
      Top             =   3840
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      IconAlign       =   0
      Icon            =   "frmjh.frx":0000
      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
   End
   Begin CSCommandSCE.CommandSCE CommandSCE1 
      Height          =   375
      Left            =   5040
      TabIndex        =   17
      Top             =   3840
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   661
      IconAlign       =   0
      Icon            =   "frmjh.frx":001C
      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
   End
   Begin VB.Frame Frame2 
      Caption         =   "信息"
      Height          =   1695
      Left            =   120
      TabIndex        =   6
      Top             =   1800
      Width           =   7935
      Begin VB.TextBox Text4 
         Height          =   270
         Left            =   6600
         TabIndex        =   16
         Top             =   720
         Width           =   855
      End
      Begin VB.TextBox Text3 
         Height          =   270
         Left            =   4920
         TabIndex        =   15
         Top             =   720
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   270
         Left            =   3480
         TabIndex        =   14
         Top             =   720
         Width           =   735
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1920
         TabIndex        =   13
         Top             =   720
         Width           =   1095
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   360
         TabIndex        =   12
         Top             =   720
         Width           =   1215
      End
      Begin VB.Label Label2 
         Caption         =   "金额"
         Height          =   255
         Index           =   4
         Left            =   6720
         TabIndex        =   11
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "进货价"
         Height          =   255
         Index           =   3
         Left            =   5160
         TabIndex        =   10
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "数量"
         Height          =   255
         Index           =   2
         Left            =   3600
         TabIndex        =   9
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "名称"
         Height          =   255
         Index           =   1
         Left            =   2160
         TabIndex        =   8
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "商品代码"
         Height          =   255
         Index           =   0
         Left            =   480
         TabIndex        =   7
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "信息"
      Height          =   1455
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7935
      Begin VB.TextBox Text6 
         Height          =   270
         Left            =   3480
         TabIndex        =   23
         Top             =   960
         Width           =   1335
      End
      Begin VB.ComboBox Combo3 
         Height          =   300
         Left            =   1080
         TabIndex        =   22
         Top             =   960
         Width           =   1335
      End
      Begin MSComCtl2.DTPicker dtp1 
         Height          =   255
         Left            =   5520
         TabIndex        =   21
         Top             =   240
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   450
         _Version        =   393216
         Format          =   61603841
         CurrentDate     =   38238
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   3480
         TabIndex        =   20
         Top             =   240
         Width           =   1335
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Index           =   0
         Left            =   960
         TabIndex        =   19
         Top             =   240
         Width           =   1335
      End
      Begin VB.Label Label1 
         Caption         =   "发票号"
         Height          =   255
         Index           =   5
         Left            =   2760
         TabIndex        =   5
         Top             =   960
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "经手人"
         Height          =   255
         Index           =   4
         Left            =   480
         TabIndex        =   4
         Top             =   960
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "日期"
         Height          =   255
         Index           =   3
         Left            =   5040
         TabIndex        =   3
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "供应商"
         Height          =   255
         Index           =   1
         Left            =   2760
         TabIndex        =   2
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "单号"
         Height          =   255
         Index           =   0
         Left            =   480
         TabIndex        =   1
         Top             =   360
         Width           =   1095
      End
   End
End
Attribute VB_Name = "frmjh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Dim sqltxt As String
Dim msgtxt As String
Dim mrc As ADODB.Recordset
sqltxt = "select spmc from sp where spdm='" & Combo1.Text & "'"
Set mrc = ExecuteSQL(sqltxt, msgtxt)
Text1.Text = mrc.Fields(0)
mrc.Close
End Sub

Private Sub CommandSCE1_Click()
Dim i As Integer
Dim sqltxt As String
Dim msgtxt As String
Dim mrc As ADODB.Recordset
sqltxt = "select * from cgjh"
Set mrc = ExecuteSQL(sqltxt, msgtxt)
With mrc
.AddNew
.Fields(0) = Trim(Text5(0).Text)
.Fields(1) = Trim(Combo2.Text)
.Fields(2) = Trim(Text4.Text)
.Fields(3) = dtp1.Value
.Fields(4) = Trim(Combo3.Text)
.Fields(5) = Trim(Text6.Text)

.Update
End With
sqltxt = "select kcsl from kc where dm='" & Combo1.Text & "'"
Set mrc = ExecuteSQL(sqltxt, msgtxt)
mrc.Fields(0) = mrc.Fields(0) + Val(Text2.Text)
mrc.Update
mrc.Close

MsgBox "成功!"

 With Main.eg1
       
        .Cols = 7
        .TextMatrix(0, 1) = "单号"
        .TextMatrix(0, 2) = "供应商"
        .TextMatrix(0, 3) = "进货金额"
        .TextMatrix(0, 4) = "日期"
        .TextMatrix(0, 5) = "经手人"
        .TextMatrix(0, 6) = "发票号"

        .FixedRows = 1
     '设置各列对齐方式
     For i = 0 To 6
        .ColAlignment(i) = 0
     Next i
     '表头项居中
      '.FillStyle = flexFillRepeat
      .Col = 0
      .Row = 0
      .RowSel = 1
      .ColSel = .Cols - 1
      .CellAlignment = 4
     End With
    '***************************************************************8
'eg2.Clear
sqltxt = "select * from cgjh"
Set rst = ExecuteSQL(sqltxt, msgtxt)
If rst.RecordCount < 1 Then
MsgBox "没有查询到相应信息!", vbOKOnly + vbExclamation, "查询"
Exit Sub
End If
If rst.EOF = False Then
    With Main.eg1
     .Rows = 1
     Do While Not rst.EOF
       .Rows = .Rows + 1
       For i = 1 To rst.Fields.Count
           .TextMatrix(.Rows - 1, i) = rst.Fields(i - 1)
       Next i
      rst.MoveNext
     Loop
    End With
 End If
 rst.Close
 Main.eg1.FixedRows = 1

End Sub

Private Sub CommandSCE2_Click()
frmjh.Hide
End Sub

Private Sub Form_Activate()
dtp1.Value = Date
Dim fsqltxt As String
Dim msgtxt As String
Dim mrc As ADODB.Recordset
fsqltxt = "select distinct gysmc from gys"
Set mrc = ExecuteSQL(fsqltxt, msgtxt)
For i = 1 To mrc.RecordCount
    Combo2.AddItem mrc.Fields(0)
    mrc.MoveNext
Next i
mrc.Close
fsqltxt = "select distinct jsr from jsr"
Set mrc = ExecuteSQL(fsqltxt, msgtxt)
For i = 1 To mrc.RecordCount
    Combo3.AddItem mrc.Fields(0)
    mrc.MoveNext
Next i
mrc.Close
fsqltxt = "select distinct spdm from sp"
Set mrc = ExecuteSQL(fsqltxt, msgtxt)
For i = 1 To mrc.RecordCount
    Combo1.AddItem mrc.Fields(0)
    mrc.MoveNext
Next i
mrc.Close
End Sub

Private Sub Text3_Change()
Text4.Text = Val(Text2.Text) * Val(Text3.Text)
End Sub

⌨️ 快捷键说明

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