📄 form27.frm
字号:
Else
a105 = grs.Fields(104)
End If
If grs.Fields(105) = 0 Then
a106 = ""
Else
a106 = grs.Fields(105)
End If
If grs.Fields(106) = 0 Then
a107 = ""
Else
a107 = grs.Fields(106)
End If
If grs.Fields(107) = 0 Then
a108 = ""
Else
a108 = grs.Fields(107)
End If
If grs.Fields(108) = 0 Then
a109 = ""
Else
a109 = grs.Fields(108)
End If
If grs.Fields(109) = 0 Then
a110 = ""
Else
a110 = grs.Fields(109)
End If
If grs.Fields(110) = 0 Then
a111 = ""
Else
a111 = grs.Fields(110)
End If
If grs.Fields(111) = 0 Then
a112 = ""
Else
a112 = grs.Fields(111)
End If
If grs.Fields(112) = 0 Then
a113 = ""
Else
a113 = grs.Fields(112)
End If
If grs.Fields(113) = 0 Then
a114 = ""
Else
a114 = grs.Fields(113)
End If
If grs.Fields(114) = 0 Then
a115 = ""
Else
a115 = grs.Fields(114)
End If
If grs.Fields(115) = 0 Then
a116 = ""
Else
a116 = grs.Fields(115)
End If
If grs.Fields(116) = 0 Then
a117 = ""
Else
a117 = grs.Fields(116)
End If
If grs.Fields(117) = 0 Then
a118 = ""
Else
a118 = grs.Fields(117)
End If
If grs.Fields(118) = 0 Then
a119 = ""
Else
a119 = grs.Fields(118)
End If
If grs.Fields(119) = 0 Then
a120 = ""
Else
a120 = grs.Fields(119)
End If
If grs.Fields(120) = 0 Then
a121 = ""
Else
a121 = grs.Fields(120)
End If
If grs.Fields(121) = 0 Then
a122 = ""
Else
a122 = grs.Fields(121)
End If
If grs.Fields(122) = 0 Then
a123 = ""
Else
a123 = grs.Fields(122)
End If
If grs.Fields(123) = 1 Then
a124 = ""
Else
a124 = grs.Fields(123)
End If
If grs.Fields(124) = 0 Then
a125 = ""
Else
a125 = grs.Fields(124)
End If
If grs.Fields(125) = 0 Then
a126 = ""
Else
a126 = grs.Fields(125)
End If
If grs.Fields(126) = 0 Then
a127 = ""
Else
a127 = grs.Fields(126)
End If
If grs.Fields(127) = 0 Then
a128 = ""
Else
a128 = grs.Fields(127)
End If
If grs.Fields(128) = 0 Then '共计为空,预收款也必为空
a129 = ""
Else
a129 = grs.Fields(128)
End If
If grs.Fields(129) = 0 Then
a130 = ""
Else
a130 = grs.Fields(129)
End If
If grs.Fields(130) = 0 Then
a131 = ""
Else
a131 = grs.Fields(130)
End If
Form28.Text1.Text = a1
Form28.Text2.Text = a2
Form28.Text3.Text = a3
Form28.Combo1.Text = a4
Form28.Combo2.Text = a5
Form28.Text6.Text = a6
Form28.Text7.Text = a7
Form28.Text8.Text = a8
Form28.Text9.Text = a9
Form28.Text10.Text = a10
Form28.Combo3.Text = a11
Form28.Combo4.Text = a12
Form28.Text13.Text = a13
Form28.Text14.Text = a14
Form28.Text15.Text = a15
Form28.Text16.Text = a16
Form28.Text17.Text = a17
Form28.Combo5.Text = a18
Form28.Combo6.Text = a19
Form28.Text20.Text = a20
Form28.Text21.Text = a21
Form28.Text22.Text = a22
Form28.Text23.Text = a23
Form28.Text24.Text = a24
Form28.Combo7.Text = a25
Form28.Combo8.Text = a26
Form28.Text27.Text = a27
Form28.Text28.Text = a28
Form28.Text29.Text = a29
Form28.Text30.Text = a30
Form28.Text31.Text = a31
Form28.Combo9.Text = a32
Form28.Combo10.Text = a33
Form28.Text34.Text = a34
Form28.Text35.Text = a35
Form28.Text36.Text = a36
Form28.Text37.Text = a37
Form28.Text38.Text = a38
Form28.Combo11.Text = a39
Form28.Combo12.Text = a40
Form28.Text41.Text = a41
Form28.Text42.Text = a42
Form28.Text43.Text = a43
Form28.Text44.Text = a44
Form28.Text45.Text = a45
Form28.Combo13.Text = a46
Form28.Combo14.Text = a47
Form28.Text48.Text = a48
Form28.Text49.Text = a49
Form28.Text50.Text = a50
Form28.Text51.Text = a51
Form28.Text52.Text = a52
Form28.Text53.Text = a53
Form28.Combo19.Text = a54
Form28.Text55.Text = a55
Form28.Text56.Text = a56
Form28.Text57.Text = a57
Form28.Combo20.Text = a58
Form28.Text59.Text = a59
Form28.Text60.Text = a60
Form28.Text61.Text = a61
Form28.Text62.Text = a62
Form28.Text63.Text = a63
Form28.Text64.Text = a64
Form28.Text65.Text = a65
Form28.Text66.Text = a66
Form28.Text67.Text = a67
Form28.Text68.Text = a68
Form28.Text69.Text = a69
Form28.Text70.Text = a70
Form28.Combo15.Text = a71
Form28.Combo16.Text = a72
Form28.Text73.Text = a73
Form28.Text74.Text = a74
Form28.Text75.Text = a75
Form28.Text76.Text = a76
Form28.Text77.Text = a77
Form28.Combo17.Text = a78
Form28.Combo18.Text = a79
Form28.Text80.Text = a80
Form28.Text81.Text = a81
Form28.Text82.Text = a82
Form28.Text83.Text = a83
Form28.Text84.Text = a84
Form28.Combo21.Text = a85
Form28.Text86.Text = a86
Form28.Text87.Text = a87
Form28.Text88.Text = a88
Form28.Text89.Text = a89
Form28.Combo22.Text = a90
Form28.Text91.Text = a91
Form28.Text92.Text = a92
Form28.Text93.Text = a93
Form28.Text94.Text = a94
Form28.Combo23.Text = a95
Form28.Text96.Text = a96
Form28.Text97.Text = a97
Form28.Text98.Text = a98
Form28.Text99.Text = a99
Form28.Combo24.Text = a100
Form28.Text101.Text = a101
Form28.Text102.Text = a102
Form28.Text103.Text = a103
Form28.Text104.Text = a104
Form28.Combo25.Text = a105
Form28.Text106.Text = a106
Form28.Text107.Text = a107
Form28.Text108.Text = a108
Form28.Text109.Text = a109
Form28.Combo26.Text = a110
Form28.Text111.Text = a111
Form28.Text112.Text = a112
Form28.Text113.Text = a113
Form28.Text114.Text = a114
Form28.Text18.Text = a115
Form28.Text4.Text = a116
Form28.Text19.Text = a117
Form28.Text5.Text = a118
Form28.Text25.Text = a119
Form28.Text11.Text = a120
Form28.Text26.Text = a121
Form28.Text12.Text = a70
Form28.Text33.Text = a123
Form28.Text32.Text = a124
Form28.Text40.Text = a125
Form28.Text39.Text = a126
Form28.Text46.Text = a127
Form28.Text47.Text = a128
Form28.Text115.Text = a129
Form28.Text58.Text = a130
Form28.Text54.Text = a131
End If
grs.MoveNext
Next
grs.Close
Dim msql, msql1, msql2, msql3, msql4, msql5, msql6 As String
Form28.ListView1.ListItems.Clear
msql6 = "select 单位名称,工程编号, 时间,总计累计 from 定线 where 院长签字<>'0' and 实际回款金额='0' and 单位名称 like '%" & left(a1, 2) & "%' UNION ALL select 单位名称,工程编号, 时间,总计累计 from 竣工 where 院长签字<>'0' and 实际回款金额='0' and 单位名称 like '%" & left(a1, 2) & "%' UNION ALL select 单位名称,工程编号, 时间,总计累计 from 地籍 where 院长签字<>'0' and 实际回款金额='0' and 单位名称 like '%" & left(a1, 2) & "%' UNION ALL select 单位名称,工程编号, 时间,总计累计 from 松北 where 院长签字<>'0' and 实际回款金额='0' and 单位名称 like '%" & left(a1, 2) & "%' UNION ALL select 单位名称,工程编号, 时间,总计累计 from 计划内 where 院长签字<>'0' and 实际回款金额='0' and 单位名称 like '%" & left(a1, 2) & "%'"
msql = msql6 & "UNION ALL select 单位名称,工程编号, 时间,总计累计 from 零星验字工程 where 院长签字<>'0' and 实际回款金额='0' and 单位名称 like '%" & left(a1, 2) & "%' UNION ALL select 单位名称,工程编号, 时间,总计累计 from 建筑物位置测定 where 院长签字<>'0' and 实际回款金额='0' and 单位名称 like '%" & left(a1, 2) & "%'"
grs.CursorLocation = adUseClient
grs.Open msql, gconn, 1, 1
For i = 1 To grs.RecordCount
Form28.ListView1.ListItems.Add , , grs("单位名称").Value
Form28.ListView1.ListItems.Item(i).SubItems(1) = grs("工程编号").Value
Form28.ListView1.ListItems.Item(i).SubItems(2) = grs("时间").Value
Form28.ListView1.ListItems.Item(i).SubItems(3) = grs("总计累计").Value
grs.MoveNext
Next
grs.Close
Form28.ListView2.ListItems.Clear
msql1 = "select sp_rws_num, sp_fromman_dept,sp_fromman, sp_opinion,sp_posttime ,sp_xz from 流程记录 where sp_rws_num='" & splc & "'order by sp_posttime DESC"
grs.CursorLocation = adUseClient
grs.Open msql1, gconn, 1, 1
For i = 1 To grs.RecordCount
Form28.ListView2.ListItems.Add , , grs("sp_fromman_dept").Value
Form28.ListView2.ListItems.Item(i).SubItems(1) = grs("sp_fromman").Value
Form28.ListView2.ListItems.Item(i).SubItems(2) = grs("sp_opinion").Value
Form28.ListView2.ListItems.Item(i).SubItems(3) = grs("sp_posttime").Value
Form28.ListView2.ListItems.Item(i).SubItems(4) = grs("sp_xz").Value
grs.MoveNext
Next
grs.Close
If username = "李五夫" Then
Form28.Text25.Text = "李五夫"
If a120 = "" Then
Form28.Text11.Enabled = True
Else
Form28.Text11.Enabled = False
End If
End If
If username = "任剑锋" Then
Form28.Text46.Text = "任剑锋"
If a128 = "" Then
Form28.Text47.Enabled = True
Else
Form28.Text47.Enabled = False
End If
End If
If username = "衣鸿波" Then
Form28.Text19.Text = "衣鸿波"
If a124 = "" Then
Form28.Text32.Enabled = True
Else
Form28.Text32.Enabled = False
End If
If a118 = "" Then
Form28.Text5.Enabled = True
Else
Form28.Text5.Enabled = False
End If
End If
If username = "张琼" Then
Form28.Text18.Text = "张琼"
' If a124 = "" Then
Form28.Text32.Enabled = True
' Else
' Form28.Text32.Enabled = False
' End If
If a116 = "" Then
Form28.Text4.Enabled = True
Else
Form28.Text4.Enabled = False
End If
End If
Form28.Show vbModal
Exit Sub
End If
Next
End Sub
Private Sub Timer1_Timer()
Dim i As Integer
i = i + 1
If i = 5 Then
Form27.ListView1.ListItems.Clear
grs.CursorLocation = adUseClient
grs.Open "select * from " & biaoming & " order by 工程编号", gconn, adOpenKeyset, adLockPessimistic
For i = 1 To grs.RecordCount
k = k + 1
Form27.ListView1.ListItems.Add , , grs.Fields(0).Value
Form27.ListView1.ListItems.Item(i).SubItems(1) = grs.Fields(1).Value
Form27.ListView1.ListItems.Item(i).SubItems(2) = grs.Fields(2).Value
Form27.ListView1.ListItems.Item(i).SubItems(3) = grs.Fields(52).Value
Form27.ListView1.ListItems.Item(i).SubItems(4) = grs.Fields(128).Value
Form27.ListView1.ListItems.Item(i).SubItems(5) = grs.Fields(53).Value
If grs.Fields(120).Value = "0" Then
Form27.ListView1.ListItems.Item(k).ForeColor = &H0& '黑色
For m = 1 To 5
Form27.ListView1.ListItems.Item(k).ListSubItems.Item(m).ForeColor = &H0&
Next
End If
If grs.Fields(126).Value = "0" And grs.Fields(120).Value <> "0" Then
Form27.ListView1.ListItems.Item(k).ForeColor = &H80FF& '酱色
For m = 1 To 5
Form27.ListView1.ListItems.Item(k).ListSubItems.Item(m).ForeColor = &H80FF&
Next
End If
If grs.Fields(118).Value = "0" And grs.Fields(126).Value <> "0" And grs.Fields(120).Value <> "0" Then
Form27.ListView1.ListItems.Item(k).ForeColor = &HFF0000 '蓝色
For m = 1 To 5
Form27.ListView1.ListItems.Item(k).ListSubItems.Item(m).ForeColor = &HFF0000
Next
End If
If grs.Fields(116).Value = "0" And grs.Fields(118).Value <> "0" And grs.Fields(126).Value <> "0" And grs.Fields(120).Value <> "0" Then
Form27.ListView1.ListItems.Item(k).ForeColor = &HC0C000 '天蓝色
For m = 1 To 5
Form27.ListView1.ListItems.Item(k).ListSubItems.Item(m).ForeColor = &HC0C000
Next
End If
If grs.Fields(114).Value = "0" And grs.Fields(116).Value <> "0" And grs.Fields(118).Value <> "0" And grs.Fields(126).Value <> "0" And grs.Fields(120).Value <> "0" Then
Form27.ListView1.ListItems.Item(k).ForeColor = vbRed '红色
For m = 1 To 5
Form27.ListView1.ListItems.Item(k).ListSubItems.Item(m).ForeColor = vbRed
Next
End If
If grs.Fields(122).Value = "0" And grs.Fields(114).Value <> "0" And grs.Fields(116).Value <> "0" And grs.Fields(118).Value <> "0" And grs.Fields(126).Value <> "0" And grs.Fields(120).Value <> "0" Then
Form27.ListView1.ListItems.Item(k).ForeColor = &HFF00FF '紫色
For m = 1 To 5
Form27.ListView1.ListItems.Item(k).ListSubItems.Item(m).ForeColor = &HFF00FF
Next
End If
If grs.Fields(122).Value <> "0" And grs.Fields(114).Value <> "0" And grs.Fields(116).Value <> "0" And grs.Fields(118).Value <> "0" And grs.Fields(126).Value <> "0" And grs.Fields(120).Value <> "0" Then
Form27.ListView1.ListItems.Item(k).ForeColor = &H8000& '黑绿色
For m = 1 To 5
Form27.ListView1.ListItems.Item(k).ListSubItems.Item(m).ForeColor = &H8000&
Next
End If
grs.MoveNext
Next
grs.Close
If Form27.ListView1.ListItems.Count <> "0" Then
Form27.ListView1.ListItems(Form27.ListView1.ListItems.Count).Selected = True
Form27.ListView1.SelectedItem.EnsureVisible
Form27.ListView1.Refresh
End If
i = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -