📄 fortune_list.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!--#include file="../../inc/navigate.asp"-->
<%
dim sPageNavigate '分页表格
dim iRecordCount,iMaxPageCount,iPageCount,iCurrentPageIndex,i,sTMP '分页
iMaxPageCount=20 '一页多少行记录
Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
if Submit="删除信息" then
if ChkAdmin("oa_zhichan")=False then
call message("您没有管理固定资产的权限","back")
call endexit()
end if
if blogid="" then
call message("请至少选择一项删除","back")
call EndExit()
end if
bid=split(blogid,",")
for i=0 to ubound(bid)
delsql="delete from oa_fourch where id="&bid(i)&""
conn.execute(delsql)
next
call message("删除成功","fortune_list.asp")
call EndExit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
body,td,th {
font-size: 12px;
}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>
<body>
<form name="form1" method="post" action="fortune_list.asp">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<tr align="right">
<td width="18%" height="25" align="left" bgcolor="#CC0000"><span class="style1"><strong>固定资产管理</strong></span></td>
<td height="25" colspan="6" bgcolor="#CC0000"><input name="Submit" type="button" class="bon" id="Submit" value="资产登记" onClick="window.location.href='Fortune_input.asp'">
<input name="Submit" type="submit" class="bon" id="Submit" value="删除信息">
<input name="Submit3" type="button" class="tabel1" value="返回" onClick="window.history.go(-1)"></td>
</tr>
<tr bgcolor="#F2F2F2">
<td colspan="7" align="right"> </td>
</tr>
<tr bgcolor="#CC6633">
<td height="25" align="center"><span class="style3"> 资产编号</span></td>
<td width="20%" height="25" align="center"><span class="style3"> 资产名称 </span></td>
<td width="17%" align="center"><span class="style1"><strong>规格型号</strong></span></td>
<td width="13%" height="25" align="center"><span class="style3"> 出厂日期</span></td>
<td width="11%" align="center"><span class="style3">资产原值(¥)</span></td>
<td width="11%" height="25" align="center"><span class="style3">折旧后</span></td>
<td width="10%" align="center"><span class="style3">操作
<input name="checkbox" type=checkbox onclick=sel('blogid')>
</span></td>
</tr>
<%
sql="select a.id,a.f_num,a.f_name,a.f_type,a.f_outtime,a.f_oldprice,b.zjl,a.f_ztime from oa_fourch as a inner join oa_zjclass as b on a.f_zjtype=b.id where a.companyid="&session("companyid")
'response.Write(sql)
Call GetCurrentPageIndex() '取得当前页码
set my_rs=server.CreateObject("adodb.recordset")
my_rs.open Sql,conn,1,3
my_rs.PageSize=iMaxPageCount
my_rs.CacheSize =iMaxPageCount
if my_rs.recordCount <> 0 then my_rs.Absolutepage=iCurrentPageIndex
iRecordCount=my_rs.RecordCount '所有查询出来的记录数
iPageCount=my_rs.PageCount '最终多少页
if iCurrentPageIndex>iPageCount then iCurrentPageIndex=iPageCount '控制当前页不得超出范围
sPageNavigate=GetNavigate("fortune_list.asp",iRecordCount,iMaxPageCount,iCurrentPageIndex,true,true,"项") '取得分页表格
if Not my_rs.Eof then
For i = 1 to iMaxPageCount '利用for next 循环依次读出当前页的记录
if my_rs.EOF then Exit For
bgColor="#F8F8F8"
if i mod 2=0 then bgColor="#DFEFFF"
dd=datediff("d",my_rs("f_ztime"),date())'折蒜天数
price_zs=(my_rs(5)*my_rs(6))*dd
price_zs=cint(my_rs(5)-price_zs)
stotal=stotal+price_zs
%>
<tr bgcolor="<%=bgColor%>">
<td height="25" align="center"><%=my_rs(1)%></td>
<td height="25" align="center"><%=my_rs(2)%></td>
<td height="25" align="center"><%=my_rs(3)%></td>
<td height="25" align="center"><%=my_rs(4)%></td>
<td height="25" align="center"><%=my_rs(5)%></td>
<td height="25" align="center"><%=price_zs%></td>
<td height="25" align="center"><a href="Fortune_input.asp?act=edits&id=<%=my_rs(0)%>">修改</a>
<input name="blogid" type="checkbox" id="blogid" value="<%=my_rs(0)%>"></td>
</tr>
<%
my_rs.MoveNext()
Next
End if
my_rs.close
set my_rs=nothing
%>
<tr bgcolor="#F2F2F2">
<td colspan="7" align="right" height="20"><%=sPageNavigate%> </td>
</tr>
<%
total=conn.execute("select sum(f_oldprice) from oa_fourch where companyid="&session("companyid"))(0)
%>
<tr align="left" bgcolor="#CCCC00">
<td height="20" colspan="7" bgcolor="#999999"><span class="style3">总资产:¥<%=total%> | 折旧后总资产:¥<%=stotal%> 折旧资产系统自动计算=原产值-(原产值*折旧率*折旧天数)</span></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -