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

📄 mdimain.frm

📁 vb写得进销存
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm mdiMain 
   BackColor       =   &H8000000C&
   Caption         =   "汽车配件管理系统"
   ClientHeight    =   6825
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   10215
   Icon            =   "mdiMain.frx":0000
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  '窗口缺省
   WindowState     =   2  'Maximized
   Begin VB.PictureBox Pic 
      Align           =   3  'Align Left
      Appearance      =   0  'Flat
      BackColor       =   &H80000004&
      ForeColor       =   &H80000008&
      Height          =   6825
      Left            =   0
      ScaleHeight     =   6795
      ScaleWidth      =   1365
      TabIndex        =   0
      Top             =   0
      Width           =   1395
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   2700
         Top             =   585
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   32
         ImageHeight     =   32
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   11
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":0442
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":0896
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":2C78
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":4982
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":668C
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":8396
               Key             =   ""
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":B0A0
               Key             =   ""
            EndProperty
            BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":DBAA
               Key             =   ""
            EndProperty
            BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":108FC
               Key             =   ""
            EndProperty
            BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":12606
               Key             =   ""
            EndProperty
            BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "mdiMain.frx":13458
               Key             =   ""
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar1 
         Height          =   3825
         Left            =   15
         TabIndex        =   1
         Top             =   15
         Width           =   1320
         _ExtentX        =   2328
         _ExtentY        =   6747
         ButtonWidth     =   2090
         ButtonHeight    =   1349
         Appearance      =   1
         Style           =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   5
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "  货品资料  "
               ImageIndex      =   7
            EndProperty
            BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "进货"
               ImageIndex      =   2
            EndProperty
            BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "出货"
               ImageIndex      =   3
            EndProperty
            BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "库存"
               ImageIndex      =   4
            EndProperty
            BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "退出"
               ImageIndex      =   6
            EndProperty
         EndProperty
      End
   End
   Begin VB.Menu mnu_Data 
      Caption         =   "数据(&S)"
      Begin VB.Menu mnu_Data_SZ 
         Caption         =   "基本数据设置"
      End
      Begin VB.Menu q2 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_SJ_HP 
         Caption         =   "货品资料设置"
      End
      Begin VB.Menu q3 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_Data_Person 
         Caption         =   "人事资料设置"
      End
      Begin VB.Menu o8 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_Data_KH 
         Caption         =   "客户资料设置"
      End
      Begin VB.Menu t6 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_WH_exit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu mnu_In 
      Caption         =   "进货(&J)"
      Begin VB.Menu mnu_In_In 
         Caption         =   "进货"
      End
      Begin VB.Menu q4 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_In_Find 
         Caption         =   "进货单查询"
      End
   End
   Begin VB.Menu mnu_Out 
      Caption         =   "出货(&C)"
      Begin VB.Menu mnu_Out_Out 
         Caption         =   "出货"
      End
      Begin VB.Menu y7 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_Out_In 
         Caption         =   "出货退货"
      End
      Begin VB.Menu q5 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_Out_Find 
         Caption         =   "出货单查询"
      End
   End
   Begin VB.Menu mnu_KC 
      Caption         =   "库存(&K)"
      Begin VB.Menu mnu_KC_KC 
         Caption         =   "检索库存"
      End
      Begin VB.Menu q6 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_KC_YJ 
         Caption         =   "自动预警"
         Checked         =   -1  'True
      End
   End
   Begin VB.Menu mnu_TJ 
      Caption         =   "统计(&T)"
      Begin VB.Menu mnu_TJ_Date 
         Caption         =   "今日销售额"
      End
      Begin VB.Menu r4 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_TJ_Dates 
         Caption         =   "销售额统计"
      End
      Begin VB.Menu o7 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_TJ_SPMX 
         Caption         =   "商品销售明细"
      End
      Begin VB.Menu t5 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_TJ_Money 
         Caption         =   "收费"
      End
   End
   Begin VB.Menu mnu_Sys 
      Caption         =   "系统(&X)"
      WindowList      =   -1  'True
      Begin VB.Menu mnu_Sys_Toolbar 
         Caption         =   "导航条"
         Checked         =   -1  'True
      End
   End
End
Attribute VB_Name = "mdiMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'10

Private Sub MDIForm_Load()
On Error GoTo eH
    g_cnnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\qipei.mdb;Persist Security Info=False"
    Set g_cnn = New ADODB.Connection
    Set g_rst = New ADODB.Recordset
    Set g_cmd = New ADODB.Command
    g_cnn.ConnectionString = g_cnnStr
    DE.cnn.ConnectionString = g_cnnStr
    DE.cnn.Open
    g_cnn.Open
    Set g_rst.ActiveConnection = g_cnn
    Set g_cmd.ActiveConnection = g_cnn
    
    Dim t As String
    t = GetSetting(App.EXEName, "cfg", "yj", "1")
    If t = "1" Then
        mnu_KC_YJ.Checked = True
        g_rst.Open "select * from 货品资料,货品库存 where (库存数量>最高库存 or 库存数量<最底库存) and 货品资料.货品代码=货品库存.货品代码 order by 货品资料.货品代码 asc"
        If Not g_rst.EOF Then
            frmKC.InitSQL = "select * from 货品资料,货品库存 where (库存数量>最高库存 or 库存数量<最底库存) and 货品资料.货品代码=货品库存.货品代码 order by 货品资料.货品代码 asc"
            frmKC.Caption = "库存预警"
        End If
    Else
        mnu_KC_YJ.Checked = False
    End If
    
    t = GetSetting(App.EXEName, "cfg", "dh", "1")
    If t = "1" Then
    Else
        Pic.Visible = False
        mnu_Sys_Toolbar.Checked = False
    End If
Exit Sub
eH:
    MsgBox em & vbNewLine & "错误号:1001" & vbNewLine & "错误描述:" & Err.Description
End Sub

Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Set g_rst = Nothing
    Set g_cmd = Nothing
    Set g_cnn = Nothing
    Set DE = Nothing
    frmExit.Show 1
End Sub

Private Sub mnu_Data_KH_Click()
    frmCustomer.Show
End Sub

Private Sub mnu_Data_Person_Click()
    frmPerson.Show
End Sub

Private Sub mnu_Data_SZ_Click()
    frmDataCfg.Show
    
End Sub

Private Sub mnu_In_Find_Click()
    frmInFind.Show
End Sub

Private Sub mnu_In_In_Click()
    frmIn.Show
End Sub

Private Sub mnu_KC_KC_Click()
    frmKC.Show
End Sub

Private Sub mnu_KC_YJ_Click()
On Error GoTo eH
    If mnu_KC_YJ.Checked = False Then
        mnu_KC_YJ.Checked = True
        Call SaveSetting(App.EXEName, "cfg", "yj", "1")
    Else
        mnu_KC_YJ.Checked = False
        Call SaveSetting(App.EXEName, "cfg", "yj", "0")
    End If
Exit Sub
eH:
    MsgBox em & vbNewLine & "错误号:1002" & vbNewLine & "错误描述:" & Err.Description

End Sub

Private Sub mnu_Out_Find_Click()
    frmOutFind.Show
End Sub

Private Sub mnu_Out_In_Click()
    frmOutIn.Show
End Sub

Private Sub mnu_Out_Out_Click()
    frmOut.Show
End Sub

Private Sub mnu_SJ_HP_Click()
    frmData.Show
End Sub

Private Sub mnu_Sys_Toolbar_Click()
    If Pic.Visible = False Then
        Pic.Visible = True
        Call SaveSetting(App.EXEName, "cfg", "dh", "1")
    Else
        Pic.Visible = False
        Call SaveSetting(App.EXEName, "cfg", "dh", "0")
    End If
    mnu_Sys_Toolbar.Checked = Pic.Visible
End Sub

Private Sub mnu_TJ_Date_Click()
    frmDate.Show
End Sub

Private Sub mnu_TJ_Dates_Click()
    frmDates.Show
End Sub

Private Sub mnu_TJ_Money_Click()
    frmMoney.Show
End Sub

Private Sub mnu_TJ_SPMX_Click()
    frmSPMX.Show
End Sub

Private Sub mnu_WH_exit_Click()
    Unload Me
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Index
        Case 1
            frmData.Show
        Case 2
            frmIn.Show
        Case 3
            frmOut.Show
        Case 4
            frmKC.Show
        Case 5
            Unload Me
    End Select
End Sub

⌨️ 快捷键说明

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