📄 form25.frm
字号:
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
Form26.Text1.Text = a1
Form26.Text2.Text = a2
Form26.Text3.Text = a3
Form26.Combo1.Text = a4
Form26.Combo2.Text = a5
Form26.Text6.Text = a6
Form26.Text7.Text = a7
Form26.Text8.Text = a8
Form26.Text9.Text = a9
Form26.Text10.Text = a10
Form26.Combo3.Text = a11
Form26.Combo4.Text = a12
Form26.Text13.Text = a13
Form26.Text14.Text = a14
Form26.Text15.Text = a15
Form26.Text16.Text = a16
Form26.Text17.Text = a17
Form26.Combo5.Text = a18
Form26.Combo6.Text = a19
Form26.Text20.Text = a20
Form26.Text21.Text = a21
Form26.Text22.Text = a22
Form26.Text23.Text = a23
Form26.Text24.Text = a24
Form26.Combo7.Text = a25
Form26.Combo8.Text = a26
Form26.Text27.Text = a27
Form26.Text28.Text = a28
Form26.Text29.Text = a29
Form26.Text30.Text = a30
Form26.Text31.Text = a31
Form26.Combo9.Text = a32
Form26.Combo10.Text = a33
Form26.Text34.Text = a34
Form26.Text35.Text = a35
Form26.Text36.Text = a36
Form26.Text37.Text = a37
Form26.Text38.Text = a38
Form26.Combo11.Text = a39
Form26.Combo12.Text = a40
Form26.Text41.Text = a41
Form26.Text42.Text = a42
Form26.Text43.Text = a43
Form26.Text44.Text = a44
Form26.Text45.Text = a45
Form26.Combo13.Text = a46
Form26.Combo14.Text = a47
Form26.Text48.Text = a48
Form26.Text49.Text = a49
Form26.Text50.Text = a50
Form26.Text51.Text = a51
Form26.Text52.Text = a52
Form26.Text53.Text = a53
Form26.Combo19.Text = a54
Form26.Text55.Text = a55
Form26.Text56.Text = a56
Form26.Text57.Text = a57
Form26.Combo20.Text = a58
Form26.Text59.Text = a59
Form26.Text60.Text = a60
Form26.Text61.Text = a61
Form26.Text62.Text = a62
Form26.Text63.Text = a63
Form26.Text64.Text = a64
Form26.Text65.Text = a65
Form26.Text66.Text = a66
Form26.Text67.Text = a67
Form26.Text68.Text = a68
Form26.Text69.Text = a69
Form26.Text70.Text = a70
Form26.Combo15.Text = a71
Form26.Combo16.Text = a72
Form26.Text73.Text = a73
Form26.Text74.Text = a74
Form26.Text75.Text = a75
Form26.Text76.Text = a76
Form26.Text77.Text = a77
Form26.Combo17.Text = a78
Form26.Combo18.Text = a79
Form26.Text80.Text = a80
Form26.Text81.Text = a81
Form26.Text82.Text = a82
Form26.Text83.Text = a83
Form26.Text84.Text = a84
Form26.Combo21.Text = a85
Form26.Text86.Text = a86
Form26.Text87.Text = a87
Form26.Text88.Text = a88
Form26.Text89.Text = a89
Form26.Combo22.Text = a90
Form26.Text91.Text = a91
Form26.Text92.Text = a92
Form26.Text93.Text = a93
Form26.Text94.Text = a94
Form26.Combo23.Text = a95
Form26.Text96.Text = a96
Form26.Text97.Text = a97
Form26.Text98.Text = a98
Form26.Text99.Text = a99
Form26.Combo24.Text = a100
Form26.Text101.Text = a101
Form26.Text102.Text = a102
Form26.Text103.Text = a103
Form26.Text104.Text = a104
Form26.Combo25.Text = a105
Form26.Text106.Text = a106
Form26.Text107.Text = a107
Form26.Text108.Text = a108
Form26.Text109.Text = a109
Form26.Combo26.Text = a110
Form26.Text111.Text = a111
Form26.Text112.Text = a112
Form26.Text113.Text = a113
Form26.Text114.Text = a114
Form26.Text18.Text = a115
Form26.Text4.Text = ""
Form26.Text19.Text = a117
Form26.Text5.Text = ""
Form26.Text25.Text = a119
Form26.Text11.Text = ""
Form26.Text26.Text = a121
Form26.Text12.Text = ""
Form26.Text33.Text = a123
Form26.Text32.Text = a124
Form26.Text40.Text = a125
Form26.Text39.Text = ""
Form26.Text46.Text = a127
Form26.Text47.Text = ""
Form26.Text115.Text = a129
Form26.Text58.Text = a130
Form26.Text54.Text = ""
End If
grs.MoveNext
Next
grs.Close
End If
Next
Dim msql, msql1, msql2, msql3, msql4, msql5, msql6 As String
Form26.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
Form26.ListView1.ListItems.Add , , grs("单位名称").Value
Form26.ListView1.ListItems.Item(i).SubItems(1) = grs("工程编号").Value
Form26.ListView1.ListItems.Item(i).SubItems(2) = grs("时间").Value
Form26.ListView1.ListItems.Item(i).SubItems(3) = grs("总计累计").Value
grs.MoveNext
Next
grs.Close
Form26.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
Form26.ListView2.ListItems.Add , , grs("sp_fromman_dept").Value
Form26.ListView2.ListItems.Item(i).SubItems(1) = grs("sp_fromman").Value
Form26.ListView2.ListItems.Item(i).SubItems(2) = grs("sp_opinion").Value
Form26.ListView2.ListItems.Item(i).SubItems(3) = grs("sp_posttime").Value
Form26.ListView2.ListItems.Item(i).SubItems(4) = grs("sp_xz").Value
grs.MoveNext
Next
grs.Close
If username = "李五夫" Then
Form26.Text25.Text = "李五夫"
If a120 = "" Then
Form26.Text11.Enabled = True
Else
Form26.Text11.Enabled = False
End If
End If
If username = "任剑锋" Then
Form26.Text46.Text = "任剑锋"
If a128 = "" Then
Form26.Text47.Enabled = True
Else
Form26.Text47.Enabled = False
End If
End If
If username = "衣鸿波" Then
Form26.Text19.Text = "衣鸿波"
If a124 = "" Then
Form26.Text32.Enabled = True
Else
Form26.Text32.Enabled = False
End If
If a118 = "" Then
Form26.Text5.Enabled = True
Else
Form26.Text5.Enabled = False
End If
End If
If username = "张琼" Then
Form26.Text18.Text = "张琼"
' If a124 = "" Then
Form26.Text32.Enabled = True
' Else
' form26.Text32.Enabled = False
' End If
If a116 = "" Then
Form26.Text4.Enabled = True
Else
Form26.Text4.Enabled = False
End If
End If
Form26.Show vbModal
Exit Sub
End If
Next
End Sub
Private Sub Timer1_Timer()
Dim i As Integer
i = i + 1
If i = 5 Then
Form25.ListView1.ListItems.Clear
For Each mytab In gcat.Tables
a = a + 1
lty11 = mytab.Name
lty12 = left(lty11, 2)
If lty12 <> "sy" And lty12 <> "dt" And lty12 <> "my" And lty12 <> "密码" And lty12 <> "流程" Then
grs.CursorLocation = adUseClient
grs.Open lty11, gconn, adOpenKeyset, adLockPessimistic
For n = 1 To grs.RecordCount
If username = "任剑锋" Then
If grs("depart").Value = "2" Then
b = b + 1
Form25.ListView1.ListItems.Add , , grs.Fields(0).Value
Form25.ListView1.ListItems.Item(b).SubItems(1) = grs.Fields(1).Value
Form25.ListView1.ListItems.Item(b).SubItems(2) = grs.Fields(2).Value
Form25.ListView1.ListItems.Item(b).SubItems(3) = grs.Fields(52).Value
Form25.ListView1.ListItems.Item(b).SubItems(4) = grs.Fields(128).Value
Form25.ListView1.ListItems.Item(b).SubItems(5) = grs.Fields(53).Value
Form25.ListView1.ListItems.Item(b).ForeColor = &H80FF& '酱色
For m = 1 To 5
Form25.ListView1.ListItems.Item(b).ListSubItems.Item(m).ForeColor = &H80FF& '酱色
Next
End If
End If
If username = "李五夫" Then
If grs("depart").Value = "3" Then
b = b + 1
Form25.ListView1.ListItems.Add , , grs.Fields(0).Value
Form25.ListView1.ListItems.Item(b).SubItems(1) = grs.Fields(1).Value
Form25.ListView1.ListItems.Item(b).SubItems(2) = grs.Fields(2).Value
Form25.ListView1.ListItems.Item(b).SubItems(3) = grs.Fields(52).Value
Form25.ListView1.ListItems.Item(b).SubItems(4) = grs.Fields(128).Value
Form25.ListView1.ListItems.Item(b).SubItems(5) = grs.Fields(53).Value
Form25.ListView1.ListItems.Item(b).ForeColor = &HFF0000 '蓝色
For m = 1 To 5
Form25.ListView1.ListItems.Item(b).ListSubItems.Item(m).ForeColor = &HFF0000 '蓝色
Next
End If
End If
If username = "衣鸿波" Then
If grs("depart").Value = "4" Then
b = b + 1
Form25.ListView1.ListItems.Add , , grs.Fields(0).Value
Form25.ListView1.ListItems.Item(b).SubItems(1) = grs.Fields(1).Value
Form25.ListView1.ListItems.Item(b).SubItems(2) = grs.Fields(2).Value
Form25.ListView1.ListItems.Item(b).SubItems(3) = grs.Fields(52).Value
Form25.ListView1.ListItems.Item(b).SubItems(4) = grs.Fields(128).Value
Form25.ListView1.ListItems.Item(b).SubItems(5) = grs.Fields(53).Value
Form25.ListView1.ListItems.Item(b).ForeColor = &HC0C000 '天蓝色
For m = 1 To 5
Form25.ListView1.ListItems.Item(b).ListSubItems.Item(m).ForeColor = &HC0C000 '天蓝色
Next
End If
End If
If username = "张琼" Then
If grs("depart").Value = "5" Then
b = b + 1
Form25.ListView1.ListItems.Add , , grs.Fields(0).Value
Form25.ListView1.ListItems.Item(b).SubItems(1) = grs.Fields(1).Value
Form25.ListView1.ListItems.Item(b).SubItems(2) = grs.Fields(2).Value
Form25.ListView1.ListItems.Item(b).SubItems(3) = grs.Fields(52).Value
Form25.ListView1.ListItems.Item(b).SubItems(4) = grs.Fields(128).Value
Form25.ListView1.ListItems.Item(b).SubItems(5) = grs.Fields(53).Value
Form25.ListView1.ListItems.Item(b).ForeColor = vbRed '红色
For m = 1 To 5
Form25.ListView1.ListItems.Item(b).ListSubItems.Item(m).ForeColor = vbRed '红色
Next
End If
End If
grs.MoveNext
Next
grs.Close
End If
Next
If b <> 0 Then
Form25.ListView1.ListItems(Form25.ListView1.ListItems.Count).Selected = True
Form25.ListView1.SelectedItem.EnsureVisible
Form25.ListView1.Refresh
End If
i = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -