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

📄 frmexst.frm

📁 仓库管理软件,库存信息,仓库入库,仓库出库,单据新增,修改,删除,审核,反审核等等功能.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{E684D8A3-716C-4E59-AA94-7144C04B0074}#1.1#0"; "GRIDEX20.OCX"
Begin VB.Form FrmExST 
   Caption         =   "Form1"
   ClientHeight    =   7980
   ClientLeft      =   4110
   ClientTop       =   4590
   ClientWidth     =   11040
   DrawStyle       =   1  'Dash
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   7980
   ScaleWidth      =   11040
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   390
      Left            =   0
      TabIndex        =   10
      Top             =   7590
      Width           =   11040
      _ExtentX        =   19473
      _ExtentY        =   688
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   11853
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
      EndProperty
   End
   Begin GridEX20.GridEX Grid 
      Height          =   4440
      Left            =   75
      TabIndex        =   8
      Top             =   1575
      Width           =   10890
      _ExtentX        =   19209
      _ExtentY        =   7832
      Version         =   "2.0"
      AllowRowSizing  =   -1  'True
      AutomaticSort   =   -1  'True
      BoundColumnIndex=   ""
      ReplaceColumnIndex=   ""
      HideSelection   =   2
      MethodHoldFields=   -1  'True
      ContScroll      =   -1  'True
      SelectionStyle  =   1
      AutomaticArrange=   0   'False
      AllowDelete     =   -1  'True
      GroupByBoxVisible=   0   'False
      NewRowPos       =   1
      AllowAddNew     =   -1  'True
      ColumnHeaderHeight=   270
      IntProp1        =   0
      IntProp2        =   0
      IntProp7        =   0
      ColumnsCount    =   2
      Column(1)       =   "FrmExST.frx":0000
      Column(2)       =   "FrmExST.frx":00C8
      FormatStylesCount=   5
      FormatStyle(1)  =   "FrmExST.frx":016C
      FormatStyle(2)  =   "FrmExST.frx":02B0
      FormatStyle(3)  =   "FrmExST.frx":0360
      FormatStyle(4)  =   "FrmExST.frx":0414
      FormatStyle(5)  =   "FrmExST.frx":04EC
      ImageCount      =   0
      PrinterProperties=   "FrmExST.frx":05A4
   End
   Begin VB.Frame Frame2 
      Caption         =   "备注:"
      Height          =   1440
      Left            =   75
      TabIndex        =   2
      Top             =   6075
      Width           =   10890
      Begin VB.TextBox txtMemo 
         Height          =   1140
         Left            =   75
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   7
         Text            =   "FrmExST.frx":076C
         Top             =   225
         Width           =   10740
      End
   End
   Begin VB.Frame Frame1 
      Height          =   990
      Left            =   75
      TabIndex        =   1
      Top             =   600
      Width           =   10890
      Begin VB.TextBox txtBillNo 
         Height          =   315
         Left            =   3150
         TabIndex        =   5
         Text            =   "Text1"
         Top             =   285
         Width           =   1740
      End
      Begin MSComCtl2.DTPicker dtpDate 
         Height          =   315
         Left            =   6450
         TabIndex        =   4
         Top             =   300
         Width           =   1740
         _ExtentX        =   3069
         _ExtentY        =   556
         _Version        =   393216
         Format          =   25493505
         CurrentDate     =   38917
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "已审核"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   240
         Left            =   300
         TabIndex        =   9
         Top             =   375
         Width           =   765
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "入库日期:"
         Height          =   180
         Left            =   5475
         TabIndex        =   6
         Top             =   360
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "入库单号:"
         Height          =   180
         Left            =   2175
         TabIndex        =   3
         Top             =   360
         Width           =   900
      End
   End
   Begin MSComctlLib.Toolbar Toolbar 
      Align           =   1  'Align Top
      Height          =   555
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   11040
      _ExtentX        =   19473
      _ExtentY        =   979
      ButtonWidth     =   1138
      ButtonHeight    =   926
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   8
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "新增"
            Key             =   "tlbNew"
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "保存"
            Key             =   "tlbSave"
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "审核"
            Key             =   "tlbAuditing"
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "反审核"
            Key             =   "tlbUnAuditing"
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "tlbClose"
         EndProperty
      EndProperty
      BorderStyle     =   1
   End
End
Attribute VB_Name = "FrmExST"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rstGrid As New ADODB.Recordset
Dim rstExec As New ADODB.Recordset

Dim mExSTID As Long
Dim mEdit As Boolean
Dim mChanged As Boolean


Private Sub BtnState(l As Long)
    If l = 1 Then
        txtBillNo.Enabled = False
        dtpDate.Enabled = False
        Grid.Enabled = False
        txtMemo.Enabled = False
    ElseIf l = 2 Then
        txtBillNo.Enabled = True
        dtpDate.Enabled = True
        Grid.Enabled = True
        txtMemo.Enabled = True
    End If
    
End Sub

Private Sub dtpDate_Change()
mChanged = True
End Sub

Private Sub Form_Load()
    Me.Icon = frmMain.Icon
    Me.Caption = "物品出库单"
    With Me
        '----- 设置 ToolBar 属性 -----
        .Toolbar.ImageList = frmMain.Image
        .Toolbar.Buttons.Item("tlbNew").Image = "New"
        .Toolbar.Buttons.Item("tlbSave").Image = "Save"
        .Toolbar.Buttons.Item("tlbAuditing").Image = "Audi"
        .Toolbar.Buttons.Item("tlbUnAuditing").Image = "UnAudi"
        .Toolbar.Buttons.Item("tlbClose").Image = "Store"
    End With
    
    

End Sub

Private Sub LoadGrid()


    
    Set Grid.ADORecordset = rstGrid
    Grid.Columns(1).Visible = False
    Grid.Columns(2).Visible = False
    Grid.Columns(3).Caption = "物品编码"
    Grid.Columns(4).Caption = "物品名称"
    Grid.Columns(5).Caption = "单价"
    Grid.Columns(6).Caption = "数量"
    Grid.Columns(7).Caption = "金额"
    
    Grid.AllowEdit = True
    Grid.AllowAddNew = True
    Grid.AllowDelete = True
    Grid.SelectionStyle = jgexEntireRow
    ColumnCenter Grid
    Grid.Columns(3).ButtonStyle = jgexButtonEllipsis
    Grid.Columns(4).ButtonStyle = jgexButtonEllipsis
    Grid.ColumnAutoResize = True
    txtBillNo.Locked = True
    

End Sub


Public Sub AddBill()
    Dim s As String
    s = "WPCK" & Format(Date, "yymmdd")
    
    If rstExec.State = 1 Then rstExec.Close
    Set rstExec = Nothing
    rstExec.CursorLocation = adUseClient
    rstExec.Open "select Max(ExSTCode) as Code from ExST", con, adOpenStatic, adLockBatchOptimistic
    
    If IsNull(rstExec.Fields("Code")) Then
        txtBillNo.Text = s & "0001"
    Else
        txtBillNo.Text = s & Right(("0000" & CStr(Val(Right(rstExec.Fields("Code"), 4)) + 1)), 4)
    End If
    dtpDate.Value = Date
    txtMemo.Text = ""

    If rstGrid.State = 1 Then rstGrid.Close
    Set rstGrid = Nothing
    rstGrid.CursorLocation = adUseClient
    rstGrid.Open "select * from ExST_d where ExSTID=0", con, adOpenStatic, adLockBatchOptimistic
    
    LoadGrid
    BtnState 2
    
    mEdit = False
    mExSTID = 0

⌨️ 快捷键说明

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