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

📄 frm_saleman.frm

📁 Visual Basic + Oracle 9i数据库应用系统开发与实例(企业购销存管理系统)界面简洁,数据库完整,还不错~适合学生利用和使用!
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frm_SaleMan 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "商品销售管理"
   ClientHeight    =   7455
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   11790
   Icon            =   "Frm_SaleMan.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7455
   ScaleWidth      =   11790
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Add 
      Caption         =   "填写销售单"
      Height          =   400
      Left            =   2005
      MouseIcon       =   "Frm_SaleMan.frx":0CCA
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   6840
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Back 
      Cancel          =   -1  'True
      Caption         =   "返 回"
      Height          =   400
      Left            =   8485
      MouseIcon       =   "Frm_SaleMan.frx":0FD4
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   6840
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Apply 
      Caption         =   "申请出库"
      Height          =   400
      Left            =   6865
      MouseIcon       =   "Frm_SaleMan.frx":12DE
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   6840
      Width           =   1300
   End
   Begin VB.ComboBox ComboType 
      Height          =   300
      ItemData        =   "Frm_SaleMan.frx":15E8
      Left            =   1560
      List            =   "Frm_SaleMan.frx":15F5
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   240
      Width           =   1455
   End
   Begin VB.CommandButton Cmd_Del 
      Caption         =   "删除销售单"
      Height          =   400
      Left            =   5245
      MouseIcon       =   "Frm_SaleMan.frx":1611
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   6840
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Edit 
      Caption         =   "编辑销售单"
      Height          =   400
      Left            =   3625
      MouseIcon       =   "Frm_SaleMan.frx":191B
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   6840
      Width           =   1300
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Frm_SaleMan.frx":1C25
      Height          =   5895
      Left            =   0
      TabIndex        =   6
      Top             =   720
      Width           =   11775
      _ExtentX        =   20770
      _ExtentY        =   10398
      _Version        =   393216
      AllowUpdate     =   0   'False
      AllowArrows     =   0   'False
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   0
      Top             =   6960
      Visible         =   0   'False
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   2
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=OssSys"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "OssSys"
      OtherAttributes =   ""
      UserName        =   "OSSMAN"
      Password        =   "OSSMAN"
      RecordSource    =   "SELECT * FROM OSSMAN.Sales"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "销售单状态"
      Height          =   180
      Left            =   240
      TabIndex        =   7
      Top             =   300
      Width           =   900
   End
End
Attribute VB_Name = "Frm_SaleMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Flag As Integer

Private Sub Refresh_Sales()
  Dim TmpSource As String
  If Flag = 1 Then
    TmpSource = "SELECT s.SaleId As 销售单编号," _
            + " p.ProName As 商品名称, p.ProStyle As 商品型号," _
            + " s.ProPrice As 销售单价, s.ProNum As 销售数量," _
            + " s.ProAmount As 销售金额, c.ClientName As 销售商," _
            + " s.EmpName As 经办人, s.OptDate As 销售时间" _
            + " FROM Sales s, Product p, Client c" _
            + " WHERE s.ProId=p.ProId And s.ClientId=c.ClientId" _
            + " And s.SaleType='销售' And s.Stored=" _
            + Trim(ComboType.ListIndex + 1)
  Else
    TmpSource = "SELECT s.SaleId As 销售单编号," _
            + " p.ProName As 商品名称, p.ProStyle As 商品型号," _
            + " s.ProPrice As 退货单价, s.ProNum As 退货数量," _
            + " s.ProAmount As 退货金额, c.ClientName As 销售商," _
            + " s.EmpName As 经办人, s.OptDate As 销售时间" _
            + " FROM Sales s, Product p, Client c" _
            + " WHERE s.ProId=p.ProId And s.ClientId=c.ClientId" _
            + " And s.SaleType='销售退货' And s.Stored=" _
            + Trim(ComboType.ListIndex + 1)
  End If
  
  TmpSource = TmpSource + " ORDER BY s.SaleId DESC"
  Adodc1.RecordSource = TmpSource
  Adodc1.Refresh
End Sub

Private Sub Cmd_Add_Click()
  Frm_SaleEdit.Modify = False
  Frm_SaleEdit.OriCltType = 1
  Frm_SaleEdit.OriId = 0
  Frm_SaleEdit.lblStatus = "未处理"
  Frm_SaleEdit.lblEmpName = CurUser.EmpName
  Frm_SaleEdit.lblOptDate = Format(Now, "yyyy-mm-dd")
  If Flag = 1 Then
    Frm_SaleEdit.OriType = "销售"
  Else
    Frm_SaleEdit.OriType = "销售退货"
    Frm_SaleEdit.Caption = "编辑销售退货单"
  End If
  Frm_SaleEdit.Show 1
  Refresh_Sales
End Sub

Private Sub Cmd_Apply_Click()
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择销售单"
    Exit Sub
  End If
  If MsgBox("提出申请后将无法修改,是否申请?", vbYesNo, "请确认") = vbYes Then
    MySales.Stored = 2
    MySales.UpdateStored (Adodc1.Recordset.Fields(0))
  End If
  Refresh_Sales
End Sub

Private Sub Cmd_Back_Click()
  Unload Me
End Sub

Private Sub Cmd_Del_Click()
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择销售单"
    Exit Sub
  End If
  If MsgBox("是否删除当前行?", vbYesNo, "请确认") = vbYes Then
    MySales.Delete (Adodc1.Recordset.Fields(0))
  End If
  Refresh_Sales
End Sub

Private Sub Cmd_Edit_Click()
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择销售单"
    Exit Sub
  End If
  Frm_SaleEdit.Modify = True
  If Flag = 1 Then
    Frm_SaleEdit.OriType = "销售"
  Else
    Frm_SaleEdit.OriType = "销售退货"
    Frm_SaleEdit.Caption = "编辑销售退货单"
  End If
  Frm_SaleEdit.Show 1
  Refresh_Sales
End Sub

Private Sub ComboType_Click()
  Refresh_Sales
  If ComboType.ListIndex > 0 Then
    Cmd_Edit.Enabled = False
    Cmd_Del.Enabled = False
    Cmd_Apply.Enabled = False
  Else
    Cmd_Edit.Enabled = True
    Cmd_Del.Enabled = True
    Cmd_Apply.Enabled = True
  End If
End Sub

Private Sub Form_Load()
  If Flag = 2 Then
    Cmd_Add.Caption = "填写退货单"
    Cmd_Edit.Caption = "编辑退货单"
    Cmd_Del.Caption = "删除退货单"
    Cmd_Apply.Caption = "申请入库"
  End If
  
  ComboType.ListIndex = 0
  Refresh_Sales
End Sub

⌨️ 快捷键说明

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