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

📄 frmcontractman.frm

📁 一个小的企业销售管理系统,希望对大家有所帮助有所帮助
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmContractMan 
   BorderStyle     =   1  'Fixed Single
   Caption         =   " "
   ClientHeight    =   6720
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   7080
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6720
   ScaleWidth      =   7080
   StartUpPosition =   2  '屏幕中心
   Begin MSComCtl2.MonthView MonthView1 
      Height          =   2220
      Left            =   240
      TabIndex        =   20
      Top             =   240
      Width           =   4095
      _ExtentX        =   7223
      _ExtentY        =   3916
      _Version        =   393216
      ForeColor       =   -2147483630
      BackColor       =   -2147483633
      BorderStyle     =   1
      Appearance      =   1
      StartOfWeek     =   24903681
      CurrentDate     =   38690
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   -120
      Top             =   5640
      Visible         =   0   'False
      Width           =   1320
      _ExtentX        =   2328
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   2
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      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 MSDataListLib.DataList DataList1 
      Bindings        =   "FrmContractMan.frx":0000
      Height          =   2580
      Left            =   240
      TabIndex        =   19
      Top             =   2640
      Width           =   2175
      _ExtentX        =   3836
      _ExtentY        =   4551
      _Version        =   393216
      ListField       =   "ContractId"
   End
   Begin VB.CommandButton Cmd_Income 
      Caption         =   "合同收帐"
      Height          =   400
      Left            =   2835
      MouseIcon       =   "FrmContractMan.frx":0015
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   6120
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Cost 
      Caption         =   "合同费用"
      Height          =   400
      Left            =   1200
      MouseIcon       =   "FrmContractMan.frx":031F
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   6120
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Back 
      Cancel          =   -1  'True
      Caption         =   "返 回"
      Height          =   400
      Left            =   4455
      MouseIcon       =   "FrmContractMan.frx":0629
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   6120
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Status 
      Caption         =   "合同状态"
      Height          =   400
      Left            =   4455
      MouseIcon       =   "FrmContractMan.frx":0933
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   5520
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Add 
      Caption         =   "添加合同"
      Default         =   -1  'True
      Height          =   400
      Left            =   1215
      MouseIcon       =   "FrmContractMan.frx":0C3D
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   5520
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Modi 
      Caption         =   "修改合同"
      Height          =   400
      Left            =   2835
      MouseIcon       =   "FrmContractMan.frx":0F47
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   5520
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Caption         =   "合同信息"
      Height          =   2535
      Left            =   2640
      TabIndex        =   0
      Top             =   2640
      Width           =   4215
      Begin VB.Label lblLastDay 
         AutoSize        =   -1  'True
         Caption         =   "lblLastDay"
         Height          =   180
         Left            =   1440
         TabIndex        =   18
         Top             =   2160
         Width           =   900
      End
      Begin VB.Label lblSettleWay 
         AutoSize        =   -1  'True
         Caption         =   "lblSettleWay"
         Height          =   180
         Left            =   1440
         TabIndex        =   17
         Top             =   1800
         Width           =   1080
      End
      Begin VB.Label lblEmpName 
         AutoSize        =   -1  'True
         Caption         =   "lblEmpName"
         Height          =   180
         Left            =   1440
         TabIndex        =   16
         Top             =   1440
         Width           =   900
      End
      Begin VB.Label lblStatus 
         AutoSize        =   -1  'True
         Caption         =   "lblStatus"
         Height          =   180
         Left            =   1440
         TabIndex        =   15
         Top             =   1080
         Width           =   810
      End
      Begin VB.Label lblClient 
         AutoSize        =   -1  'True
         Caption         =   "lblClient"
         Height          =   180
         Left            =   1440
         TabIndex        =   14
         Top             =   720
         Width           =   810
      End
      Begin VB.Label lblSignDate 
         AutoSize        =   -1  'True
         Caption         =   "lblSignDate"
         Height          =   180
         Left            =   1440
         TabIndex        =   13
         Top             =   360
         Width           =   990
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "有效期限:"
         Height          =   180
         Left            =   240
         TabIndex        =   12
         Top             =   2160
         Width           =   900
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "结算方式:"
         Height          =   180
         Left            =   240
         TabIndex        =   11
         Top             =   1800
         Width           =   900
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "负责人:"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   1440
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "合同状态:"
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   1080
         Width           =   900
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "客户单位:"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   720
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "签定日期:"
         Height          =   180
         Left            =   240
         TabIndex        =   7
         Top             =   360
         Width           =   900
      End
   End
End
Attribute VB_Name = "FrmContractMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_Add_Click()
  MyContract.Init
  FrmContractEdit.Modify = False
  FrmContractEdit.DTDeliveryDate.Value = Now
  FrmContractEdit.DTValidation.Value = Now
  FrmContractEdit.ComboSettle.ListIndex = 0
  FrmContractEdit.DTSignDate.Value = Now
  FrmContractEdit.lblStatus = "签定合同"
  FrmContractEdit.lbl_Cost = 0
  FrmContractEdit.lbl_Income = 0
  FrmContractEdit.Show 1
   '刷新合同列表
  MonthView1_Click
End Sub

Private Sub Cmd_Back_Click()
  Unload Me
End Sub

Private Sub Cmd_Cost_Click()
  If DataList1.Text = "" Then
    MsgBox "请选择合同编号"
    Exit Sub
  End If
  
  FrmCostMan.Show 1
End Sub

Private Sub Cmd_Income_Click()
  If DataList1.Text = "" Then
    MsgBox "请选择合同编号"
    Exit Sub
  End If
  
  FrmIncomeMan.Show 1
End Sub

Private Sub Cmd_Modi_Click()
  If DataList1.Text = "" Then
    MsgBox "请选择合同编号"
    Exit Sub
  End If
  
  With FrmContractEdit
  .txtId.Enabled = False
  .txtId = MyContract.ContractId
  .lblStatus = lblStatus
  .txtClient = MyContract.Client
  .DTSignDate.Value = MyContract.SignDate
  .DTValidation.Value = MyContract.Validation
  .ComboSettle.ListIndex = MyContract.SettleWay - 1
  .txtEmpName = MyContract.EmpName
  .DTDeliveryDate.Value = MyContract.DeliveryDate
  .txtDeliveryWay = MyContract.DeliveryWay
  .lbl_Cost = MyCost.SumCost(MyContract.ContractId)
  .lbl_Income = MyIncome.SumIncome(MyContract.ContractId)
  .txtContents = MyContract.Contents
  .txtAdditional = MyContract.Additional
  .OriId = .txtId
  .Modify = True
  .Show 1
  End With
  
  MonthView1_Click
End Sub

Private Sub Cmd_Status_Click()
  Select Case MyContract.Status
    Case 1
      If MsgBox("是否将合同状态改变为 - 实施合同?", vbYesNo, "请确认") = vbYes Then
        Call MyContract.UpdateStatus(MyContract.ContractId, 2)
      End If
    Case 2
      If MsgBox("是否将合同状态改变为 - 完成合同?", vbYesNo, "请确认") = vbYes Then
        Call MyContract.UpdateStatus(MyContract.ContractId, 3)
      End If
    Case 3
      MsgBox "完成合同将无法改变状态"
    Case Else
      MsgBox "无效的合同状态"
  End Select
  
  DataList1_Click
End Sub

Private Sub DataList1_Click()
  With MyContract
  .GetInfo (DataList1.Text)
  '签定日期
  lblSignDate = .SignDate
  '客户单位
  lblClient = .Client
  '合同状态
  Select Case .Status
    Case 1
      lblStatus = "签定合同"
    Case 2
      lblStatus = "实施合同"
    Case 3
      lblStatus = "完成合同"
    Case Else
      lblStatus = ""
  End Select
  '负责人
  lblEmpName = .EmpName
  '结算方式
  Select Case .SettleWay
    Case 1
      lblSettleWay = "支票"
    Case 2
      lblSettleWay = "现金"
    Case 3
      lblSettleWay = "签单"
    Case 4
      lblSettleWay = "汇款"
    Case Else
      lblSettleWay = ""
  End Select
  '有效期限
  lblLastDay = .Validation
  End With
End Sub

Private Sub Form_Load()
  MonthView1.Value = Now
  MonthView1_Click
End Sub

Private Sub MonthView1_Click()
  Dim SelDate As String
  ' 获取选择的日期
  SelDate = Format(MonthView1.Value, "yyyy-mm-dd")
  Adodc1.ConnectionString = conn
  Adodc1.RecordSource = "SELECT ContractId FROM Contract WHERE SignDate='" _
                     + SelDate + "'"
  Adodc1.Refresh
  DataList1_Click
End Sub

⌨️ 快捷键说明

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