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

📄 sail.frm

📁 小软件,是一个光盘发行的销售管理软件,第一次上这个网站,先测试一下,如果觉得可以,以后肯定多多的发,
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form sail 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "销售录入"
   ClientHeight    =   7065
   ClientLeft      =   45
   ClientTop       =   375
   ClientWidth     =   10095
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "sail.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7065
   ScaleWidth      =   10095
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   495
      Left            =   5820
      TabIndex        =   11
      Top             =   6360
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "确定"
      Height          =   495
      Left            =   2940
      TabIndex        =   10
      Top             =   6360
      Width           =   1335
   End
   Begin VB.Frame Frame3 
      Caption         =   "金额信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   0
      TabIndex        =   21
      Top             =   5040
      Width           =   10095
      Begin VB.TextBox Text7 
         Height          =   375
         Left            =   7800
         TabIndex        =   9
         Text            =   "Text7"
         Top             =   360
         Width           =   1455
      End
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   4920
         TabIndex        =   8
         Text            =   "Text6"
         Top             =   360
         Width           =   1215
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1680
         TabIndex        =   7
         Text            =   "Text1"
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label9 
         Caption         =   "本次实收:"
         Height          =   375
         Left            =   6600
         TabIndex        =   24
         Top             =   360
         Width           =   1215
      End
      Begin VB.Label Label8 
         Caption         =   "本次折扣:"
         Height          =   255
         Left            =   3720
         TabIndex        =   23
         Top             =   360
         Width           =   1215
      End
      Begin VB.Label Label7 
         Caption         =   "累计进货:"
         Height          =   375
         Left            =   480
         TabIndex        =   22
         Top             =   360
         Width           =   1215
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "购买产品信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Left            =   0
      TabIndex        =   18
      Top             =   3840
      Width           =   10095
      Begin VB.CommandButton Command1 
         Caption         =   "增加"
         Height          =   495
         Left            =   8160
         TabIndex        =   6
         Top             =   480
         Width           =   1335
      End
      Begin VB.ComboBox Combo2 
         Height          =   360
         Left            =   1680
         TabIndex        =   4
         Text            =   "Combo2"
         Top             =   480
         Width           =   3495
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   6480
         TabIndex        =   5
         Text            =   "Text5"
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label6 
         Caption         =   "数量:"
         Height          =   255
         Left            =   5640
         TabIndex        =   20
         Top             =   480
         Width           =   1215
      End
      Begin VB.Label Label5 
         Caption         =   "产品名称:"
         Height          =   255
         Left            =   480
         TabIndex        =   19
         Top             =   480
         Width           =   1215
      End
   End
   Begin MSFlexGridLib.MSFlexGrid MSF1 
      Height          =   2175
      Left            =   0
      TabIndex        =   17
      Top             =   1680
      Width           =   10095
      _ExtentX        =   17806
      _ExtentY        =   3836
      _Version        =   393216
      BackColorBkg    =   16777215
   End
   Begin VB.Frame Frame1 
      Caption         =   "用户信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1575
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   10095
      Begin VB.ComboBox Combo1 
         Height          =   360
         Left            =   1680
         TabIndex        =   12
         Text            =   "Combo1"
         Top             =   480
         Width           =   4335
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   7560
         TabIndex        =   3
         Text            =   "Text4"
         Top             =   960
         Width           =   1935
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   7560
         TabIndex        =   1
         Text            =   "Text3"
         Top             =   480
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1680
         TabIndex        =   2
         Text            =   "Text2"
         Top             =   960
         Width           =   4335
      End
      Begin VB.Label Label4 
         Caption         =   "联系电话:"
         Height          =   255
         Left            =   6480
         TabIndex        =   16
         Top             =   960
         Width           =   1215
      End
      Begin VB.Label Label3 
         Caption         =   "联系人:"
         Height          =   255
         Left            =   6480
         TabIndex        =   15
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "详细地址:"
         Height          =   255
         Left            =   480
         TabIndex        =   14
         Top             =   960
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "单位名称:"
         Height          =   255
         Left            =   480
         TabIndex        =   13
         Top             =   480
         Width           =   1455
      End
   End
End
Attribute VB_Name = "sail"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public count1
Private Sub Combo1_Click()
Dim reslut As New ADODB.Recordset
Dim count
count = 0
reslut.Open "select * from 销售网点资料 where 销售商名称='" & Combo1.Text & "'", main.strcnn, adOpenKeyset, adLockOptimistic
If Not reslut.EOF Then
   If IsNull(reslut.Fields("地址")) = False Then
      Text2.Text = reslut.Fields("地址")
   End If
   If IsNull(reslut.Fields("联系人姓名")) = False Then
      Text3.Text = reslut.Fields("联系人姓名")
   End If
   If IsNull(reslut.Fields("工作电话")) = False Then
      Text4.Text = reslut.Fields("工作电话")
   End If
End If
reslut.Close
reslut.Open "select * from 销售订单 where 销售商名称='" & Combo1.Text & "'", main.strcnn, adOpenKeyset, adLockOptimistic
If Not reslut.EOF Then
   For i = 1 To reslut.RecordCount
       count = count + CSng(reslut.Fields("数量")) * CSng(reslut.Fields("单价")) * CSng(reslut.Fields("折扣"))
       reslut.MoveNext
   Next i
End If
reslut.Close
Text1.Text = count
reslut.Open "select * from 折扣 order by 累计进货 desc", main.strcnn, adOpenKeyset, adLockOptimistic
If Not reslut.EOF Then
   For i = 1 To reslut.RecordCount
       If reslut.Fields("累计进货") <= count Then
          Text6.Enabled = True
          Text6.Text = Format(reslut.Fields("折扣"), "0.####")
          Text6.Enabled = False
          Exit For
       Else
          Text6.Text = 1
       End If
       reslut.MoveNext
   Next i
End If
reslut.Close
End Sub

Private Sub Command1_Click()
Dim reslut As New ADODB.Recordset
Dim count
If Combo2.Text = "" Then
   MsgBox "请选择要销售的产品名称!", vbOKOnly + vbInformation, "互联网出版发行中心发行系统!"
   Exit Sub
End If
If Text5.Text = "" Then
   MsgBox "请输入要销售的产品数量!", vbOKOnly + vbInformation, "互联网出版发行中心发行系统!"
   Exit Sub
End If
reslut.Open "select * from 产品目录 ", main.strcnn, adOpenKeyset, adLockOptimistic
If Not reslut.EOF Then
   For i = 1 To reslut.RecordCount
       If reslut.Fields("产品名称") = Combo2.Text Then
          MSF1.Rows = MSF1.Rows + 1
          MSF1.Row = MSF1.Rows - 1
          MSF1.Col = 0
          MSF1.Text = reslut.Fields("产品编号")
          MSF1.Col = 1
          MSF1.Text = Combo2.Text
          MSF1.Col = 2
          If IsNull(reslut.Fields("价格")) = False Then
             MSF1.Text = reslut.Fields("价格")
          End If
          MSF1.Col = 3
          MSF1.Text = Text5.Text
          MSF1.Col = 4
          MSF1.Text = CSng(Text5.Text) * CSng(reslut.Fields("价格"))
         count1 = count1 + MSF1.Text
         Text7.Text = Format(count1 * CSng(Text6.Text), "#####.00")
         Combo1.Enabled = False
         Text1.Enabled = False
         Text6.Enabled = False
       End If
   reslut.MoveNext
   Next i
End If
reslut.Close
Combo2.Text = ""
Text5.Text = ""
End Sub

Private Sub Command2_Click()
Dim reslut As New ADODB.Recordset
Dim i, i1
If MSF1.Rows <= 1 Then
   MsgBox "没有需要确定的订单!", vbOKOnly + vbInformation, "互联网出版发行中心发行系统!"
   Exit Sub
End If
i = MsgBox("确定输入销售订单?", vbYesNo + vbInformation, "互联网出版发行中心发行系统!")
If i = vbYes Then
   reslut.Open "销售订单", main.strcnn, adOpenKeyset, adLockOptimistic
   For i1 = 1 To MSF1.Rows - 1
       reslut.AddNew
       MSF1.Row = i1
       MSF1.Col = 0
       reslut.Fields("产品编号") = MSF1.Text
       MSF1.Col = 1
       reslut.Fields("产品名称") = MSF1.Text
       MSF1.Col = 3
       reslut.Fields("数量") = MSF1.Text
       MSF1.Col = 2
       reslut.Fields("单价") = MSF1.Text
       reslut.Fields("销售商名称") = Combo1.Text
       reslut.Fields("订购日期") = Date
       reslut.Fields("折扣") = Text6.Text
       reslut.Update
   Next i1

   reslut.Close
End If
Unload Me
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim reslut As New ADODB.Recordset
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Combo1.Clear
Combo2.Clear
count1 = 0
reslut.Open "select * from 销售网点资料 order by 销售商ID", main.strcnn, adOpenKeyset, adLockOptimistic
If Not reslut.EOF Then
   For i = 1 To reslut.RecordCount
       Combo1.AddItem (reslut.Fields("销售商名称"))
       reslut.MoveNext
   Next i
End If
reslut.Close
reslut.Open "select * from 产品目录 order by 产品编号", main.strcnn, adOpenKeyset, adLockOptimistic
If Not reslut.EOF Then
   For i = 1 To reslut.RecordCount
       Combo2.AddItem (reslut.Fields("产品名称"))
       reslut.MoveNext
   Next i
End If
reslut.Close
MSF1.FixedCols = 0
MSF1.ColAlignment(0) = 4
MSF1.Cols = 5
MSF1.Rows = 1
MSF1.Col = 0
MSF1.Row = 0
MSF1.Text = "产品编号"
MSF1.Col = 1
MSF1.Text = "产品名称"
MSF1.Col = 2
MSF1.Text = "面值(元)"
MSF1.Col = 3
MSF1.Text = "数量(张)"
MSF1.Col = 4
MSF1.Text = "码洋(元)"
MSF1.ColWidth(0) = 1500
MSF1.ColWidth(1) = 4000
MSF1.ColWidth(2) = 1200
MSF1.ColWidth(3) = 1200
MSF1.ColWidth(4) = 1800
End Sub

⌨️ 快捷键说明

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