addrow10.frm

来自「一个关于电脑管理汽车的软件」· FRM 代码 · 共 475 行

FRM
475
字号
VERSION 5.00
Object = "{40D97E01-4259-4398-B597-183C348B488F}#1.0#0"; "BSE.ocx"
Begin VB.Form AddRow10 
   Caption         =   "维修零件领用编辑"
   ClientHeight    =   7620
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5040
   LinkTopic       =   "Form1"
   ScaleHeight     =   7620
   ScaleWidth      =   5040
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取 消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2640
      TabIndex        =   1
      Top             =   6960
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确 定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   0
      Top             =   6960
      Width           =   1215
   End
   Begin BSE_Engine.BSE BSE1 
      Left            =   960
      Top             =   7080
      _ExtentX        =   6588
      _ExtentY        =   1085
   End
   Begin VB.Frame Frame1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   6855
      Left            =   0
      TabIndex        =   2
      Top             =   0
      Width           =   5055
      Begin VB.TextBox TexGoods 
         Height          =   375
         Index           =   3
         Left            =   1440
         TabIndex        =   22
         Top             =   4320
         Width           =   1215
      End
      Begin VB.CommandButton cmdFind2 
         Height          =   375
         Left            =   4440
         Picture         =   "AddRow10.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   12
         Top             =   960
         Width           =   375
      End
      Begin VB.CommandButton cmdFind 
         Height          =   375
         Left            =   3960
         Picture         =   "AddRow10.frx":014A
         Style           =   1  'Graphical
         TabIndex        =   11
         Top             =   480
         Width           =   375
      End
      Begin VB.ComboBox Combo1 
         Height          =   315
         Index           =   3
         Left            =   1440
         TabIndex        =   10
         Top             =   3360
         Width           =   1215
      End
      Begin VB.ComboBox Combo1 
         Height          =   315
         Index           =   2
         Left            =   1440
         TabIndex        =   9
         Top             =   2880
         Width           =   2295
      End
      Begin VB.ComboBox Combo1 
         Height          =   315
         Index           =   1
         Left            =   1440
         TabIndex        =   8
         Top             =   2400
         Width           =   2295
      End
      Begin VB.ComboBox Combo1 
         Height          =   315
         Index           =   0
         Left            =   1440
         TabIndex        =   7
         Top             =   1920
         Width           =   2295
      End
      Begin VB.TextBox TexGoods 
         Height          =   375
         Index           =   5
         Left            =   1440
         TabIndex        =   6
         Top             =   5280
         Width           =   1215
      End
      Begin VB.TextBox TexGoods 
         Height          =   375
         Index           =   2
         Left            =   1440
         TabIndex        =   5
         Top             =   1440
         Width           =   2895
      End
      Begin VB.TextBox TexGoods 
         Height          =   375
         Index           =   1
         Left            =   1440
         TabIndex        =   4
         Top             =   960
         Width           =   2895
      End
      Begin VB.TextBox TexGoods 
         Height          =   375
         Index           =   0
         Left            =   1440
         TabIndex        =   3
         Top             =   480
         Width           =   2295
      End
      Begin VB.Label Label1 
         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           =   12
         Left            =   240
         TabIndex        =   21
         Top             =   3360
         Width           =   1215
      End
      Begin VB.Label Label1 
         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           =   9
         Left            =   240
         TabIndex        =   20
         Top             =   5280
         Width           =   1215
      End
      Begin VB.Label Label1 
         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            =   240
         TabIndex        =   19
         Top             =   4320
         Width           =   1215
      End
      Begin VB.Label Label1 
         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           =   5
         Left            =   240
         TabIndex        =   18
         Top             =   2880
         Width           =   1215
      End
      Begin VB.Label Label1 
         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           =   4
         Left            =   240
         TabIndex        =   17
         Top             =   2400
         Width           =   1215
      End
      Begin VB.Label Label1 
         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           =   3
         Left            =   240
         TabIndex        =   16
         Top             =   1920
         Width           =   1215
      End
      Begin VB.Label Label1 
         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           =   2
         Left            =   240
         TabIndex        =   15
         Top             =   1440
         Width           =   1215
      End
      Begin VB.Label Label1 
         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           =   1
         Left            =   240
         TabIndex        =   14
         Top             =   960
         Width           =   1215
      End
      Begin VB.Label Label1 
         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           =   0
         Left            =   240
         TabIndex        =   13
         Top             =   480
         Width           =   1215
      End
   End
End
Attribute VB_Name = "AddRow10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
 Unload Me
End Sub

Private Sub cmdFind_Click()
 VarInitData.SearGoodsBS = 9
 SearchGoods2.Show 1
End Sub

Private Sub cmdFind2_Click()
 VarInitData.SearchSimpleCodeBS = 10
 SimpleCodeFind.Show 1
End Sub


Public Sub ClearAllContxt()
 Dim i As Integer
 For i = 0 To 5
  If i <> 4 Then
   TexGoods(i) = ""
  End If
 Next i
 For i = 0 To 3
  Combo1(i) = ""
 Next i
End Sub
 
Private Sub cmdOk_Click()
 Dim MyItems As ListItems
 Dim TempStr As String
 Dim TempSQL As String
 Dim TempMoney As Double
 Dim TempCount As Long
 Dim TempItemCount As Long
 Dim TemplstCount As Long
 Dim TempIndex As Long
 Dim i As Long
  If MaintainPartBill.ModifyBS = True Then
    TempIndex = MaintainPartBill.lstBillDocuIndex
  Else
    MaintainPartBill.lstBillDocu.ListItems.Add , , ""
    TempIndex = MaintainPartBill.lstBillDocu.ListItems.Count
  End If
  TempStr = "0.00"
  
  With MaintainPartBill.lstBillDocu.ListItems(TempIndex)
   
   .Text = TexGoods(0)
   .SubItems(1) = TexGoods(1)
   .SubItems(2) = TexGoods(2)
   .SubItems(3) = TexGoods(3)
   .SubItems(4) = Combo1(3)
 '  .SubItems(5) = Format(TexGoods(4), TempStr)
   TempMoney = Val(TexGoods(3)) * Val(TexGoods(5))
   .SubItems(5) = Format(TempMoney, "0.00")
   .SubItems(6) = TexGoods(5)
   .SubItems(7) = Combo1(1)
   .SubItems(8) = Combo1(0)
   .SubItems(9) = Combo1(2)
  End With
  With MaintainPartBill
   TemplstCount = .lstBillDocu.ListItems.Count
   .lblGItemCount = TemplstCount
   TempCount = 0
   TempMoney = 0
   For i = 1 To TemplstCount
    TempCount = TempCount + Val(.lstBillDocu.ListItems(i).SubItems(3))
    TempMoney = TempMoney + Val(.lstBillDocu.ListItems(i).SubItems(5))
   Next i
   .lblGCount = TempCount
   .lblGMoney = VarFunction.DefFormat(TempMoney)
  End With
  MaintainPartBill.ModifyBS = False
  Unload Me
  
End Sub






Private Sub Combo1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
 Combo1(Index).Text = ""
End Sub

Private Sub Combo1_KeyUp(Index As Integer, KeyCode As Integer, Shift As Integer)
 Combo1(Index).Text = ""
End Sub

Private Sub Form_Load()
 Dim i As Integer
 Dim TempSQL As String
 VarInitData.InitBSE BSE1, 0
 ClearAllContxt
 LockText
 For i = 2 To 5
  TempSQL = VarInitData.DisplayDynSQLVal(VarInitData.SureNameFrIndex(i))
  VarInitData.LoadData Combo1(i - 2), TempSQL, 1
 Next i
 If MaintainPartBill.ModifyBS = True Then
  With MaintainPartBill.lstBillDocu.ListItems(MaintainPartBill.lstBillDocuIndex)
   TexGoods(0) = .Text
   TexGoods(1) = .SubItems(1)
   TexGoods(2) = .SubItems(2)
   TexGoods(3) = .SubItems(3)
   Combo1(3) = .SubItems(4)
   'TexGoods(4) = .SubItems(5)
   TexGoods(5) = .SubItems(6)
   Combo1(1) = .SubItems(7)
   Combo1(0) = .SubItems(8)
   Combo1(2) = .SubItems(9)
  End With
 End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
 If BSE1.EngineStarted Then BSE1.EndSubClassing
 MaintainPartBill.ModifyBS = False
End Sub



Private Sub TexGoods_LostFocus(Index As Integer)
 Select Case Index
  Case 5
    TexGoods(Index).Text = Format$(TexGoods(Index).Text, "0.00")
 End Select
End Sub
Private Sub LockText()
 Dim i As Integer
 For i = 0 To 2
  TexGoods(i).Locked = True
 Next i
 cmdFind2.Visible = False
End Sub

⌨️ 快捷键说明

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