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

📄 frm_main.frm

📁 企业进销管理系统 好东西 好东西 好东西
💻 FRM
📖 第 1 页 / 共 2 页
字号:
        End If
    Case "gysxx"   '供应商信息
        If GYSXXWH.Enabled = True Then
            GYSXXWH_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
        '商品入库管理
    Case "ruku"   '商品入库
        If HPRKGL.Enabled = True Then
            HPRKGL_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "rkcx"   '入库查询
        If RKXXCX.Enabled = True Then
            RKXXCX_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
        '商品库存管理
    Case "spjc"   '商品借出
        If HPJC.Enabled = True Then
            HPJC_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "spjccx"   '商品借出查询
        If HPJCCX.Enabled = True Then
            HPJCCX_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "spgh"   '商品归还
        If HPGH.Enabled = True Then
            HPGH_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "spghcx"   '商品归还查询
        If HPGHCX.Enabled = True Then
            HPGHCX_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "sppd"   '商品盘点
        If HPPDGL.Enabled = True Then
            HPPDGL_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "kccx"   '库存查询
        If KCXXCX.Enabled = True Then
            KCXXCX_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
        '商品销售管理
    Case "spxs"   '商品销售
        If HPCKGL.Enabled = True Then
            HPCKGL_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "xscx"   '销售查询
        If CKXXCX.Enabled = True Then
            CKXXCX_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
        '数据统计与报表
    Case "day"   '出入库商品日统计
        If CRKXXRTJ.Enabled = True Then
            CRKXXRTJ_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "year"   '出入库现金年统计
        If CRKNTJ.Enabled = True Then
            CRKNTJ_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "ckbb"   '出库报表
        If PRINTOUT.Enabled = True Then
            PRINTOUT_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "kcbb"   '库存报表
        If PRINTKC.Enabled = True Then
            PRINTKC_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If

        '系统维护
    Case "mmxg"   '密码修改
        If MMXG.Enabled = True Then
            MMXG_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "czyqx"   '操作员权限
        If CZYQXSZ.Enabled = True Then
            CZYQXSZ_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "sjbf"   '数据备份
        If SJBF.Enabled = True Then
            SJBF_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "sjhf"   '数据恢复
        If SJHF.Enabled = True Then
            SJHF_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "sjql"   '数据清理
        If SJQL.Enabled = True Then
            SJQL_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "ckrz"   '查看日志
        If CKRZ.Enabled = True Then
            CKRZ_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "rzql"   '日志清理
        If RZQL.Enabled = True Then
            RZQL_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    Case "czy"   '操作员管理
        If CZYXXWH.Enabled = True Then
            CZYXXWH_Click
        Else
            MsgBox "您没有该权限!", vbCritical
        End If
    End Select
End Sub

Private Sub Form_Load()
    '使用API函数来设置窗体展开形式
    outspread = AnimateWindow(Me.hwnd, 1000, 16)
    Me.Refresh
    StatusBar1.Panels(3).Text = Format(Date, " yyyy年mm月dd日")
    Flash1.Movie = App.Path & "\image\swf\0.swf"
    Call QuanXian  '调用权限过程
End Sub

Private Sub QuanXian()
    CKSZ.Enabled = bQx(1)        '仓库管理
    QCKCSZ.Enabled = bQx(2)      '期初库存设置
    HPRKGL.Enabled = bQx(3)      '商品入库
    HPCKGL.Enabled = bQx(4)      '商品销售
    HPPDGL.Enabled = bQx(5)      '商品盘点
    RKXXCX.Enabled = bQx(6)      '入库查询
    CKXXCX.Enabled = bQx(7)      '销售查询
    KCXXCX.Enabled = bQx(8)      '库存查询
    CRKXXRTJ.Enabled = bQx(9)    '出入库统计
    CRKNTJ.Enabled = bQx(9)      '出入库统计
    PRINTOUT.Enabled = bQx(10)   '出库报表
    PRINTKC.Enabled = bQx(11)    '库存报表
    CZYXXWH.Enabled = bQx(12)    '操作员管理
    MMXG.Enabled = bQx(13)       '密码修改
    CZYQXSZ.Enabled = bQx(14)    '操作权限管理
    SJBF.Enabled = bQx(15)       '数据备份
    SJHF.Enabled = bQx(16)       '数据回复
    SJQL.Enabled = bQx(17)       '数据清理
    RZQL.Enabled = bQx(18)       '日志清理
    HPJC.Enabled = bQx(19)       '商品借出
    HPGH.Enabled = bQx(20)       '商品归还
    GYSXXWH.Enabled = bQx(21)    '供应商管理
    HPJCCX.Enabled = bQx(22)     '商品借出查询
    HPGHCX.Enabled = bQx(23)     '商品归还查询
    CKRZ.Enabled = bQx(24)       '查询日志
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim i As Integer
    For i = 0 To Lbl_info.UBound
        Lbl_info(i).ForeColor = vbBlack
    Next i
End Sub

Private Sub Form_Unload(Cancel As Integer)
    '添加退出系统日志
    Open (App.Path & "\系统日志.ini") For Input As #1              '首先读取文件中的信息
    Do While Not EOF(1)
        Line Input #1, Intext
        TStr = TStr + Intext + Chr(13) + Chr(10)             '将读取的信息保存到变量中
    Loop
    Close #1
    '改变变量的值
    TStr = TStr + "   " + Name1 + "               " + Format(Now, "yyyy-mm-dd hh:mm:ss") + "            " + "退出系统" + Chr(13) + Chr(10)
    Open (App.Path & "\系统日志.ini") For Output As #1            '将添加日志后的信息重新保存到文件当中
    Print #1, TStr
    Close #1
End Sub

Private Sub GYSXXWH_Click()
    frm_gys.Show                           '显示供应商信息窗体
    Me.Enabled = False
End Sub

Private Sub HPCKGL_Click()
    frm_out.Show                          '显示货品出库信息窗体
    StrNums = 0                           '出库标识,用于标识调用库存检索窗体
    Me.Enabled = False
End Sub

Private Sub HPGH_Click()
    frm_hpin.Show                         '显示货品归还窗体
    Me.Enabled = False
End Sub

Private Sub HPGHCX_Click()
    frm_HpghQuery.Show                    '显示货品归还查询窗体
    Me.Enabled = False
End Sub

Private Sub HPJC_Click()
    StrNums = 2   '货品借出标识,用于标识调用库存检索窗体
    frm_hpout.Show                         '显示货品借出窗体
    Me.Enabled = False
End Sub

Private Sub HPJCCX_Click()
    frm_HpjcQuery.Show                      '显示货品借出查询窗体
    Me.Enabled = False
End Sub

Private Sub HPPDGL_Click()
    frm_kcpd.Show                       '显示库存盘点信息窗体
    StrNums = 1   '出库标识,用于标识调用库存检索窗体
    Me.Enabled = False
End Sub

Private Sub HPRKGL_Click()
   frm_in.Show                            '显示货品入库信息窗体
   Me.Enabled = False
End Sub

Private Sub KCXXCX_Click()
  frm_KCQuery.Show                        '显示库存查询信息窗体
  Me.Enabled = False
End Sub

Private Sub Lbl_info_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
   Lbl_info(Index).ForeColor = RGB(255, 0, 0)
   Flash1.Movie = App.Path & "\image\swf\" & Index & ".swf"
End Sub

Private Sub MMXG_Click()
    frm_Edit_Password.Show                      '显示修改密码窗体
    Me.Enabled = False
End Sub

Private Sub PRINTKC_Click()
    Data_kc.Show                                '显示库存信息报表
    Me.Enabled = False
End Sub

Private Sub PRINTOUT_Click()
    Data_out.Show                               '显示出库信息报表
    Me.Enabled = False
End Sub

Private Sub QCKCSZ_Click()
    frm_qckc.Show                              '显示期初库存设置窗体
    Me.Enabled = False
End Sub

Private Sub RKXXCX_Click()
    frm_InQuery.Show                            '显示货品入库信息查询窗体
    Me.Enabled = False
End Sub

Private Sub RZQL_Click()                      '进行日志清理操作
    Dim del
    Dim temp1 As String
    On Error Resume Next  '错误处理语句
    del = MsgBox("确认要清除进销存管理系统的日志信息吗?", vbQuestion)
    If del = vbOK Then
        Kill (App.Path & "\系统日志.ini")
        Open (App.Path & "\系统日志.ini") For Output As #1
        temp1 = "  操作员姓名             日期时间                      操作类型"
        Print #1, temp1
        Print #1,
        Close #1
        MsgBox "日志清理成功完成!!", vbInformation
    Else
    End If
End Sub

Private Sub SJBF_Click()
    Shell App.Path & "\数据库备份与恢复.exe", vbNormalFocus
    End
End Sub

Private Sub SJHF_Click()
    Shell App.Path & "\数据库备份与恢复.exe", vbNormalFocus
    End
End Sub

Private Sub SJQL_Click()                      '进行数据清理操作
    frm_sfyz.Show
    Me.Enabled = False
End Sub


Private Sub TCXT_Click()                      '退出系统操作
    '添加退出系统日志
    Dim c
    c = MsgBox("您确认要退出进销存管理系统吗?", 33)
    If c = vbOK Then
        Open (App.Path & "\系统日志.ini") For Input As #1
        Do While Not EOF(1)
            Line Input #1, Intext
            TStr = TStr + Intext + Chr(13) + Chr(10)
        Loop
        Close #1
        TStr = TStr + "   " + Name1 + "               " + Format(Now, "yyyy-mm-dd hh:mm:ss") + "            " + "退出系统" + Chr(13) + Chr(10)
        Open (App.Path & "\系统日志.ini") For Output As #1
        Print #1, TStr
        Close #1
        End
    Else
        rtn = SetWindowPos(Me.hwnd, -2, 0, 0, 0, 0, 3)      '运用API函数SetWindowPos,来实现取消窗体置前的功能
    End If
End Sub

'在窗体的状态栏中显示当前系统的日期时间
Private Sub Timer1_Timer()
    StatusBar1.Panels(4).Text = Format(Now, " hh点mm分ss秒")
End Sub

⌨️ 快捷键说明

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