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

📄 frmmrprequire.frm

📁 一个OA办公自动化管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{0D6234D1-DBA2-11D1-B5DF-0060976089D0}#6.0#0"; "TODG6.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmMrpRequire 
   Caption         =   "617"
   ClientHeight    =   5520
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9315
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5520
   ScaleWidth      =   9315
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdPurchase 
      Caption         =   "616"
      Height          =   375
      Left            =   7680
      TabIndex        =   6
      Top             =   180
      Width           =   1155
   End
   Begin TrueOleDBGrid60.TDBGrid TDBGrid1 
      Height          =   4695
      Left            =   120
      OleObjectBlob   =   "frmMrpRequire.frx":0000
      TabIndex        =   5
      Top             =   660
      Width           =   9075
   End
   Begin VB.CommandButton cmdAnalyzer 
      Caption         =   "615"
      Height          =   375
      Left            =   6420
      TabIndex        =   4
      Top             =   180
      Width           =   1155
   End
   Begin MSComCtl2.DTPicker DTPDate1 
      Height          =   315
      Left            =   1200
      TabIndex        =   0
      Top             =   180
      Width           =   1275
      _ExtentX        =   2249
      _ExtentY        =   556
      _Version        =   393216
      CustomFormat    =   "yyyy-MM-dd"
      Format          =   24576003
      CurrentDate     =   36684
   End
   Begin MSComCtl2.DTPicker DTPDate2 
      Height          =   315
      Left            =   3540
      TabIndex        =   3
      Top             =   180
      Width           =   1275
      _ExtentX        =   2249
      _ExtentY        =   556
      _Version        =   393216
      CustomFormat    =   "yyyy-MM-dd"
      Format          =   24576003
      CurrentDate     =   36684
   End
   Begin VB.Label Label2 
      Caption         =   "614"
      Height          =   195
      Left            =   2700
      TabIndex        =   2
      Top             =   240
      Width           =   555
   End
   Begin VB.Label Label1 
      Caption         =   "613"
      Height          =   195
      Left            =   120
      TabIndex        =   1
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "frmMrpRequire"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAnalyzer_Click()
Dim rstMRP As Recordset
    GetCNClient.Execute "Purchase_Require '" & Format(DTPDate1.Value, "yyyy-mm-dd") & "','" & Format(DTPDate2.Value, "yyyy-mm-dd") & "'"
    Set rstMRP = New Recordset
    rstMRP.Open "Select Inventory_ID, Order_Qty, Balance_Qty, Purchase_Qty, Require_Qty,Summary From Mrp_Require", GetCNClient, adOpenStaticl, adLockPessimistic
    Set Me.TDBGrid1.DataSource = rstMRP
    InitTurboGrid Me.TDBGrid1, Me.name
End Sub

Private Sub AutoPurchase(BillNO As String)
Dim rstPurchase As Recordset
Set rstPurchase = New Recordset

    GetCNClient.Execute "Insert Into Inventory_Evidence(Evidence_Number,Date,Type) " _
                      & " Values('" & BillNO & "','" & Format(Date, "yyyy-mm-dd") & "','202')"


    rstPurchase.Open "SELECT Inventory_ID, Require_Qty FROM Mrp_Require  Where Require_Qty>0 ", GetCNClient, adOpenForwardOnly

    Do Until rstPurchase.EOF
    
        GetCNClient.Execute "Insert Into Inventory_Evidence_Detail(Evidence_Number,Inventory_ID,Qty) " _
                    & " Values('" & BillNO & "','" & rstPurchase![Inventory_ID] & "', " & rstPurchase![Require_Qty] & ")"
                    
        rstPurchase.MoveNext
    Loop
'    Dim frm1 As clsInput
'    Set frm1 = New clsInput
    frm1.FormName = "PurchaseOrder"
    frm1.ShowForm BillNO, 1, True
End Sub



Private Sub cmdPurchase_Click()
Dim strBillNo As String
strBillNo = InputBox("输入单据号:")
AutoPurchase strBillNo
End Sub

Private Sub Form_Load()
    Me.Caption = LoadResString(Val(Me.Caption & GLanguageID))
    GGetRes GLanguageID, Me
    Me.DTPDate1.Value = Date
    Me.DTPDate2.Value = Date + 7
End Sub

Private Sub TDBGrid1_ColResize(ByVal ColIndex As Integer, Cancel As Integer)
    SaveDataGridWidth Me.name, Me.TDBGrid1.Columns(ColIndex).DataField, Me.TDBGrid1.Columns(ColIndex).Width

End Sub

⌨️ 快捷键说明

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