⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmhwbfd.frm

📁 制造业产供销与往来系统源码,包括进销存及全部控件!
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":0542
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":0A84
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":0FC6
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":10D8
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":162A
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":1B7C
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":20CE
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2620
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2732
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2844
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2956
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2A68
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2B7A
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2C8C
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2D9E
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":2EB0
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":31CA
            Key             =   ""
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":32DC
            Key             =   ""
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":33F0
            Key             =   ""
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmHwBfd.frx":3504
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VSFlex7Ctl.VSFlexGrid Flex 
      Height          =   2625
      Index           =   0
      Left            =   30
      TabIndex        =   18
      Top             =   2250
      Width           =   10545
      _cx             =   18600
      _cy             =   4630
      _ConvInfo       =   1
      Appearance      =   1
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      MousePointer    =   0
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      BackColorFixed  =   -2147483633
      ForeColorFixed  =   -2147483630
      BackColorSel    =   -2147483635
      ForeColorSel    =   -2147483634
      BackColorBkg    =   -2147483636
      BackColorAlternate=   -2147483643
      GridColor       =   -2147483633
      GridColorFixed  =   -2147483632
      TreeColor       =   -2147483632
      FloodColor      =   192
      SheetBorder     =   -2147483642
      FocusRect       =   1
      HighLight       =   1
      AllowSelection  =   -1  'True
      AllowBigSelection=   -1  'True
      AllowUserResizing=   3
      SelectionMode   =   0
      GridLines       =   1
      GridLinesFixed  =   2
      GridLineWidth   =   1
      Rows            =   2
      Cols            =   9
      FixedRows       =   1
      FixedCols       =   1
      RowHeightMin    =   0
      RowHeightMax    =   0
      ColWidthMin     =   0
      ColWidthMax     =   0
      ExtendLastCol   =   0   'False
      FormatString    =   "|<货物编码|<货物名称|<计量单位|>换算系数|>报废数量|>单价|>金额|<备注"
      ScrollTrack     =   0   'False
      ScrollBars      =   3
      ScrollTips      =   0   'False
      MergeCells      =   0
      MergeCompare    =   0
      AutoResize      =   -1  'True
      AutoSizeMode    =   0
      AutoSearch      =   0
      AutoSearchDelay =   2
      MultiTotals     =   -1  'True
      SubtotalPosition=   1
      OutlineBar      =   0
      OutlineCol      =   0
      Ellipsis        =   0
      ExplorerBar     =   0
      PicturesOver    =   0   'False
      FillStyle       =   0
      RightToLeft     =   0   'False
      PictureType     =   0
      TabBehavior     =   0
      OwnerDraw       =   0
      Editable        =   0
      ShowComboButton =   -1  'True
      WordWrap        =   0   'False
      TextStyle       =   0
      TextStyleFixed  =   0
      OleDragMode     =   0
      OleDropMode     =   0
      DataMode        =   0
      VirtualData     =   -1  'True
      DataMember      =   ""
      ComboSearch     =   0
      AutoSizeMouse   =   -1  'True
      FrozenRows      =   0
      FrozenCols      =   0
      AllowUserFreezing=   0
      BackColorFrozen =   0
      ForeColorFrozen =   0
      WallPaperAlignment=   9
   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
      End
   End
   Begin VB.Menu mView 
      Caption         =   "查看(&V)"
      Begin VB.Menu muView 
         Caption         =   ""
         Index           =   0
      End
   End
   Begin VB.Menu mHelp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu muHelp 
         Caption         =   ""
         Index           =   0
      End
   End
End
Attribute VB_Name = "frmHwBfd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Const TlbHwBfd = 0
Const ImgHwBfd = 0
Const SbarHwBfd = 0

Const FrmHwBfdh = 0

Const FlexHwBfdh = 1
Const FlexHwBfd = 0

Const TxtHwBfdhDocno = 0
Const TxtHwBfdhDat = 6
Const TxtHwBfdh_CwqjCode = 5

Const CBxHwBfdh_HwBfRcCode = 0
Const CBxHwBfdh_HwCkMc = 1

Const TxtTotalQty = 1
Const TxtTotalAmt = 2

Dim mCurColOldValue As String

Dim oHwBfdhs As HwBfdhs
Dim oHwBfdh As HwBfdh
Dim oHwBfd As HwBfd

Public Sub LetDocno(vDocno As String)
On Error GoTo Errorhandle

   Text(TxtHwBfdhDocno).Text = vDocno
   Text_LostFocus TxtHwBfdhDocno

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 Combo_LostFocus(Index As Integer)
On Error GoTo Errorhandle
   
   If Tlbaction(TlbHwBfd).Tag = "" Then
      Exit Sub
   End If

   Select Case Index
   Case CBxHwBfdh_HwCkMc
         oHwBfdh.HwBfdh_HwCkMc = Trim(Combo(CBxHwBfdh_HwCkMc).Text)
   End Select

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(TlbHwBfd).Tag = "" Then
      Cancel = True
   End If
   
   If oHwBfdh Is Nothing Then
      Cancel = True
   End If

   mCurColOldValue = Trim(Flex(FlexHwBfd).TextMatrix(Flex(FlexHwBfd).Row, Flex(FlexHwBfd).Col))

   Select Case Flex(FlexHwBfd).ColKey(Col)
   Case "HWBMCODE"
         
   Case "HWBFD_HWDWCONV", "HWBFDQTY", "HWBFDPRICE", "HWBFDAMT", "HWBFDBZ"
         If oHwBfd Is Nothing Then
            Cancel = True
         End If
         
   Case "HWDWCODE"
         If oHwBfd 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(TxtHwBfdhDocno).SetFocus
  
Exit Sub
Errorhandle:
   MsgBox Err.Description
End Sub

Private Sub Form_Load()
On Error GoTo Errorhandle
  
   Flex(FlexHwBfd).Editable = flexEDKbdMouse
   
   Flex(FlexHwBfd).ColKey(1) = "HWBMCODE"
   Flex(FlexHwBfd).ColKey(2) = "HWBMMC"
   Flex(FlexHwBfd).ColKey(3) = "HWDWCODE"
   Flex(FlexHwBfd).ColKey(4) = "HWBFD_HWDWCONV"
   Flex(FlexHwBfd).ColKey(5) = "HWBFDQTY"
   Flex(FlexHwBfd).ColKey(6) = "HWBFDPRICE"
   Flex(FlexHwBfd).ColKey(7) = "HWBFDAMT"
   Flex(FlexHwBfd).ColKey(8) = "HWBFDBZ"
      
   gPublicFunction.LoadFormSet Me, Tlbaction(TlbHwBfd), Img(ImgHwBfd), SBar(SbarHwBfd)
   gPublicCommon.gForms(UCase(Me.Name)).ControlBegEnds.Add "HwBfd", "TXTHwBfdHDOCNO", "CBXHWCKMC"
   
   gPublicCommon.gForms(UCase(Me.Name)).ControlStatus.Add "", Flex(FlexHwBfd), Text(TxtHwBfdhDocno)
   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(CBxHwBfdh_HwBfRcCode), "SELECT HwBfRcCODE,HwBfRcNO FROM HwBfRcREC ORDER BY HwBfRcCODE", "HwBfRcNO", 0
   gPublicFunction.FillComboWithSql Me, Combo(CBxHwBfdh_HwCkMc), "SELECT HwCkMc,HwCkNo FROM HwCkREC ORDER BY HwCkMc", "HwCkNO", 0
  
Exit Sub
Errorhandle:
   MsgBox Err.Description
End Sub

Private Sub LoadDataIntoGrid()
   Dim ItemStr As String
   Dim mHwBfdh As HwBfdh
   Dim mHwBfd As HwBfd
On Error GoTo Errorhandle
   
   Flex(FlexHwBfd).Rows = 1
   Flex(FlexHwBfd).AddItem ""
   
   oHwBfdh.HwBfds.FillbyDb oHwBfdh
   
   For Each mHwBfd In oHwBfdh.HwBfds
      ItemStr = vbTab & mHwBfd.HwBfd_HwBmCode & vbTab & mHwBfd.HwBfd_HwBmMc
      ItemStr = ItemStr & vbTab & mHwBfd.HwBfd_HwDwCode & vbTab & mHwBfd.HwBfd_HwDwConv
      ItemStr = ItemStr & vbTab & mHwBfd.HwBfdQty & vbTab & mHwBfd.HwBfdPrice & vbTab & mHwBfd.HwBfdAmt & vbTab & mHwBfd.HwBfdBz
      Flex(FlexHwBfd).AddItem ItemStr, Flex(FlexHwBfd).Rows - 1
      Flex(FlexHwBfd).RowData(Flex(FlexHwBfd).Rows - 2) = mHwBfd.HwBfdKey
   Next
   If Flex(FlexHwBfd).Rows > 2 Then
      Flex(FlexHwBfd).Row = 1
      Set oHwBfd = oHwBfdh.HwBfds(CStr(Flex(FlexHwBfd).RowData(1)))
   Else
      Set oHwBfd = Nothing
   End If
   
   gPublicFunction.SumFlexQtyAmt Flex(FlexHwBfd), "HWBFDQTY,HWBFDAMT", 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 oHwBfdh = New HwBfdh
   Set oHwBfd = Nothing
   Clearcontrol
   Text(TxtHwBfdhDocno).SetFocus
   
   If Text(TxtHwBfdhDat).Text = "" Then
      Text(TxtHwBfdhDat).Text = gPublicCommon.PublicSysDatas("SYSTEMDATE").SysDataValue
   End If
   
   oHwBfdh.HwBfdhDat = Trim(Text(TxtHwBfdhDat).Text)
   Text(TxtHwBfdh_CwqjCode).Text = oHwBfdh.HwBfdh_CwQjCode
   
   gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwBfd), RecordName
   
Exit Sub
Errorhandle:
   Err.Raise vbObjectError + 1, , Err.Description
End Sub

Private Sub ChgRecord(RecordName As String)
On Error GoTo Errorhandle
    
   If oHwBfdh Is Nothing Then
      Exit Sub
   End If

   Text(TxtHwBfdhDocno).SetFocus
   gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwBfd), RecordName
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -