📄 frmmate.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Begin VB.Form frmMATE
Caption = "配料单信息"
ClientHeight = 6105
ClientLeft = 45
ClientTop = 345
ClientWidth = 10020
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6105
ScaleWidth = 10020
WindowState = 2 'Maximized
Begin VB.TextBox txtJLDW
Height = 372
Left = 8040
TabIndex = 21
Top = 5040
Visible = 0 'False
Width = 252
End
Begin VB.TextBox txtWZMC
Height = 372
Left = 8040
TabIndex = 20
Top = 5760
Visible = 0 'False
Width = 252
End
Begin VB.TextBox txtWZDM
Height = 372
Left = 0
TabIndex = 19
Top = 5400
Visible = 0 'False
Width = 252
End
Begin VB.TextBox txt_YWDM
Height = 372
Left = 120
TabIndex = 18
Top = 6000
Visible = 0 'False
Width = 252
End
Begin VB.TextBox txtM_DATE
Height = 372
Left = 0
TabIndex = 17
Top = 5040
Visible = 0 'False
Width = 252
End
Begin VB.TextBox txtM_NO
Height = 372
Left = 0
TabIndex = 16
Top = 5880
Visible = 0 'False
Width = 252
End
Begin VB.Frame Frame1
Caption = "配料单基本信息:"
Height = 1440
Index = 0
Left = 120
TabIndex = 2
Top = 10
Width = 8535
Begin VB.CommandButton Command1
Caption = "确定配料单"
Height = 375
Left = 6600
TabIndex = 22
Top = 840
Width = 1095
End
Begin VB.ComboBox Combo1
Height = 315
Index = 1
Left = 3000
Style = 2 'Dropdown List
TabIndex = 15
Top = 840
Width = 1575
End
Begin VB.TextBox txtItem
Height = 360
Index = 3
Left = 5640
MaxLength = 20
TabIndex = 12
Top = 840
Width = 735
End
Begin VB.TextBox txtItem
Height = 360
Index = 2
Left = 960
MaxLength = 20
TabIndex = 8
Top = 840
Width = 975
End
Begin VB.TextBox txtItem
Height = 360
Index = 0
Left = 960
MaxLength = 20
TabIndex = 5
Top = 360
Width = 975
End
Begin VB.ComboBox Combo1
Height = 315
Index = 0
Left = 5640
Style = 2 'Dropdown List
TabIndex = 4
Top = 360
Width = 2052
End
Begin VB.TextBox txtItem
Height = 360
Index = 1
Left = 3000
MaxLength = 20
TabIndex = 3
Top = 360
Width = 1572
End
Begin VB.Label Label2
Caption = "成品名称:"
Height = 255
Index = 1
Left = 2040
TabIndex = 14
Top = 840
Width = 1095
End
Begin VB.Label Label2
Caption = "计量单位:"
Height = 255
Index = 4
Left = 4680
TabIndex = 13
Top = 840
Width = 1095
End
Begin VB.Label Label2
Caption = "业 务 员:"
Height = 255
Index = 3
Left = 4680
TabIndex = 10
Top = 360
Width = 1095
End
Begin VB.Label Label2
Caption = "成品编号:"
Height = 255
Index = 2
Left = 120
TabIndex = 9
Top = 840
Width = 1095
End
Begin VB.Label Label2
Caption = "配料单编号:"
Height = 252
Index = 0
Left = 120
TabIndex = 7
Top = 360
Width = 1092
End
Begin VB.Label Label2
Caption = "日 期:"
Height = 255
Index = 5
Left = 2040
TabIndex = 6
Top = 360
Width = 1095
End
End
Begin VB.Frame Frame1
Caption = "原材料信息"
Height = 3612
Index = 1
Left = 240
TabIndex = 0
Top = 1560
Width = 7932
Begin MSFlexGridLib.MSFlexGrid msgList
Height = 3255
Left = 120
TabIndex = 1
Top = 240
Width = 7695
_ExtentX = 13573
_ExtentY = 5741
_Version = 393216
Cols = 4
FixedCols = 2
AllowUserResizing= 1
End
End
Begin VB.Label lblTitle
Caption = "生 产 配 料 单 设 置 信 息 列 表"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 252
Left = 480
TabIndex = 11
Top = 240
Visible = 0 'False
Width = 5532
End
End
Attribute VB_Name = "frmMATE"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public txtSQL As String
Dim mrc As adodb.Recordset
'用户的读写权限标识
Dim mintRW As Integer
'状态条中显示的时间信息
Public msBarText As String
Public reportSQL As String
Public Sub RecordRefresh()
'显示数据
msBarText = "当前数据时间范围:" & Format(DateAdd("m", -1, Now), "yyyy-mm-dd") & "至" & Format(Now, "yyyy-mm-dd")
ShowData
End Sub
Public Sub RecordAdd()
Dim sSQL As String
Dim recTemp As adodb.Recordset
Dim MsgText As String
If gintPLLISTmode = 1 Then
If Trim(txtItem(0)) <> "" And Trim(txtItem(2)) <> "" And Trim(Combo1(0)) <> "" Then
If Trim(msgList.TextMatrix(1, 1) = "") Then
sSQL = "select * from mate where m_no ='" & Trim(txtItem(0)) & "'"
Set recTemp = ExecuteSQL(sSQL, MsgText)
If recTemp.EOF = False Then
MsgBox "已经存在相同编号的配料记录!", vbOKOnly + vbExclamation, "警告"
txtItem(0).SetFocus
recTemp.Close
Exit Sub
End If
sSQL = "select * from mate where wzdm1 = '" & Trim(txtItem(2)) & "'"
Set recTemp = ExecuteSQL(sSQL, MsgText)
If recTemp.EOF = False Then
MsgBox "已经存在相同成品的配料记录!", vbOKOnly + vbExclamation, "警告"
Combo1(1).SetFocus
recTemp.Close
Exit Sub
End If
End If
frmMATE1.txtM_NO = Trim(txtItem(0))
frmMATE1.txtM_DATE = Trim(txtItem(1))
frmMATE1.txtWZDM = Trim(txtItem(2))
frmMATE1.txtWZMC = Trim(Combo1(1))
frmMATE1.txtJLDW = Trim(txtItem(3))
frmMATE1.txtYWDM = Trim(Combo1(0).ItemData(Combo1(0).ListIndex))
gintPLmode = 1
frmMATE1.Show 1
Else
MsgBox "请设置配料单的所有选项!", vbOKOnly, "警告"
Exit Sub
End If
ElseIf gintPLLISTmode = 2 Then
frmMATE1.txtM_NO = Trim(txtItem(0))
frmMATE1.txtM_DATE = Trim(txtItem(1))
frmMATE1.txtWZDM = Trim(txtItem(2))
frmMATE1.txtWZMC = Trim(Combo1(1))
frmMATE1.txtJLDW = Trim(txtItem(3))
frmMATE1.txtYWDM = Trim(Combo1(0).ItemData(Combo1(0).ListIndex))
gintPLmode = 1
frmMATE1.Show 1
End If
End Sub
'删除记录
Public Sub RecordDelete()
Dim sSQL As String
Dim intCount As Integer
Dim recTemp As adodb.Recordset
Dim MsgText As String
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -