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

📄 frmck.frm

📁 库存管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "现库存量:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   480
      TabIndex        =   3
      Top             =   1320
      Width           =   975
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "产品名称型号:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   480
      TabIndex        =   2
      Top             =   600
      Width           =   1695
   End
   Begin VB.Image imgTitleMinimize 
      Height          =   195
      Left            =   8160
      Picture         =   "frmCK.frx":3B98
      Top             =   120
      Width           =   195
   End
   Begin VB.Image imgTitleClose 
      Height          =   195
      Left            =   8160
      Picture         =   "frmCK.frx":3DE2
      Top             =   480
      Width           =   195
   End
   Begin VB.Image imgTitleHelp 
      Height          =   195
      Left            =   8160
      Picture         =   "frmCK.frx":402C
      Top             =   840
      Width           =   195
   End
   Begin VB.Label lblTitle 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "出库"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   240
      Left            =   7200
      TabIndex        =   0
      Top             =   1200
      Width           =   975
   End
   Begin VB.Image imgTitleMain 
      Height          =   450
      Left            =   6720
      Picture         =   "frmCK.frx":4276
      Stretch         =   -1  'True
      Top             =   600
      Width           =   285
   End
   Begin VB.Image imgWindowBottomRight 
      Height          =   450
      Left            =   7800
      Picture         =   "frmCK.frx":49C0
      Top             =   120
      Width           =   285
   End
   Begin VB.Image imgWindowRight 
      Height          =   450
      Left            =   7800
      Picture         =   "frmCK.frx":510A
      Stretch         =   -1  'True
      Top             =   600
      Width           =   285
   End
   Begin VB.Image imgWindowLeft 
      Height          =   450
      Left            =   7440
      Picture         =   "frmCK.frx":5854
      Stretch         =   -1  'True
      Top             =   600
      Width           =   285
   End
   Begin VB.Image imgWindowBottom 
      Height          =   450
      Left            =   7080
      Picture         =   "frmCK.frx":5F9E
      Stretch         =   -1  'True
      Top             =   600
      Width           =   285
   End
   Begin VB.Image imgWindowBottomLeft 
      Height          =   450
      Left            =   7440
      Picture         =   "frmCK.frx":66E8
      Top             =   120
      Width           =   285
   End
   Begin VB.Image imgTitleRight 
      Height          =   450
      Left            =   7080
      Picture         =   "frmCK.frx":6E32
      Top             =   120
      Width           =   285
   End
   Begin VB.Image imgTitleLeft 
      Height          =   450
      Left            =   6720
      Picture         =   "frmCK.frx":757C
      Top             =   120
      Width           =   285
   End
End
Attribute VB_Name = "frmCK"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub asPopup3_Click(Cancel As Boolean)
If Val(Label4.Caption) - Val(Text1.Text) < 0 Or Val(Text1.Text) = 0 Then
 MsgBox "库存量不够!请及时采购。"
 Exit Sub
End If
If Val(ckprice.Text) = 0 Then
 MsgBox "请选择出库材料价格!"
 Exit Sub
End If
If DBCombo2.Text = "" Then
 MsgBox "请选择出库材料名称!"
 Exit Sub
End If
If DBCombo3.Text = "" Then
 MsgBox "请选择服务客户!"
 Exit Sub
End If
If DBCombo4.Text = "" Then
 MsgBox "请选择经手人!"
 Exit Sub
End If
Dim a As Integer
 a = MsgBox("********你确定此操作吗?**********" & vbCrLf _
        & "材料名称:" & DBCombo2.Text & vbCrLf _
        & "原库存量:" & Label4.Caption & Label5.Caption & vbCrLf _
        & "本次出库:" & Text1.Text & Label5.Caption & vbCrLf _
        & "出库单价:" & ckprice.Text & "元" & vbCrLf _
        & "服务客户:" & DBCombo3.Text & vbCrLf _
        & "经  手  人:" & DBCombo4.Text & vbCrLf _
        & "出库支付:" & CKzhifu.Text & vbCrLf _
        & "出库备注:" & CKzhifu.Text & vbCrLf _
        , vbExclamation + vbOKCancel + vbApplicationModal, "提示")
If a = 1 Then
  Data5.Recordset.AddNew
  Data5.Recordset("名称") = DBCombo2.Text
  Data5.Recordset("用户单位") = DBCombo3.Text
  Data5.Recordset("数量") = Text1.Text
  Data5.Recordset("单价") = ckprice.Text
  Data5.Recordset("经手人") = DBCombo4.Text
  Data5.Recordset("日期") = Date
  Data5.Recordset("出库支付") = CKzhifu.Text
  Data5.Recordset("出库备注") = CKbeizhu.Text
  Data5.UpdateRecord
  Data5.Recordset.Bookmark = Data5.Recordset.LastModified
  '************************
  Data2.Recordset.Edit
  Data2.Recordset("数量") = Val(Label4.Caption) - Val(Text1.Text)
  Data2.Recordset.Update
  MsgBox "出库完成!"
  asPopup4.Enabled = True
End If
End Sub

Private Sub asPopup4_Click(Cancel As Boolean)
DataReport1.Show
DataReport1.Sections(2).Controls("Label1").Caption = "出库单据"
DataReport1.Sections(2).Controls("Label2").Caption = CStr(DBCombo2.Text)
DataReport1.Sections(2).Controls("Label3").Caption = "数量:" & CStr(Text1.Text) & Label5.Caption
DataReport1.Sections(2).Controls("Label4").Caption = "用途:" & CStr(DBCombo3.Text)
DataReport1.Sections(2).Controls("Label5").Caption = "单价:" & CStr(ckprice.Text) & "元"
DataReport1.Sections(2).Controls("Label6").Caption = "经手人:" & CStr(DBCombo4.Text)
DataReport1.Sections(2).Controls("Label7").Caption = "支付:" & CKzhifu.Text
asPopup4.Enabled = False
End Sub

Private Sub DBCombo2_Click(Area As Integer)
Dim SQL As String
SQL = "SELECT ID, 分类, 单位, 名称, 备注, 数量 FROM 库存材料表 WHERE 分类 = '成品'"
Data2.Visible = False
Data2.DatabaseName = App.Path & "\库存管理.mdb"
Data2.RecordSource = SQL
Data2.Refresh
DBCombo2.Refresh
Timer1.Enabled = True
Timer1.Interval = 1
End Sub

Private Sub DBCombo3_Click(Area As Integer)
Timer2.Enabled = True
Timer2.Interval = 1
End Sub

Private Sub DBCombo4_Click(Area As Integer)
Timer3.Enabled = True
Timer3.Interval = 1
End Sub

Private Sub Form_Load()
CKzhifu.AddItem "现金", 0
CKzhifu.AddItem "支票", 1
CKzhifu.AddItem "欠款", 2
MakeWindow Me
   ' AlwaysOnTop Me, True
Me.Top = MDIFrmMain.Height / 2 - Me.Height / 2 - 1000
Me.Left = MDIFrmMain.Width / 2 - Me.Width / 2
Data2.DatabaseName = App.Path & "\库存管理.mdb"
Data2.Connect = ";pwd=lee1012"
Data2.RecordSource = "库存材料表"
Data2.Refresh
Data2.Visible = False
Data3.DatabaseName = App.Path & "\库存管理.mdb"
Data3.Connect = ";pwd=lee1012"
Data3.RecordSource = "客户表"
Data3.Refresh
Data3.Visible = False
Data4.DatabaseName = App.Path & "\库存管理.mdb"
Data4.Connect = ";pwd=lee1012"
Data4.RecordSource = "员工表"
Data4.Refresh
Data4.Visible = False
Data5.DatabaseName = App.Path & "\库存管理.mdb"
Data5.Connect = ";pwd=lee1012"
Data5.RecordSource = "出库表"
Data5.Refresh
Data5.Visible = False
asPopup4.Enabled = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim MyStr As String
MyStr = "东方库存管理由东方软件有限公司开发"
MDIFrmMain.MovingText1.MsgChar = MyStr
End Sub

Private Sub imgTitleClose_Click()
Unload Me
End Sub

Private Sub imgTitleLeft_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMinimize_Click()
    Me.WindowState = 1
End Sub

Private Sub imgTitleRight_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub lblTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub Timer1_Timer()
Data2.Recordset.FindFirst "名称 ='" & DBCombo2.Text & "'"
If Data2.Recordset.NoMatch = False Then
  Label4.Caption = Data2.Recordset("数量")
  Label5.Caption = Data2.Recordset("单位")
  MDIFrmMain.MovingText1.MsgChar = "----------出库操作中---------东方软件有限公司--------董芳芳所有--------" 'MyStr
  Timer1.Enabled = False
End If
End Sub

Private Sub Timer2_Timer()
If DBCombo3.Text > "" And DBCombo3.Text > "" Then
 Data3.Recordset.FindFirst "名称 ='" & DBCombo3.Text & "'"
 MDIFrmMain.MovingText1.MsgChar = "----------出库操作中---------东方软件有限公司--------董芳芳所有--------" 'MyStr
 Timer2.Enabled = False
End If
End Sub

Private Sub Timer3_Timer()
If DBCombo4.Text = "" And DBCombo4.Text > "" Then
 Data4.Recordset.FindFirst "姓名 ='" & DBCombo4.Text & "'"
 Timer3.Enabled = False
 MDIFrmMain.MovingText1.MsgChar = "----------出库操作中---------东方软件有限公司--------董芳芳所有--------" 'MyStr
End If
End Sub

⌨️ 快捷键说明

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