📄 frmmain.frm
字号:
.Caption = "待材料信息报表"
Set .DataSource = rs
.Sections("Section1").Controls("text1").DataField = "受理修序号"
.Sections("Section1").Controls("text2").DataField = "机型"
.Sections("Section1").Controls("text3").DataField = "颜色"
.Sections("Section1").Controls("text4").DataField = "IMEI"
.Sections("Section1").Controls("text5").DataField = "此机属于"
.Sections("Section1").Controls("text6").DataField = "维修方法"
.Sections("Section1").Controls("text7").DataField = "故障描述"
.Sections("Section1").Controls("text8").DataField = "接收人员"
.Sections("Section1").Controls("text9").DataField = "收机时间"
.Sections("Section2").Controls("label15").Caption = "待修手机报表"
.Show
End With
End Sub
Private Sub abuou_Click()
frmAbout.Show
End Sub
Private Sub bbb_Click()
Call zdf
rs.Open "select * from info where 维修方法='待材料'"
With DataReport1
.Caption = "待材料信息报表"
Set .DataSource = rs
.Sections("Section1").Controls("text1").DataField = "受理修序号"
.Sections("Section1").Controls("text2").DataField = "机型"
.Sections("Section1").Controls("text3").DataField = "颜色"
.Sections("Section1").Controls("text4").DataField = "IMEI"
.Sections("Section1").Controls("text5").DataField = "此机属于"
.Sections("Section1").Controls("text6").DataField = "维修方法"
.Sections("Section1").Controls("text7").DataField = "故障描述"
.Sections("Section1").Controls("text8").DataField = "接收人员"
.Sections("Section1").Controls("text9").DataField = "收机时间"
.Sections("Section2").Controls("label15").Caption = "待材料手机报表"
.Show
End With
End Sub
Private Sub beifen_Click()
frmbeifen.Show
End Sub
Private Sub chu_Click()
frmchu.Show
End Sub
Private Sub daoru_Click()
frmdaoru.Show
End Sub
Private Sub ddd_Click()
frmdaixiu.Show
End Sub
Private Sub dfsd_Click()
frmdaiciliao.Show
End Sub
Private Sub exit_Click()
End
End Sub
Private Sub exitxx_Click()
End
End Sub
Private Sub fsdfsd_Click()
Call zdf
rs.Open "select * from info where 是否取走='是'"
With DataReport2
.Caption = "取走手机一览表"
Set .DataSource = rs
.Sections("Section1").Controls("text1").DataField = "受理修序号"
.Sections("Section1").Controls("text2").DataField = "机型"
.Sections("Section1").Controls("text3").DataField = "颜色"
.Sections("Section1").Controls("text4").DataField = "IMEI"
.Sections("Section1").Controls("text5").DataField = "此机属于"
.Sections("Section1").Controls("text6").DataField = "维修方法"
.Sections("Section1").Controls("text7").DataField = "故障描述"
.Sections("Section1").Controls("text8").DataField = "是否取走"
.Sections("Section1").Controls("text9").DataField = "取机时间"
.Sections("Section2").Controls("label15").Caption = "取走手机报表"
.Show
End With
End Sub
Private Sub helpmeu_Click()
End Sub
Private Sub huan_Click()
Call zdf
rs.Open "select * from info where 维修方法='换机'"
With DataReport1
.Caption = "待材料信息报表"
Set .DataSource = rs
.Sections("Section1").Controls("text1").DataField = "受理修序号"
.Sections("Section1").Controls("text2").DataField = "机型"
.Sections("Section1").Controls("text3").DataField = "颜色"
.Sections("Section1").Controls("text4").DataField = "IMEI"
.Sections("Section1").Controls("text5").DataField = "此机属于"
.Sections("Section1").Controls("text6").DataField = "维修方法"
.Sections("Section1").Controls("text7").DataField = "故障描述"
.Sections("Section1").Controls("text8").DataField = "接收人员"
.Sections("Section1").Controls("text9").DataField = "收机时间"
.Sections("Section2").Controls("label15").Caption = "换机报表"
.Show
End With
End Sub
Private Sub huandfd_Click()
frmhuanji.Show
End Sub
Private Sub infooo_Click()
frminfo.Show
End Sub
Private Sub MDIForm_Load()
Call zdf
rs.Open "select * from ming", conn, adOpenStatic, adLockOptimistic
Me.Caption = rs.Fields(0).Value
StatusBar1.Panels(3).Text = "今天是:" & Date
StatusBar1.Panels(1).Text = "当前操作员:" & frmlogin.Text1.Text
If admin = 0 Then
frmmain.chu.Enabled = False
frmmain.usr.Enabled = False
frmmain.Toolbar1.Buttons(1).Visible = False
StatusBar1.Panels(2).Text = "用户类型:普通用户"
End If
If admin = 1 Then
frmmain.chu.Enabled = True
frmmain.usr.Enabled = True
frmmain.Toolbar1.Buttons(1).Visible = True
StatusBar1.Panels(2).Text = "用户类型:管理员"
End If
End Sub
Private Sub quji_Click()
frmquji.Show
End Sub
Private Sub quzou_Click()
frmquzou.Show
End Sub
Private Sub Timer1_Timer()
StatusBar1.Panels(4).Text = "当前时间:" & Format(Now, "hh:mm:ss")
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
n = Button.Index
Select Case n
Case 1
frmuser.Show
Case 2
frmpwd.Show
Case 3
frminfo.Show
Case 5
frmbeifen.Show
Case 6
frmming.Show
Case 7
End
End Select
End Sub
Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
Select Case ButtonMenu.Index
Case 1
frmdaixiu.Show
Case 2
frmdaiciliao.Show
Case 3
frmhuanji.Show
Case 4
frmxiuhao.Show
Case 5
frmquzou.Show
End Select
End Sub
Private Sub update_Click()
frmpwd.Show
End Sub
Private Sub usr_Click()
frmuser.Show
End Sub
Private Sub xinxi_Click()
On Error Resume Next
Dim i As Integer
Call zdf
rs.Open "select * from info "
i = rs.RecordCount
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks().Add
Set xlSheet = xlBook.Worksheets("sheet1")
xlSheet.Cells(1, 4) = "东信售后服务所有信息"
xlSheet.Cells(2, 1) = "受理修序号"
xlSheet.Cells(2, 2) = "机型"
xlSheet.Cells(2, 3) = "颜色"
xlSheet.Cells(2, 4) = "IMEI"
xlSheet.Cells(2, 5) = "此机属于"
xlSheet.Cells(2, 6) = "维修方法"
xlSheet.Cells(2, 7) = "故障描述"
xlSheet.Cells(2, 8) = "接收人员"
xlSheet.Cells(2, 9) = "收机时间"
Do While Not rs.EOF
For i = 3 To i + 3
xlSheet.Cells(i, 1) = rs.Fields(1).Value
xlSheet.Cells(i, 2) = rs.Fields(2).Value
xlSheet.Cells(i, 3) = rs.Fields(3).Value
xlSheet.Cells(i, 4) = rs.Fields(4).Value
xlSheet.Cells(i, 5) = rs.Fields(5).Value
xlSheet.Cells(i, 6) = rs.Fields(6).Value
xlSheet.Cells(i, 7) = rs.Fields(7).Value
xlSheet.Cells(i, 8) = rs.Fields(8).Value
xlSheet.Cells(i, 9) = rs.Fields(9).Value
rs.MoveNext
Next i
Loop
xlApp.Visible = True
xlApp.Application.Visible = True
Set xlApp = Nothing
Set xlBook = Nothing
Set xlSheet = Nothing
End Sub
Private Sub xinxiss_Click()
frmupdate.Show
End Sub
Private Sub xiuhao_Click()
On Error Resume Next
Call zdf
rs.Open "select * from info where 维修方法='修好'"
With DataReport1
.Caption = "待材料信息报表"
Set .DataSource = rs
.Sections("Section1").Controls("text1").DataField = "受理修序号"
.Sections("Section1").Controls("text2").DataField = "机型"
.Sections("Section1").Controls("text3").DataField = "颜色"
.Sections("Section1").Controls("text4").DataField = "IMEI"
.Sections("Section1").Controls("text5").DataField = "此机属于"
.Sections("Section1").Controls("text6").DataField = "维修方法"
.Sections("Section1").Controls("text7").DataField = "故障描述"
.Sections("Section1").Controls("text8").DataField = "接收人员"
.Sections("Section1").Controls("text9").DataField = "收机时间"
.Sections("Section2").Controls("label15").Caption = "修好手机报表"
.Show
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -