⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fortune_input.asp

📁 网络办公系统源码
💻 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;
}
.style2 {color: #CC0000}
-->
</style>
</head>
<%
act=request.QueryString("act")
id=replace(trim(request("id")),"'","")
companyid=session("companyid")
f_num=replace(trim(request.Form("f_num")),"'","")
f_name=trim(request.Form("f_name"))
f_type=replace(trim(request.Form("f_type")),"'","")
f_made=replace(trim(request.Form("f_made")),"'","")
f_class=trim(request.Form("f_class"))
f_outtime=replace(trim(request.Form("f_outtime")),"'","")
f_buytime=replace(trim(request.Form("f_buytime")),"'","")
f_zjtype=replace(trim(request.Form("f_zjtype")),"'","")

f_oldprice=replace(trim(request.Form("f_oldprice")),"'","")
f_lessprice=trim(request.Form("f_lessprice"))
f_ztime=replace(trim(request.Form("f_ztime")),"'","")
f_bname=replace(trim(request.Form("f_bname")),"'","")
f_dname=replace(trim(request.Form("f_dname")),"'","")
f_dtime=replace(trim(request.Form("f_dtime")),"'","")
f_txt=replace(trim(request.Form("f_txt")),"'","")

insql="insert into oa_fourch(f_num,f_name,f_type,f_made,f_class,f_outtime,f_buytime,f_zjtype,f_oldprice,f_lessprice,f_ztime,f_bname,f_dname,f_dtime,f_txt,companyid) "& _
"values('"&f_num&"','"&f_name&"','"&f_type&"','"&f_made&"',"&f_class&",'"&f_outtime&"','"&f_buytime&"',"&f_zjtype&","&f_oldprice&","&f_lessprice&",'"&f_ztime&"','"&f_bname&"','"&f_dname&"','"&f_dtime&"','"&f_txt&"',"&companyid&")"

upsql="update oa_fourch set "&_
"f_num='"&f_num&"',"&_
"f_name='"&f_name&"',"&_
"f_type='"&f_type&"',"&_
"f_made='"&f_made&"',"&_
"f_class="&f_class&","&_
"f_outtime='"&f_outtime&"',"&_
"f_buytime='"&f_buytime&"',"&_
"f_zjtype="&f_zjtype&","&_
"f_oldprice="&f_oldprice&","&_
"f_lessprice="&f_lessprice&","&_
"f_ztime='"&f_ztime&"',"&_
"f_bname='"&f_bname&"',"&_
"f_dname='"&f_dname&"',"&_
"f_dtime='"&f_dtime&"',"&_
"f_txt='"&f_txt&"'"&_

" where id="&request.Form("ids")

	if act="add" then
		conn.execute(insql)
		call Message("发布成功","Fortune_list.asp")
	elseif act="edit" then
		conn.execute(upsql)
		call Message("修改成功","Fortune_list.asp")
	END IF	
%>
<body>
<%if act="" then%>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <form name="myform" method="post" action="fortune_input.asp?act=add" onSubmit="return CheckForm();">
  <tr align="center">
    <td height="25" colspan="2" bgcolor="#CC0000"><span class="style1">资产登记</span></td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td width="13%" height="25" align="center"> <strong><img src="../img/item_point.gif" width="4" height="7"> <B>基本信息</B></strong></td>
    <td width="87%" height="25" align="left">&nbsp;</td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 资产编号</td>
    <td height="25" align="left"><input name="f_num" type="text" class="tabel1" id="f_num" size="40">
      <span class="style2">*</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 资产名称</td>
    <td height="25" align="left"><input name="f_name" type="text" class="tabel1" id="f_name" size="40">
      <span class="style2">*</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 规格型号</td>
    <td height="25" align="left"><input name="f_type" type="text" class="tabel1" id="f_type" size="40">
      <span class="style2">*</span> </td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">制造厂商</td>
    <td height="25" align="left"><input name="f_made" type="text" class="tabel1" id="f_made" size="40"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">资产性质</td>
    <td height="25" align="left"><select name="f_class" id="f_class">
      <option value="">选择类别</option>
      <%
	  	sql="select id, classname from oa_fourchclass where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
      <option value="<%=rs("id")%>"><%=rs("classname")%></option>
      <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
    </select></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">出厂日期</td>
    <td height="25" align="left"><input name="f_outtime" type="text" class="tabel1" id="buytime2" value="<%=date()%>" onFocus="setday(this)"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">购买日期</td>
    <td height="25" align="left"><input name="f_buytime" type="text" class="tabel1" id="buytime22" value="<%=date()%>" onFocus="setday(this)"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">折旧类型</td>
    <td height="25" align="left"><select name="f_zjtype" id="select3">
      <option value="">选择类别</option>
      <%
	  	sql="select id,classname,zjl,zjq from oa_zjclass where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
      <option value="<%=rs("id")%>"><%=rs("classname")%>【折旧率:<%=rs("zjl")%>%】</option>
      <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
    </select></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">资产原值</td>
    <td height="25" align="left"><input name="f_oldprice" type="text" class="tabel1" id="f_oldprice" value="0">
¥</td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">资产最低值</td>
    <td height="25" align="left"><input name="f_lessprice" type="text" class="tabel1" id="f_lessprice" value="0">
¥</td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">开始折旧日期</td>
    <td height="25" align="left"><input name="f_ztime" type="text" class="tabel1" id="f_buytime" value="<%=date()%>" onFocus="setday(this)"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">保管人</td>
    <td height="25" align="left"><input name="f_bname" type="text" class="tabel1" id="price4"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">登记人</td>
    <td height="25" align="left"><input name="f_dname" type="text" class="tabel1" id="f_dname" value="<%=session("truename")%>">
      </td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">登记日期</td>
    <td height="25" align="left"><input name="f_dtime" type="text" class="tabel1" id="buytime" value="<%=date()%>" onFocus="setday(this)">
      <span class="style2">*</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">备注</td>
    <td height="25" align="left">      <span class="style2">
      <textarea name="f_txt" cols="50" rows="4" class="tabel1" id="f_txt"></textarea>
      </span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">&nbsp;</td>
    <td height="25" align="left"><input name="Submit2" type="submit" class="bon" value="添加">
 
  <input name="Submit3" type="reset" class="bon" value="重置">
  <span class="style1"><font style="font-size:15px ">  
  <input name="Submit" type="button" class="bon" value="返回" onClick="window.history.go(-1)">
  </font></span></td>
  </tr></form>
</table>
<%
elseif act="edits" then
sqle="select a.*,b.zjl,b.classname as bname,c.classname as cname from oa_fourch as a inner join oa_zjclass as b on a.f_zjtype=b.id inner join oa_fourchclass as c on c.id=a.f_class  where a.id="&id
set rs=conn.execute(sqle)
if not rs.eof then
	f_num1=trim(rs("f_num"))
 	f_name1=trim(rs("f_name"))
 	f_type1=trim(rs("f_type")) 
 	f_made1=trim(rs("f_made"))
 	f_class1=trim(rs("f_class"))
 	f_outtime1=trim(rs("f_outtime"))
 	f_buytime1=trim(rs("f_buytime"))
 	f_zjtype1=trim(rs("f_zjtype")) 
 	f_oldprice1=trim(rs("f_oldprice"))
	f_lessprice1=trim(rs("f_lessprice"))
  	f_ztime1=trim(rs("f_ztime"))
  	f_bname1=trim(rs("f_bname"))
  	f_dname1=trim(rs("f_dname"))
  	f_dtime1=trim(rs("f_dtime"))
  	f_txt1=trim(rs("f_txt"))
	f_cname=trim(rs("cname"))
	f_bname=trim(rs("bname"))
end if
rs.close
set rs=nothing

%>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <form name="myform" method="post" action="fortune_input.asp?act=edit" onSubmit="return CheckForm();">
    <tr align="center">
      <td height="25" colspan="2" bgcolor="#CC0000"><span class="style1">资产修改</span></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td width="13%" height="25" align="center"> <strong><img src="../img/item_point.gif" width="4" height="7"> <B>基本信息</B></strong></td>
      <td width="87%" height="25" align="left">&nbsp;</td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center"> 资产编号</td>
      <td height="25" align="left"><input name="f_num" type="text" class="tabel1" id="f_num3" size="40" value="<%=f_num1%>">
          <span class="style2">*</span></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center"> 资产名称</td>
      <td height="25" align="left"><input name="f_name" type="text" class="tabel1" id="f_name" size="40" value="<%=f_name1%>">
          <span class="style2">*</span></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center"> 规格型号</td>
      <td height="25" align="left"><input name="f_type" type="text" class="tabel1" id="f_type" size="40" value="<%=f_type1%>">
          <span class="style2">*</span> </td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">制造厂商</td>
      <td height="25" align="left"><input name="f_made" type="text" class="tabel1" id="f_made" size="40" value="<%=f_made1%>"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">资产性质</td>
      <td height="25" align="left"><select name="f_class" id="f_class">
	  <option value="<%=f_class1%>" selected><%=f_cname%></option>
          <option value="">选择类别</option>
          <%
	  	sql="select id, classname from oa_fourchclass where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
          <option value="<%=rs("id")%>"><%=rs("classname")%></option>
          <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
      </select></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">出厂日期</td>
      <td height="25" align="left"><input name="f_outtime" type="text" class="tabel1" id="f_outtime" value="<%=f_outtime1%>" onFocus="setday(this)"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">购买日期</td>
      <td height="25" align="left"><input name="f_buytime" type="text" class="tabel1" id="f_buytime" value="<%=f_buytime1%>" onFocus="setday(this)"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">折旧类型</td>
      <td height="25" align="left"><select name="f_zjtype" id="select5">
	   <option value="<%=f_zjtype1%>"><%=f_bname%></option>
          <option value="">选择类别</option>
          <%
	  	sql="select id,classname,zjl,zjq from oa_zjclass where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
          <option value="<%=rs("id")%>"><%=rs("classname")%>【折旧率:<%=rs("zjl")%>%】</option>
          <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
      </select></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">资产原值</td>
      <td height="25" align="left"><input name="f_oldprice" type="text" class="tabel1" id="f_oldprice" value="<%=f_oldprice1%>">
        ¥</td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">资产最低值</td>
      <td height="25" align="left"><input name="f_lessprice" type="text" class="tabel1" id="f_lessprice" value="<%=f_lessprice1%>">
        ¥</td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">开始折旧日期</td>
      <td height="25" align="left"><input name="f_ztime" type="text" class="tabel1" id="f_ztime" value="<%=f_ztime1%>" onFocus="setday(this)"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">保管人</td>
      <td height="25" align="left"><input name="f_bname" type="text" class="tabel1" id="f_bname" value="<%=f_bname1%>"></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">登记人</td>
      <td height="25" align="left"><input name="f_dname" type="text" class="tabel1" id="f_dname" value="<%=f_dname1%>">
      </td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">登记日期</td>
      <td height="25" align="left"><input name="f_dtime" type="text" class="tabel1" id="f_dtime" value="<%=f_dtime1%>" onFocus="setday(this)">
          <span class="style2">*</span></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">备注</td>
      <td height="25" align="left"> <span class="style2">
        <textarea name="f_txt" cols="50" rows="4" class="tabel1" id="f_txt"><%=f_txt1%></textarea>
      </span></td>
    </tr>
    <tr bgcolor="#F9F9F9">
      <td height="25" align="center">&nbsp;</td>
      <td height="25" align="left"><input name="Submit" type="submit" class="bon" id="Submit" value="修改">
         
          <input name="Submit32" type="reset" class="bon" value="重置">
          <span class="style1"><font style="font-size:15px ">  
          <input name="Submit4" type="button" class="bon" value="返回" onClick="window.history.go(-1)">
          <input name="ids" type="hidden" id="ids" value="<%=id%>">
</font></span></td>
    </tr>
  </form>
</table>
<%end if%>
<%
	set conn=nothing
%>
</body>
</html>
<script language="javascript">
function CheckForm()
{
    var objFrm=document.myform;
	if(objFrm.f_num.value=="")
	{
		alert("请选择资产编号!");
		objFrm.f_num.focus();
		return false;
	}
	if(objFrm.f_name.value=="")
	{
		alert("请输入资产名称!");
		objFrm.f_name.focus();
		return false;
	}
	if(objFrm.f_type.value=="")
	{
		alert("请输入规格型号!");
		objFrm.f_type.focus();
		return false;
	}
	return true;

}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -