searchgoods2.frm
来自「一个关于电脑管理汽车的软件」· FRM 代码 · 共 368 行
FRM
368 行
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Object = "{40D97E01-4259-4398-B597-183C348B488F}#1.0#0"; "BSE.ocx"
Begin VB.Form SearchGoods2
BackColor = &H8000000D&
BorderStyle = 1 'Fixed Single
Caption = "货品查找选择"
ClientHeight = 5070
ClientLeft = 45
ClientTop = 330
ClientWidth = 8070
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5070
ScaleWidth = 8070
Begin VB.CommandButton cmdCancel
Caption = "取 消"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6240
TabIndex = 5
Top = 4560
Width = 1215
End
Begin VB.CommandButton cmdOk
Caption = "确 定"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4560
TabIndex = 4
Top = 4560
Width = 1215
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 3
Top = 120
Width = 3495
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 5160
TabIndex = 1
Top = 120
Width = 2535
End
Begin MSComctlLib.ListView lstBillDocu
Height = 3855
Left = 0
TabIndex = 0
Top = 600
Width = 8055
_ExtentX = 14208
_ExtentY = 6800
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = 0
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 4
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Name"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Address"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "City, State, Zip"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 3
Text = "Notes"
Object.Width = 2540
EndProperty
End
Begin BSE_Engine.BSE BSE1
Left = 240
Top = 4560
_ExtentX = 6588
_ExtentY = 1085
End
Begin VB.Label Label10
BackColor = &H8000000D&
Caption = "查询条件:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 375
Left = 240
TabIndex = 2
Top = 240
Width = 1695
End
End
Attribute VB_Name = "SearchGoods2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Dim NewRecord As Boolean
Dim LastSortIndex As Long, LastSortDir As Long
Private VarOption As Integer
Private ModifyBS As Boolean
Public lstBillDocuIndex As Long
Private SearchGoodsKey As String
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOk_Click()
Dim i As Long
If lstBillDocu.SelectedItem Is Nothing Then
Unload Me
Exit Sub
End If
With lstBillDocu.SelectedItem
Select Case VarInitData.SearGoodsBS
Case 1
ClientNeedInfo.TexGoods(0) = .Text
ClientNeedInfo.TexGoods(1) = .SubItems(1)
ClientNeedInfo.TexGoods(2) = .SubItems(2)
ClientNeedInfo.TexGoods(3) = .SubItems(3)
ClientNeedInfo.Combo1(0) = .SubItems(4)
ClientNeedInfo.Combo1(1) = .SubItems(5)
ClientNeedInfo.Combo1(2) = .SubItems(6)
ClientNeedInfo.Combo1(3) = .SubItems(7)
ClientNeedInfo.TexGoods(4) = .SubItems(8)
Case 2
AddRow.TexGoods(0) = .Text
AddRow.TexGoods(1) = .SubItems(1)
AddRow.TexGoods(2) = .SubItems(3)
AddRow.Combo1(0) = .SubItems(4)
AddRow.Combo1(1) = .SubItems(5)
AddRow.Combo1(2) = .SubItems(6)
AddRow.Combo1(3) = .SubItems(7)
AddRow.TexGoods(3) = .SubItems(10)
AddRow.TexGoods(5) = .SubItems(11)
AddRow.TexGoods(6) = .SubItems(12)
AddRow.TexGoods(7) = Format$(Val(.SubItems(11)) * GPriceRef(1), "0.00")
Case 3
AddRow2.TexGoods(0) = .Text
AddRow2.TexGoods(1) = .SubItems(1)
AddRow2.TexGoods(2) = .SubItems(3)
AddRow2.Combo1(0) = .SubItems(4)
AddRow2.Combo1(1) = .SubItems(5)
AddRow2.Combo1(2) = .SubItems(6)
AddRow2.Combo1(3) = .SubItems(7)
AddRow2.TexGoods(3) = .SubItems(10)
AddRow2.TexGoods(5) = .SubItems(11)
AddRow2.TexGoods(6) = .SubItems(12)
AddRow2.TexGoods(7) = Format$(Val(.SubItems(11)) * GPriceRef(1), "0.00")
Case 4
AddRow3.TexGoods(0) = .Text
AddRow3.TexGoods(1) = .SubItems(1)
AddRow3.TexGoods(2) = .SubItems(3)
AddRow3.Combo1(0) = .SubItems(4)
AddRow3.Combo1(1) = .SubItems(5)
AddRow3.Combo1(2) = .SubItems(6)
AddRow3.Combo1(3) = .SubItems(7)
' AddRow3.TexGoods(3) = .SubItems(11)
'AddRow3.TexGoods(5) = .SubItems(11)
AddRow3.TexGoods(6) = .SubItems(12)
AddRow3.TexGoods(7) = Format$(Val(.SubItems(12)) * (100 - Val(SellTable.Text1.Text)) / 100, "0.00")
Case 5
AddRow4.TexGoods(0) = .Text
AddRow4.TexGoods(1) = .SubItems(1)
AddRow4.TexGoods(2) = .SubItems(3)
AddRow4.Combo1(0) = .SubItems(4)
AddRow4.Combo1(1) = .SubItems(5)
AddRow4.Combo1(2) = .SubItems(6)
AddRow4.Combo1(3) = .SubItems(7)
'AddRow2.TexGoods(3) = .SubItems(10)
'AddRow2.TexGoods(5) = .SubItems(11)
AddRow4.TexGoods(6) = .SubItems(12)
AddRow4.TexGoods(7) = .SubItems(12) 'Format$(Val(.SubItems(12)) * 1.6, "0.00")
Case 6
AddRow5.TexGoods(0) = .Text
AddRow5.TexGoods(1) = .SubItems(1)
AddRow5.TexGoods(2) = .SubItems(3)
AddRow5.Combo1(0) = .SubItems(4)
AddRow5.Combo1(1) = .SubItems(5)
AddRow5.Combo1(2) = .SubItems(6)
AddRow5.Combo1(3) = .SubItems(7)
'AddRow3.TexGoods(3) = .SubItems(10)
'AddRow3.TexGoods(5) = .SubItems(11)
AddRow5.TexGoods(6) = .SubItems(12)
AddRow5.TexGoods(7) = Format$(Val(.SubItems(12)) * (100 - Val(QuoteBillTable.Text1.Text)) / 100, "0.00")
Case 7
Addrow6.TexGoods(0) = .Text
Addrow6.TexGoods(1) = .SubItems(1)
Addrow6.TexGoods(2) = .SubItems(3)
Addrow6.Combo1(0) = .SubItems(4)
Addrow6.Combo1(1) = .SubItems(5)
Addrow6.Combo1(2) = .SubItems(6)
Addrow6.Combo1(3) = .SubItems(7)
Addrow6.TexGoods(7) = Format(.SubItems(12), "0.00")
Addrow6.TexGoods(8) = Format$(.SubItems(11), "0.00")
Case 8
AddRow8.TexGoods(0) = .Text
AddRow8.TexGoods(1) = .SubItems(1)
AddRow8.TexGoods(2) = .SubItems(3)
AddRow8.Combo1(0) = .SubItems(5)
AddRow8.Combo1(1) = .SubItems(6)
AddRow8.Combo1(2) = .SubItems(7)
AddRow8.TexGoods(4) = Format(.SubItems(12), "0.00")
Case 9
AddRow10.TexGoods(0) = .Text
AddRow10.TexGoods(1) = .SubItems(1)
AddRow10.TexGoods(2) = .SubItems(3)
AddRow10.Combo1(0) = .SubItems(4)
AddRow10.Combo1(1) = .SubItems(5)
AddRow10.Combo1(2) = .SubItems(6)
AddRow10.Combo1(3) = .SubItems(7)
' AddRow10.TexGoods(4) = .SubItems(11)
AddRow10.TexGoods(5) = .SubItems(12)
End Select
End With
Unload Me
End Sub
Private Sub Combo1_Click()
Select Case Combo1.ListIndex
Case 0
SearchGoodsKey = "goodscoding"
Case 1
SearchGoodsKey = "goodsname"
Case 2
SearchGoodsKey = "goodsstandard"
Case 3
SearchGoodsKey = "goodssort"
End Select
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
Combo1.Text = ""
End Sub
Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer)
Combo1.Text = ""
End Sub
Private Sub Form_Activate()
VarInitData.DealListView lstBillDocu, lstBillDocuIndex
End Sub
Private Sub Form_Load()
Dim i As Integer
VarInitData.InitBSE BSE1, 0
Combo1.AddItem "货品编码"
Combo1.AddItem "货品名称"
Combo1.AddItem "规格型号"
Combo1.AddItem "货品分类"
'Combo1.Text = "货品编码"
SearchGoodsKey = "goodscoding"
Combo1.ListIndex = 0
VarInitData.LoadData lstBillDocu, VarInitData.DisplaySQLVal(3)
End Sub
Private Sub Form_Unload(Cancel As Integer)
If BSE1.EngineStarted Then BSE1.EndSubClassing
End Sub
Private Sub lstBillDocu_ItemClick(ByVal Item As MSComctlLib.ListItem)
lstBillDocuIndex = Item.Index
End Sub
Private Sub Option1_Click(Index As Integer)
VarOption = Index + 1
End Sub
Private Sub Text1_Change()
Dim TempSQL As String
If Text1.Text <> "" Then
TempSQL = VarInitData.DisplaySQLVal(3) & " Where " & SearchGoodsKey & " like " & Quote(Text1.Text & "%")
VarInitData.LoadData lstBillDocu, TempSQL
Else
VarInitData.LoadData lstBillDocu, VarInitData.DisplaySQLVal(3)
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?