📄 financetype.asp
字号:
<%@language="vbscript" codepage="936"%>
<%response.buffer = true%>
<%Public HOME_PATH:HOME_PATH = "../"%>
<!--#include file="../db.asp"-->
<!--#include file="../inc/function.asp"-->
<%Public title:title = "财务类别"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><%=title%></title><%
if isLogin = false then
Response.Write viewinfo("Logingo","","")
Response.end
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<link href="<%=HOME_PATH%>css/style.css" rel="stylesheet" type="text/css">
<style>
html{min-width: 776px;}
fieldset {padding:3px;}
</style>
</head>
<body style = 'border-style:none;margin:0px;'>
<div style = 'text-align:center;'>
<table border = '1' cellspacing = '0' cellpadding = '2' borderColorLight="#848284" borderColorDark="#eeeeee" bordercolor="#EFBAEF" style = 'width:100%;border-bottom:0px solid;border-right:0px solid;'/>
<form method='post' action="<%=SELVAR("FN","")%>">
<input type = 'hidden' name = 'Options' value = 'Add'/>
<tr>
<td style = 'height:25px;width:45px;text-align:right;'>序号 </td>
<td style = 'width:100px;'>类别名</td>
<td style = 'width:30px;'>排列</td>
<td style = 'width:50px;'>已有数量</td>
<td style = 'width:auto;'>备注</td>
<td style = 'width:88px;'> </td>
</tr>
<tr>
<td style = 'text-align:right;'>新加 </td>
<td><input type="text" name="ftypeName" style = 'width:100%;' class = 'input'/></td>
<td><input type = 'text' name = 'ftypeArray' style = 'width:100%;' class = 'input'/></td>
<td> </td>
<td><input type = 'text' name = 'ftypeRemark' style = 'width:100%;' class = 'input'/></td>
<td><input type="submit" value = '新添加类别' style = 'width:72px;'></td>
</tr>
</form>
<%
SQL = ("select * From incfinanceType Order By ftypeid Desc")
Rs.Open(SQL),Conn,1,1
if not Rs.eof then
For i = 1 to Rs.RecordCount
ftypeid = Rs("ftypeid")
fTypeName = Rs("ftypeName")
fTypeArray = Rs("ftypeArray")
fTypeRemark = Rs("ftypeRemark")
financeCount = SelectZD("select Count(financeid) from incfinance where ftypeid = " & ftypeid & "",0)
deleteButton = "<input type = 'submit' onclick = ""javascript:formm" & i & ".Options.value = 'delete';return confirm('即将彻底删除类别:(" & ftypeName & ")及与其相关的所有商品记录.\n\n此操作不可撤消.是否继续?');return true;"" value = '删除'/>"
Response.Write"" &_
"<form method = 'post' action='" & SELVAR("FN","") & "' name = 'formm" & i & "'>" &_
"<input name = 'Options' type = 'hidden'/>" & _
"<input name = 'ftypeid' type = 'hidden' value = '" & ftypeid & "'/>" & _
"<tr>" &_
"<td style = 'text-align:right;'>" & ftypeid & " </td>" & _
"<td><input type = 'text' name = 'ATypeName' value = '" & ftypeName & "' style = 'width:100%;' class = 'input'/></td>" & _
"<td><input type = 'text' name = 'ATypeArray' value = '" & ftypeArray & "' style = 'width:100%;' class = 'input'/></td>" & _
"<td style = 'text-align:center;'>" & financeCount & "</td>" &_
"<td><input type = 'text' name = 'ATypeRemark' value = '" & ftypeRemark & "' style = 'width:100%;' class = 'input'/></td>" & _
"<td><input type = 'submit' value = '修改' onclick = ""javascript:formm" & i &".Options.value = 'update';""/>" & deleteButton & "</td>" &_
"</tr>" & _
"</form>"
Rs.movenext
Next
ftypeData = true
else
ftypeData = false
Response.Write"<tr><td colspan = '6' style = 'color:red;text-align:center;'>请先添加一个类别!</td></tr>"
end if
Rs.Close
Function ata(SELExe , oldRequestid , newRequestid)
dim AboutUserTypeArr , AUTUBound , i_AUT
oldRequestid = GetText(oldRequestid,"P","number",1,10,0)
newRequestid = GetText(newRequestid,"P","number",1,10,0)
AboutUserTypeArr = array("stock","sale")
AUTUBound = UBound(AboutUserTypeArr)
Select Case SELExe
Case "U"
Conn.Execute("update adminType set ATypeSelect = " & newRequestid & " where Atypeid = " & oldRequestid & "")
For i_AUT = 0 to AUTUBound
Conn.Execute("update " & AUTUBound(i_AUT) & " set Atypeid = " & newRequestid & " where Atypeid = " & oldRequestid & "")
Next
Case "D"
For i_AUT = 0 to AUTUBound
Conn.Execute(SQL)
Next
End Select
End Function
dim SQLAdd
Select Case trim(Request.Form("Options"))
Case "Add"
SQLAdd = "insert into incfinancetype (ftypeName,ftypeArray,ftypeRemark) values ('" & Replace(GetText("ftypeName","P","Str",1,110,"none"),"'","’") & "' , " & GetText("ftypeArray","P","number",1,10,0) & " , '" & Replace(GetText("ftypeRemark","P","Str",1,1000,"none"),"'","’") & "') "
Conn.Execute(SQLAdd)
Response.Write viewinfo("alertLoca","类别添加成功!",SELVAR("FN",""))
SQL = ""
Case "update"
ftypeid__ = abs(GetText("ftypeid","P","number",1,10,0))
SQL = "update incfinancetype Set ftypeName = '" & Replace(GetText("ftypeName","P","Str",1,110,"none"),"'","’") & "' , ftypeArray = " & GetText("ftypeArray","P","number",1,10,0) & " , ftypeRemark = '" & Replace(GetText("ftypeRemark","P","Str",1,1000,"none"),"'","’") & "' where ftypeid = " & ftypeid__ & ""
Conn.Execute(SQL)
Response.Write viewinfo("alertLoca","主类修改成功!",SELVAR("FN",""))
Case "delete"
ftypeid__ = abs(GetText("ftypeid","P","number",1,10,0))
SQL = "delete from incfinancetype where ftypeid = " & ftypeid__ & ""
SQLList = "delete from incfinance where ftypeid = " & ftypeid__ & ""
Conn.Execute(SQL)
Conn.Execute(SQLList)
Response.Write viewinfo("alertLoca","类别-相关类别信息删除成功!",SELVAR("FN","?"))
Case "AddSub"
dim SELmainid
SELmainid = GetText("ATypeSelect","P","number",1,10,0)
SELmainid = SelectZD("select Atypeid from adminType where Atypeid = " & SELmainid & "","F")
if SELmainid = "F" then
Response.Write viewinfo("alertLoca","不存在的主部门.请重新选择主部门!",SELVAR("FN",""))
Response.end
end if
SQLAdd = "insert into adminType (ATypeName,ATypeArray,ATypeSelect,ATypeRemark) values ('" & Replace(GetText("ATypeName","P","Str",1,110,"none"),"'","’") & "' , " & GetText("ATypeArray","P","number",1,10,0) & " , " & SELmainid & " , '" & Replace(GetText("ATypeRemark","P","Str",1,1000,"none"),"'","’") & "') "
Conn.Execute(SQLAdd)
Response.Write viewinfo("alertLoca","子部门添加成功!",SELVAR("FN",""))
Case "updateSub"
Atypeid__ = abs(GetText("Atypeid","P","number",1,10,0))
SQL = "update adminType Set ATypeName = '" & Replace(GetText("ATypeName","P","Str",1,110,"none"),"'","’") & "' , ATypeArray = " & GetText("ATypeArray","P","number",1,10,0) & " , ATypeSelect = " & GetText("ATypeSelect","P","number",1,10,0) & " , ATypeRemark = '" & Replace(GetText("ATypeRemark","P","Str",1,1000,"none"),"'","’") & "' where Atypeid = " & Atypeid__ & ""
Conn.Execute(SQL)
Response.Write viewinfo("alertLoca","子部门修改成功!",SELVAR("FN",""))
Case "deleteSub"
Atypeid__ = abs(GetText("Atypeid","P","number",1,10,0))
SQL = "delete from adminType where Atypeid = " & Atypeid__ & ""
Conn.Execute(SQL)
Response.Write viewinfo("alertLoca","子部门删除成功!",SELVAR("FN",""))
End Select
ConnClose()
%>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -