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

📄 frmfoot.frm

📁 < 飞鸿商品>>零售是基于VB+SQL2000开的商品零售管理系统. 开发的很好.可以一看
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmFoot 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "结  算"
   ClientHeight    =   4455
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   3960
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmFoot.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4455
   ScaleWidth      =   3960
   StartUpPosition =   1  '所有者中心
   Begin sell.xpcmdbutton cmdCancel 
      Height          =   495
      Left            =   2160
      TabIndex        =   15
      Top             =   3750
      Width           =   1125
      _ExtentX        =   1984
      _ExtentY        =   873
      Caption         =   "取  消"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin sell.xpcmdbutton cmdEnter 
      Height          =   495
      Left            =   450
      TabIndex        =   14
      Top             =   3750
      Width           =   1125
      _ExtentX        =   1984
      _ExtentY        =   873
      Caption         =   "确  定"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.TextBox txtCash 
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   405
      Left            =   1650
      TabIndex        =   0
      Text            =   "0.00"
      Top             =   2400
      Width           =   1995
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00C0C0C0&
      Index           =   1
      X1              =   -30
      X2              =   3960
      Y1              =   3510
      Y2              =   3510
   End
   Begin VB.Label Label10 
      Caption         =   "¥"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   1620
      TabIndex        =   13
      Top             =   3000
      Width           =   255
   End
   Begin VB.Label lbl 
      Caption         =   "0.00"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   1980
      TabIndex        =   12
      Top             =   3000
      Width           =   1725
   End
   Begin VB.Label Label3 
      Caption         =   "找    零"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   2
      Left            =   240
      TabIndex        =   11
      Top             =   3000
      Width           =   960
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      Index           =   0
      X1              =   -30
      X2              =   3960
      Y1              =   2130
      Y2              =   2130
   End
   Begin VB.Label Label3 
      Caption         =   "现    收"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   1
      Left            =   240
      TabIndex        =   10
      Top             =   2460
      Width           =   960
   End
   Begin VB.Label Label8 
      Caption         =   "¥"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   240
      Left            =   1650
      TabIndex        =   9
      Top             =   975
      Width           =   255
   End
   Begin VB.Label lblYH 
      Caption         =   "0.00"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   240
      Left            =   2010
      TabIndex        =   8
      Top             =   975
      Width           =   1725
   End
   Begin VB.Label Label5 
      Caption         =   "¥"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   1650
      TabIndex        =   7
      Top             =   1590
      Width           =   255
   End
   Begin VB.Label lblSums 
      Caption         =   "0.00"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   240
      Left            =   2010
      TabIndex        =   6
      Top             =   1590
      Width           =   1725
   End
   Begin VB.Label Label6 
      Caption         =   "¥"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   240
      Left            =   1650
      TabIndex        =   5
      Top             =   360
      Width           =   255
   End
   Begin VB.Label lblSum 
      Caption         =   "0.00"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   240
      Left            =   2010
      TabIndex        =   4
      Top             =   360
      Width           =   1755
   End
   Begin VB.Label Label3 
      Caption         =   "实收金额"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   0
      Left            =   240
      TabIndex        =   3
      Top             =   1590
      Width           =   960
   End
   Begin VB.Label Label2 
      Caption         =   "优惠金额"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   240
      TabIndex        =   2
      Top             =   990
      Width           =   960
   End
   Begin VB.Label Label1 
      Caption         =   "应收金额"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   240
      TabIndex        =   1
      Top             =   390
      Width           =   960
   End
End
Attribute VB_Name = "frmFoot"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
  SellEnd = False
  Unload Me
End Sub

Private Sub cmdEnter_Click()
  SellEnd = True
  If IsPrint = 1 Then Prints
  Unload Me
End Sub

Private Sub Form_Load()
  txtCash.SelStart = 0
  txtCash.SelLength = Len(txtCash.Text)
End Sub

Private Sub txtCash_KeyPress(KeyAscii As Integer)
  If (KeyAscii < 46 Or KeyAscii > 57) Or KeyAscii = 47 Or KeyAscii = 8 Then KeyAscii = 0
End Sub

Private Sub txtCash_KeyUp(KeyCode As Integer, Shift As Integer)
  Select Case KeyCode
    Case vbKeyReturn
      If Val(txtCash.Text) < Val(lblsums.Caption) Then
        txtCash.SelStart = 0
        txtCash.SelLength = Len(txtCash.Text)
        Exit Sub
      End If
      txtCash.Text = Format(txtCash.Text, "0.00")
      lbl.Caption = Format(CStr(Val(txtCash.Text) - Val(lblsums.Caption)), "0.00")
      cmdEnter.SetFocus
    Case vbKeyEscape
      cmdCancel_Click
  End Select
End Sub


Private Sub Prints()
Dim LeftMargin As Integer
Dim I As Integer

Exit Sub

MousePointer = vbHourglass
Printer.Font = "宋体"
Printer.PaperSize = vbPRPSLegal
Printer.FontSize = 12
Printer.Orientation = 1

LeftMargin = 3
  
  Printer.Print ""
  Printer.Print Tab(10); "飞鸿科技"
  Printer.FontSize = 9
  Printer.Print Tab(LeftMargin); "----------------------------"
  Printer.Print Tab(LeftMargin); "单号:" & frmSell.lbl.Caption & " 收银员:" & UserName
  Printer.Print Tab(LeftMargin); "时间:" & Format(Date$, "yyyy-mm-dd") & "  " & Format(Time$, "hh:mm:ss")
  Printer.Print Tab(LeftMargin); "单价        数量    金额"
  Printer.Print Tab(LeftMargin); "----------------------------"
  For I = 1 To frmSell.Grid.Rows - 1
    Printer.Print Tab(LeftMargin); frmSell.Grid.TextMatrix(I, 2)
    Printer.Print Tab(LeftMargin); frmSell.Grid.TextMatrix(I, 6) & "        " & frmSell.Grid.TextMatrix(I, 7) & "      "; frmSell.Grid.TextMatrix(I, 10)
  Next
  Printer.Print Tab(LeftMargin); "============================"
  Printer.Print Tab(LeftMargin); "本笔累计数:" & frmSell.Grid.Rows - 1
  Printer.Print Tab(LeftMargin); "总计:" & frmSell.lblSum.Caption & "  " & "应付:" & frmSell.lblsums.Caption
  Printer.Print Tab(LeftMargin); "现金付款:" & Format(txtCash.Text, "0.00")
  Printer.Print Tab(LeftMargin); "现金找零:" & lbl.Caption
  Printer.Print Tab(LeftMargin); " "
  Printer.Print Tab(LeftMargin); "          谢谢光临"
  Printer.EndDoc

  MousePointer = vbDefault
  
End Sub


⌨️ 快捷键说明

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