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

📄 frmdrjc.frm

📁 车辆管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         ColumnCount     =   10
         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
         BeginProperty Column02 
            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 Column03 
            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 Column04 
            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 Column05 
            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 Column06 
            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 Column07 
            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 Column08 
            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 Column09 
            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 
               ColumnWidth     =   884.976
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   659.906
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   854.929
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   854.929
            EndProperty
            BeginProperty Column04 
               ColumnWidth     =   854.929
            EndProperty
            BeginProperty Column05 
               ColumnWidth     =   794.835
            EndProperty
            BeginProperty Column06 
               ColumnWidth     =   824.882
            EndProperty
            BeginProperty Column07 
               ColumnWidth     =   794.835
            EndProperty
            BeginProperty Column08 
               ColumnWidth     =   854.929
            EndProperty
            BeginProperty Column09 
               ColumnWidth     =   840.189
            EndProperty
         EndProperty
      End
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00E0E0E0&
      Height          =   270
      Left            =   1335
      TabIndex        =   0
      Top             =   120
      Width           =   1350
   End
   Begin VB.Label Label10 
      Caption         =   "本月奖金:"
      Height          =   225
      Left            =   4440
      TabIndex        =   22
      Top             =   810
      Width           =   945
   End
   Begin VB.Label Label9 
      Caption         =   "驾驶员姓名:"
      Height          =   210
      Left            =   120
      TabIndex        =   20
      Top             =   480
      Width           =   1230
   End
   Begin VB.Label Label8 
      Caption         =   "日期:"
      Height          =   165
      Left            =   120
      TabIndex        =   17
      Top             =   810
      Width           =   765
   End
   Begin VB.Label Label7 
      Caption         =   "司机驾驶车号:"
      Height          =   210
      Left            =   120
      TabIndex        =   7
      Top             =   165
      Width           =   1425
   End
   Begin VB.Label Label6 
      Caption         =   "运营次数:"
      Height          =   225
      Left            =   2775
      TabIndex        =   6
      Top             =   465
      Width           =   945
   End
   Begin VB.Label Label5 
      Caption         =   "违章次数:"
      Height          =   225
      Left            =   4440
      TabIndex        =   5
      Top             =   480
      Width           =   945
   End
   Begin VB.Label Label4 
      Caption         =   "事故次数:"
      Height          =   225
      Left            =   4440
      TabIndex        =   4
      Top             =   150
      Width           =   945
   End
   Begin VB.Label Label3 
      Caption         =   "本月得分:"
      Height          =   225
      Left            =   2775
      TabIndex        =   3
      Top             =   810
      Width           =   945
   End
   Begin VB.Label Label2 
      Caption         =   "维修费用:"
      Height          =   225
      Left            =   6030
      TabIndex        =   2
      Top             =   165
      Width           =   945
   End
   Begin VB.Label Label1 
      Caption         =   "运营收入:"
      Height          =   225
      Left            =   2775
      TabIndex        =   1
      Top             =   165
      Width           =   945
   End
End
Attribute VB_Name = "frmDrJC"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdSave_Click()
    If Text1.Text = "" Then
       MsgBox "车牌号码,不能为空!", , "系统提示"
       Text1.SetFocus
       Exit Sub
    End If
    Dim strdate As String
    Dim strNo As String
    strdate = Mid(Date, 1, 7)
    AdoJF.RecordSource = "select * from 奖罚表 where 车牌号码='" + Text1.Text + "'"
    AdoJF.Refresh
    For i = 0 To AdoJF.Recordset.RecordCount - 1
        On Error Resume Next
        strNo = Mid(AdoJF.Recordset.Fields(7), 1, 7)
        AdoJF.Recordset.MoveNext
        strNo = Mid(AdoJF.Recordset.Fields(7), 1, 7)
        If strdate = strNo Then
           MsgBox "车牌号码为:" + Text1.Text + "本月已经统计过运营情况了", , "系统提示"
           Text1.Text = ""
           Text1.SetFocus
           Exit Sub
        End If
    Next i
  On Error Resume Next
  AdoJF.Recordset.AddNew
  AdoJF.Recordset.Fields("车牌号码") = Text1.Text
  AdoJF.Recordset.Fields("姓名") = TName.Text
  AdoJF.Recordset.Fields("运营收入") = Text2.Text
  AdoJF.Recordset.Fields("运营次数") = Text4.Text
  AdoJF.Recordset.Fields("维修费用") = Text3.Text
  AdoJF.Recordset.Fields("违章次数") = Text6.Text
  AdoJF.Recordset.Fields("事故次数") = Text5.Text
  AdoJF.Recordset.Fields("日期") = Text8.Text
  AdoJF.Recordset.Fields("每月得分") = Text7.Text
  AdoJF.Recordset.Fields("每月奖金") = Text9.Text
  AdoJF.Recordset.Update
  Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
  Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
  TName.Text = "": Text9.Text = ""
End Sub
Private Sub Cmdprint_Click()
  DataReport1.Show
End Sub
Private Sub Form_Load()
  frmDrJC.Width = 7875: frmDrJC.Height = 4080
  Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
  Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
  TName.Text = "": Text9.Text = ""
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     TName.SetFocus
  End If
End Sub

Private Sub Text1_LostFocus()
   Dim rss1 As New ADODB.Recordset
     Set rss1 = adoCon.Execute("select * from 车辆异动表 where 车牌号码='" & Text1.Text & "'")
     If rss1.EOF Then
     Else
        MsgBox "该车为异动车辆!", , "系统提示"
        Text1.Text = ""
        Text1.SetFocus
        Exit Sub
     End If
    rss1.Close
    Dim rss2 As New ADODB.Recordset
     Set rss2 = adoCon.Execute("select * from 车辆报废表 where 车牌号码='" & Text1.Text & "'")
     If rss2.EOF Then
     Else
        MsgBox "该车已经报废!", , "系统提示"
        Text1.Text = ""
        Text1.SetFocus
        Exit Sub
     End If
    rss2.Close
       
  If Text1.Text = "" Then Exit Sub
  Text8.Text = Date
  On Error Resume Next
  AdoYY.RecordSource = "select * from 车辆运营表 where 车牌号码='" & Text1.Text & "'"
  AdoYY.Refresh
    
  If AdoYY.Recordset.RecordCount > 0 Then
    Else
     MsgBox "此车没有参加运营!", , "系统提示"
     Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
     Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
     TName.Text = "": Text9.Text = ""
     Exit Sub
     AdoYY.Recordset.Close
  End If
  AdoYY.RecordSource = "select sum(运营收入) as 收入,count(运营收入) as 次数 from 车辆运营表 where 车牌号码='" & Text1.Text & "'"
  AdoYY.Refresh
  Text2.Text = AdoYY.Recordset.Fields(0).Value
  Text4.Text = AdoYY.Recordset.Fields(1).Value
  AdoWX.RecordSource = "select sum(共计费用) as 费用 from 车辆维修表 where 车牌号码='" & Text1.Text & "'"
  AdoWX.Refresh
  Text3.Text = AdoWX.Recordset.Fields(0)
  AdoSG.RecordSource = "select count(车牌号码) as 事故次数 from 车辆事故表 where 车牌号码='" & Text1.Text & "'"
  AdoSG.Refresh
  Text5.Text = AdoSG.Recordset.Fields(0)
  AdoWZ.RecordSource = "select count(车牌号码) as 违章次数 from 车辆违章表 where 车牌号码='" & Text1.Text & "'"
  AdoWZ.Refresh
  Text6.Text = AdoWZ.Recordset.Fields(0)
  If Val(tex4.Text) > 30 Then
     Text7.Text = 10 - (Text5.Text * 10 + Text6.Text * 2 + (30 - Text4.Text) * 0.3)
  Else  '>=30次
     Text7.Text = 10 - (Text5.Text * 10 + Text6.Text * 2)
  End If
  If Val(Text7.Text) > 0 Then
      Text9.Text = ((Val(Text2.Text) * 0.2 - Val(Text3.Text) * 0.4) * Val(Text7.Text) * 0.1)
  Else
     Text9.Text = 0
  End If
End Sub

Private Sub TName_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     CmdSave.SetFocus
  End If
End Sub

⌨️ 快捷键说明

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