?? 月盤點.frm
字號:
End
Begin VB.Line Line3
BorderWidth = 2
X1 = 8820
X2 = 8820
Y1 = 1260
Y2 = 4200
End
Begin VB.Line Line2
BorderWidth = 2
X1 = 240
X2 = 240
Y1 = 1260
Y2 = 4200
End
Begin VB.Line Line1
BorderWidth = 2
X1 = 240
X2 = 8820
Y1 = 1260
Y2 = 1260
End
Begin VB.Label row
BackStyle = 0 'Transparent
Caption = "報損單"
Height = 195
Index = 5
Left = 360
TabIndex = 12
Top = 3900
Width = 615
End
Begin VB.Label row
BackStyle = 0 'Transparent
Caption = "調(diào)拔單"
Height = 195
Index = 4
Left = 360
TabIndex = 11
Top = 3480
Width = 615
End
Begin VB.Label row
BackStyle = 0 'Transparent
Caption = "借出單"
Height = 195
Index = 3
Left = 360
TabIndex = 10
Top = 3060
Width = 615
End
Begin VB.Label row
BackStyle = 0 'Transparent
Caption = "借入單"
Height = 195
Index = 2
Left = 360
TabIndex = 9
Top = 2640
Width = 615
End
Begin VB.Label row
BackStyle = 0 'Transparent
Caption = "出庫單"
Height = 195
Index = 1
Left = 360
TabIndex = 8
Top = 2220
Width = 615
End
Begin VB.Label row
BackStyle = 0 'Transparent
Caption = "入庫單"
Height = 195
Index = 0
Left = 360
TabIndex = 7
Top = 1800
Width = 615
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "單據(jù)類別"
Height = 195
Left = 360
TabIndex = 6
Top = 1380
Width = 735
End
Begin VB.Label col
BackStyle = 0 'Transparent
Caption = "處理單數(shù)"
Height = 195
Index = 0
Left = 1380
TabIndex = 5
Top = 1380
Width = 735
End
Begin VB.Label col
BackStyle = 0 'Transparent
Caption = "其它金額總數(shù)"
Height = 195
Index = 3
Left = 5880
TabIndex = 4
Top = 1380
Width = 1095
End
Begin VB.Label col
BackStyle = 0 'Transparent
Caption = "貨物總量"
Height = 195
Index = 2
Left = 4500
TabIndex = 3
Top = 1380
Width = 735
End
Begin VB.Label col
BackStyle = 0 'Transparent
Caption = "退出(還出,還入)單數(shù)"
Height = 195
Index = 1
Left = 2340
TabIndex = 2
Top = 1380
Width = 1755
End
Begin VB.Label col
BackStyle = 0 'Transparent
Caption = "貨物金額總數(shù)"
Height = 195
Index = 4
Left = 7500
TabIndex = 1
Top = 1380
Width = 1095
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "盤 點 單"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 3540
TabIndex = 0
Top = 180
Width = 1935
End
End
Attribute VB_Name = "月盤點"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
Private 倉庫編號 As String
Private 經(jīng)辦人編號 As String
Private m_data(5, 4) As String
Private m_otherdata(5) As String
Option Explicit
Private Sub printdata(i, j)
Dim x, y As Long
x = col(j).left / 15 + 5
y = row(i).Top / 15
TextOut Me.hdc, x, y, m_data(i, j), Len(m_data(i, j))
End Sub
Private Sub printotherdata(i)
Dim x, y As Long
If i = 0 Then
x = (other1.left + other1.Width) / 15 + 5
y = other1.Top / 15
ElseIf i = 1 Then
x = (other2.left + other2.Width) / 15 + 5
y = other2.Top / 15
ElseIf i = 2 Then
x = (other3.left + other3.Width) / 15 + 5
y = other3.Top / 15
ElseIf i = 3 Then
x = (other4.left + other4.Width) / 15 + 5
y = other4.Top / 15
ElseIf i = 4 Then
x = (other5.left + other5.Width) / 15 + 5
y = other5.Top / 15
Else
x = (other6.left + other6.Width) / 15 + 5
y = other6.Top / 15
End If
TextOut Me.hdc, x, y, m_otherdata(i), Len(m_otherdata(i))
End Sub
Private Sub printalldata()
Dim i, j As Integer
For i = 0 To 5
For j = 0 To 4
printdata i, j
Next j
Next i
For i = 0 To 5
printotherdata i
Next i
End Sub
Private Function GetMinDate()
Dim t As Date
t = Date
t = DateAdd("m", -1, t)
GetMinDate = Str(t)
End Function
Private Sub ChangeBackColor()
Dim bkcolor As Long
bkcolor = Me.BackColor
編號.BackColor = bkcolor
日期.BackColor = bkcolor
經(jīng)辦人.BackColor = bkcolor
倉庫名稱.BackColor = bkcolor
進行月盤點.BackColor = bkcolor
更改背景.BackColor = bkcolor
打印月盤點單.BackColor = bkcolor
保存月盤點.BackColor = bkcolor
End Sub
Private Sub lockcontrol()
編號.Locked = True
倉庫名稱.Locked = True
經(jīng)辦人.Locked = True
End Sub
Private Sub Form_Paint()
printalldata
End Sub
Private Sub Form_Resize()
ChangeBackColor
'新增盤點單
If 編號.Text = "" Then
日期.Text = Date
打印月盤點單.Visible = False
更改背景.Visible = False
'初始化編號
fMainForm.m_checkado.RecordSource = "select 編號 from 盤點單"
fMainForm.m_checkado.Refresh
If fMainForm.m_checkado.Recordset.RecordCount > 0 Then
fMainForm.m_checkado.Recordset.MoveLast
編號.Text = fMainForm.m_checkado.Recordset.Fields("編號").Value + 1
Else
編號.Text = 1
End If
Else '打印盤點單
'初始化數(shù)據(jù)
fMainForm.m_checkado.RecordSource = "select 倉庫.倉庫名稱,職員信息.姓名 as 經(jīng)辦人,盤點單.盤點數(shù)據(jù),盤點單.盤點時間 from 倉庫,職員信息,盤點單 where 倉庫.編號=盤點單.倉庫編號 and 職員信息.編號=盤點單.經(jīng)辦人編號 and 盤點單.編號=" + 編號.Text + " and 盤點時間>" + GetMinDate
fMainForm.m_checkado.Refresh
If fMainForm.m_checkado.Recordset.RecordCount > 0 Then
倉庫名稱.Text = fMainForm.m_checkado.Recordset.Fields("倉庫名稱").Value
經(jīng)辦人.Text = fMainForm.m_checkado.Recordset.Fields("經(jīng)辦人").Value
日期.Text = fMainForm.m_checkado.Recordset.Fields("盤點時間").Value
Dim data As String
data = fMainForm.m_checkado.Recordset.Fields("盤點數(shù)據(jù)").Value
Dim i, j, n As Long
i = 1: n = 1
j = InStr(i, data, ";")
While (j <> 0)
If n <= 30 Then
m_data(n / 5, (n - 1) Mod 5) = Mid(data, i, j - i)
Else
m_otherdata(n - 31) = Mid(data, i, j - i)
End If
On Error Resume Next
n = n + 1
i = j + 1
j = InStr(i, data, ";")
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -