addrow6.frm

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

FRM
653
字号
      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        =   21
         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           =   5
         Left            =   240
         TabIndex        =   20
         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           =   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           =   9
         Left            =   240
         TabIndex        =   18
         Top             =   5760
         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           =   11
         Left            =   240
         TabIndex        =   17
         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           =   12
         Left            =   240
         TabIndex        =   16
         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           =   6
         Left            =   240
         TabIndex        =   15
         Top             =   3840
         Width           =   1215
      End
   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           =   13
      Left            =   5280
      TabIndex        =   31
      Top             =   120
      Width           =   1215
   End
End
Attribute VB_Name = "Addrow6"
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 = 7
 SearchGoods2.Show 1
End Sub

Public Sub ClearAllContxt()
 Dim i As Integer
 For i = 0 To 8
  If i <> 3 And i <> 5 Then
   TexGoods(i) = ""
  End If
 Next i
 For i = 0 To 3
  Combo1(i) = ""
 Next i
End Sub
 
Private Sub cmdFind2_Click()
 VarInitData.SearchSimpleCodeBS = 8
 SimpleCodeFind.Show 1
End Sub

Private Sub cmdOk_Click()
 Dim MyItems As ListItems
 Dim TempStr As String
 Dim TempSQL As String
 Dim TempMoney As Double
 Dim TempMoney2 As Double
 Dim TempRealMoney As Double
 Dim TempCount As Long
 Dim TempItemCount As Long
 Dim TemplstCount As Long
 Dim TempIndex As Long
 Dim i As Long
  If StoreDealTable.ModifyBS = True Then
    TempIndex = StoreDealTable.lstBillDocuIndex
  Else
    StoreDealTable.lstBillDocu.ListItems.Add , , ""
    TempIndex = StoreDealTable.lstBillDocu.ListItems.Count
  End If
  TempStr = "0.00"
  
  With StoreDealTable.lstBillDocu.ListItems(TempIndex)
   
   .Text = TexGoods(0)
   .SubItems(1) = TexGoods(1)
   .SubItems(2) = TexGoods(2)
   .SubItems(3) = TexGoods(3)
   .SubItems(4) = TexGoods(4)
   .SubItems(5) = Combo1(3)
   .SubItems(6) = Format(Val(TexGoods(8)) * Val(TexGoods(3)), TempStr)
   .SubItems(7) = Format(TexGoods(8), TempStr)
   .SubItems(8) = TexGoods(5)
   .SubItems(9) = TexGoods(6)
   .SubItems(10) = Combo1(1)
   .SubItems(11) = Combo1(0)
   .SubItems(12) = Combo1(2)
   .SubItems(13) = Format(TexGoods(7), TempStr)
   .SubItems(14) = TexGoods(9)
   
  ' .SubItems(14) = Format(TexGoods(3), TempStr)
  End With
  With StoreDealTable
   TemplstCount = .lstBillDocu.ListItems.Count
   .lblGItemCount = TemplstCount
     TempCount = 0
     TempMoney = 0
     For i = 1 To TemplstCount
      TempCount = TempCount + Val(.lstBillDocu.ListItems(i).SubItems(4))
      TempMoney = TempMoney + Val(.lstBillDocu.ListItems(i).SubItems(4)) * Val(TexGoods(8))
     Next i
     .lblGCount = TempCount
     .lblGMoney = Format(TempMoney, TempStr)
  End With
  StoreDealTable.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 StoreDealTable.ModifyBS = True Then
  With StoreDealTable.lstBillDocu.ListItems(StoreDealTable.lstBillDocuIndex)
   
   TexGoods(0) = Trim(.Text)
   TexGoods(1) = Trim(.SubItems(1))
   TexGoods(2) = Trim(.SubItems(2))
   TexGoods(3) = .SubItems(3)
   TexGoods(4) = .SubItems(4)
   Combo1(3) = .SubItems(5)
   TexGoods(8) = .SubItems(7)
   TexGoods(5) = .SubItems(8)
   TexGoods(6) = .SubItems(9)
   Combo1(1) = .SubItems(10)
   Combo1(0) = .SubItems(11)
   Combo1(2) = .SubItems(12)
   TexGoods(7) = .SubItems(13)
   TexGoods(9) = .SubItems(14)
   
  End With
 End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
 If BSE1.EngineStarted Then BSE1.EndSubClassing
 StoreDealTable.ModifyBS = False
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



Private Sub TexGoods_Change(Index As Integer)
   Dim TempRS As New MYSQL_RS
   Dim TempSQL As String
   Dim TempCount As Long
   If Index = 0 Then
    Set TempRS = New MYSQL_RS
       
    TempSQL = VarInitData.DisplaySQLVal(10) & " Where goodscoding = " & Quote(TexGoods(0)) '_
    '& " or goodscoding like " & Quote(TexGoods(0) & "_%")
    TempRS.OpenRs TempSQL, gCnn
    'Debug.Print TempSQL
    TempCount = 0
    With TempRS
     Do Until .EOF
      TempCount = TempCount + CLng(.Fields("goodscount"))
      .MoveNext
     Loop
      .CloseRecordset
      .ReleaseMemory
    End With
    Set TempRS = Nothing
    TexGoods(3) = TempCount
   End If
End Sub

⌨️ 快捷键说明

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