📄 frmhwid.frm
字号:
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "前移"
Key = "PRE_SYSTABLE"
ImageIndex = 6
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "后移"
Key = "NEX_SYSTABLE"
ImageIndex = 7
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "最后"
Key = "LAS_SYSTABLE"
ImageIndex = 8
EndProperty
BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "查找"
Key = "FIN_SYSTABLE"
ImageIndex = 2
EndProperty
BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
Key = "PRN_SYSTABLE"
ImageIndex = 1
EndProperty
BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "帮助"
Key = "HLP_SYSTABLE"
ImageIndex = 10
EndProperty
BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Button23 {66833FEA-8583-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Button24 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "EXI_SYSTABLE"
ImageIndex = 11
EndProperty
EndProperty
BorderStyle = 1
End
Begin MSComctlLib.ImageList Img
Index = 0
Left = 0
Top = 300
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 21
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":0542
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":0A84
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":0FC6
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":10D8
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":162A
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":1B7C
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":20CE
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2620
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2732
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2844
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2956
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2A68
Key = ""
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2B7A
Key = ""
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2C8C
Key = ""
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2D9E
Key = ""
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":2EB0
Key = ""
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":31CA
Key = ""
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":32DC
Key = ""
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":33F0
Key = ""
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwId.frx":3504
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mFile
Caption = "文件(&F)"
Begin VB.Menu muFile
Caption = ""
Index = 0
End
End
Begin VB.Menu mEdit
Caption = "编辑(&E)"
Begin VB.Menu muEdit
Caption = "据采购订单生成收货单"
Index = 0
Tag = "CGSHDGEN"
End
End
Begin VB.Menu mView
Caption = "查看(&V)"
Begin VB.Menu muView
Caption = ""
End
End
Begin VB.Menu mHelp
Caption = "帮助(&H)"
Begin VB.Menu muHelp
Caption = ""
Index = 0
End
End
End
Attribute VB_Name = "frmHwId"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const TlbHwId = 0
Const ImgHwId = 0
Const SbarHwId = 0
Const FrmHwIdh = 0
Const FlexHwIdh = 1
Const FlexHwId = 0
Const TxtHwIdhDocno = 0
Const TxtHwIdhDat = 6
Const TxtHwIdh_CwqjCode = 5
Const CBxHwIdh_HwIoRcCode = 0
Const TxtTotalQty = 1
Const TxtTotalAmt = 2
Dim mCurColOldValue As String
Dim oHwIdhs As HwIdhs
Dim oHwIdh As HwIdh
Dim oHwId As HwId
Public Sub LetDocno(vDocno As String)
On Error GoTo Errorhandle
Text(TxtHwIdhDocno).Text = vDocno
Text_LostFocus TxtHwIdhDocno
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub Combo_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
On Error GoTo Errorhandle
gPublicFunction.FormKeyDown Me, KeyCode, Shift, Combo(Index)
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_AfterEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long)
On Error GoTo Errorhandle
SetControlToFlex
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_BeforeEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long, Cancel As Boolean)
On Error GoTo Errorhandle
If Tlbaction(TlbHwId).Tag = "" Then
Cancel = True
End If
If oHwIdh Is Nothing Then
Cancel = True
End If
mCurColOldValue = Trim(Flex(FlexHwId).TextMatrix(Flex(FlexHwId).Row, Flex(FlexHwId).Col))
Select Case Flex(FlexHwId).ColKey(Col)
Case "HWBMCODE"
Case "HWCKMC", "HWID_HWDWCONV", "HWIDQTY", "HWIDPRICE", "HWIDAMT", "HWIDBZ"
If oHwId Is Nothing Then
Cancel = True
End If
Case "HWDWCODE"
If oHwId Is Nothing Then
Cancel = True
End If
Case Else
Cancel = True
End Select
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
On Error GoTo Errorhandle
gPublicFunction.FlexKeyDown Flex(Index), KeyCode
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_KeyDownEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long, KeyCode As Integer, ByVal Shift As Integer)
On Error GoTo Errorhandle
gPublicFunction.FlexKeyDown Flex(Index), KeyCode
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_KeyPressEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long, KeyAscii As Integer)
On Error GoTo Errorhandle
gPublicFunction.FlexInputCheck Me, Flex(Index), KeyAscii
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Form_Activate()
On Error GoTo Errorhandle
Text(TxtHwIdhDocno).SetFocus
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Form_Load()
On Error GoTo Errorhandle
Flex(FlexHwId).Editable = flexEDKbdMouse
Flex(FlexHwId).ColKey(1) = "HWBMCODE"
Flex(FlexHwId).ColKey(2) = "HWBMMC"
Flex(FlexHwId).ColKey(3) = "HWDWCODE"
Flex(FlexHwId).ColKey(4) = "HWID_HWDWCONV"
Flex(FlexHwId).ColKey(5) = "HWCKMC"
Flex(FlexHwId).ColKey(6) = "HWIDQTY"
Flex(FlexHwId).ColKey(7) = "HWIDPRICE"
Flex(FlexHwId).ColKey(8) = "HWIDAMT"
Flex(FlexHwId).ColKey(9) = "HWIDBZ"
gPublicFunction.LoadFormSet Me, Tlbaction(TlbHwId), Img(ImgHwId), SBar(SbarHwId)
gPublicCommon.gForms(UCase(Me.Name)).ControlBegEnds.Add "HwId", "TXTHwIdHDOCNO", "CBXHWIORCCODE"
gPublicCommon.gForms(UCase(Me.Name)).ControlStatus.Add "", Flex(FlexHwId), Text(TxtHwIdhDocno)
gPublicCommon.gForms(UCase(Me.Name)).ControlStatus.Add "ADD", Text(TxtTotalQty), Text(TxtTotalAmt)
gPublicCommon.gForms(UCase(Me.Name)).ControlStatus.Add "CHG", Text(TxtTotalQty), Text(TxtTotalAmt)
gPublicCommon.PublicFunction.EnableControl Me, ""
gPublicFunction.FillComboWithSql Me, Combo(CBxHwIdh_HwIoRcCode), "SELECT HwIoRcCODE,HwIoRcNO FROM HwIoRcREC ORDER BY HwIoRcCODE", "HwIoRcNO", 0
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub LoadDataIntoGrid()
Dim ItemStr As String
Dim mHwIdh As HwIdh
Dim mHwId As HwId
On Error GoTo Errorhandle
Flex(FlexHwId).Rows = 1
Flex(FlexHwId).AddItem ""
oHwIdh.HwIds.FillbyDb oHwIdh
For Each mHwId In oHwIdh.HwIds
ItemStr = vbTab & mHwId.HwId_HwBmCode & vbTab & mHwId.HwId_HwBmMc
ItemStr = ItemStr & vbTab & mHwId.HwId_HwDwCode & vbTab & mHwId.HwId_HwDwConv & vbTab & mHwId.HwId_HwCkMc
ItemStr = ItemStr & vbTab & mHwId.HwIdQty & vbTab & mHwId.HwIdPrice & vbTab & mHwId.HwIdAmt & vbTab & mHwId.HwIdBz
Flex(FlexHwId).AddItem ItemStr, Flex(FlexHwId).Rows - 1
Flex(FlexHwId).RowData(Flex(FlexHwId).Rows - 2) = mHwId.HwIdKey
Next
If Flex(FlexHwId).Rows > 2 Then
Flex(FlexHwId).Row = 1
Set oHwId = oHwIdh.HwIds(CStr(Flex(FlexHwId).RowData(1)))
Else
Set oHwId = Nothing
End If
gPublicFunction.SumFlexQtyAmt Flex(FlexHwId), "HWIDQTY,HWIDAMT", Text(TxtTotalQty), Text(TxtTotalAmt)
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub AddRecord(RecordName As String)
On Error GoTo Errorhandle
Set oHwIdh = New HwIdh
Set oHwId = Nothing
Clearcontrol
Text(TxtHwIdhDocno).SetFocus
If Text(TxtHwIdhDat).Text = "" Then
Text(TxtHwIdhDat).Text = gPublicCommon.PublicSysDatas("SYSTEMDATE").SysDataValue
End If
oHwIdh.HwIdhDat = Trim(Text(TxtHwIdhDat).Text)
Text(TxtHwIdh_CwqjCode).Text = oHwIdh.HwIdh_CwQjCode
gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwId), RecordName
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub ChgRecord(RecordName As String)
On Error GoTo Errorhandle
If oHwIdh Is Nothing Then
Exit Sub
End If
Text(TxtHwIdhDocno).SetFocus
gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwId), RecordName
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub CancelRecord(RecordName As String)
On Error GoTo Errorhandle
If oHwIdh.HwIdhId = -1 Then
Clearcontrol
Set oHwId = Nothing
Set oHwIdh = Nothing
Else
oHwIdh.Requery oHwIdh.HwIdhDocno
SetValueToControl
End If
gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwId), RecordName
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -