📄 sells_record.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:directive.page import="com.captainli.struts.form.LoginForm"/>
<jsp:directive.page import="java.text.SimpleDateFormat"/>
<jsp:directive.page import="com.captainli.dboperation.WarehouseDA"/>
<jsp:directive.page import="com.captainli.util.VerComData"/>
<jsp:directive.page import="com.captainli.dboperation.VercomDA"/>
<jsp:directive.page import="com.captainli.bean.WarehouseBean"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'sells_record.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="../css/sys.css">
<style type="text/css">
<!--
body {
margin-left: 5px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
background-color: #FFFFFF;
}
a:link {
color: #1A438E;
text-decoration: underline;
}
a:visited {
text-decoration: underline;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: underline;
}
.style1 { color: #1A438E;
font-size: 12px;
}
.style2 { color:#FF0000;
font-size: 12px;
}
</style>
<script language="javascript" type="text/javascript">
function loadCalendar(obj){//日期选择
//var rtn = window.open("../utilPages/calendar.jsp","","directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=170,top=180,left=550");
var rtn = window.showModalDialog("../utilPages/calendar.jsp","","dialogWidth:350px;dialogHeight:185px;status:no;help:no;scrolling=no;scrollbars=no");
if(rtn!=null)
obj.value=rtn;
return;
}
function wsub(){
var wid = document.getElementById("w_id").value;
document.getElementById("sellsrecordframe").src = "sells_record_frame.jsp?w_id="+wid;
}
function pnosub(){
var sno = document.getElementById("s_no").value;
document.getElementById("sellsrecordframe").src = "sells_record_frame.jsp?s_no="+sno;
}
function subtime(){
var start = document.getElementById("startdate").value;
var end = document.getElementById("enddate").value;
if(start == ""){
window.alert("请输入查询开始日期!");
return false;
}
if(end == ""){
window.alert("请输入查询结束日期!");
return false;
}
document.getElementById("sellsrecordframe").src = "sells_record_frame.jsp?start_time="+start+"&end_time="+end+"";
}
function shenhe(){
document.getElementById("sellsrecordframe").src = "sells_recordwite_frame.jsp";
}
function hongchong(){
document.getElementById("sellsrecordframe").src = "sells_recordhongchong_frame.jsp";
}
</script>
</head>
<%
//获得登录者信息
LoginForm form = (LoginForm)session.getAttribute("users");
//日期
String start_time = "";
String end_time = "";
//获得系统时间
Calendar cal=Calendar.getInstance();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
String m_time=sdf.format(cal.getTime());
String nian = m_time.substring(0, 4);
String yue = m_time.substring(5, 7);
String ri = m_time.substring(8, 10);
if(yue.equals("01")){
String start_nian = String.valueOf(Integer.parseInt(nian) - 1);
String start_yue = "12";
String start_ri = "01";
start_time = start_nian + "-" + start_yue + "-" + start_ri;
end_time = m_time;
}else if(ri.equals("01")){
String start_nian = nian;
String start_yue = String.valueOf(Integer.parseInt(yue) - 1);
String start_ri = "01";
start_time = start_nian + "-" + start_yue + "-" + start_ri;
end_time = m_time;
}else{
String start_nian = nian;
String start_yue = yue;
String start_ri = "01";
start_time = start_nian + "-" + start_yue + "-" + start_ri;
end_time = m_time;
}
%>
<%
//仓库下拉列表
ArrayList arryWare = new WarehouseDA().selectWarehouse();
//获得审核权限//获得删除权限(红冲单据)
VerComData dataVer = new VercomDA().selectVerCom(form.getL_username());
%>
<body>
<form action="" method="post" name="form1" id="form1">
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<tr>
<td width="95%" height="21" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="31%"><img src="../images/system/print.jpg" width="36" height="34" align="absmiddle" style="cursor:hand;" onClick="preview();window.close()"></td>
<td width="69%" align="right"><select name="w_id" id="w_id" onChange="wsub()">
<option value="0">--所有仓库--</option>
<%for(int i = 0;i < arryWare.size();i++){ WarehouseBean bean = (WarehouseBean)arryWare.get(i);%>
<option value="<%= bean.getU_id() %>"><%= bean.getU_name() %></option>
<%} %>
</select>
<input type="text" id="s_no" name="s_no" size="20">
<input type="button" value="单据编号查询" class="button" onclick="pnosub()"></td></tr>
<tr>
<td><%if(dataVer.isV_ba()){ %>
<input name="Submit" type="button" class="button" value=" 待审核单据 " onclick="shenhe()">
<%}else{ %>
<%} %>
<%if(dataVer.isV_bb()){ %>
<input name="Submit" type="button" class="button" value=" 冲红单据查询 " onclick="hongchong()">
<%}else{ %>
<%} %></td>
<td align="right">开始日期:
<input name="startdate" id="startdate" readonly value="<%= start_time %>" style="width:100px">
<img src="../images/system/date.gif" width="19" height="19" align="absmiddle" style="cursor:pointer;" onClick="loadCalendar(form1.startdate)"> 结束日期:
<input name="enddate" id="enddate" readonly value="<%= end_time %>" style="width:100px">
<img src="../images/system/date.gif" width="19" height="19" align="absmiddle" style="cursor:pointer;" onClick="loadCalendar(form1.enddate)">
<input type="button" value=" 查询 " class="button" onclick="return subtime()"></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><iframe scrolling='no' width="100%" height="100%" frameborder="0" name="sellsrecordframe" id="sellsrecordframe" src="sells_record_frame.jsp"></iframe></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -