📄 ycdy.frm
字号:
Left = 240
TabIndex = 24
Top = 600
Width = 1440
End
Begin VB.Label Label1
BackColor = &H00C0FFC0&
BorderStyle = 1 'Fixed Single
Caption = "毛重"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 23
Top = 960
Width = 975
End
Begin VB.Label Label10
BackColor = &H00C0FFC0&
BorderStyle = 1 'Fixed Single
Caption = "皮重"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2280
TabIndex = 22
Top = 960
Width = 1335
End
Begin VB.Label Label11
BackColor = &H00C0FFC0&
BorderStyle = 1 'Fixed Single
Caption = "净重"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4560
TabIndex = 21
Top = 960
Width = 975
End
End
Begin VB.TextBox Text7
Height = 375
Left = 6600
TabIndex = 5
Top = 1440
Width = 2295
End
Begin VB.CommandButton Command1
Caption = "前一条"
Height = 375
Left = 2970
TabIndex = 4
Top = 5520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "后一条"
Height = 375
Left = 4140
TabIndex = 3
Top = 5520
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "打印"
Height = 375
Left = 5310
TabIndex = 2
Top = 5520
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "放弃"
Height = 375
Left = 6480
TabIndex = 1
Top = 5520
Width = 1095
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 3000
TabIndex = 6
Top = 1440
Width = 2055
_ExtentX = 3625
_ExtentY = 661
_Version = 393216
Format = 30277632
CurrentDate = 37584
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2160
Top = 4800
Visible = 0 'False
Width = 3135
_ExtentX = 5530
_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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
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 VB.Label Label12
Caption = "检斤日期"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 37
Top = 1440
Width = 1215
End
Begin VB.Label Label13
Caption = "车号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5400
TabIndex = 36
Top = 1440
Width = 1335
End
Begin VB.Label Label14
Alignment = 2 'Center
Caption = "发货单异常情况打印"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 2520
TabIndex = 35
Top = 600
Width = 5055
End
Begin VB.Line Line1
BorderStyle = 6 'Inside Solid
BorderWidth = 3
DrawMode = 14 'Copy Pen
X1 = 2280
X2 = 8280
Y1 = 1080
Y2 = 1080
End
End
Begin VB.Menu qyt
Caption = "前一条"
End
Begin VB.Menu hyt
Caption = "后一条"
End
Begin VB.Menu print
Caption = "打印"
End
Begin VB.Menu clos
Caption = "关闭"
End
End
Attribute VB_Name = "ycdy"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
Private Sub clos_Click()
Command4_Click
End Sub
'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()
On Error Resume Next
If Adodc1.Recordset.BOF = True Then
Adodc1.Recordset.MoveFirst
Call loaddata
End If
Adodc1.Recordset.MovePrevious
End Sub
'##################################################################
'## 过程名称:Command2_Click
'## 参数: 无
'##################################################################
Private Sub Command2_Click()
On Error Resume Next
If Adodc1.Recordset.EOF = True Then
Adodc1.Recordset.MoveLast
Call loaddata
End If
'Adodc1.Recordset.MoveNext
End Sub
'##################################################################
'## 过程名称:Command3_Click
'## 参数: 无
'##################################################################
Private Sub Command3_Click()
On Error Resume Next
jl_hth = Val(Text1.Text)
jl_ch = Text2.Text
jl_mz = Val(Text4.Text)
jl_pz = Val(Text5.Text)
jl_jz = Val(Text6.Text)
jl_jz = jl_mz - jl_pz '毛重减皮重
jl_hwm = Text9.Text
jl_fhr = Text11.Text
jl_shr = Text10.Text
jl_sj = Text5.Text
jl_dhddk = Text12.Text
jl_lsh = Val(Text3.Text)
jl_sby = Text13.Text
jl_zg = Text8.Text
jl_sj = Label32.Caption
dyyl.Command1.Enabled = False
dyyl.Command2.Enabled = False
dyyl.Command3.Enabled = True
dyyl.Show
End Sub
'##################################################################
'## 过程名称:Command4_Click
'## 参数: 无
'##################################################################
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Command5_Click()
Adodc1.RecordSource = "select * from " & jl_sqlstr & " where sj like '%" & Format(DTPicker1.Value, "yyyy-mm-dd") & "%'"
Adodc1.refresh
End Sub
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
Adodc1.ConnectionString = connetstr
Adodc1.RecordSource = "select * from " & jl_sqlstr & " where sj like '%" & Format(DTPicker1.Value, "yyyy-mm-dd") & "%'"
Adodc1.refresh
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.MoveLast
Call loaddata
End If
Me.DTPicker1.Value = Now
'mainfrm.Hide
Form_Resize
End Sub
Private Sub Form_Resize()
'Dim pw, ph, mw, mh, ii, jj As Integer
' Dim x1, y1 As Integer
' pw = Me.Image1.Width
' ph = Me.Image1.Height
' mw = Me.Width
' mh = Me.Height
' x1 = Fix(mw / pw)
' y1 = Fix(mh / ph)
' For ii = 1 To x1
' For jj = 1 To y1
' Me.PaintPicture Me.Image1.Picture, (ii - 1) * pw, (jj - 1) * ph
' Next jj
' Next ii
End Sub
'##################################################################
'## 过程名称:Form_Unload
'## 参数:Cancel 为Integer型
'##################################################################
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
'Adodc1.refresh
'Adodc1.Recordset.MoveLast
DTPicker1.Value = Now
mainfrm.Show
End Sub
Private Sub hyt_Click()
Command2_Click
End Sub
Private Sub print_Click()
Command3_Click
End Sub
Private Sub qyt_Click()
Command1_Click
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
'On Error Resume Next
If KeyAscii = 13 Then
jl_lsh = Val(Text3.Text)
Adodc1.RecordSource = " select * from " & jl_sqlstr & " where id = " & jl_lsh
Adodc1.refresh
' Adodc1.Recordset.MoveLast
Call loaddata
End If
End Sub
'##################################################################
'## 过程名称:Text7_KeyPress
'## 参数:KeyAscii 为Integer型
'##################################################################
Private Sub Text7_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = 13 Then
jl_ch = Trim(Text7.Text)
Adodc1.RecordSource = " select * from " & jl_sqlstr & " where ch = '" & jl_ch & "' and sj like '%" & Format(DTPicker1.Value, "yyyy-mm-dd") & "%' Order by sj"
Adodc1.refresh
Adodc1.Recordset.MoveLast
Call loaddata
End If
End Sub
Private Sub loaddata()
jl_hth = Adodc1.Recordset.Fields("hth")
jl_mz = Adodc1.Recordset.Fields("mz")
jl_pz = Adodc1.Recordset.Fields("pz")
jl_jz = Adodc1.Recordset.Fields("jz")
'jl_jz = jl_mz - jl_pz '毛重减皮重
jl_hwm = Adodc1.Recordset.Fields("hwm")
jl_fhr = Adodc1.Recordset.Fields("fhr")
jl_shr = Adodc1.Recordset.Fields("shr")
jl_sj = Adodc1.Recordset.Fields("sj")
jl_dhddk = Adodc1.Recordset.Fields("dhdd")
jl_lsh = Adodc1.Recordset.Fields("id")
jl_sby = Adodc1.Recordset.Fields("sby")
jl_zg = Adodc1.Recordset.Fields("zg")
jl_sj = Adodc1.Recordset.Fields("sj")
jl_ch = Adodc1.Recordset.Fields("ch")
Me.Text2 = jl_ch
Text1.Text = jl_hth
Text4.Text = jl_mz
Text5.Text = jl_pz
Text6.Text = jl_jz
jl_jz = jl_mz - jl_pz '毛重减皮重
Text9.Text = jl_hwm
Text11.Text = jl_fhr
Text10.Text = jl_shr
Text15.Text = jl_sj
Text12.Text = jl_dhddk
Text3.Text = jl_lsh
Text13.Text = jl_sby
Text8.Text = jl_zg
Text5.Text = jl_pz
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -