-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcount.asp
349 lines (344 loc) · 14.2 KB
/
count.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/mysession.asp"-->
<link href="css.css" rel="stylesheet" type="text/css">
<link href="images/tab.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%if session("rank")<>"" then %>
<body>
<table width="100%" border="0" cellpadding="1" cellspacing="0" >
<tr>
<td height="25" background="images/default_19.gif" style="border-left:solid 1px #aad5e6;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30"><div align="center"><img src="images/table.gif" width="16" height="14"></div></td>
<td width="15"><img src="images/jt.gif" width="5" height="6"></td>
<td style="height:1;font-size:9pt; color:#ffffff;filter:glow(color=#215970,strength=1);"><b>系统统计</b></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" bgcolor="#6298E1">
<tbody>
<% if Instr(session("juese"),"|102,")<>0 then %>
<tr>
<%
set rszc=server.CreateObject("adodb.recordset")
sqlzc="select * from sbxx"
rszc.Open sqlzc, conn, 1, 1
zccount=rszc.recordcount
rszc.Close
%>
<td width="5%" align="center" class="classtd"><p>资产</p>
<p><%=zccount%>台</p></td>
<td width="95%" class="classtd"><table border="0" cellspacing="1" bgcolor="#FFFFFF" align="center" width="100%">
<%
set rszt=server.CreateObject("adodb.recordset")
sqlzt="select * from admin_state"
rszt.Open sqlzt, conn, 1, 1
%>
<tbody>
<tr>
<td rowspan="2" align="center" valign="middle" class="classtd" width="5%">状态</td>
<%
do while not rszt.eof
set rszf=server.CreateObject("adodb.recordset")
sqlzcf="select * from sbxx where zt='" & rszt("ztm") &"'"
rszf.Open sqlzcf, conn, 1, 1
zcf=rszf.recordcount
%>
<td height="20" width="<%=round(zcf/zccount*95,2)%>%" nowrap="nowrap" title="<%=rszt("ztm")%>【<%=zcf%>台,<%=round(zcf/zccount*100,2)%>%】" bgcolor="<%=rszt("ztys")%>" align="center"><%if round(zcf/zccount*95,2)>=20 then Response.Write rszt("ztm") & "【" & zcf & "台," & round(zcf/zccount*100,2) & "%】" %></td>
<% rszf.Close
rszt.movenext
loop
%>
</tr>
<tr>
<td class="classtd" height="20" colspan="<%=rszt.recordcount%>">图例:
<%
rszt.movefirst
do while not rszt.eof
sqlzcf="select * from sbxx where zt='" & rszt("ztm") &"'"
rszf.Open sqlzcf, conn, 1, 1
zcf=rszf.recordcount
%>
<font color="<%=rszt("ztys")%>"><%=rszt("ztm")%></font>
<% rszf.Close
rszt.movenext
loop
%>
</td>
</tr>
</tbody>
<%rszt.Close
set rszt=nothing
%>
</table>
<br>
<table border="0" cellspacing="1" bgcolor="#FFFFFF" align="center" width="100%">
<%
set rszt=server.CreateObject("adodb.recordset")
sqlzt="select * from admin_bsort order by s_paixu asc"
rszt.Open sqlzt, conn, 1, 1
%>
<tbody>
<tr>
<td rowspan="2" align="center" valign="middle" class="classtd" width="5%">分类</td>
<%
set rszc=server.CreateObject("adodb.recordset")
sqlzc="select * from sbxx"
rszc.Open sqlzc, conn, 1, 1
zccount=rszc.recordcount
rszc.Close
do while not rszt.eof
set rszf=server.CreateObject("adodb.recordset")
sqlzcf="select * from sbxx where sbcs='" & rszt("s_name") &"'"
rszf.Open sqlzcf, conn, 1, 1
zcf=rszf.recordcount
%>
<td height="20" width="<%=round(zcf/zccount*95,2)%>%" nowrap="nowrap" title="<%=rszt("s_name")%>【<%=zcf%>台,<%=round(zcf/zccount*100,2)%>%】" bgcolor="<%=rszt("s_color")%>" align="center"><%if round(zcf/zccount*95,2)>=20 then Response.Write rszt("s_name") & "【" & zcf & "台," & round(zcf/zccount*100,2) & "%】" %></td>
<% rszf.Close
rszt.movenext
loop
%>
</tr>
<tr>
<td class="classtd" height="20" colspan="<%=rszt.recordcount%>">图例:
<%
rszt.movefirst
do while not rszt.eof
sqlzcf="select * from sbxx where sbcs='" & rszt("s_name") &"'"
rszf.Open sqlzcf, conn, 1, 1
zcf=rszf.recordcount
%>
<font color="<%=rszt("s_color")%>"><%=rszt("s_name")%></font>
<% rszf.Close
rszt.movenext
loop
%></td>
</tr>
</tbody>
<%rszt.Close
set rszt=nothing
%>
</table>
<br>
<table border="0" cellspacing="0" bgcolor="#FFFFFF" align="center" width="100%">
<%
set rszt=server.CreateObject("adodb.recordset")
sqlzt="select * from admin_shiyongdanwei order by y_paixu asc"
rszt.Open sqlzt, conn, 1, 1
%>
<tbody>
<tr>
<td rowspan="2" align="center" valign="middle" class="classtd" width="5%">公司</td>
<%
set rszc=server.CreateObject("adodb.recordset")
sqlzc="select * from sbxx"
rszc.Open sqlzc, conn, 1, 1
zccount=rszc.recordcount
rszc.Close
do while not rszt.eof
set rszf=server.CreateObject("adodb.recordset")
sqlzcf="select * from sbxx where ssbm='" & rszt("y_name") &"'"
rszf.Open sqlzcf, conn, 1, 1
zcf=rszf.recordcount
%>
<td height="20" width="<%=round(zcf/zccount*95,2)%>%" nowrap="nowrap" title="<%=rszt("y_name")%>【<%=zcf%>台,<%=round(zcf/zccount*100,2)%>%】" bgcolor="<%=rszt("y_color")%>" align="center"><%if round(zcf/zccount*95,2)>=20 then Response.Write rszt("y_name") & "【" & zcf & "台," & round(zcf/zccount*100,2) & "%】" %></td>
<% rszf.Close
rszt.movenext
loop
%>
</tr>
<tr>
<td class="classtd" height="20" colspan="<%=rszt.recordcount%>">图例:
<%
rszt.movefirst
do while not rszt.eof
sqlzcf="select * from sbxx where ssbm='" & rszt("y_name") &"'"
rszf.Open sqlzcf, conn, 1, 1
zcf=rszf.recordcount
%>
<font color="<%=rszt("y_color")%>"><%=rszt("y_name")%></font>
<% rszf.Close
rszt.movenext
loop
%></td>
</tr>
</tbody>
<%rszt.Close
set rszt=nothing
%>
</table></td>
</tr>
<% end if
if Instr(session("juese"),"|502,")<>0 then %>
<tr>
<%
set rsyh=server.CreateObject("adodb.recordset")
sqlyh="select * from admin_yuangong"
rsyh.Open sqlyh, conn, 1, 1
yhcount=rsyh.recordcount
rsyh.Close
%>
<td width="5%" align="center" class="classtd"><p> </p></td>
<td width="95%" class="classtd"> </td>
</tr>
<tr>
<td align="center" class="classtd"><p>员工</p>
<p><%=yhcount%>人</p></td>
<td class="classtd"><table border="0" cellspacing="0" bgcolor="#FFFFFF" align="center" width="100%">
<tbody>
<tr>
<td rowspan="2" align="center" valign="middle" class="classtd" width="5%">性别</td>
<%
set rsyg=server.CreateObject("adodb.recordset")
sqlyg="select * from admin_yuangong"
rsyg.Open sqlyg, conn, 1, 1
ygcount=rsyg.Recordcount
rsyg.Close
set rsfyg=server.CreateObject("adodb.recordset")
sqlzyg="select * from admin_yuangong where left(right(idcard,2),1) mod 2 <> 0"
rsfyg.Open sqlzyg, conn, 1, 1
fyg=rsfyg.recordcount
rsfyg.Close
sqlzyg="select * from admin_yuangong where left(right(idcard,2),1) mod 2 = 0"
rsfyg.Open sqlzyg, conn, 1, 1
fyg2=rsfyg.recordcount
%>
<td width="<%=round(fyg/ygcount*95,2)%>%" height="20" align="center" nowrap="nowrap" bgcolor="#00C3FF" title="男【<%=fyg%>人,<%=round(fyg/ygcount*100,2)%>%】"><%if round(fyg/ygcount*95,2)>=20 then Response.Write "男【" & fyg & "人," & round(fyg/ygcount*100,2) & "%】" %></td>
<td width="<%=round(fyg2/ygcount*95,2)%>%" height="20" align="center" nowrap="nowrap" bgcolor="#FF5070" title="女【<%=fyg2%>人,<%=round(fyg2/ygcount*100,2)%>%】"><%if round(fyg2/ygcount*95,2)>=20 then Response.Write "女【" & fyg2 & "人," & round(fyg2/ygcount*100,2) & "%】" %></td>
<% rszyg.Close %>
</tr>
<tr>
<td class="classtd" height="21" colspan="2">图例: <font color="#00C3FF">男</font> <font color="#FF5070">女</font></td>
</tr>
</tbody>
<%rszt.Close
set rszt=nothing
%>
</table>
<br>
<table border="0" cellspacing="1" bgcolor="#FFFFFF" align="center" width="100%">
<%
set rszt=server.CreateObject("adodb.recordset")
sqlzt="select * from admin_shiyongdanwei order by y_paixu asc"
rszt.Open sqlzt, conn, 1, 1
%>
<tbody>
<tr>
<td rowspan="2" align="center" valign="middle" class="classtd" width="5%">公司</td>
<%
set rsyg=server.CreateObject("adodb.recordset")
sqlyg="select * from admin_yuangong"
rsyg.Open sqlyg, conn, 1, 1
ygcount=rsyg.Recordcount
rsyg.Close
do while not rszt.eof
set rsfyg=server.CreateObject("adodb.recordset")
sqlzyg="select * from admin_yuangong where company='" & rszt("y_name") &"'"
rsfyg.Open sqlzyg, conn, 1, 1
fyg=rsfyg.recordcount
%>
<td height="20" width="<%=round(fyg/ygcount*95,2)%>%" nowrap="nowrap" title="<%=rszt("y_name")%>【<%=fyg%>人,<%=round(fyg/ygcount*100,2)%>%】" bgcolor="<%=rszt("y_color")%>" align="center"><%if round(fyg/ygcount*95,2)>=20 then Response.Write rszt("y_name") & "【" & fyg & "人," & round(fyg/ygcount*100,2) & "%】" %></td>
<% rszyg.Close
rszt.movenext
loop
%>
</tr>
<tr>
<td class="classtd" height="21" colspan="<%=rszt.Recordcount%>">图例:
<%
rszt.movefirst
do while not rszt.eof
sqlzyg="select * from sbxx where ssbm='" & rszt("y_name") &"'"
rsfyg.Open sqlzyg, conn, 1, 1
fyg=rsfyg.recordcount
%>
<font color="<%=rszt("y_color")%>"><%=rszt("y_name")%></font>
<% rszyg.Close
rszt.movenext
loop
%></td>
</tr>
<% end if %>
</tbody>
<%rszt.Close
set rszt=nothing
%>
</table>
</td>
</tr>
<%
mystr=split(session("rank"),", ")
for i=0 to ubound(mystr)
rk = "ssbm='" & mystr(i) & "' or " + rk
next
rk =rk & " False"
sqlpdaa="and ssbm='" & session("rank") & "'"
set rspda=server.CreateObject("adodb.recordset")
sqlpda="select * from sbxx where zt<>'报废' and (" & rk & ")"
rspda.Open sqlpda, conn, 1, 1
pdz=rspda.recordcount
set rspds=server.CreateObject("adodb.recordset")
sqlpd="select * from setting"
rspds.Open sqlpd, conn, 1, 1
if rspds("pd") and Instr(session("juese"),"|108,")<>0 then
%>
<tr>
<td align="center" class="classtd"> </td>
<td class="classtd"> </td>
</tr>
<tr>
<td align="center" class="classtd"><p>盘点</p>
<p><%=pdz%>台</p></td>
<td class="classtd">
<table border="0" cellspacing="1" bgcolor="#FFFFFF" align="center" width="100%">
<tbody>
<%
rspda.Close
sqlpd9="select * from sbxx where zt<>'报废' and pdzt=0 and (" & rk & ")"
rspda.Open sqlpd9, conn, 1, 1
pd9=rspda.recordcount
rspda.Close
sqlpd1="select * from sbxx where zt<>'报废' and pdzt=1 and (" & rk & ")"
rspda.Open sqlpd1, conn, 1, 1
pd1=rspda.recordcount
rspda.Close
sqlpd2="select * from sbxx where zt<>'报废' and pdzt=2 and (" & rk & ")"
rspda.Open sqlpd2, conn, 1, 1
pd2=rspda.recordcount
rspda.Close
sqlpd3="select * from sbxx where zt<>'报废' and pdzt=3 and (" & rk & ")"
rspda.Open sqlpd3, conn, 1, 1
pd3=rspda.recordcount
rspda.Close
if pd9>0 then
%>
<tr>
<td align="center" colspan="4" bgcolor="#FFFFFF">
<marquee onMouseOut="this.start()" onMouseOver="this.stop()" behavior="alternate" scrollamount="10"><font color="red"><B>注意:还有<%=pd9%>台未盘点资产,请检查!</B></font></marquee>
</td>
</tr>
<%end if%>
<tr>
<td width="<%=round(pd9/pdz*100,2)%>%" height="20" align="center" nowrap="nowrap" bgcolor="#CCCCCC" title="未盘点【<%=pd9%>台,<%=round(pd9/pdz*100,2)%>%】"><%if round(pd9/pdz*100,2)>=20 then Response.Write "未盘点【" & pd9 & "台," & round(pd9/pdz*100,2) & "%】" %></td>
<td width="<%=round(pd1/pdz*100,2)%>%" height="20" align="center" nowrap="nowrap" bgcolor="Green" title="正常【<%=pd1%>台,<%=round(pd1/pdz*100,2)%>%】"><%if round(pd1/pdz*100,2)>=20 then Response.Write "正常【" & pd1 & "台," & round(pd1/pdz*100,2) & "%】" %></td>
<td width="<%=round(pd2/pdz*100,2)%>%" height="20" align="center" nowrap="nowrap" bgcolor="Blue" title="盘盈【<%=pd2%>台,<%=round(pd2/pdz*100,2)%>%】"><%if round(pd2/pdz*100,2)>=20 then Response.Write "盘盈【" & pd2 & "台," & round(pd2/pdz*100,2) & "%】" %></td>
<td width="<%=round(pd3/pdz*100,2)%>%" height="20" align="center" nowrap="nowrap" bgcolor="Red" title="盘亏【<%=pd3%>台,<%=round(pd3/pdz*100,2)%>%】"><%if round(pd3/pdz*100,2)>=20 then Response.Write "盘亏【" & pd3 & "台," & round(pd3/pdz*100,2) & "%】" %></td>
<% rszyg.Close %>
</tr>
<tr>
<td class="classtd" height="21" colspan="4">图例: <strong>未盘点</strong><%=pd9%> <font color="Green"><strong>正常</strong></font><%=pd1%> <font color=blue><strong>盘盈</strong></font><%=pd2%> <font color=red><strong>盘亏</strong></font><%=pd3%></td>
</tr>
</tbody>
<%rszt.Close
set rszt=nothing
%>
</table></td>
</tr>
</tbody>
<%end if%>
</table>
</body>
<%else%>
<!--#include file="inc/quanxian.asp"-->
<%end if%>