📄 tjyw.asp
字号:
<!--#include file="conn1.asp"-->
<%
sid=request("sid")
fw=request("fw")
if request("dt")<>"" then
dt=request("dt")
else
dt=mid(date(),3)
end if
if sid<>"" then
if request("yw1")<>"" and request("cnt1")<>"" then
yw1=request("yw1")&"("&request("cnt1")&")"&dt
wf1=int(request("m1")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw1") &"','"& request("cnt1") &"','"& dt &"')"
conn.execute sql
if request("yw2")<>"" and request("cnt2")<>"" then
yw1=yw1&","&request("yw2")&"("&request("cnt2")&")"&request("dt")
wf1=wf1+int(request("m2")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw2") &"','"& request("cnt2") &"','"& dt &"')"
conn.execute sql
end if
if request("yw3")<>"" and request("cnt3")<>"" then
yw1=yw1&","&request("yw3")&"("&request("cnt3")&")"&request("dt")
wf1=wf1+int(request("m3")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw3") &"','"& request("cnt3") &"','"& dt &"')"
conn.execute sql
end if
if request("yw4")<>"" and request("cnt4")<>"" then
yw1=yw1&","&request("yw4")&"("&request("cnt4")&")"&request("dt")
wf1=wf1+int(request("m4")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw4") &"','"& request("cnt4") &"','"& dt &"')"
conn.execute sql
end if
if request("yw5")<>"" and request("cnt5")<>"" then
yw1=yw1&","&request("yw5")&"("&request("cnt5")&")"&dt
wf1=wf1+int(request("m5")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw5") &"','"& request("cnt5") &"','"& dt &"')"
conn.execute sql
end if
if request("yw6")<>"" and request("cnt6")<>"" then
yw1=yw1&","&request("yw6")&"("&request("cnt6")&")"&dt
wf1=wf1+int(request("m6")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw6") &"','"& request("cnt6") &"','"& dt &"')"
conn.execute sql
end if
if request("yw7")<>"" and request("cnt7")<>"" then
yw1=yw1&","&request("yw7")&"("&request("cnt7")&")"&dt
wf1=wf1+int(request("m7")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw7") &"','"& request("cnt7") &"','"& dt &"')"
conn.execute sql
end if
if request("yw8")<>"" and request("cnt8")<>"" then
yw1=yw1&","&request("yw8")&"("&request("cnt8")&")"&dt
wf1=wf1+int(request("m8")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw8") &"','"& request("cnt8") &"','"& dt &"')"
conn.execute sql
end if
if request("yw9")<>"" and request("cnt9")<>"" then
yw1=yw1&","&request("yw9")&"("&request("cnt9")&")"&dt
wf1=wf1+int(request("m9")*100)/100
sql="insert into yck (yname,cnt,ydate) values ('"& request("yw9") &"','"& request("cnt9") &"','"& dt &"')"
conn.execute sql
end if
else
yw1=""
wf1=0
end if
if request("m1")<>"" then
sql="select * from helthy where sid='"& sid &"'"
set rs1=conn.execute (sql)
if not rs1.eof then
if rs1("wf")<>"" then
yw1=rs1("wfname")&","&yw1
if rs1("wf")<>" " then
wf1=wf1+int(rs1("wf")*100)/100
end if
sql="update helthy set wfname='"& yw1 &"',wf='"& wf1 &"'where sid='"& sid &"'"
conn.execute sql
end if
else
yw1=yw1
sql="insert into helthy (sid,wfname,wf) values ('"& sid &"','"& yw1 &"','"& wf1 &"')"
conn.execute sql
end if '没有变为数字再加!
else
response.write("<br><br><br><br> 对不起1,请输入药物的金额,否则不能进行准确记录!<br><br><br>")
response.write(" <a href='tjyw.asp?id=")
response.write(sid)
response.write("'>返回</a>")
response.end
end if
response.redirect "sill.asp?id="&sid&"&fw="&fw '返回查询页面!
end if %>
<%
id=request("id")
fw=request("fw")
if id<>"" then
sql="select * from student where id="& id
set rs=conn.execute(sql)
end if 'if id<>""r的end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css">
<title>学生健康档案</title>
<style type="text/css">
<!--
body {
background-color: #d6dff7;
}
.style2 {color: #990000}
-->
</style>
<script language="javascript">
function check(){
if(form1.dt.value==""){
alert("日期不能为空!");
form1.dt.focus;
return false;
}
else {
return true;
}
}
</script>
</head>
<body>
<table width="564" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="564"><br>
</td>
</tr>
<tr>
<td>
<form name="form1" method="post" action="tjyw.asp?sid=<%=rs("id")%>&fw=<%=fw%>" onSubmit="return check()">
-----> 添加药物
<tr>
<td><hr size="1"align="left" noshade></td>
</tr>
<tr>
<td> </td>
</tr>
<%if not rs.eof then %>
<tr>
<td align="center" valign="top">
<table width="581" border="1" cellpadding="0" cellspacing="0" bordercolor="#BFCDF2" align="center">
<tr>
<td width="513" height="32"> 姓 名:
<input name="sname" type="text" id="sname" value="<%=rs("sname")%>">
</td>
</tr>
<%if rs("grade")<>"" then%>
<tr>
<td height="38"> 年 级:
<select name="grade" id="select2">
<option value="学前班" <%if rs("grade")="学前班" then%> selected <%end if%>>学前班</option>
<option value="一年级" <%if rs("grade")="一年级" then%> selected <%end if%>>一年级</option>
<option value="二年级" <%if rs("grade")="二年级" then%> selected <%end if%>>二年级</option>
<option value="三年级" <%if rs("grade")="三年级" then%> selected <%end if%>>三年级</option>
<option value="四年级" <%if rs("grade")="四年级" then%> selected <%end if%>>四年级</option>
<option value="五年级" <%if rs("grade")="五年级" then%> selected <%end if%>>五年级</option>
<option value="六年级" <%if rs("grade")="六年级" then%> selected <%end if%>>六年级</option>
<option value="初一" <%if rs("grade")="初一" then%> selected <%end if%>>初一</option>
<option value="初二" <%if rs("grade")="初二" then%> selected <%end if%>>初二</option>
<option value="初三" <%if rs("grade")="初三" then%> selected <%end if%>>初三</option>
<option value="高一" <%if rs("grade")="高一" then%> selected <%end if%>>高一</option>
<option value="高二" <%if rs("grade")="高二" then%> selected <%end if%>>高二</option>
<option value="高三" <%if rs("grade")="高三" then%> selected <%end if%>>高三</option>
</select>
班 级:
<select name="classes" id="select3">
<option value="一班" <%if rs("classes")="一班" then%> selected <%end if%>>一班</option>
<option value="二班" <%if rs("classes")="二班" then%> selected <%end if%>>二班</option>
<option value="三班" <%if rs("classes")="三班" then%> selected <%end if%>>三班</option>
<option value="四班" <%if rs("classes")="四班" then%> selected <%end if%>>四班</option>
</select>
</td>
</tr>
<%end if%>
<%if rs("bm")<>"" then%>
<tr>
<td height="31"> 部 门:
<input name="bm" type="text" size="10" value="<%=rs("bm")%>">
</td>
</tr>
<tr><% end if %>
<td height="31"> 日 期:
<input name="dt" type="text" size="10">
(请用格式 04-05-06 即为04年5月6日)</td>
</tr>
<tr>
<td align="left" valign="middle" height="38">
药物 1 :
<input name="yw1" type="text" id="yw1" size="15">
数量:
<input name="cnt1" type="text" id="cnt12" size="10">
金额:
<input name="m1" type="text" id="m1" size="5">
元</td>
</tr>
<tr>
<td align="left" valign="middle" height="38"> 药物 2 :
<input name="yw2" type="text" id="yw2" size="15">
数量:
<input name="cnt2" type="text" id="cnt2" size="10">
金额:
<input name="m2" type="text" id="m2" size="5">
元</td>
</tr>
<tr>
<td align="left" valign="middle" height="38"><p> 药物 3 :
<input name="yw3" type="text" id="yw3" size="15">
数量:
<input name="cnt3" type="text" id="cnt3" size="10">
金额:
<input name="m3" type="text" id="m3" size="5">
元
</p> </td>
</tr>
<tr>
<td align="left" valign="middle" height="38"> 药物 4 :
<input name="yw4" type="text" id="yw4" size="15">
数量:
<input name="cnt4" type="text" id="cnt4" size="10">
金额:
<input name="m4" type="text" id="m4" size="5">
元</td>
</tr>
<tr>
<td align="left" valign="middle" height="38"><p> 药物 5 :
<input name="yw5" type="text" id="yw5" size="15">
数量:
<input name="cnt5" type="text" id="cnt5" size="10">
金额:
<input name="m5" type="text" id="m5" size="5">
元
</p> </td>
</tr>
<tr>
<td align="left" valign="middle" height="38"> 药物 6 :
<input name="yw6" type="text" id="yw111" size="15">
数量:
<input name="cnt6" type="text" id="cnt17" size="10">
金额:
<input name="m6" type="text" id="m17" size="5">
元</td>
</tr>
<tr>
<td align="left" valign="middle" height="38"> 药物 7 :
<input name="yw7" type="text" id="yw17" size="15">
数量:
<input name="cnt7" type="text" id="cnt7" size="10">
金额:
<input name="m7" type="text" id="m7" size="5">
元</td>
</tr>
<tr>
<td align="left" valign="middle" height="38"> 药物 8 :
<input name="yw8" type="text" id="yw18" size="15">
数量:
<input name="cnt8" type="text" id="cnt8" size="10">
金额:
<input name="m8" type="text" id="m8" size="5">
元</td>
</tr>
<tr>
<td align="left" valign="middle" height="38"> 药物 9 :
<input name="yw9" type="text" id="yw19" size="15">
数量:
<input name="cnt9" type="text" id="cnt9" size="10">
金额:
<input name="m9" type="text" id="m9" size="5">
元</td>
</tr>
<tr>
<td align="center" valign="middle" height="38"><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</td></table>
<%else%> </tr></form>
<tr>
<td align="center" valign="top">对不起你的输入有误!</td>
</tr><%end if%>
<tr>
<td height="43" align="center"> </td>
</tr>
<tr>
<td align="center"><!--#include file="foot.asp"--></td>
</tr></table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -