📄 sellhistory.frm
字号:
Top = 600
Width = 1215
End
Begin VB.Label BillName
Caption = "进货单号:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Index = 0
Left = 120
TabIndex = 19
Top = 240
Width = 1215
End
End
Begin QCJXC.ctlListViewGraphical ctllstAddress
Height = 6495
Left = 360
TabIndex = 5
Top = 480
Width = 9615
_ExtentX = 16960
_ExtentY = 11456
End
Begin MSComctlLib.ListView lstBillDocu
Height = 3615
Left = -74880
TabIndex = 34
Top = 3240
Width = 9855
_ExtentX = 17383
_ExtentY = 6376
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = 8388608
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 0
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
End
End
Attribute VB_Name = "SellHistory"
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
Public lstAddressIndex As Long
Public ModifyBS As Boolean
Public lstBillDocuIndex As Long
Public lstAddress As ListView
Private Sub cmbCheckMan_KeyDown(KeyCode As Integer, Shift As Integer)
cmbCheckMan.Text = ""
End Sub
Private Sub cmbCheckMan_KeyUp(KeyCode As Integer, Shift As Integer)
cmbCheckMan.Text = ""
End Sub
Private Sub cmbInvoiceType_KeyDown(KeyCode As Integer, Shift As Integer)
cmbInvoiceType.Text = "'"
End Sub
Private Sub cmbInvoiceType_KeyUp(KeyCode As Integer, Shift As Integer)
cmbInvoiceType.Text = ""
End Sub
Private Sub CmbPayWay_KeyDown(KeyCode As Integer, Shift As Integer)
CmbPayWay.Text = ""
End Sub
Private Sub CmbPayWay_KeyUp(KeyCode As Integer, Shift As Integer)
CmbPayWay.Text = ""
End Sub
Private Sub cmbPrincipal_KeyDown(KeyCode As Integer, Shift As Integer)
cmbPrincipal.Text = ""
End Sub
Private Sub cmbPrincipal_KeyUp(KeyCode As Integer, Shift As Integer)
cmbPrincipal.Text = ""
End Sub
Private Sub Command1_Click(Index As Integer)
Dim i As Integer
Dim TempRS As MYSQL_RS
Dim TempVar As Long
Dim TempSQL As String
Dim TempBillType As Integer
Select Case Index
Case 0
SearchGoods9.Show 1
Case 1
TempSQL = VarInitData.DisplaySQLVal(19)
VarInitData.LoadData lstAddress, TempSQL
VarInitData.CheckSendBackGoods ctllstAddress
Case 6
If lstAddress.SelectedItem Is Nothing Then Exit Sub
VarCrystal.DispalySellReport lstAddress.SelectedItem.Text, 19
End Select
VarInitData.DealListView lstAddress, lstAddressIndex
End Sub
Private Sub ctllstAddress_cItemClick(ByVal Item As MSComctlLib.ListItem)
lstAddressIndex = Item.Index
End Sub
Private Sub Form_Activate()
VarInitData.DealListView lstAddress, lstAddressIndex
End Sub
Private Sub Form_Load()
Dim i As Integer
VarInitData.InitBSE BSE1
Frame2.Visible = False
Frame2.Enabled = False
lstBillDocu.Visible = False
Set lstAddress = ctllstAddress.lv
ctllstAddress.Visible = True
' lstAddress.Visible = True
' With lstaddress.Font
' .Name = "宋体"
' .Size = 12
' End With
'ctllstAddress
VarInitData.LoadData lstAddress, VarInitData.DisplaySQLVal(19)
VarInitData.CheckSendBackGoods ctllstAddress
End Sub
Private Sub Form_Resize()
If Me.ScaleHeight > 0 And Me.ScaleWidth > 0 Then
frameInfo.left = Me.ScaleLeft
frameInfo.tOp = Me.ScaleTop
frameInfo.Width = Me.ScaleWidth
SSStock.tOp = frameInfo.tOp + frameInfo.Height
SSStock.left = Me.ScaleLeft + 70
SSStock.Width = Me.ScaleWidth - 140
SSStock.Height = Me.ScaleHeight - frameInfo.Height - 50 'Screen.Height - 2650
ctllstAddress.tOp = 450
ctllstAddress.left = 70
ctllstAddress.Width = SSStock.Width - 140
ctllstAddress.Height = SSStock.Height - 550
Frame2.left = 70
Frame2.tOp = 450
Frame2.Width = SSStock.Width - 140
lstBillDocu.tOp = Frame2.tOp + Frame2.Height
lstBillDocu.left = 70
lstBillDocu.Width = SSStock.Width - 140
lstBillDocu.Height = SSStock.Height - Frame2.Height - 550
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If BSE1.EngineStarted Then BSE1.EndSubClassing
End Sub
Private Sub lstAddress_DblClick()
If lstAddress.SelectedItem Is Nothing Then Exit Sub
' LoadRecord Val(lstAddress.SelectedItem.Text)
End Sub
Private Sub lstAddress_ItemClick(ByVal Item As MSComctlLib.ListItem)
'Dim templong As Long
'Stop
'templong = Item.Text
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 SSStock_Click(PreviousTab As Integer)
Dim TempSQL As String
Dim TempStr As String
Dim TempRS As MYSQL_RS
Dim TempBillType As Integer
Dim i As Integer
If PreviousTab <> 0 Then
For i = 0 To 1
Command1(i).Visible = True
Next i
Frame2.Visible = False
lstBillDocu.Visible = False
ctllstAddress.Visible = True
VarInitData.DealListView lstAddress, lstAddressIndex
Else
For i = 0 To 1
Command1(i).Visible = False
Next i
Frame2.Visible = True
lstBillDocu.Visible = True
ctllstAddress.Visible = False
ClearFrame2
If lstAddress.ListItems.Count > 0 Then
TempStr = lstAddress.ListItems(lstAddressIndex).Text
Else
TempStr = ""
End If
TempSQL = VarInitData.DisplaySQLVal(20) & " Where billnum = " & Quote(TempStr)
VarInitData.LoadData lstBillDocu, TempSQL
VarInitData.DealListView lstBillDocu, lstBillDocuIndex
If lstAddressIndex > 0 And lstAddress.ListItems.Count > 0 Then
With lstAddress.ListItems(lstAddressIndex)
lblBillNum = .Text
lblProvide = .SubItems(1)
DTDate.Value = .SubItems(2)
CmbPayWay = .SubItems(3)
cmbPrincipal = .SubItems(4)
cmbCheckMan = .SubItems(5)
lblGCount = .SubItems(6)
lblGMoney = .SubItems(7)
lblGMoney2 = .SubItems(8)
lblGItemCount = .SubItems(9)
lblOperateMan = .SubItems(11)
'Set TempRS = New MYSQL_RS
'SQL = "Select * From stocktable Where billnum = " & Quote(Trim(.Text))
'TempRS.OpenRs SQL, gCnn
cmbInvoiceType = .SubItems(12) 'TempRS.Fields("invoicetype").Value
texInvoiceNo = .SubItems(13) 'TempRS.Fields("invoiceno").Value
TempBillType = Val(.SubItems(14)) 'TempRS.Fields("billtype").Value
If TempBillType > 0 Then Option1(TempBillType - 1).Value = True
' TempRS.CloseRecordset
' Set TempRS = Nothing
End With
End If
End If
End Sub
Private Sub ClearFrame2()
With StockHistory
.lblBillNum = ""
.lblProvide = ""
.lblGCount = "0"
.lblGItemCount = "0"
.lblOperateMan = ""
.lblGMoney = "0"
.cmbCheckMan = ""
.cmbInvoiceType = ""
.texInvoiceNo = ""
.CmbPayWay = ""
.cmbPrincipal = ""
.DTDate = Date
.Option1(0).Value = False
.Option1(1).Value = False
.Option1(2).Value = False
.Option1(3).Value = False
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -