📄 fortune_zjclass.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<%
if ChkAdmin("oa_zhichan")=False then
call message("您没有管理资产的权限","back")
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>
<SCRIPT language=JavaScript src="../../inc/meizzDate.js"></SCRIPT>
<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;
font-weight: bold;
}
-->
</style>
</head>
<%
Submit=request.form("Submit")
classname=trim(request.Form("classname"))
zjl=trim(request.Form("zjl"))
zjq=trim(request.Form("zjq"))
'----------------------------------
classname1=trim(request.Form("classname1"))
zjl1=trim(request.Form("zjl1"))
zjq1=trim(request.Form("zjq1"))
'-----------------------------------
tid=replace(request.Form("tid"),"'","")
select case Submit
case "修改"
if not isnumeric(zjl1) then
call message("请输入整数","back")
call exitend()
end if
if cint(zjl1)>100 then
call message("请输入0-100整数","back")
call exitend()
end if
sql="update oa_zjclass set classname='"&classname1&"',zjl="&zjl1&",zjq="&zjq1&" where id="&tid
conn.execute(sql)
response.Write("<script>alert('修改成功');window.location.href='Fortune_zjclass.asp';</script>")
response.End()
case "删除"
sql="delete from oa_zjclass where id="&tid
conn.execute(sql)
response.Write("<script>alert('删除成功');window.location.href='Fortune_zjclass.asp';</script>")
response.End()
case "添加"
if not isnumeric(zjl) then
response.Write("<script>alert('折旧率请输入整数');window.location.href='Fortune_zjclass.asp';</script>")
response.End()
end if
if cint(zjl)>100 then
call message("请输入0-100整数","back")
call exitend()
end if
sql="insert into oa_zjclass(classname,zjl,zjq,companyid) values('"&classname&"',"&zjl&","&zjq&","&session("companyid")&")"
conn.execute(sql)
response.Write("<script>alert('添加成功');window.location.href='Fortune_zjclass.asp';</script>")
response.End()
end select
%>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="table3">
<tr align="center" bgcolor="#CC0000">
<td height="25" colspan="3" class="tabel1" ><span class="style1">折旧分类</span></td>
</tr>
<tr>
<td width="16%" height="25" align="center"> <strong><img src="../img/item_point.gif" width="4" height="7"> 折旧分类</strong></td>
<td width="58%" height="25" align="left"> </td>
<td width="26%" align="left"> </td>
</tr>
<%
sql="select * from oa_zjclass where companyid="&session("companyid")
set rs=conn.execute(sql)
do while not rs.eof
%>
<form name="myform" method="post" action="Fortune_zjclass.asp" >
<tr >
<td height="25" align="center"> 名称</td>
<td height="25" colspan="2" align="left">
<input name="classname1" type="text" class="tabel1" id="classname1" value="<%=trim(rs("classname"))%>">
<input name="zjl1" type="text" class="tabel1" id="zjl1" value="<%=trim(rs("zjl"))%>" size="4">
<input name="zjq1" type="radio" value="1" <%if trim(rs("zjq"))=1 then response.Write("checked")%>>
月折旧
<input type="radio" name="zjq1" value="2" <%if trim(rs("zjq"))=2 then response.Write("checked")%>>
年折旧
<input name="Submit" type="submit" class="tabel1" id="Submit" value="修改">
<input name="tid" type="hidden" id="tid" value="<%=rs("id")%>">
<input name="Submit" type="submit" class="tabel1" id="Submit" value="删除"></td>
</form>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
<tr >
<td height="25" align="center"><strong><img src="../img/item_point.gif" width="4" height="7"> 增加折旧分类</strong></td>
<td height="25" align="left">说明:折旧率请输入小数</td>
<td align="left"> </td>
</tr>
<form name="myform1" method="post" action="Fortune_zjclass.asp" onSubmit="return CheckForm();">
<tr>
<td height="25" align="center"> 分类名称</td>
<td height="25" align="left"><input name="classname" type="text" class="tabel1" id="classname">
<input name="zjl" type="text" class="tabel1" id="zjl" value="0.01" size="4">
<input name="zjq" type="radio" value="1" checked>
月折旧
<input type="radio" name="zjq" value="2">
年折旧 <input name="Submit" type="submit" class="tabel1" id="Submit" value="添加">
<input type="reset" name="Submit2" value="重置"></td>
<td align="left"> </td>
</tr>
</form>
</table>
</body>
</html>
<script language="javascript">
function CheckForm()
{
var objFrm=document.myform1;
if(objFrm.classname.value=="")
{
alert("请输入分类名称!");
objFrm.classname.focus();
return false;
}
return true;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -