storedealtable.frm

来自「一个关于电脑管理汽车的软件」· FRM 代码 · 共 1,081 行 · 第 1/3 页

FRM
1,081
字号
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   6
            Left            =   3960
            TabIndex        =   25
            Top             =   240
            Width           =   1215
         End
         Begin VB.Label BillName 
            Caption         =   "审 核 人:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   8
            Left            =   3960
            TabIndex        =   24
            Top             =   960
            Width           =   1215
         End
         Begin VB.Label BillName 
            Caption         =   "操 作 员:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   10
            Left            =   3960
            TabIndex        =   23
            Top             =   1680
            Width           =   1215
         End
         Begin VB.Label BillName 
            Caption         =   "盈亏数量:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   11
            Left            =   3960
            TabIndex        =   22
            Top             =   2040
            Width           =   1215
         End
         Begin VB.Label BillName 
            Caption         =   "盈亏金额:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   7
            Left            =   7200
            TabIndex        =   21
            Top             =   1800
            Width           =   1215
         End
      End
      Begin MSComctlLib.ListView lstAddress 
         Height          =   6495
         Left            =   120
         TabIndex        =   28
         Top             =   480
         Width           =   9015
         _ExtentX        =   15901
         _ExtentY        =   11456
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   -1  'True
         HideSelection   =   0   'False
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         _Version        =   393217
         ForeColor       =   8388608
         BackColor       =   -2147483628
         BorderStyle     =   1
         Appearance      =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Name"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Address"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "City, State, Zip"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Notes"
            Object.Width           =   2540
         EndProperty
      End
      Begin MSComctlLib.ListView lstBillDocu 
         Height          =   3615
         Left            =   -74880
         TabIndex        =   29
         Top             =   3240
         Width           =   9855
         _ExtentX        =   17383
         _ExtentY        =   6376
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   -1  'True
         HideSelection   =   0   'False
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         _Version        =   393217
         ForeColor       =   8388608
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Name"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Address"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "City, State, Zip"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Notes"
            Object.Width           =   2540
         EndProperty
      End
   End
End
Attribute VB_Name = "StoreDealTable"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Dim NewRecord As Boolean
Dim LastSortIndex As Long, LastSortDir As Long
Private VarOption As Integer
Public lstAddressIndex As Long
Public ModifyBS As Boolean
Public lstBillDocuIndex As Long
Public BillStateBS As Integer
Public OrgRS As ChangeHistory


Private Sub cmdFind_Click()
 VarInitData.SearchClientData = 2
 ClientDataFind.Show 1
End Sub



Private Sub cmbCheckMan_KeyDown(KeyCode As Integer, Shift As Integer)
 cmbCheckMan.Text = ""
End Sub

Private Sub cmbCheckMan_KeyUp(KeyCode As Integer, Shift As Integer)
 cmbCheckMan.Text = ""
End Sub

Private Sub Command1_Click(Index As Integer)
 Dim i As Integer
 Dim TempRS As MYSQL_RS, TempRS2 As MYSQL_RS
 Dim TempVar As Long
 Dim TempSQL As String
 Dim TempBillType As Integer
 Dim StrBillNum As String
 Select Case Index
  Case 0
    VarInitData.StoreBS = True
    SearchGoods13.Show 1
  Case 1
    BillStateBS = 1
    For i = 0 To 3
     With Command3(i)
      .left = Command1(i).left
      .top = Command1(i).top
      .Visible = True
     End With
    Next i
    For i = 0 To 6
     Command1(i).Visible = False
    Next i
    Frame2.Enabled = True
    ClearFrame2
    
    lblOperateMan = CurrentOperate

    If SSStock.Tab = 1 Then
     SSStock.TabEnabled(0) = False
     SSStock_Click 0
    Else
     SSStock.Tab = 1
     SSStock.TabEnabled(0) = False
    End If
  Case 2
   If lstAddressIndex > 0 And lstAddress.ListItems.Count > 0 Then
    BillStateBS = 2
    For i = 0 To 3
     With Command3(i)
      .left = Command1(i).left
      .top = Command1(i).top
      .Visible = True
     End With
    Next i
    For i = 0 To 6
     Command1(i).Visible = False
    Next i
    Frame2.Enabled = True
    SSStock.Tab = 1
    SSStock.TabEnabled(0) = False
   End If
  Case 3
    If lstAddressIndex > 0 And lstAddress.ListItems.Count > 0 Then
     If MsgBox("确定删除这条进货单吗?", vbOKCancel) = vbOK Then
      TempSQL = "Delete From storedealtable Where billnum = " & Quote(Trim(lstAddress.ListItems(lstAddressIndex).Text))
      gCnn.Execute TempSQL
      TempSQL = "Delete From storedealtable2 Where billnum = " & Quote(Trim(lstAddress.ListItems(lstAddressIndex).Text))
      gCnn.Execute TempSQL
      TempSQL = VarInitData.DisplaySQLVal(29)
      VarInitData.LoadData lstAddress, TempSQL
      ClearFrame2
      lstBillDocu.ListItems.Clear
     End If
    End If
  Case 4
   TempSQL = VarInitData.DisplaySQLVal(29)
   VarInitData.LoadData lstAddress, TempSQL
  Case 5 '确库存盘点
   If lstAddressIndex > 0 And lstAddress.ListItems.Count > 0 Then
    TempSQL = "select * from storedealtable2" & " Where billnum = " & Quote(Trim(lstAddress.ListItems(lstAddressIndex).Text))
    Set TempRS = New MYSQL_RS
    TempRS.OpenRs TempSQL, gCnn
   If TempRS.RecordCount > 0 Then
     With TempRS
      .MoveFirst
      Do Until .EOF
       If VarInitData.DealFrStore(TempRS) = False Then
         MsgBox "操作的货物在库存没有,操作失败", , VarInitData.SysPrompt
         TempRS.CloseRecordset
         TempRS.ReleaseMemory
         Exit Sub
       End If
       .MoveNext
      Loop
     End With
     TempRS.CloseRecordset
     TempRS.ReleaseMemory
     Set TempRS = Nothing
     
    Set TempRS2 = New MYSQL_RS
    TempSQL = "Select * From counttable where countname =" & Quote("审核盘点单")
    TempRS2.OpenRs TempSQL, gCnn
    TempRS2.Fields("count").Value = CLng(TempRS2.Fields("count").Value) + 1
    StrBillNum = VarInitData.DealVarNo(CStr(TempRS2.Fields("count")), 6, "P")
    TempRS2.Update
    TempRS2.CloseRecordset
    TempRS2.ReleaseMemory
    Set TempRS2 = Nothing
    
    TempSQL = VarInitData.DisplaySQLVal(29) & " Where billnum = " & Quote(Trim(lstAddress.ListItems(lstAddressIndex).Text))
    Set TempRS = New MYSQL_RS
    TempRS.OpenRs TempSQL, gCnn
    VarInitData.SaveToDealBill TempRS, StrBillNum
    TempRS.CloseRecordset
    TempRS.ReleaseMemory
    Set TempRS = Nothing
    
    TempSQL = "select * from storedealtable2" & " Where billnum = " & Quote(Trim(lstAddress.ListItems(lstAddressIndex).Text))
    Set TempRS = New MYSQL_RS
    TempRS.OpenRs TempSQL, gCnn
    With TempRS
     .MoveFirst
     Do Until .EOF
      VarInitData.DealFrStore TempRS, True
      VarInitData.SaveToDealBillStore TempRS, StrBillNum
      .MoveNext
     Loop
    End With
    TempRS.CloseRecordset
    TempRS.ReleaseMemory
    Set TempRS = Nothing
    
    TempSQL = "Delete from storedealtable2 Where billnum = " & Quote(Trim(StoreDealTable.lstAddress.ListItems(StoreDealTable.lstAddressIndex).Text))
    gCnn.Execute TempSQL
    TempSQL = "Delete from storedealtable Where billnum = " & Quote(Trim(StoreDealTable.lstAddress.ListItems(StoreDealTable.lstAddressIndex).Text))
    gCnn.Execute TempSQL
    TempSQL = VarInitData.DisplaySQLVal(29)
    VarInitData.LoadData lstAddress, TempSQL
    VarInitData.LoadData lstBillDocu, VarInitData.DisplaySQLVal(30)
    Else
     MsgBox "货物单据为空,操作失败", , VarInitData.SysPrompt
    End If
  End If

⌨️ 快捷键说明

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