maintainstat.frm
来自「一个关于电脑管理汽车的软件」· FRM 代码 · 共 344 行
FRM
344 行
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{40D97E01-4259-4398-B597-183C348B488F}#1.0#0"; "BSE.ocx"
Begin VB.Form MaintainStat
Caption = "维修统计"
ClientHeight = 8505
ClientLeft = 60
ClientTop = 450
ClientWidth = 11535
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 8505
ScaleWidth = 11535
Begin BSE_Engine.BSE BSE1
Left = 5400
Top = 6600
_ExtentX = 6588
_ExtentY = 1085
End
Begin VB.Frame frameInfo
Height = 855
Index = 1
Left = 0
TabIndex = 4
Top = 7680
Width = 11775
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Index = 1
Left = 3720
TabIndex = 5
Top = 240
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
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
Format = 67305473
CurrentDate = 38281
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Index = 0
Left = 1440
TabIndex = 6
Top = 240
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
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
Format = 67305473
CurrentDate = 38281
End
Begin VB.Label Label10
Caption = "统计时段:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Index = 1
Left = 120
TabIndex = 9
Top = 360
Width = 1335
End
Begin VB.Label Label2
Caption = "到"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 2
Left = 3480
TabIndex = 8
Top = 360
Width = 375
End
Begin VB.Label Label2
Caption = "自"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 3
Left = 1200
TabIndex = 7
Top = 360
Width = 375
End
End
Begin VB.Frame frameInfo
Height = 855
Index = 0
Left = 0
TabIndex = 0
Top = 0
Width = 11775
Begin VB.CommandButton Command1
Height = 495
Index = 5
Left = 6840
Picture = "MaintainStat.frx":0000
Style = 1 'Graphical
TabIndex = 2
ToolTipText = "打印"
Top = 240
Width = 495
End
Begin VB.CommandButton Command1
Height = 495
Index = 4
Left = 6240
Picture = "MaintainStat.frx":014A
Style = 1 'Graphical
TabIndex = 1
ToolTipText = "刷新"
Top = 240
Width = 495
End
Begin VB.Label Label10
Caption = "维修统计"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Index = 0
Left = 120
TabIndex = 3
Top = 360
Width = 1935
End
End
Begin MSComctlLib.ListView lstBillDocu
Height = 4695
Left = 0
TabIndex = 10
Top = 840
Width = 8175
_ExtentX = 14420
_ExtentY = 8281
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
Attribute VB_Name = "MaintainStat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private SearchGoodsKey As String
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 4
LoadData
Case 5
End Select
End Sub
Private Sub Form_Load()
Dim i As Integer
VarInitData.InitBSE BSE1
DTPicker1(0) = Date - 30
DTPicker1(1) = Date
SearchGoodsKey = "goodscoding"
InitListView
LoadData
End Sub
Private Sub Form_Resize()
If Me.ScaleHeight > 0 And Me.ScaleWidth > 0 Then
frameInfo(0).Width = Me.ScaleWidth
lstBillDocu.top = frameInfo(0).top + frameInfo(0).Height + 50
lstBillDocu.left = 100
lstBillDocu.Width = Me.ScaleWidth - 200
lstBillDocu.Height = Me.ScaleHeight - frameInfo(0).Height - frameInfo(1).Height
frameInfo(1).top = lstBillDocu.top + lstBillDocu.Height
frameInfo(1).Width = Me.ScaleWidth
End If
End Sub
Private Sub InitListView()
lstBillDocu.ColumnHeaders.Clear
With lstBillDocu.ColumnHeaders
.Add , , "序号"
.Add , , "维修单号"
.Add , , "零件费用"
.Add , , "零件成本费用"
.Add , , "其它费用"
.Add , , "合计"
' .Add , , "比率(%)"
End With
End Sub
Private Sub LoadData()
Dim TempSQL As String
Dim TempRS As MYSQL_RS, TempRS2 As MYSQL_RS, TempRS3 As MYSQL_RS
Dim i As Long, TempMoney As Double, TempMoney2 As Double, TempMoney3 As Double
Dim TempIndex As Long
lstBillDocu.ListItems.Clear
TempSQL = VarInitData.DisplaySQLVal(37) & "Where balancedate >= " & Quote(DTPicker1(0).Value) & " and balancedate <= " & Quote(DTPicker1(1).Value)
Set TempRS = New MYSQL_RS
TempRS.OpenRs TempSQL, gCnn
With TempRS
Do Until .EOF
TempMoney = 0
TempMoney2 = 0
TempMoney = TempMoney + .Fields("workcost")
TempMoney = TempMoney + .Fields("othercost")
TempMoney2 = TempMoney2 + .Fields("partcost")
TempMoney3 = 0
TempSQL = "Select * From maintainpartbill " & "Where workbillnum = " & Quote(.Fields("billnum"))
Set TempRS2 = New MYSQL_RS
TempRS2.OpenRs TempSQL, gCnn
With TempRS2
Do Until .EOF
TempSQL = "Select * From maintainpartbill2 " & "Where drawbillnum = " & Quote(.Fields("drawbillnum"))
Set TempRS3 = New MYSQL_RS
TempRS3.OpenRs TempSQL, gCnn
With TempRS3
Do Until .EOF
TempMoney3 = TempMoney3 + .Fields("goodspricemoney")
.MoveNext
Loop
.CloseRecordset
.ReleaseMemory
End With
Set TempRS3 = Nothing
.MoveNext
Loop
.CloseRecordset
.ReleaseMemory
End With
Set TempRS2 = Nothing
lstBillDocu.ListItems.Add
TempIndex = lstBillDocu.ListItems.Count
With lstBillDocu.ListItems(TempIndex)
.Text = TempIndex
.SubItems(1) = TempRS.Fields("billnum")
.SubItems(2) = TempMoney2
.SubItems(3) = TempMoney3
.SubItems(4) = TempMoney
.SubItems(5) = TempMoney + TempMoney2
End With
.MoveNext
Loop
.CloseRecordset
.ReleaseMemory
End With
Set TempRS = Nothing
VarInitData.lstSort lstBillDocu
End Sub
Private Sub Form_Unload(Cancel As Integer)
If BSE1.EngineStarted Then BSE1.EndSubClassing
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?