charge_ok.jsp

来自「java医院应用包含门诊挂号收费住院等应用比较好用」· JSP 代码 · 共 68 行

JSP
68
字号
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.util.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<table width="75%" border="0" align="center">
  <tr bgcolor="#9CCFFF"> 
    <td><font size="2">挂号编号</font></td>
    <td><font size="2">药品编号</font></td>
    <td><font size="2">单价</font></td>
    <td><font size="2">数量</font></td>
    <td><font size="2">金额</font></td>
  </tr>
  <%
  	ResultSet rs=(ResultSet)session.getAttribute("res");
	double price=0.0;
  	while(rs.next()){
	price=price+rs.getDouble("price");
  %>
  <tr bgcolor="#9CCFFF"> 
    <td><%=rs.getString("regid")%></td>
    <td><%=rs.getString("drugid")%></td>
    <td><%=rs.getDouble("uprice")%></td>
    <td><%=rs.getInt("num")%></td>
    <td><%=rs.getDouble("price")%></td>
  </tr>
  <%}%>
</table>
<p>&nbsp;</p>
<form name="form1" method="post" action="/servlet/Charge">
  <table width="75%" border="0" align="center">
    <tr bgcolor="#9CCFFF"> 
      <td><font size="2">收费编号</font></td>
      <td> 
        <input name="chargeid" type="text" id="chargeid"></td>
    </tr>
    <tr bgcolor="#9CCFFF"> 
      <td><font size="2">挂号编号</font></td>
      <td> 
        <input name="regid" type="text" id="regid"></td>
    </tr>
    <tr bgcolor="#9CCFFF"> 
      <td><font size="2">收费员姓名</font></td>
      <td> 
        <input name="name" type="text" id="name"></td>
    </tr>
    <tr bgcolor="#9CCFFF"> 
      <td><font size="2">收费金额</font></td>
      <td> 
        <input name="money" type="text" id="money" value="<%out.print(price);%>">
        <font size="2">元</font></td>
    </tr>
    <tr> 
      <td colspan="2" bgcolor="#9CCFFF">
<div align="center"> 
          <input type="submit" name="Submit" value="提交">
          <input type="reset" name="Submit2" value="重置">
        </div></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

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