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

📄 frmstockinout.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{D252F124-F62C-11D1-9ABD-444553540000}#1.0#0"; "GADATE.DLL"
Object = "{9C4B12C2-D5CE-11D1-9ABC-444553540000}#1.0#0"; "GACEDIT.DLL"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Begin VB.Form frmStockInOut 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "验收入库"
   ClientHeight    =   4830
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9015
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4830
   ScaleWidth      =   9015
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin MSRDC.MSRDC datSource 
      Height          =   330
      Left            =   7695
      Top             =   4365
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      _Version        =   393216
      Options         =   0
      CursorDriver    =   0
      BOFAction       =   0
      EOFAction       =   0
      RecordsetType   =   1
      LockType        =   3
      QueryType       =   0
      Prompt          =   3
      Appearance      =   1
      QueryTimeout    =   30
      RowsetSize      =   100
      LoginTimeout    =   15
      KeysetSize      =   0
      MaxRows         =   0
      ErrorThreshold  =   -1
      BatchSize       =   15
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Enabled         =   -1  'True
      ReadOnly        =   0   'False
      Appearance      =   -1  'True
      DataSourceName  =   ""
      RecordSource    =   ""
      UserName        =   ""
      Password        =   ""
      Connect         =   ""
      LogMessages     =   ""
      Caption         =   "MSRDC1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin GATLCTRLLibCtl.CalEdit txtEdit 
      Height          =   300
      Left            =   7665
      OleObjectBlob   =   "frmstockinout.frx":0000
      TabIndex        =   13
      Top             =   3960
      Width           =   1110
   End
   Begin MSFlexGridLib.MSFlexGrid msgBody 
      Bindings        =   "frmstockinout.frx":0081
      Height          =   4365
      Left            =   60
      TabIndex        =   0
      Top             =   420
      Width           =   7530
      _ExtentX        =   13282
      _ExtentY        =   7699
      _Version        =   393216
      AllowUserResizing=   1
   End
   Begin VB.ComboBox cboStock 
      Height          =   300
      Left            =   675
      TabIndex        =   2
      Text            =   "Combo1"
      Top             =   60
      Width           =   3075
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "全部取消(&U)"
      Height          =   350
      Index           =   5
      Left            =   7695
      TabIndex        =   12
      Top             =   2325
      Width           =   1215
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "条件选择(&C)"
      Height          =   350
      Index           =   4
      Left            =   7695
      TabIndex        =   11
      Top             =   1980
      Width           =   1215
   End
   Begin GACALENDARLibCtl.Calendar cldBegin 
      Height          =   315
      Left            =   4845
      OleObjectBlob   =   "frmstockinout.frx":0099
      TabIndex        =   4
      Top             =   60
      Width           =   1260
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "栏目设置(&M)"
      Height          =   350
      Index           =   2
      Left            =   7695
      TabIndex        =   9
      Top             =   1230
      Width           =   1215
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "全部选择(&A)"
      Height          =   350
      Index           =   3
      Left            =   7695
      TabIndex        =   10
      Top             =   1635
      Width           =   1215
   End
   Begin VB.CommandButton cmdOk 
      Height          =   350
      Index           =   1
      Left            =   7695
      Style           =   1  'Graphical
      TabIndex        =   8
      Tag             =   "1002"
      Top             =   795
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdOk 
      Height          =   350
      Index           =   0
      Left            =   7695
      Style           =   1  'Graphical
      TabIndex        =   7
      Tag             =   "1001"
      Top             =   435
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin GACALENDARLibCtl.Calendar cldEnd 
      Height          =   315
      Left            =   6345
      OleObjectBlob   =   "frmstockinout.frx":0122
      TabIndex        =   6
      Top             =   60
      Width           =   1245
   End
   Begin VB.Label lblNote 
      AutoSize        =   -1  'True
      Caption         =   "至"
      Height          =   180
      Index           =   2
      Left            =   6120
      TabIndex        =   5
      Top             =   120
      Width           =   180
   End
   Begin VB.Label lblNote 
      Caption         =   "日期"
      Height          =   195
      Index           =   1
      Left            =   4395
      TabIndex        =   3
      Top             =   135
      Width           =   375
   End
   Begin VB.Label lblNote 
      AutoSize        =   -1  'True
      Caption         =   "货位(&M)"
      Height          =   180
      Index           =   0
      Left            =   60
      TabIndex        =   1
      Top             =   120
      Width           =   630
   End
End
Attribute VB_Name = "frmStockInOut"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private WithEvents mclsGrid As Grid
Attribute mclsGrid.VB_VarHelpID = -1
Private mclsMainControl As MainControl

Private Const mintIDCol = 0
Private Const mintFactorCol = 1
Private Const mintFlagCol = 2
Private mintTotalCol As Integer
Private mintLastChkCol As Integer
Private mintEditCol As Integer
Private mstrOp As String
Private mstrCondText As String
Private mblnModify As Boolean

Public Sub ShowMe(ByVal strOP As String)
    mstrOp = strOP
    Select Case strOP
    Case "入库"
        Me.Caption = "验收入库"
        InitComBox
        RefreshGrid
        If mintTotalCol > 0 And mintLastChkCol > 0 And mintEditCol > 0 Then
            Show vbModal
        Else
            Unload Me
        End If
    Case "出库"
        Me.Caption = "发货"
        InitComBox
        RefreshGrid
        If mintTotalCol > 0 And mintLastChkCol > 0 And mintEditCol > 0 Then
            Show vbModal
        Else
            Unload Me
        End If
    End Select
End Sub

Private Sub cboStock_LostFocus()
    CondChanged
End Sub

Private Sub CondChanged()
    If mstrCondText <> cboStock.Text & cldBegin.Text & cldEnd.Text Then
        If Not (ActiveControl.TabIndex >= 1 And ActiveControl.TabIndex <= 6) Then
            mstrCondText = cboStock.Text & cldBegin.Text & cldEnd.Text
            SaveData
            RefreshGrid
        End If
    End If
End Sub

Private Sub cldBegin_LostFocus()
    CondChanged
End Sub

Private Sub cldEnd_LostFocus()
    CondChanged
End Sub

Private Sub cboStock_GotFocus()
    If DataValid Then
        mclsGrid.Save
    Else
        mclsGrid.CancelSave
    End If
End Sub

Private Sub cldBegin_GotFocus()
    If DataValid Then
        mclsGrid.Save
    Else
        mclsGrid.CancelSave
    End If
End Sub

Private Sub cldEnd_GotFocus()
    If DataValid Then
        mclsGrid.Save
    Else
        mclsGrid.CancelSave
    End If
End Sub

Private Sub cmdOK_Click(Index As Integer)
    If Index <> 1 Then
        If DataValid Then
            mclsGrid.Save
        Else
            mclsGrid.CancelSave
        End If
    Else
        mclsGrid.CancelSave
    End If
    
    Select Case Index
    Case 0: If SaveData Then Unload Me
    Case 1: Unload Me
    Case 2:
        If mblnModify Then
            If ShowMsg(hWnd, "数据已修改,是否保存?", vbQuestion + vbYesNo, Caption) = vbYes Then
                If SaveData Then SetColumns
            Else
                SetColumns
            End If
        Else
            SetColumns
        End If
    Case 3: CheckAll
    Case 4:
        If mblnModify Then
            If ShowMsg(hWnd, "数据已修改,是否保存?", vbQuestion + vbYesNo, Caption) = vbYes Then
                If SaveData Then FilterChk
            Else
                FilterChk
            End If
        Else
            FilterChk
        End If
    Case 5: CancelAll
    End Select
End Sub

Private Sub Form_Load()
    Set mclsGrid = New Grid
    Set mclsGrid.Grid = msgBody
    If mstrOp = "入库" Then
        mclsGrid.ListSet.ViewId = 1248
    Else
        mclsGrid.ListSet.ViewId = 1249
    End If
    Set mclsMainControl = gclsSys.MainControls.Add(Me)
    Utility.LoadFormResPicture Me
    msgBody.Left = ListFormLeft
    mblnModify = False
End Sub

Private Sub Form_Resize()
    cmdOk(0).Left = Me.ScaleWidth - cmdOk(0).Width - 2 * ListFormRight
    cmdOk(1).Left = Me.ScaleWidth - cmdOk(0).Width - 2 * ListFormRight
    cmdOk(2).Left = Me.ScaleWidth - cmdOk(0).Width - 2 * ListFormRight
    cmdOk(3).Left = Me.ScaleWidth - cmdOk(0).Width - 2 * ListFormRight
    msgBody.Width = cmdOk(0).Left - 2 * ListFormLeft - ListFormLeft
    msgBody.Height = Me.ScaleHeight - msgBody.Top - ListFormBottom
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set mclsGrid = Nothing
    Utility.UnLoadFormResPicture Me

⌨️ 快捷键说明

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