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

📄 rkth.frm

📁 网吧库存管理系统 主要对商品网费等费用和数量管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc2"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   3390
      Top             =   1230
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin CoolBoySkinForVB6.CoolBoySkin CoolBoySkin1 
      Height          =   1845
      Left            =   2790
      TabIndex        =   37
      Top             =   225
      Width           =   3405
      _ExtentX        =   6006
      _ExtentY        =   3254
      Caption         =   "神龙科技(网吧库管)"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      MenuBackColor   =   16777215
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Height          =   285
      Left            =   1395
      TabIndex        =   1
      Top             =   1155
      Width           =   2310
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "入库退货"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   60
      TabIndex        =   0
      Top             =   690
      Width           =   4635
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   1  'Opaque
      Height          =   3165
      Left            =   240
      Shape           =   4  'Rounded Rectangle
      Top             =   630
      Width           =   4605
   End
End
Attribute VB_Name = "rkth"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim oldx As Long
Dim oldy As Long
Dim mov As Boolean
Dim rkspid As Long
Dim xzkcs As Double
Dim dat As Date
Dim dad As Date
Dim xgsl As Double
Dim xgjg As Double
Dim ckspid As Long
Dim spnm As String
Public rkdzt As Integer
Dim rkid As Integer

Private Sub Combo1_Click()
tim = 0
If username = "" Then loginfrm.Show
Label3.Caption = ""
Label5.Caption = ""
xzkcs = 0
xpcmdbutton1.Enabled = True
If Trim(Combo1.Text) = "" Then Exit Sub
Adodc1.RecordSource = "select * from rk where rkdh ='" & Trim(Combo1.Text) & "' and DWS='" & gsname & "'"
Adodc1.Refresh
If Not Adodc1.Recordset.EOF Then
spnm = Adodc1.Recordset.Fields("spname")
Label3.Caption = "商品名称:" & spnm
Label3.Caption = Label3.Caption & vbCrLf & "入库数量:" & Adodc1.Recordset.Fields("rksl")
Label3.Caption = Label3.Caption & vbCrLf & "入库单价:" & Adodc1.Recordset.Fields("rkjg")
Label3.Caption = Label3.Caption & vbCrLf & "赠送数量:" & Adodc1.Recordset.Fields("zsrk")
Label3.Caption = Label3.Caption & vbCrLf & "入库人:" & Adodc1.Recordset.Fields("rkname")
Label3.Caption = Label3.Caption & vbCrLf & "入库时间:" & Adodc1.Recordset.Fields("rkdate")
xzkcs = Adodc1.Recordset.Fields("rksl") + Adodc1.Recordset.Fields("zsrk")
rkid = Adodc1.Recordset.Fields("id")
Adodc1.RecordSource = "select spsl,id from spkc WHERE DWS='" & gsname & "' and spname ='" & spnm & "'"
Adodc1.Refresh
If Not Adodc1.Recordset.EOF Then
Label5.Caption = "库存量:" & Adodc1.Recordset.Fields("spsl")
ckspid = Adodc1.Recordset.Fields("id")
Else
Label5.Caption = "现无库存!"
xpcmdbutton1.Enabled = False
End If
End If


End Sub

Private Sub Combo2_Click()
tim = 0
If username = "" Then loginfrm.Show
xpcmdbutton5.Enabled = True
spnm = Trim(Combo2.Text)
If spnm = "" Then Exit Sub
Adodc1.RecordSource = "select spsl,id from spkc where spname ='" & spnm & "' and DWS='" & gsname & "'"
Adodc1.Refresh
If Not Adodc1.Recordset.EOF Then
Label8.Caption = "库存量:" & Adodc1.Recordset.Fields("spsl")
Text1 = Adodc1.Recordset.Fields("spsl")
ckspid = Adodc1.Recordset.Fields("id")
Else
Label8.Caption = "现无库存!"
xpcmdbutton5.Enabled = False
Text1 = 0
End If
End Sub

Private Sub Combo3_Click()
xzkcs = 0
xpcmdbutton7.Enabled = True
If Trim(Combo3.Text) = "" Then Exit Sub
Adodc1.RecordSource = "select * from rk WHERE DWS='" & gsname & "' and rkdh ='" & Trim(Combo3.Text) & "'"
Adodc1.Refresh
If Not Adodc1.Recordset.EOF Then
spnm = Adodc1.Recordset.Fields("spname")
Label9.Caption = "商品名称:" & spnm
Text3.Text = Adodc1.Recordset.Fields("rksl")
Text4.Text = Adodc1.Recordset.Fields("rkjg")
Text5.Text = Adodc1.Recordset.Fields("zsrk")
xgsl = Val(Adodc1.Recordset.Fields("rksl")) + Val(Adodc1.Recordset.Fields("zsrk"))
rkid = Adodc1.Recordset.Fields("id")
xgjg = Val(Text4.Text)
Adodc1.RecordSource = "select spsl,id from spkc where spname ='" & spnm & "' and  DWS='" & gsname & "'"
Adodc1.Refresh
If Not Adodc1.Recordset.EOF Then
Label10.Caption = "库存量:" & Adodc1.Recordset.Fields("spsl")
ckspid = Adodc1.Recordset.Fields("id")
Else
Label10.Caption = "现无库存!"
xpcmdbutton7.Enabled = False
End If
End If

End Sub

Private Sub Form_Load()
tim = 0
If username = "" Then loginfrm.Show
Me.Left = Screen.Width - Me.Width
Me.Top = 400
Adodc1.ConnectionString = connstr
Adodc1.CommandType = adCmdText
Adodc2.ConnectionString = connstr
Adodc2.CommandType = adCmdText
dat = CDate(Year(Date) & "-" & Month(Date) & "- 1")
dad = Date
loadspdh
If username = "" Then loginfrm.Show
For i = 0 To 2
Frame1(i).Visible = False
Next
Frame1(rkdzt).Visible = True
If rkdzt = 0 Then Label1.Caption = "删除入库单"
If rkdzt = 1 Then Label1.Caption = "入库退货单"
If rkdzt = 2 Then Label1.Caption = "修改入库单"

Adodc1.RecordSource = "select DISTINCT spname from spkc where spsl>0 and DWS='" & gsname & "'"
Adodc1.Refresh
Combo2.Clear
Do While Not Adodc1.Recordset.EOF
Combo2.AddItem Adodc1.Recordset.Fields("spname")
Adodc1.Recordset.MoveNext
Loop




End Sub

Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
oldx = X
oldy = Y
mov = True
End Sub

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If mov Then
Me.Move Me.Left + (X - oldx), Me.Top + (Y - oldy)
End If
tim = 0
If username = "" Then loginfrm.Show
End Sub
Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mov = False
End Sub

Public Sub loadspdh()
tim = 0
If username = "" Then loginfrm.Show
Dim slk As String
slk = Format(dat, "yyyymm")
Adodc1.RecordSource = "select rkdh from rk where left(rkdh,6)='" & slk & "' and rkxz='进货入库' and  DWS='" & gsname & "'"
Adodc1.Refresh
Combo1.Clear
Combo3.Clear
Do While Not Adodc1.Recordset.EOF
Combo1.AddItem Trim(Adodc1.Recordset.Fields(0).Value)
Combo3.AddItem Trim(Adodc1.Recordset.Fields(0).Value)
Adodc1.Recordset.MoveNext
Loop
Combo1.Text = ""
Combo3.Text = ""
Label3.Caption = ""
Label10.Caption = ""
Label5.Caption = ""
If slk <> Format(Date, "yyyymm") Then
xpcmdbutton3(1).Visible = True
xpcmdbutton3(3).Visible = True
Else
xpcmdbutton3(1).Visible = False
xpcmdbutton3(3).Visible = False
End If
End Sub

Private Sub xpcmdbutton1_Click()
tim = 0
If username = "" Then loginfrm.Show
If spnm = "" Then Exit Sub
Adodc2.RecordSource = "select * from spkc where DWS='" & gsname & "' and id=" & ckspid
Adodc2.Refresh
If Not Adodc2.Recordset.EOF Then
Adodc2.Recordset.Fields("spsl") = Adodc2.Recordset.Fields("spsl") - xzkcs
Adodc2.Recordset.Update
If rs.State Then rs.Close
rs.Open "delete  rk where DWS='" & gsname & "' and id=" & rkid, cn, 3, 3
If rs.State Then rs.Close
Combo1.RemoveItem Combo1.ListIndex
Else
MsgBox "没有找到库存记录,可能的原因是商品名称错误!", vbOKOnly + vbInformation, "错误"
Exit Sub
End If
xzkcs = 0
spnm = ""
spdh = Trim(Combo1.Text)
Call loadspdh
Label5.Caption = "删除:" & spdh & "完成"
Exit Sub
nxt:

End Sub

Private Sub xpcmdbutton2_Click()
Unload Me
End Sub

Private Sub xpcmdbutton3_Click(Index As Integer)
tim = 0
If username = "" Then loginfrm.Show
If Index = 1 Or Index = 3 Then
dat = CDate(Year(Date) & "-" & Month(Date) & "- 1")
dad = Date
Else
If Month(dat) = 1 Then
dat = CDate(Year(dat) - 1 & "-12-1")
dad = CDate(Year(dat) - 1 & "-12-31")
Else
dat = CDate(Year(dat) & "-" & Month(dat) - 1 & "-1")
dad = CDate(Year(dat) & "-" & Month(dat) & "-1") - 1
End If
End If
Call loadspdh

End Sub

Private Sub xpcmdbutton4_Click()
Unload Me
End Sub

Private Sub xpcmdbutton5_Click()
tim = 0
If username = "" Then loginfrm.Show
Dim sl As Double
ckdh = Format(Now, "yyyymmddhhmmss") & "-" & userid
Adodc2.RecordSource = "select * from spkc where DWS='" & gsname & "' and id=" & ckspid
Adodc2.Refresh
If Not Adodc2.Recordset.EOF Then
Adodc2.Recordset.Fields("spsl") = Adodc2.Recordset.Fields("spsl") - Val(Text1.Text)
Adodc2.Recordset.Update
Else
MsgBox "仓库中没有此商品", vbExclamation + vbOKOnly, "错误"
Exit Sub
End If
Adodc2.RecordSource = "select * from ck where ckdh='" & ckdh & "' and  DWS='" & gsname & "'"
Adodc2.Refresh
With Adodc2.Recordset
.addnew
.Fields("ckdh") = ckdh
.Fields("spname") = Trim(Combo1.Text)
.Fields("cksl") = Val(Text1.Text)
.Fields("ckxz") = "商品退货"
.Fields("ckname") = username
.Fields("ckdate") = Now
.Fields("beizhu") = Trim(Text2) & " "
.Fields("dws") = gsname
.Update
End With
Text1 = ""
Text2 = ""
Adodc1.RecordSource = "select DISTINCT spname from spkc where spsl>0 and DWS='" & gsname & "'"
Adodc1.Refresh
Combo2.Clear
Do While Not Adodc1.Recordset.EOF
Combo2.AddItem Adodc1.Recordset.Fields("spname")
Adodc1.Recordset.MoveNext
Loop

End Sub

Private Sub xpcmdbutton6_Click()
Unload Me
End Sub

Private Sub xpcmdbutton7_Click()
tim = 0
If username = "" Then loginfrm.Show
If spnm = "" Then Exit Sub
xgsl = Val(Text3.Text) + Val(Text5) - xgsl
Adodc2.RecordSource = "select * from spkc  where DWS='" & gsname & "' and id=" & ckspid
Adodc2.Refresh
If Not Adodc2.Recordset.EOF Then
Adodc2.Recordset.Fields("spsl") = Adodc2.Recordset.Fields("spsl") + (xgsl)
Adodc2.Recordset.Update
Adodc1.RecordSource = "select * from rk where DWS='" & gsname & "' and id=" & rkid
Adodc1.Refresh
Adodc1.Recordset.Fields("rksl") = Val(Text3.Text)
Adodc1.Recordset.Fields("rkjg") = Val(Text4.Text)
Adodc1.Recordset.Fields("zsrk") = Val(Text5.Text)
Adodc1.Recordset.Update
Else
MsgBox "没有找到库存记录,可能的原因是商品名称错误!", vbOKOnly + vbInformation, "错误"
Exit Sub
End If
xgsl = 0
spnm = ""
spdh = Trim(Combo3.Text)
Call loadspdh
Label10.Caption = "修改:" & spdh & "完成"
Text3 = ""
Text4 = ""
Text5 = ""
End Sub

⌨️ 快捷键说明

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