📄 frmcx.frm
字号:
EndProperty
Height = 372
Left = 1680
TabIndex = 12
Top = 720
Width = 1812
End
Begin VB.Label Label3
BackColor = &H00C0E0FF&
BackStyle = 0 'Transparent
Caption = "请输入车号:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = -73680
TabIndex = 10
Top = 720
Width = 1932
End
End
Begin VB.PictureBox picButtons
Align = 2 'Align Bottom
Appearance = 0 'Flat
BackColor = &H00404040&
BorderStyle = 0 'None
DrawStyle = 1 'Dash
DrawWidth = 32
ForeColor = &H80000008&
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 9510
TabIndex = 0
Top = 5880
Visible = 0 'False
Width = 9504
Begin VB.CommandButton Command2
Caption = "打印(&P)"
Height = 372
Left = 4440
TabIndex = 17
Top = 0
Visible = 0 'False
Width = 972
End
Begin VB.CommandButton Command1
Caption = "帮助"
Height = 372
Left = 5640
TabIndex = 9
Top = 0
Width = 1092
End
Begin VB.CommandButton cmdClose
Caption = "关闭(&C)"
Height = 300
Left = 7680
TabIndex = 4
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdRefresh
Caption = "刷新(&R)"
Height = 300
Left = 3060
TabIndex = 3
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdDelete
Caption = "删除(&D)"
Enabled = 0 'False
Height = 300
Left = 1675
TabIndex = 2
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdUpdate
Caption = "更新(&U)"
Enabled = 0 'False
Height = 300
Left = 290
TabIndex = 1
Top = 0
Width = 1095
End
End
Begin MSAdodcLib.Adodc datPrimaryRS
Align = 2 'Align Bottom
Height = 330
Left = 0
Top = 6180
Visible = 0 'False
Width = 9510
_ExtentX = 16775
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=dzqch"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "dzqch"
OtherAttributes = ""
UserName = "sa"
Password = ""
RecordSource = $"frmcx.frx":00B4
Caption = " "
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1
Height = 5532
Left = 240
TabIndex = 22
Top = 1920
Width = 10692
_ExtentX = 18865
_ExtentY = 9763
_Version = 393216
Rows = 4
Cols = 13
WordWrap = -1 'True
FocusRect = 0
HighLight = 0
FillStyle = 1
GridLinesUnpopulated= 1
AllowUserResizing= 3
RowSizingMode = 1
BeginProperty FontFixed {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_NumberOfBands = 1
_Band(0).BandIndent= 10
_Band(0).Cols = 13
_Band(0).GridLinesBand= 2
_Band(0).TextStyleBand= 0
_Band(0).TextStyleHeader= 0
_Band(0)._NumMapCols= 12
_Band(0)._MapCol(0)._Name= "票号"
_Band(0)._MapCol(0)._RSIndex= 0
_Band(0)._MapCol(1)._Name= "车号"
_Band(0)._MapCol(1)._RSIndex= 1
_Band(0)._MapCol(2)._Name= "毛重"
_Band(0)._MapCol(2)._RSIndex= 2
_Band(0)._MapCol(2)._Alignment= 7
_Band(0)._MapCol(3)._Name= "皮重"
_Band(0)._MapCol(3)._RSIndex= 3
_Band(0)._MapCol(3)._Alignment= 7
_Band(0)._MapCol(4)._Name= "净重"
_Band(0)._MapCol(4)._RSIndex= 4
_Band(0)._MapCol(4)._Alignment= 7
_Band(0)._MapCol(5)._Name= "货物名"
_Band(0)._MapCol(5)._RSIndex= 5
_Band(0)._MapCol(6)._Name= "收货人"
_Band(0)._MapCol(6)._RSIndex= 6
_Band(0)._MapCol(7)._Name= "发货人"
_Band(0)._MapCol(7)._RSIndex= 7
_Band(0)._MapCol(8)._Name= "到货地点"
_Band(0)._MapCol(8)._RSIndex= 8
_Band(0)._MapCol(9)._Name= "司磅员"
_Band(0)._MapCol(9)._RSIndex= 9
_Band(0)._MapCol(10)._Name= "检斤时间"
_Band(0)._MapCol(10)._RSIndex= 10
_Band(0)._MapCol(11)._Name= "流水号"
_Band(0)._MapCol(11)._RSIndex= 11
_Band(0)._MapCol(11)._Alignment= 7
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "Label9"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 720
TabIndex = 19
Top = 5400
Visible = 0 'False
Width = 936
End
Begin VB.Menu prin
Caption = "文件"
Begin VB.Menu mnuoutput
Caption = "导出"
End
Begin VB.Menu mnuPreview
Caption = "打印预览"
End
Begin VB.Menu mnuPrint
Caption = "打印"
End
Begin VB.Menu null
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "关闭"
End
End
Begin VB.Menu mnuManual
Caption = "编码控制预览"
Begin VB.Menu mnuPageUp
Caption = "上页"
End
Begin VB.Menu mnuPageDown
Caption = "下页"
End
Begin VB.Menu mnuZoom
Caption = "显示比例"
End
Begin VB.Menu mnuPaperSize
Caption = "选择纸张"
End
Begin VB.Menu mnuOrientation
Caption = "纸张方向"
End
End
Begin VB.Menu hlp
Caption = "帮助"
Begin VB.Menu about
Caption = "关于"
End
Begin VB.Menu neirong
Caption = "内容"
End
End
End
Attribute VB_Name = "frmcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim jl_sql As String
'CODE Manger By BcodeXRose
Private Sub about_Click()
frmAbout.Show
End Sub
Private Sub Combo1_Click()
datPrimaryRS.RecordSource = jl_sql & " where hwm like '%" & Trim(Combo1.Text) & "%' and " & jl_sqlstr & ".sj>='" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and " & jl_sqlstr & ".sj<='" & Format(DTPicker2.Value + 1 + 1, "yyyy-mm-dd") & "' Order by " & jl_sqlstr & ".sj"
datPrimaryRS.refresh
Me.prin.Enabled = True
Call js
End Sub
'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()
' frmBrowser.StartingAddress = App.Path & "\index9.htm"
' frmBrowser.Show
End Sub
'##################################################################
'## 过程名称:Command2_Click
'## 参数: 无
'##################################################################
'##################################################################
'## 过程名称:Combo1_Change
'## 参数: 无
'##################################################################
Private Sub Combo1_Change()
'On Error Resume Next
datPrimaryRS.RecordSource = Trim(jl_sql & " where hwm like '%" & Trim(Combo1.Text) & "%' and " & jl_sqlstr & ".sj>='" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and " & jl_sqlstr & ".sj<='" & Format(DTPicker2.Value + 1 + 1, "yyyy-mm-dd") & "' Order by " & jl_sqlstr & ".sj")
datPrimaryRS.refresh
Me.prin.Enabled = True
Me.MSHFlexGrid1.refresh
Call js
End Sub
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
On Error Resume Next
Me.Adodc1.ConnectionString = connetstr
Me.datPrimaryRS.ConnectionString = connetstr
Me.Adodc2.ConnectionString = connetstr
Me.Adodc2.RecordSource = "select DISTINCT shr from " & jl_sqlstr & ""
Adodc2.refresh
Dim i
For i = 1 To Adodc2.Recordset.RecordCount
If IsNull(Adodc2.Recordset.Fields(0)) = False Then
Text3.AddItem Adodc2.Recordset.Fields(0)
End If
Adodc2.Recordset.MoveNext
Next i
Me.Adodc2.RecordSource = "select DISTINCT fhr from " & jl_sqlstr & ""
Adodc2.refresh
For i = 1 To Adodc2.Recordset.RecordCount
If IsNull(Adodc2.Recordset.Fields(0)) = False Then
Text4.AddItem Adodc2.Recordset.Fields(0)
End If
Adodc2.Recordset.MoveNext
Next i
Me.Adodc2.RecordSource = "select DISTINCT dhdd from " & jl_sqlstr & ""
Adodc2.refresh
For i = 1 To Adodc2.Recordset.RecordCount
If IsNull(Adodc2.Recordset.Fields(0)) = False Then
Text5.AddItem Adodc2.Recordset.Fields(0)
End If
Adodc2.Recordset.MoveNext
Next
Me.Adodc2.RecordSource = "select DISTINCT hwm from hwmk"
Adodc2.refresh
For i = 1 To Adodc2.Recordset.RecordCount
If IsNull(Adodc2.Recordset.Fields(0)) = False Then
Me.Combo1.AddItem Adodc2.Recordset.Fields(0)
End If
Adodc2.Recordset.MoveNext
Next
' " select hth as 票号,,,,,,,,,,, from " & jl_sqlstr & " where hth like '" & Text2.Text & "%' and .sj>='" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and .sj <='" & Format(DTPicker2.Value + 1 + 1, "yyyy-mm-dd") & "' Order by .sj"
jl_sql = ""
jl_sql = "select"
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".hth as 票号") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".ch as 车号") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".mz as 毛重") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".pz as 皮重") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".jz as 净重") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".hwm as 货物名") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".shr as 收货人") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".fhr as 发货人") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".dhdd as 到货地点") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".sby as 司磅员") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".sj as 检斤时间") & ","
jl_sql = jl_sql + " " + Trim(jl_sqlstr & ".id as 流水号")
jl_sql = jl_sql & " from " & jl_sqlstr
Me.datPrimaryRS.ConnectionString = connetstr
Me.datPrimaryRS.RecordSource = jl_sql & " where " & jl_sqlstr & ".sj>'" & Format(Now - 1, "yyyy-mm-dd") & "'"
Me.datPrimaryRS.refresh
Me.MSHFlexGrid1.Clear
Set Me.MSHFlexGrid1.DataSource = Me.datPrimaryRS
Me.MSHFlexGrid1.refresh
Me.DTPicker1.Value = Now - 30
Me.DTPicker2.Value = Now
End Sub
'##################################################################
'## 过程名称:Form_Resize
'## 参数: 无
'##################################################################
Private Sub Form_Resize()
On Error Resume Next
'当窗体调整时会调整网格
MSHFlexGrid1.Height = Height - 3400
MSHFlexGrid1.Width = Width - 340
SSTab1.Width = Width - 340
Frame1.Width = Width - 640
Me.CurtPrinter1.Move 0, 0, Width - 200, Height - 1000
End Sub
'##################################################################
'## 过程名称:Form_Unload
'## 参数:Cancel 为Integer型
'##################################################################
Private Sub Form_Unload(Cancel As Integer)
'Screen.MousePointer = vbDefault
'
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -