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

📄 销售界面.frm

📁 医药管理信息系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Left            =   3780
      TabIndex        =   19
      Text            =   "Text14"
      Top             =   5220
      Visible         =   0   'False
      Width           =   795
   End
   Begin VB.TextBox Text11 
      DataField       =   "库存量"
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   6600
      TabIndex        =   18
      Top             =   4740
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.TextBox Text10 
      DataField       =   "单位"
      DataSource      =   "Adodc1"
      Height          =   315
      Left            =   5580
      TabIndex        =   17
      Text            =   "Text10"
      Top             =   4740
      Visible         =   0   'False
      Width           =   795
   End
   Begin VB.TextBox Text9 
      DataField       =   "售价"
      DataSource      =   "Adodc1"
      Height          =   315
      Left            =   4680
      TabIndex        =   16
      Text            =   "Text9"
      Top             =   4740
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.TextBox Text8 
      DataField       =   "药品名称"
      DataSource      =   "Adodc1"
      Height          =   330
      Left            =   3780
      TabIndex        =   15
      Text            =   "Text8"
      Top             =   4740
      Visible         =   0   'False
      Width           =   795
   End
   Begin VB.TextBox Text7 
      DataField       =   "药品编码"
      DataSource      =   "Adodc1"
      Height          =   315
      Left            =   2880
      TabIndex        =   14
      Text            =   "Text7"
      Top             =   4740
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.TextBox Text6 
      Height          =   315
      Left            =   6540
      TabIndex        =   13
      Top             =   3900
      Width           =   1275
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "销售界面.frx":009D
      Height          =   2355
      Left            =   420
      TabIndex        =   11
      Top             =   1380
      Width           =   7575
      _ExtentX        =   13361
      _ExtentY        =   4154
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加"
      Height          =   435
      Left            =   6120
      TabIndex        =   10
      Top             =   780
      Width           =   1035
   End
   Begin VB.TextBox Text5 
      DataSource      =   "Adodc2"
      Height          =   375
      Left            =   1440
      TabIndex        =   9
      Top             =   3780
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Height          =   315
      Left            =   1380
      TabIndex        =   7
      Top             =   960
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Height          =   330
      Left            =   6060
      TabIndex        =   5
      Top             =   300
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   330
      Left            =   3240
      TabIndex        =   3
      Top             =   300
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   315
      Left            =   1380
      TabIndex        =   1
      Top             =   300
      Width           =   1215
   End
   Begin VB.Label Label6 
      Caption         =   "售货员编码:"
      Height          =   315
      Left            =   4980
      TabIndex        =   12
      Top             =   300
      Width           =   1095
   End
   Begin VB.Label Label5 
      Caption         =   "销售总额:"
      Height          =   315
      Left            =   5640
      TabIndex        =   8
      Top             =   3960
      Width           =   1095
   End
   Begin VB.Label Label4 
      Caption         =   "数量:"
      Height          =   195
      Left            =   2700
      TabIndex        =   6
      Top             =   360
      Width           =   1395
   End
   Begin VB.Label Label3 
      Caption         =   "销售日期:"
      Height          =   195
      Left            =   540
      TabIndex        =   4
      Top             =   3900
      Width           =   1155
   End
   Begin VB.Label Label2 
      Caption         =   "销售编码:"
      Height          =   255
      Left            =   540
      TabIndex        =   2
      Top             =   1020
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "药品代码:"
      Height          =   195
      Left            =   540
      TabIndex        =   0
      Top             =   360
      Width           =   1035
   End
End
Attribute VB_Name = "销售界面"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim x As Currency

Private Sub Command1_Click()
Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价 ,unit as 单位,stocknum as 库存量 from medinfor where medicinecode='" & Text1 & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then MsgBox "无此信息!", , "提示"
If Val(Text11.Text) - Val(Text2.Text) < 0 Then
MsgBox "库存不足", , "提示"
Text1.Text = "": Text2.Text = "": Text1.SetFocus
Else
On Error Resume Next
Adodc2.Recordset.AddNew
Text12.Text = Text4.Text
Text13.Text = Text7.Text
Text14.Text = Text8.Text
Text15.Text = Text9.Text
Text16.Text = Text10.Text
Text17.Text = Val(Text9.Text) * Val(Text2.Text)
Text18.Text = Text2.Text
Adodc2.Recordset.Update
Adodc2.Recordset.MoveLast
Adodc1.Recordset.Update
Text11.Text = Val(Text11.Text) - Val(Text2.Text)
Adodc1.Recordset.Update
Adodc1.Recordset.MoveLast
x = x + Val(Text17.Text)
End If
End Sub
Private Sub Command2_Click()
Static y As Integer
y = Val(Text4.Text) + 1
Text4.Text = y
Text5.Text = Date$
Text6.Text = x
Adodc3.Recordset.AddNew
Text19.Text = Text4.Text
Text20.Text = Text3.Text
Text21.Text = Date$
Text22.Text = Text6.Text
Adodc3.Recordset.Update
Adodc3.Recordset.MoveLast
Text6.SetFocus
End Sub

Private Sub Form_Load()
Text4.Text = 1
End Sub

Private Sub Text6_LostFocus()
x = 0
End Sub

⌨️ 快捷键说明

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