?? sellview.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%//出庫操作主頁面 %>
<%if(session.getAttribute("code")==null||session.getAttribute("code").equals("0"))
{
%><jsp:forward page="false.jsp"/><%
} %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
int i=1;
if(!session.getAttribute("numrecord").equals("5"))
{
session.setAttribute("numrecord","5");
int n=1;
session.setAttribute("num",n);
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'sellview.jsp' starting page</title>
</head>
<body>
<div align="center"><font size="6" face="華文隸書" color="blue">銷售管理</font>
<hr color="#66FF33">
</div><form action="sellview.do" name="sell" method="POST">
<table>
<tr><td>商品編號:</td><td><input type="text" name="wareid" size="25"></td></tr>
<tr><td>商品名稱:</td><td><input type="text" name="warename" size="25"></td></tr>
<tr><td>出貨日期:</td><td><input type="text" name="year" size="2">年
<input type="text" name="month" size="1">月
<input type="text" name="day" size="1">日</td></tr>
</table>
<input type="hidden" name="flag" value="">
<input type="button" value="查詢" name="sea" style="float: right" onclick="seamethod()">
<br><br>
<table border="1" width="100%" id="table1" bordercolorlight="#FFFFFF" bordercolordark="#C0C0C0">
<tr>
<td bgcolor="#33CC33" align="center">序號</td>
<td bgcolor="#33CC33" align="center">選取</td>
<td bgcolor="#33CC33" align="center">出貨單號</td>
<td bgcolor="#33CC33" align="center">客戶編號</td>
<td bgcolor="#33CC33" align="center">商品編號</td>
<td bgcolor="#33CC33" align="center">商品名稱</td>
<td bgcolor="#33CC33" align="center">規格</td>
<td bgcolor="#33CC33" align="center">單位</td>
<td bgcolor="#33CC33" align="center">單價</td>
<td bgcolor="#33CC33" align="center">出貨日期</td>
<td bgcolor="#33CC33" align="center">出貨數量</td>
<td bgcolor="#33CC33" align="center">金額合計</td>
<td bgcolor="#33CC33" align="center">操作員</td>
</tr>
<logic:present name="infor">
<logic:iterate name="infor" id="sell" scope="request" type="java.util.HashMap">
<tr>
<td align="center"><bean:write name="sell" property="number"/></td>
<td align="center"><input type="checkbox" name="checkfield" value=<bean:write name="sell" property="sell_sellid"/>></td>
<td align="center"><bean:write name="sell" property="sell_sellid"/></td>
<td align="center"><bean:write name="sell" property="sell_clientid"/></td>
<td align="center"><bean:write name="sell" property="sell_wareid"/></td>
<td align="center"><bean:write name="sell" property="sell_warename"/></td>
<td align="center"><bean:write name="sell" property="sell_standard"/></td>
<td align="center"><bean:write name="sell" property="sell_unit"/></td>
<td align="center"><bean:write name="sell" property="sell_rate"/></td>
<td align="center"><bean:write name="sell" property="sell_selldate"/></td>
<td align="center"><bean:write name="sell" property="sell_sellamount"/></td>
<td align="center"><bean:write name="sell" property="sell_moneysum"/></td>
<td align="center"><bean:write name="sell" property="sell_operator"/></td>
</tr>
</logic:iterate>
</logic:present>
</table>
<br>
<table>
<tr><td width="100" align="center"><font face="華文行楷" color="blue" size="5">共<%=session.getAttribute("sumpage") %>頁 </font></td>
<td width="100" align="center"><font face="華文行楷" color="blue" size="5">共<%=session.getAttribute("sumrecord") %>記錄 </font></td>
<td width="100" align="center"><font face="華文行楷" color="blue" size="5">第<%=session.getAttribute("nowpage") %>頁</font></td></tr>
</table>
<input type="button" value="下頁" name="next" style="float:right" onclick="nextmethod()">
<input type="button" value="上頁" name="front" style="float:right" onclick="frontmethod()">
<input type="button" value="刪除" name="del" style="float: right" onclick="delmethod()">
</form>
</body>
</html>
<script language="javascript">
function nextmethod()
{
document.sell.flag.value="next";
document.sell.submit();
}
function frontmethod()
{
document.sell.flag.value="front";
document.sell.submit();
}
function seamethod()
{
var syear=document.sell.year.value;
var smonth=document.sell.month.value;
var sday=document.sell.day.value;
if(isNaN(syear)||isNaN(smonth)||isNaN(sday))
{
alert("日期必須是數字");
return;
}
document.sell.flag.value="sea";
document.sell.submit();
}
function insmethod()
{
document.sell.flag.value="ins";
document.sell.submit();
}
function delmethod()
{
document.sell.flag.value="del";
document.sell.submit();
}
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -