📄 vcdpandian.frm
字号:
Top = 600
Width = 1215
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 420
Left = 0
TabIndex = 1
Top = 0
Width = 9990
_ExtentX = 17621
_ExtentY = 741
ButtonWidth = 1138
ButtonHeight = 582
Appearance = 1
TextAlignment = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 3
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "retrun"
Object.ToolTipText = "返回"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "pandian"
Object.ToolTipText = "盘点"
ImageIndex = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "print"
Object.ToolTipText = "打印"
ImageIndex = 4
EndProperty
EndProperty
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "vcdpandian.frx":0BEA
Height = 5175
Left = 2880
TabIndex = 0
Top = 600
Width = 6975
_ExtentX = 12303
_ExtentY = 9128
_Version = 393216
HeadLines = 1
RowHeight = 19
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 6
BeginProperty Column00
DataField = "盘号"
Caption = "盘号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "专辑名"
Caption = "专辑名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "价格"
Caption = "价格"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = """¥""#,##0.00"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "数量"
Caption = "数量"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "发行时间"
Caption = "发行时间"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "dddddd"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "入库时间"
Caption = "入库时间"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "dddddd"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
ScrollBars = 3
BeginProperty Column00
ColumnWidth = 705.26
EndProperty
BeginProperty Column01
ColumnWidth = 1739.906
EndProperty
BeginProperty Column02
ColumnWidth = 929.764
EndProperty
BeginProperty Column03
ColumnWidth = 915.024
EndProperty
BeginProperty Column04
ColumnWidth = 1170.142
EndProperty
BeginProperty Column05
ColumnWidth = 1154.835
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 1920
Top = 5160
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "vcdpandian.frx":0BFF
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "vcdpandian.frx":1057
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "vcdpandian.frx":14AF
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "vcdpandian.frx":1907
Key = ""
EndProperty
EndProperty
End
Begin VB.Label Label6
Caption = "库存总价"
Height = 375
Left = 120
TabIndex = 10
Top = 2640
Width = 1575
End
End
Attribute VB_Name = "vcdpandian"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Combo1_Click()
If Combo1.Text = "不打折" Then
Command2.Visible = False
Label3.Visible = True
Text3.Visible = True
Else
Label3.Visible = False
Text3.Visible = False
Command2.Visible = True
End If
If Combo1.Text = "9折" Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Adodc1.Recordset("价格").Value = CInt(Adodc1.Recordset("价格") * 9 / 10)
Adodc1.Recordset.MoveNext
Wend
End If
If Combo1.Text = "8.5折" Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Adodc1.Recordset("价格").Value = CInt(Adodc1.Recordset("价格") * 85 / 100)
Adodc1.Recordset.MoveNext
Wend
End If
If Combo1.Text = "5折" Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Adodc1.Recordset("价格").Value = CInt(Adodc1.Recordset("价格") * 1 / 2)
Adodc1.Recordset.MoveNext
Wend
End If
End Sub
Private Sub Command1_Click()
MDIForm1.StatusBar1.Panels(1) = "显示销量最差的碟"
'Adodc1.CommandType = adCmdText
'Adodc1.RecordSource = "select top 30 percent * from 总表 where 数量>原始数量*1/2 order by 数量 desc"
'Adodc1.Refresh
selectpayinpoint.Show
End Sub
Private Sub Command2_Click()
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select 盘号,专辑名,价格,数量,发行时间,入库时间 from 总表 where 数量=0 "
Adodc1.Refresh
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = "select * from 专辑数据,总表 where 总表.数量=0"
Adodc3.Refresh
End Sub
Private Sub Command2_LostFocus()
MDIForm1.StatusBar1.Panels(1) = "是否将已售完的光碟清空?"
Dim str As String
If Adodc1.Recordset.RecordCount <> 0 Then
str = MsgBox("是否将已售完的光碟清空?", 36, "清空数据")
If str = 6 Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
Wend
Adodc3.Recordset.MoveFirst
While Not Adodc3.Recordset.EOF
Adodc3.Recordset.Delete
Adodc3.Recordset.MoveNext
Wend
End If
End If
End Sub
Private Sub DataGrid1_Click()
MDIForm1.StatusBar1.Panels(1) = "选取一条记录"
End Sub
Private Sub Form_GotFocus()
MDIForm1.StatusBar1.Panels(1) = "歌碟库存盘点"
MDIForm1.Combo1.Text = "[歌碟库存盘点]"
End Sub
Private Sub Form_Load()
MDIForm1.StatusBar1.Panels(1) = "歌碟库存盘点"
MDIForm1.Combo1.Text = "[歌碟库存盘点]"
Command2.Visible = True
Adodc2.CommandType = adCmdText
Adodc2.RecordSource = "select count(盘号) as 条数,sum(数量) as 总数量,sum(价格*数量) as 总价格 from 总表"
Adodc2.Refresh
Combo1.AddItem "不打折"
Combo1.AddItem "9折"
Combo1.AddItem "8.5折"
Combo1.AddItem "5折"
End Sub
Private Sub Form_LostFocus()
Unload Me
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Adodc1.Recordset("价格") = Text3.Text
Adodc1.Recordset.MoveNext
Wend
End If
End Sub
Private Sub Text3_LostFocus()
If Text3.Text <> "" Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Adodc1.Recordset("价格") = Text3.Text
Adodc1.Recordset.MoveNext
Wend
End If
Text3.Text = ""
Label3.Visible = False
Text3.Visible = False
Command2.Visible = True
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1:
MDIForm1.StatusBar1.Panels(1) = "歌碟销售"
formpayout.Combo1.Text = "歌碟销售"
formpayout.Show
vcdpandian.Hide
Set vcdpandian = Nothing
Case 2:
Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "总表"
Adodc1.Refresh
Case 3:
MDIForm1.StatusBar1.Panels(1) = "歌碟库存盘点数据"
vcdpandianprint.Show
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -