📄 spoilmerch.jsp
字号:
<%@ page language="java" pageEncoding="GB2312" %>
<html>
<head>
<script src="/supermarket/comm/Calendar.js"></script>
<title>无标题文档</title>
<style>
td{font-family:Tahoma;font-size:15px;}
a{text-decoration:none;}
a:hover{text-decoration:underline;}
</style>
<script language="JavaScript">
function numberOnly(){
if (!((event.keyCode>=48)&&(event.keyCode<=57))||(event.keyCode==8)||(event.keyCode==10)||(event.keyCode==13))
event.returnValue=false;
if((event.shiftKey)&&((event.keyCode>=48)&&(event.keyCode<=57))) event.returnValue=false;
}
</script>
<%
response.setHeader("Cache-Control","no-cache"); //Forces caches to obtain a new copy of the page from the origin server
response.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
response.setHeader("Pragma","no-cache"); //HTTP 1.0 backward compatibility
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
background-image: url(../../image/backgrounds.jpg);
}
-->
</style></head>
<body text="#666666">
<div id="Layer1" style="position:absolute; left:66px; top:15px; width:450px; height:305px; z-index:1">
<table width="440" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><img src="../../image/obj_sba1.gif" width="25" height="25"></td>
<td width="81"><img src="../../image/obj_sba_topics.gif" width="81" height="25"></td>
<td width="319"><img src="../../image/obj_sba2.gif" width="339" height="25"></td>
<td width="15"><img src="../../image/obj_sba3.gif" width="15" height="25"></td>
</tr>
</table>
<form action="StorageServlet" method="POST" name="form1" id="form1">
<table width="564" border="0" style="">
登记需要报损的商品:<P>
商品编号:<input type="text" name="MerchID" maxlength="6" size="10" value="" onKeyPress="numberOnly()" onkeyup="value=value.replace(/[^\d]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));">
报损数量:<input type="text" name="SpoilNum" maxlength="4" size="10" value="" onKeyPress="numberOnly()" onkeyup="value=value.replace(/[^\d]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));"><P>
登记日期:<input type="text" name="RegDate" size="10" value="" onClick="setDay(this);" readonly>
报损原因:<input type="text" name="SpoilageCause" size="10" value="" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"><P>
<input type="submit" value="登记" onclick='form1.action.value="spoilReg";'>
<input type="submit" value="查询" onclick='form1.action.value="searchSpoil";'><input type="hidden" value="" name="action">
</table>
</form>
<%
String success = (String) request.getAttribute("success");
if ("spoilRegsuccess".equals(success)) {
%>
<script language="javascript">
alert("登记报损商品成功");
</script>
<%
request.removeAttribute("success");
} else if ("spoilRegnull".equals(success)) {
%>
<script language="javascript">
alert("商品编号,报损数量以及登记日期不能为空!");
</script>
<%
request.removeAttribute("success");
} else if ("searchSpoilfailue".equals(success)) {
%>
<script language="javascript">
alert("当前没有损坏的商品!");
</script>
<%
request.removeAttribute("success");
} else if ("spoilRegfailue".equals(success)) {
%>
<script language="javascript">
alert("不存在要报损的商品或报损数量不对!");
</script>
<%
request.removeAttribute("success");
} else if ("updateSpoilsuccess".equals(success)) {
%>
<script language="javascript">
alert("报损商品修改成功!");
</script>
<%
request.removeAttribute("success");
} else if ("deleteSpoilsuccess".equals(success)) {
%>
<script language="javascript">
alert("报损的商品删除成功!");
</script>
<%
request.removeAttribute("success");
} else if ("deletespoilDate".equals(success)) {
%>
<script language="javascript">
alert("无法修改,只能修改当天登记的商品!");
</script>
<%
request.removeAttribute("success");
}
%>
<table width="440" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><img src="../../image/obj_sba1.gif" width="25" height="25"></td>
<td width="81"><img src="../../image/obj_sba_topics.gif" width="81" height="25"></td>
<td width="319"><img src="../../image/obj_sba2.gif" width="339" height="25"></td>
<td width="15"><img src="../../image/obj_sba3.gif" width="15" height="25"></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -