📄 frmrk.frm
字号:
Width = 735
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "供应商:"
ForeColor = &H00FF0000&
Height = 255
Left = 3600
TabIndex = 4
Top = 600
Width = 855
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "产品名称型号:"
ForeColor = &H00FF0000&
Height = 255
Left = 720
TabIndex = 2
Top = 600
Width = 1815
End
Begin VB.Image imgTitleHelp
Height = 195
Left = 9960
Picture = "frmRK.frx":3B98
Top = 120
Width = 195
End
Begin VB.Image imgTitleMinimize
Height = 195
Left = 9960
Picture = "frmRK.frx":3DE2
Top = 840
Width = 195
End
Begin VB.Image imgTitleClose
Height = 195
Left = 9960
Picture = "frmRK.frx":402C
Top = 480
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 = 9480
TabIndex = 0
Top = 1200
Width = 420
End
Begin VB.Image imgTitleMain
Height = 450
Left = 8520
Picture = "frmRK.frx":4276
Stretch = -1 'True
Top = 600
Width = 285
End
Begin VB.Image imgWindowBottomRight
Height = 450
Left = 9600
Picture = "frmRK.frx":49C0
Top = 120
Width = 285
End
Begin VB.Image imgWindowRight
Height = 450
Left = 9600
Picture = "frmRK.frx":510A
Stretch = -1 'True
Top = 600
Width = 285
End
Begin VB.Image imgWindowLeft
Height = 450
Left = 9240
Picture = "frmRK.frx":5854
Stretch = -1 'True
Top = 600
Width = 285
End
Begin VB.Image imgWindowBottom
Height = 450
Left = 8880
Picture = "frmRK.frx":5F9E
Stretch = -1 'True
Top = 600
Width = 285
End
Begin VB.Image imgWindowBottomLeft
Height = 450
Left = 9240
Picture = "frmRK.frx":66E8
Top = 120
Width = 285
End
Begin VB.Image imgTitleRight
Height = 450
Left = 8880
Picture = "frmRK.frx":6E32
Top = 120
Width = 285
End
Begin VB.Image imgTitleLeft
Height = 450
Left = 8520
Picture = "frmRK.frx":757C
Top = 120
Width = 285
End
End
Attribute VB_Name = "frmRK"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub asPopup3_Click(Cancel As Boolean)
If Val(Text1.Text) <= 0 Then
MsgBox "请输入入库数量!"
Exit Sub
End If
If Val(Text2.Text) <= 0 Then
MsgBox "请输入入库价格!"
Exit Sub
End If
If DBCombo2.Text = "" Then
MsgBox "请选择入库材料名称!"
Exit Sub
End If
If DBCombo4.Text = "" Then
MsgBox "请选择经手人!"
Exit Sub
End If
If DBCombo3.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 _
& "入库单价:" & Text2.Text & "元" & vbCrLf _
& "供 应 商:" & DBCombo3.Text & vbCrLf _
& "经 手 人:" & DBCombo4.Text & vbCrLf _
& "入库支付:" & RKzhifu.Text & vbCrLf _
& "入库备注:" & RKbeizhu.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("单价") = Text2.Text
Data5.Recordset("经手") = DBCombo4.Text
Data5.Recordset("日期") = Date
Data5.Recordset("入库支付") = RKzhifu.Text
Data5.Recordset("入库备注") = RKbeizhu.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
If a = 2 Then Exit Sub
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(Text2.Text) & "元"
DataReport1.Sections(2).Controls("Label6").Caption = "经手人:" & CStr(DBCombo4.Text)
DataReport1.Sections(2).Controls("Label7").Caption = "支付:" & RKzhifu.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()
RKzhifu.AddItem "现金", 0
RKzhifu.AddItem "支票", 1
RKzhifu.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 & "'"
MDIFrmMain.MovingText1.MsgChar = "----------入库操作中---------东方软件有限公司--------董芳芳所有--------" 'MyStr
Timer3.Enabled = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -